Numerical modeling of porous flow in fractured rock and its applications in geothermal energy extraction