An approach to modeling coupled thermal-hydraulic-chemical processes in geothermal systems