Dynamic modelling of geothermal systems