sandlercubics.eos module

Pure-component cubic equations of state and their state calculations

class sandlercubics.eos.CubicEOS(*args, **kwargs)[source]

Bases: ThermodynamicState

Abstract class for all Cubic equations of state.

property A
property B
Cp: float | list[float] | dict[str, float] | None = None

heat capacity data for ideal-gas contributions

property Hvap
Pc: Quantity = None

critical pressure

Pref: Quantity = <Quantity(0.1, 'megapascal')>

reference pressure for ‘absolute’ entropy calculations, in MPa

property Pvap
property Svap
Tc: Quantity = None

critical temperature

Tref: Quantity = <Quantity(298.15, 'kelvin')>

reference temperature for ‘absolute’ internal energy, enthalpy, and entropy calculations

property Tsat
Z: float = None

compressibility factor

property a

van der Waals a parameter, and a cached property. This method should not need to be further overridden in subclasses.

property b
abstract property cubic_coeff

Coefficients of cubic equation for compressibility factor Z. These are equation-of-state specific and must be implemented in subclasses.

property da_dT
delT_adj: Quantity = <Quantity(5.0, 'kelvin')>

temperature adjustment in K for phase calculations when root finding fails at initial T guess

description: str = 'Cubic equations of state'
epsilon: float = 1e-05

fugacity tolerance in phase calculations (Fig. 7.5-1 in Sandler 5th ed)

property f
get_default_unit(field_name: str) Unit[source]

Get the default unit for a given field

property h_departure
logiter: bool = False

flag for logging iterations in phase calculations

property logphi
maxiter: int = 100

maximum iterations in phase calculations

name: str = 'cubic'

Name of the thermodynamic state

omega: float = None

acentricity factor, dimensionless

phase: str = 'unspecified'

strict phase requirement flag; ‘vapor’, ‘liquid’, ‘unspecified’ (multiple roots)

property phi
resolve() bool[source]

Resolve all state variables from the two input variables. This method is called automatically when any property assignment results in a fully specified state. There should never be a situation in which this method is called explicitly; it is only called by __setattr__ or __post_init__.

property s_departure
set_compound(compound: str | Compound)[source]

Set critical properties and Cp data from a compound name.

Parameters:

compound (str | Compound) – Name of the compound to retrieve properties for

transfer_crits_from_compound(compound: Compound = None)[source]

Set critical properties and Cp data from a Compound object.

Parameters:

compound (Compound) – Compound object containing critical properties and Cp data

z_helpers(hV: CubicEOS, hL: CubicEOS)[source]
sandlercubics.eos.vapor_pressure_ambrose_walton(T, Tc, Pc, omega)[source]