pub fn solve_temperature_from_enthalpy(
enthalpy_value: f64,
pressure: f64,
x_nacl: f64,
) -> Result<f64, String>Expand description
Calculate temperature, given composition, pressure and enthalpy
This calculation underlies the pressure-enthalpy flash
Enthalpy is a monotonic function of temperature; a simple bracketing and bisection approach is used where the amount that is bisected is estimated from a limited Newton step, with the derivative estimated from the bracket; a step size limiter of 95% if the bracketed domain is imposed.
§Arguments:
enthalpy_value- enthalpy, J/molpressure- pressure, Pax_nacl- NaCl mole fraction, mol/mol
§Returns
Temperature, K, or an error