feos.eos.State¶
- class feos.eos.State¶
A thermodynamic state at given conditions.
- Parameters:
eos (Eos) – The equation of state to use.
temperature (SINumber, optional) – Temperature.
volume (SINumber, optional) – Volume.
density (SINumber, optional) – Molar density.
partial_density (SIArray1, optional) – Partial molar densities.
total_moles (SINumber, optional) – Total amount of substance (of a mixture).
moles (SIArray1, optional) – Amount of substance for each component.
molefracs (numpy.ndarray[float]) – Molar fraction of each component.
pressure (SINumber, optional) – Pressure.
molar_enthalpy (SINumber, optional) – Molar enthalpy.
molar_entropy (SINumber, optional) – Molar entropy.
molar_internal_energy (SINumber, optional) – Molar internal energy
density_initialization ({'vapor', 'liquid', SINumber, None}, optional) – Method used to initialize density for density iteration. ‘vapor’ and ‘liquid’ are inferred from the maximum density of the equation of state. If no density or keyword is provided, the vapor and liquid phase is tested and, if different, the result with the lower free energy is returned.
initial_temperature (SINumber, optional) – Initial temperature for temperature iteration. Can improve convergence when the state is specified with pressure and molar entropy or enthalpy.
- Returns:
State
- Return type:
state at given conditions
- Raises:
Error – When the state cannot be created using the combination of input.
Methods
__init__
()chemical_potential
(contributions)Return chemical potential of each component.
chemical_potential_contributions
(component, ...)Return chemical potential contributions.
compressibility
(contributions)Return compressibility.
critical_point
(eos[, moles, ...])Create a thermodynamic state at critical conditions.
critical_point_binary
(eos, ...[, ...])Create a thermodynamic state at critical conditions for a binary system.
critical_point_pure
(eos[, ...])Return a list of thermodynamic state at critical conditions for each pure substance in the system.
d2p_drho2
(contributions)Return second partial derivative of pressure w.r.t.
d2p_dv2
(contributions)Return second partial derivative of pressure w.r.t.
dc_v_dt
(contributions)Return derivative of isochoric heat capacity w.r.t.
Return diffusion coefficient via entropy scaling.
Return reference diffusion for entropy scaling.
Return derivative of logarithmic fugacity coefficient w.r.t.
Return derivative of logarithmic fugacity coefficient w.r.t.
Return derivative of logarithmic fugacity coefficient w.r.t.
dmu_dni
(contributions)Return derivative of chemical potential w.r.t amount of substance.
dmu_dt
(contributions)Return derivative of chemical potential w.r.t temperature.
dp_dni
(contributions)Return partial derivative of pressure w.r.t.
dp_drho
(contributions)Return partial derivative of pressure w.r.t.
dp_dt
(contributions)Return partial derivative of pressure w.r.t.
dp_dv
(contributions)Return partial derivative of pressure w.r.t.
ds_dt
(contributions)Return derivative of entropy with respect to temperature.
enthalpy
(contributions)Return enthalpy.
entropy
(contributions)Return entropy.
gibbs_energy
(contributions)Return Gibbs energy.
Return Grueneisen parameter.
helmholtz_energy
(contributions)Return Helmholtz energy.
henrys_law_constant
(eos, temperature, molefracs)Return Henry's law constant of every solute (x_i=0) for a given solvent (x_i>0).
henrys_law_constant_binary
(eos, temperature)Return Henry's law constant of a binary system, assuming the first component is the solute and the second component is the solvent.
internal_energy
(contributions)Return internal energy.
is_stable
([tol, verbosity])Performs a stability analysis and returns whether the state is stable
Return isenthalpic compressibility coefficient.
Return isentropy compressibility coefficient.
Return isothermal compressibility coefficient.
Return Joule Thomson coefficient.
Return logarithmic reduced diffusion.
ln_phi
()Return logarithmic fugacity coefficient.
Return logarithmic fugacity coefficient of all components treated as pure substance at mixture temperature and pressure.
Return logarithmic symmetric activity coefficient.
Return logarithmic reduced thermal conductivity.
Return logarithmic reduced viscosity.
mass
()Returns mass of each component in the system.
Returns system's mass density.
Returns mass fractions for each component.
molar_enthalpy
(contributions)Return molar enthalpy.
molar_entropy
(contributions)Return molar entropy.
molar_gibbs_energy
(contributions)Return molar Gibbs energy.
molar_helmholtz_energy
(contributions)Return molar Helmholtz energy.
molar_internal_energy
(contributions)Return molar internal energy.
molar_isobaric_heat_capacity
(contributions)Return molar isobaric heat capacity.
molar_isochoric_heat_capacity
(contributions)Return molar isochoric heat capacity.
Return partial molar enthalpy of each component.
Return partial molar entropy of each component.
Return partial molar volume of each component.
pressure
(contributions)Return pressure.
Return pressure contributions.
Return residual Helmholtz energy contributions.
specific_enthalpy
(contributions)Return mass specific enthalpy.
specific_entropy
(contributions)Return mass specific entropy.
specific_gibbs_energy
(contributions)Return mass specific gibbs_energy.
specific_helmholtz_energy
(contributions)Return mass specific Helmholtz energy.
specific_internal_energy
(contributions)Return mass specific internal_energy.
specific_isobaric_heat_capacity
(contributions)Return mass specific isobaric heat capacity.
specific_isochoric_heat_capacity
(contributions)Return mass specific isochoric heat capacity.
Return speed of sound.
spinodal
(eos, temperature[, moles, ...])Calculate spinodal states for a given temperature and composition.
stability_analysis
([tol, verbosity])Performs a stability analysis and returns a list of stable candidate states.
Return structure factor.
Return thermal conductivity via entropy scaling.
Return reference thermal conductivity for entropy scaling.
Return thermal expansivity coefficient.
Return thermodynamic factor.
Returns system's total mass.
Return total molar weight.
tp_flash
([initial_state, max_iter, tol, ...])Calculates a two phase Tp-flash with the state as feed.
Return viscosity via entropy scaling.
Return reference viscosity for entropy scaling.
Attributes
density
molefracs
moles
partial_density
temperature
total_moles
volume