Modeling, simulation, and optimization of geothermal energy production from hot sedimentary aquifers