Devices for producing mechanical power from geothermal energy {characterised by the brine or scale treatment, e.g. brine desalination, scale deposit prevention or corrosion-proofing}