Modeling of scale formation and corrosion from geothermal water