Geothermal systems: Principles and case histories