gaspype.equilibrium_hp#
- gaspype.equilibrium_hp(f, h, p=100000.0, t_guess=1000.0)#
Calculate the isobaric equilibrium composition and temperature of a fluid at a given absolute enthalpy and pressure (e.g. for adiabatic reactions)
Enthalpies are referenced like in fluid.get_H (including enthalpy of formation). The enthalpy of a fluid fl at temperature t is therefore fl.get_H(t). Mixing streams, adding heat or calculating the adiabatic flame temperature of a fluid are expressed by the enthalpy argument:
>>> fl_out, t_out = gp.equilibrium_hp(fl1 + fl2, fl1.get_H(t1) + fl2.get_H(t2) + q)
The shapes of f, h and p are broadcast against each other, so multiple equilibria are solved in parallel. Independent of the solver selected by set_solver this function uses the “system of equations” solver.
- Parameters:
h (
float|ndarray[tuple[int,...],dtype[float64]]) – Absolute enthalpy in Jp (
float|ndarray[tuple[int,...],dtype[float64]]) – Pressure in Pascalt_guess (
float|ndarray[tuple[int,...],dtype[float64]]) – Start value of the temperature iteration in Kelvin
- Return type:
tuple[fluid,ndarray[tuple[int,...],dtype[float64]]]- Returns:
Tuple of a new fluid object with the equilibrium composition and the equilibrium temperatures in Kelvin. Composition and temperature are nan if the temperature is outside of the temperature range of the fluid system (t_min and t_max of fluid_system).