Dynamic simulation of a geothermal reservoir