Viscosity of magmatic liquids: A model