Geothermal energy extraction in CO2 rich basin using abandoned horizontal wells