An Advanced Hydraulic-Thermal Model For Drilling & Control Of Geothermal Wells