pressure_spline_error
despasito.thermodynamics.calc.pressure_spline_error
- pressure_spline_error(rho, Pset, T, xi, Eos)[source]
Calculate difference between set point pressure and computed pressure for a given density.
Used to ensure an accurate value from the EOS rather than an estimate from a spline.
- Parameters:
rho (float) – [mol/\(m^3\)] Density of system
Pset (float) – [Pa] Guess in pressure of the system
T (float) – [K] Temperature of the system
xi (numpy.ndarray) – Mole fraction of each component, sum(xi) should equal 1.0
Eos (obj) – An instance of the defined EOS class to be used in thermodynamic computations.
- Returns:
pressure_spline_error – [Pa] Difference in set pressure and predicted pressure given system conditions.
- Return type:
float