Gravity-driven flow of Herschel-Bulkley fluid in a fracture and in a 2D porous medium