ccp.State

Contents

ccp.State#

class ccp.State(*args, **kwargs)#

A thermodynamic state.

This class is inherited from CP.AbstractState. Some extra functionality has been added.

Creates a state from fluid composition and two properties. Properties can be floats (SI units are considered) or pint quantities.

Parameters:
pfloat, pint.Quantity

Pressure

Tfloat, pint.Quantity

Temperature

hfloat, pint.Quantity

Enthalpy

sfloat, pint.Quantity

Entropy

rhofloat, pint.Quantity

Specific mass

fluiddict

Dictionary with constituent and composition (mole fraction). (e.g.: fluid={‘Oxygen’: 0.2096, ‘Nitrogen’: 0.7812, ‘Argon’: 0.0092})

EOSstr, optional

String with REFPROP, HEOS, PR or SRK. Default is set in ccp.config.EOS

phasestr, optional

String with phase information. Options are: - “liquid” - “gas” - “two_phase” - “supercritical_liquid” - “supercritical_gas” - “supercritical” Default is None, in this case REFPROP/CoolProp will determine the phase. The phase calculation may require a non-trivial flash calculation which can be computationally expensive.

Returns:
stateccp.State

Examples

>>> import ccp
>>> Q_ = ccp.Q_
>>> fluid = {'Oxygen': 0.2096, 'Nitrogen': 0.7812, 'Argon': 0.0092}
>>> s = ccp.State(p=101008, T=273, fluid=fluid)
>>> s.rho()
<Quantity(1.28939426, 'kilogram / meter ** 3')>
>>> # Using pint quantities
>>> s = ccp.State(fluid=fluid, p=Q_(1, 'atm'), T=Q_(0, 'degC'))
>>> s.h()
<Quantity(273291.7, 'joule / kilogram')>

Methods

Bvirial(self) double#

Get the B virial coefficient - wrapper of c++ function :cpapi:`CoolProp::AbstractState::Bvirial(void)`

Cvirial(self) double#

Get the C virial coefficient - wrapper of c++ function :cpapi:`CoolProp::AbstractState::Cvirial(void)`

PIP(self) double#

Get the phase identification parameter - wrapper of c++ function :cpapi:`CoolProp::AbstractState::PIP`

Prandtl(self) double#

Get the Prandtl number - wrapper of c++ function :cpapi:`CoolProp::AbstractState::Prandtl(void)`

Q(self) double#

Get the vapor quality in mol/mol - wrapper of c++ function :cpapi:`CoolProp::AbstractState::Q(void)`

T(units=None)#

Temperature in Kelvin.

Returns:
Tpint.Quantity

Temperature (Kelvin).

T_critical(units=None)#

Critical Temperature in K.

Returns:
T_criticalpint.Quantity

Critical temperature (degK).

T_reducing(self) double#

Gets the reducing temperature in K - wrapper of c++ function :cpapi:`CoolProp::AbstractState::T_reducing`

Tmax(self) double#

Set the maximum temperature in K - wrapper of c++ function :cpapi:`CoolProp::AbstractState::Tmax`

Tmin(self) double#

Set the minimum temperature in K- wrapper of c++ function :cpapi:`CoolProp::AbstractState::Tmin`

Ttriple(self) double#

Set the triple point temperature in K - wrapper of c++ function :cpapi:`CoolProp::AbstractState::Ttriple`

__init__(p=None, T=None, h=None, s=None, rho=None, fluid=None, EOS=None, phase=None)#
acentric_factor(self) double#

Get the acentric factor - wrapper of c++ function :cpapi:`CoolProp::AbstractState::acentric_factor(void)`

all_critical_points(self) list#

Calculate all the critical points - wrapper of c++ function :cpapi:`CoolProp::AbstractState::all_critical_points`

alpha0(self) CoolPropDbl#

Get the ideal-gas reduced Helmholtz energy - wrapper of c++ function :cpapi:`CoolProp::AbstractState::alpha0`

alphar(self) CoolPropDbl#

Get the residual reduced Helmholtz energy - wrapper of c++ function :cpapi:`CoolProp::AbstractState::alphar`

apply_simple_mixing_rule(self, size_t i, size_t j, string model)#

Apply a simple mixing rule - wrapper of c++ function :cpapi:`CoolProp::AbstractState::apply_simple_mixing_rule`

backend_name(self)#

Get the backend name - wrapper of c++ function :cpapi:`CoolProp::AbstractState::backend_name`

build_phase_envelope(self, string type)#

Build the phase envelope - wrapper of c++ function :cpapi:`CoolProp::AbstractState::build_phase_envelope`

build_spinodal(self)#

Calculate the spinodal - wrapper of c++ function :cpapi:`CoolProp::AbstractState::build_spinodal`

change_EOS(self, size_t i, string EOS_name)#

Change the EOS for one component - wrapper of c++ function :cpapi:`CoolProp::AbstractState::change_EOS`

chemical_potential(self, size_t i) double#

Get the chemical potential of the i-th component - wrapper of c++ function :cpapi:`CoolProp::AbstractState::chemical_potential(std::size_t)`

compressibility_factor(self) double#

Get the compressibility factor Z=p/(rho*R*T) - wrapper of c++ function :cpapi:`CoolProp::AbstractState::compressibility_factor(void)`

conductivity(units=None)#

Thermal conductivity (W/m/K).

Returns:
conductivitypint.Quantity

Thermal conductivity (W/m/K).

conductivity_contributions(self) dict#

Retrieve each of the contributions to the conductivity, each in W/m/K - wrapper of c++ function :cpapi:`CoolProp::AbstractState::conductivity_contributions`

conformal_state(self, string reference_fluid, CoolPropDbl T, CoolPropDbl rho) dict#

Solve for conformal state used in extended corresponding states - wrapper of c++ function :cpapi:`CoolProp::AbstractState::conformal_state`

cp(units=None)#

Specific heat at constant pressure joule/(kilogram kelvin).

Returns:
cppint.Quantity

Specific heat at constant pressure joule/(kilogram kelvin).

cp0mass(self) double#

Get the ideal gas constant pressure specific heat in J/kg/K - wrapper of c++ function :cpapi:`CoolProp::AbstractState::cp0mass(void)`

cp0molar(self) double#

Get the ideal gas constant pressure specific heat in J/mol/K - wrapper of c++ function :cpapi:`CoolProp::AbstractState::cp0molar(void)`

cpmass(self) double#

Get the constant pressure specific heat in J/kg/K - wrapper of c++ function :cpapi:`CoolProp::AbstractState::cpmass(void)`

cpmolar(self) double#

Get the constant pressure specific heat in J/mol/K - wrapper of c++ function :cpapi:`CoolProp::AbstractState::cpmolar(void)`

criticality_contour_values(self) tuple#

Gets the criticality matrix values L1* and M1* - wrapper of c++ function :cpapi:`CoolProp::AbstractState::criticality_contour_values` Returns a tuple of (L1*, M1*)

cv(units=None)#

Specific heat at constant volume joule/(kilogram kelvin).

Returns:
cvpint.Quantity

Specific heat at constant volume joule/(kilogram kelvin).

cvmass(self) double#

Get the constant volume specific heat in J/kg/K - wrapper of c++ function :cpapi:`CoolProp::AbstractState::cvmass(void)`

cvmolar(self) double#

Get the constant volume specific heat in J/mol/K - wrapper of c++ function :cpapi:`CoolProp::AbstractState::cvmolar(void)`

d2alpha0_dDelta2(self) CoolPropDbl#

Get the ideal-gas reduced Helmholtz energy - wrapper of c++ function :cpapi:`CoolProp::AbstractState::d2alpha0_dDelta2`

d2alpha0_dDelta_dTau(self) CoolPropDbl#

Get the ideal-gas reduced Helmholtz energy - wrapper of c++ function :cpapi:`CoolProp::AbstractState::d2alpha0_dDelta_dTau`

d2alpha0_dTau2(self) CoolPropDbl#

Get the ideal-gas reduced Helmholtz energy - wrapper of c++ function :cpapi:`CoolProp::AbstractState::d2alpha0_dTau2`

d2alphar_dDelta2(self) CoolPropDbl#

Get the residual reduced Helmholtz energy - wrapper of c++ function :cpapi:`CoolProp::AbstractState::d2alphar_dDelta2`

d2alphar_dDelta_dTau(self) CoolPropDbl#

Get the residual reduced Helmholtz energy - wrapper of c++ function :cpapi:`CoolProp::AbstractState::d2alphar_dDelta_dTau`

d2alphar_dTau2(self) CoolPropDbl#

Get the residual reduced Helmholtz energy - wrapper of c++ function :cpapi:`CoolProp::AbstractState::d2alphar_dTau2`

d3alpha0_dDelta2_dTau(self) CoolPropDbl#

Get the ideal-gas reduced Helmholtz energy - wrapper of c++ function :cpapi:`CoolProp::AbstractState::d3alpha0_dDelta2_dTau`

d3alpha0_dDelta3(self) CoolPropDbl#

Get the ideal-gas reduced Helmholtz energy - wrapper of c++ function :cpapi:`CoolProp::AbstractState::d3alpha0_dDelta3`

d3alpha0_dDelta_dTau2(self) CoolPropDbl#

Get the ideal-gas reduced Helmholtz energy - wrapper of c++ function :cpapi:`CoolProp::AbstractState::d3alpha0_dDelta_dTau2`

d3alpha0_dTau3(self) CoolPropDbl#

Get the ideal-gas reduced Helmholtz energy - wrapper of c++ function :cpapi:`CoolProp::AbstractState::d3alpha0_dTau3`

d3alphar_dDelta2_dTau(self) CoolPropDbl#

Get the residual reduced Helmholtz energy - wrapper of c++ function :cpapi:`CoolProp::AbstractState::d3alphar_dDelta2_dTau`

d3alphar_dDelta3(self) CoolPropDbl#

Get the residual reduced Helmholtz energy - wrapper of c++ function :cpapi:`CoolProp::AbstractState::d3alphar_dDelta3`

d3alphar_dDelta_dTau2(self) CoolPropDbl#

Get the residual reduced Helmholtz energy - wrapper of c++ function :cpapi:`CoolProp::AbstractState::d3alphar_dDelta_dTau2`

d3alphar_dTau3(self) CoolPropDbl#

Get the residual reduced Helmholtz energy - wrapper of c++ function :cpapi:`CoolProp::AbstractState::d3alphar_dTau3`

d4alphar_dDelta2_dTau2(self) CoolPropDbl#

Get the residual reduced Helmholtz energy - wrapper of c++ function :cpapi:`CoolProp::AbstractState::d4alphar_dDelta2_dTau2`

d4alphar_dDelta3_dTau(self) CoolPropDbl#

Get the residual reduced Helmholtz energy - wrapper of c++ function :cpapi:`CoolProp::AbstractState::d4alphar_dDelta3_dTau`

d4alphar_dDelta4(self) CoolPropDbl#

Get the residual reduced Helmholtz energy - wrapper of c++ function :cpapi:`CoolProp::AbstractState::d4alphar_dDelta4`

d4alphar_dDelta_dTau3(self) CoolPropDbl#

Get the residual reduced Helmholtz energy - wrapper of c++ function :cpapi:`CoolProp::AbstractState::d4alphar_dDelta_dTau3`

d4alphar_dTau4(self) CoolPropDbl#

Get the residual reduced Helmholtz energy - wrapper of c++ function :cpapi:`CoolProp::AbstractState::d4alphar_dTau4`

dTdp_s(units=None)#

(dT / dp)s

First partial derivative of temperature related to pressure with constant entropy.

dalpha0_dDelta(self) CoolPropDbl#

Get the ideal-gas reduced Helmholtz energy - wrapper of c++ function :cpapi:`CoolProp::AbstractState::dalpha0_dDelta`

dalpha0_dTau(self) CoolPropDbl#

Get the ideal-gas reduced Helmholtz energy - wrapper of c++ function :cpapi:`CoolProp::AbstractState::dalpha0_dTau`

dalphar_dDelta(self) CoolPropDbl#

Get the residual reduced Helmholtz energy - wrapper of c++ function :cpapi:`CoolProp::AbstractState::dalphar_dDelta`

dalphar_dTau(self) CoolPropDbl#

Get the residual reduced Helmholtz energy - wrapper of c++ function :cpapi:`CoolProp::AbstractState::dalphar_dTau`

classmethod define(p=None, T=None, h=None, s=None, rho=None, fluid=None, EOS=None, **kwargs)#

Constructor for state.

Creates a state from fluid composition and two properties. Properties can be floats (SI units are considered) or pint quantities.

Parameters:
pfloat, pint.Quantity

Pressure

Tfloat, pint.Quantity

Temperature

hfloat, pint.Quantity

Enthalpy

sfloat, pint.Quantity

Entropy

rhofloat, pint.Quantity

Specific mass

fluiddict

Dictionary with constituent and composition. (e.g.: fluid={‘Oxygen’: 0.2096, ‘Nitrogen’: 0.7812, ‘Argon’: 0.0092}) String with REFPROP, HEOS, PR or SRK. Default is set in ccp.config.EOS

Returns:
stateccp.State

Examples

>>> import ccp
>>> Q_ = ccp.Q_
>>> fluid = {'Oxygen': 0.2096, 'Nitrogen': 0.7812, 'Argon': 0.0092}
>>> s = ccp.State.define(p=101008, T=273, fluid=fluid)
>>> s.rho()
<Quantity(1.28939426, 'kilogram / meter ** 3')>
>>> # Using pint quantities
>>> s = ccp.State.define(fluid=fluid, p=Q_(1, 'atm'), T=Q_(0, 'degC'))
>>> s.h()
<Quantity(273291.7, 'joule / kilogram')>
delta(self) double#

Get the reduced density - wrapper of c++ function :cpapi:`CoolProp::AbstractState::delta(void)`

dpdv_s(units=None)#

Partial derivative of pressure to spec. volume with const. entropy.

first_partial_deriv(self, parameters OF, parameters WRT, parameters CONSTANT) CoolPropDbl#

Get the first partial derivative - wrapper of c++ function :cpapi:`CoolProp::AbstractState::first_partial_deriv`

first_saturation_deriv(self, parameters OF, parameters WRT) CoolPropDbl#

Get the first derivative along the saturation curve - wrapper of c++ function :cpapi:`CoolProp::AbstractState::first_saturation_deriv`

first_two_phase_deriv(self, parameters Of, parameters Wrt, parameters Constant) double#

Get the first two-phase derivative - wrapper of C++ function :cpapi:`CoolProp::AbstractState::first_two_phase_deriv`

first_two_phase_deriv_splined(self, parameters Of, parameters Wrt, parameters Constant, double x_end) double#

Get the first two-phase derivative using splines - wrapper of C++ function :cpapi:`CoolProp::AbstractState::first_two_phase_deriv_splined`

fluid_names(self)#

Get the list of fluid names - wrapper of c++ function :cpapi:`CoolProp::AbstractState::fluid_names`

fluid_param_string(self, string key)#

Get a fluid parameter string - wrapper of c++ function :cpapi:`CoolProp::AbstractState::fluid_param_string`

fugacity(self, size_t i) double#

Get the fugacity of the i-th component - wrapper of c++ function :cpapi:`CoolProp::AbstractState::fugacity(std::size_t)`

fugacity_coefficient(self, size_t i) double#

Get the fugacity coefficient of the i-th component - wrapper of c++ function :cpapi:`CoolProp::AbstractState::fugacity_coefficient(std::size_t)`

fundamental_derivative_of_gas_dynamics(self) double#

Get the fundamental derivative of gas dynamics - wrapper of c++ function :cpapi:`CoolProp::AbstractState::fundamental_derivative_of_gas_dynamics(void)`

gas_constant(units=None)#

Gas constant in joule / (mol kelvin).

Returns:
gas_constantpint.Quantity

Gas constant (joule / (mol kelvin).

get_binary_interaction_string(self, string CAS1, string CAS2, string parameter) string#

Get a string interaction parameter - wrapper of c++ function :cpapi:`CoolProp::AbstractState::get_binary_interaction_string`

get_coolprop_state()#

Return a CoolProp state object.

get_fluid_constant(self, size_t i, parameters param) double#

Get a constant for a fluid in the mixture :cpapi:`CoolProp::AbstractState::get_fluid_constant`

get_fluid_parameter_double(self, size_t i, string parameter) double#

Get a fluid parameter that is a double-precision number - wrapper of c++ function :cpapi:`CoolProp::AbstractState::get_fluid_parameter_double`

get_mass_fractions(self)#

Get the mass fractions - wrapper of c++ function :cpapi:`CoolProp::AbstractState::get_mass_fractions`

get_mole_fractions(self)#

Get the mole fractions - wrapper of c++ function :cpapi:`CoolProp::AbstractState::get_mole_fractions`

get_phase_envelope_data(self) PyPhaseEnvelopeData#

Get the phase envelope data - wrapper of c++ function :cpapi:`CoolProp::AbstractState::get_phase_envelope_data`

get_spinodal_data(self) PySpinodalData#

Get the data from the spinodal - wrapper of c++ function :cpapi:`CoolProp::AbstractState::get_spinodal_data`

gibbsmass(self) double#

Get the mass-specific Gibbs energy in J/kg - wrapper of c++ function :cpapi:`CoolProp::AbstractState::gibbsmass(void)`

gibbsmass_excess(self) double#

Get the mass-specific excess Gibbs energy in J/kg - wrapper of c++ function :cpapi:`CoolProp::AbstractState::gibbsmass_excess(void)`

gibbsmolar(self) double#

Get the mole-specific Gibbs energy in J/mol - wrapper of c++ function :cpapi:`CoolProp::AbstractState::gibbsmolar(void)`

gibbsmolar_excess(self) double#

Get the mole-specific excess Gibbs energy in J/mol - wrapper of c++ function :cpapi:`CoolProp::AbstractState::gibbsmolar_excess(void)`

gibbsmolar_residual(self) double#

Get the mole-specific residual Gibbs energy in J/mol - wrapper of c++ function :cpapi:`CoolProp::AbstractState::gibbsmolar_residual(void)`

h(units=None)#

Specific Enthalpy (joule/kilogram).

Returns:
hpint.Quantity

Enthalpy (joule/kilogram).

has_melting_line(self) bool#

Check if the fluid has a melting line - True if is does, False otherwise - wrapper of c++ function :cpapi:`CoolProp::AbstractState::has_melting_line`

helmholtzmass(self) double#

Get the mass-specific Helmholtz energy in J/kg - wrapper of c++ function :cpapi:`CoolProp::AbstractState::helmholtzmass(void)`

helmholtzmass_excess(self) double#

Get the mass-specific excess Helmholtz energy in J/kg - wrapper of c++ function :cpapi:`CoolProp::AbstractState::helmholtzmass_excess(void)`

helmholtzmolar(self) double#

Get the mole-specific Helmholtz energy in J/mol - wrapper of c++ function :cpapi:`CoolProp::AbstractState::helmholtzmolar(void)`

helmholtzmolar_excess(self) double#

Get the mole-specific excess Helmholtz energy in J/mol - wrapper of c++ function :cpapi:`CoolProp::AbstractState::helmholtzmolar_excess(void)`

hmass(self) double#

Get the enthalpy in J/kg - wrapper of c++ function :cpapi:`CoolProp::AbstractState::hmass(void)`

hmass_excess(self) double#

Get the mass-specific excess enthalpy in J/kg - wrapper of c++ function :cpapi:`CoolProp::AbstractState::hmass_excess(void)`

hmass_idealgas(self) double#

Get the mass-specific ideal gas enthalpy in J/kg - wrapper of c++ function :cpapi:`CoolProp::AbstractState::hmass_idealgas(void)`

hmolar(self) double#

Get the enthalpy in J/mol - wrapper of c++ function :cpapi:`CoolProp::AbstractState::hmolar(void)`

hmolar_excess(self) double#

Get the mole-specific excess enthalpy in J/mol - wrapper of c++ function :cpapi:`CoolProp::AbstractState::hmolar_excess(void)`

hmolar_idealgas(self) double#

Get the mole-specific ideal gas enthalpy in J/mol - wrapper of c++ function :cpapi:`CoolProp::AbstractState::hmolar_idealgas(void)`

hmolar_residual(self) double#

Get the mole-specific residual enthalpy in J/mol - wrapper of c++ function :cpapi:`CoolProp::AbstractState::hmolar_residual(void)`

ideal_curve(self, string type) tuple#

Get an ideal curve - wrapper of c++ function :cpapi:`CoolProp::AbstractState::ideal_curve`

isobaric_expansion_coefficient(self) double#

Get the isobaric expansion coefficient - wrapper of c++ function :cpapi:`CoolProp::AbstractState::isobaric_expansion_coefficient(void)`

isothermal_compressibility(self) double#

Get the isothermal_compressibility - wrapper of c++ function :cpapi:`CoolProp::AbstractState::isothermal_compressibility(void)`

kT()#

Isentropic temperature exponent (dimensionless).

Returns:
kTpint.Quantity

Isentropic temperature exponent (dimensionless).

keyed_output(self, parameters iOutput) double#

Get a keyed output :cpapi:`CoolProp::AbstractState::keyed_output(parameters key)`

kinematic_viscosity(units=None)#

Kinematic viscosity in m²/s.

Returns:
kinematic_viscositypint.Quantity

Kinematic viscosity (m²/s)

kv()#

Isentropic volume exponent (dimensionless).

Returns:
kvpint.Quantity

Isentropic volume exponent (dimensionless).

melting_line(self, int param, int given, double value) double#

Get values from the melting line - wrapper of c++ function :cpapi:`CoolProp::AbstractState::melting_line`

molar_mass(units=None)#

Molar mass in kg/mol.

Returns:
molar_masspint.Quantity

Molar mass (kg/mol).

mole_fractions_liquid(self)#

Get the mole fractions of the liquid phase - wrapper of c++ function :cpapi:`CoolProp::AbstractState::mole_fractions_liquid(void)`

mole_fractions_vapor(self)#

Get the mole fractions of the vapor phase - wrapper of c++ function :cpapi:`CoolProp::AbstractState::mole_fractions_vapor(void)`

name(self)#

Get the fluid name - wrapper of c++ function :cpapi:`CoolProp::AbstractState::name`

neff(self) double#

Get the effective hardness of interaction - wrapper of c++ function :cpapi:`CoolProp::AbstractState::neff(void)`

p(units=None)#

Pressure in Pascal.

Returns:
ppint.Quantity

Pressure (pascal).

p_critical(units=None)#

Critical Pressure in Pa.

Returns:
p_criticalpint.Quantity

Critical pressure (Pa).

phase(self) phases#

Get the phase as key value- wrapper of c++ function :cpapi:`CoolProp::AbstractState::phase`

plot_envelope(T_units='degK', p_units='Pa', dew_point_margin=20, fig=None, **kwargs)#

Plot phase envelope.

Plots the phase envelope and dew point limit.

Parameters:
T_unitsstr

Temperature units. Default is ‘degK’.

p_unitsstr

Pressure units. Default is ‘Pa’.

dew_point_marginfloat

Dew point margin. Default is 20 degK (from API). Unit is the same as T_units.

figplotly.graph_objects.Figure, optional

The figure object with the rotor representation.

Returns:
figplotly.graph_objects.Figure

The figure object with the rotor representation.

plot_point(T_units='degK', p_units='Pa', fig=None, **kwargs)#

Plot point.

Plot point in the given figure. Function will check for axis units and plot the point accordingly.

Parameters:
T_unitsstr

Temperature units. Default is ‘degK’.

p_unitsstr

Pressure units. Default is ‘Pa’.

figplotly.graph_objects.Figure, optional

The figure object with the rotor representation.

kwargsdict

Dictionary that will be passed to go.Scatter method.

Returns:
figplotly.graph_objects.Figure

The figure object with the rotor representation.

pmax(self) double#

Set the maximum pressure in Pa - wrapper of c++ function :cpapi:`CoolProp::AbstractState::pmax`

rho(units=None)#

Specific mass (kilogram/m**3).

Returns:
rhopint.Quantity

Specific mass (kilogram/m**3).

rhomass(self) double#

Get the density in kg/m^3 - wrapper of c++ function :cpapi:`CoolProp::AbstractState::rhomass(void)`

rhomass_critical(self) double#

Gets the critical density in kg/m^3 - wrapper of c++ function :cpapi:`CoolProp::AbstractState::rhomass_critical`

rhomass_reducing(self) double#

Gets the reducing density in kg/m^3 - wrapper of c++ function :cpapi:`CoolProp::AbstractState::rhomass_reducing`

rhomolar(self) double#

Get the density in mol/m^3 - wrapper of c++ function :cpapi:`CoolProp::AbstractState::rhomolar(void)`

rhomolar_critical(self) double#

Gets the critical density in mol/m^3 - wrapper of c++ function :cpapi:`CoolProp::AbstractState::rhomolar_critical`

rhomolar_reducing(self) double#

Gets the reducing density in mol/m^3 - wrapper of c++ function :cpapi:`CoolProp::AbstractState::rhomolar_reducing`

s(units=None)#

Specific entropy (per unit of mass).

Returns:
spint.Quantity

Entropy (joule/(kelvin kilogram)).

saturated_liquid_keyed_output(self, parameters iOutput) double#

Get a trivial output for the saturated liquid :cpapi:`CoolProp::AbstractState::saturated_liquid_keyed_output(parameters key)`

saturated_vapor_keyed_output(self, parameters iOutput) double#

Get a trivial output for the saturated vapor :cpapi:`CoolProp::AbstractState::saturated_vapor_keyed_output(parameters key)`

saturation_ancillary(self, parameters param, int Q, parameters given, double value) double#

Get values from the saturation_ancillary - wrapper of c++ function :cpapi:`CoolProp::AbstractState::saturation_ancillary`

second_partial_deriv(self, parameters OF, parameters WRT1, parameters CONSTANT1, parameters WRT2, parameters CONSTANT2) CoolPropDbl#

Get the second partial derivative - wrapper of c++ function :cpapi:`CoolProp::AbstractState::second_partial_deriv`

second_saturation_deriv(self, parameters OF1, parameters WRT1, parameters WRT2) CoolPropDbl#

Get the second derivative along the saturation curve - wrapper of c++ function :cpapi:`CoolProp::AbstractState::second_saturation_deriv`

second_two_phase_deriv(self, parameters Of1, parameters Wrt1, parameters Constant1, parameters Wrt2, parameters Constant2) double#

Get the second two-phase derivative - wrapper of C++ function :cpapi:`CoolProp::AbstractState::second_two_phase_deriv`

set_cubic_alpha_C(self, size_t i, string parameter, double c1, double c2, double c3)#

Set alpha function (MC or Twu) and fluid specific parameters - wrapper of c++ function :cpapi:`CoolProp::AbstractCubicBackend::set_cubic_alpha_C`

set_fluid_parameter_double(self, size_t i, string parameter, double val)#

Set a fluid parameter that is a double-precision number - wrapper of c++ function :cpapi:`CoolProp::AbstractState::set_fluid_parameter_double`

set_mass_fractions(self, vector[double] z)#

Set the mass fractions - wrapper of c++ function :cpapi:`CoolProp::AbstractState::set_mass_fractions`

set_mole_fractions(self, vector[double] z)#

Set the mole fractions - wrapper of c++ function :cpapi:`CoolProp::AbstractState::set_mole_fractions`

set_volu_fractions(self, vector[double] z)#

Set the volume fractions - wrapper of c++ function :cpapi:`CoolProp::AbstractState::set_volu_fractions`

smass(self) double#

Get the entropy in J/kg/K - wrapper of c++ function :cpapi:`CoolProp::AbstractState::smass(void)`

smass_excess(self) double#

Get the mass-specific excess entropy in J/kg/K - wrapper of c++ function :cpapi:`CoolProp::AbstractState::smass_excess(void)`

smass_idealgas(self) double#

Get the mass-specific ideal gas entropy in J/kg/K - wrapper of c++ function :cpapi:`CoolProp::AbstractState::smass_idealgas(void)`

smolar(self) double#

Get the entropy in J/mol/K - wrapper of c++ function :cpapi:`CoolProp::AbstractState::smolar(void)`

smolar_excess(self) double#

Get the mole-specific excess entropy in J/mol/K - wrapper of c++ function :cpapi:`CoolProp::AbstractState::smolar_excess(void)`

smolar_idealgas(self) double#

Get the mole-specific ideal gas entropy in J/mol/K - wrapper of c++ function :cpapi:`CoolProp::AbstractState::smolar_idealgas(void)`

smolar_residual(self) double#

Get the mole-specific residual entropy in J/mol/K - wrapper of c++ function :cpapi:`CoolProp::AbstractState::smolar_residual(void)`

specify_phase(self, phases phase)#

Specify the phase - wrapper of c++ function :cpapi:`CoolProp::AbstractState::specify_phase`

speed_sound(units=None)#

Speed of sound - Eq. 8.1 from P. Nederstigt - Real Gas Thermodynamics.

Returns:
speed_soundpint.Quantity

Speed of sound (m/s).

surface_tension(self) double#

Get the surface tension N/m - wrapper of c++ function :cpapi:`CoolProp::AbstractState::surface_tension(void)`

tangent_plane_distance(self, double T, double p, vector[double] w, double rhomolar_guess=-1) double#

Gets the tangent_plane_distance - wrapper of c++ function :cpapi:`CoolProp::AbstractState::tangent_plane_distance`

tau(self) double#

Get the reciprocal reduced temperature - wrapper of c++ function :cpapi:`CoolProp::AbstractState::tau(void)`

trivial_keyed_output(self, parameters iOutput) double#

Get a trivial keyed output not requiring any iteration :cpapi:`CoolProp::AbstractState::trivial_keyed_output(parameters key)`

true_critical_point(self) tuple#

Get the “true” critical point where dp/drho|T = 0 & d2p/drho^2|T = 0 - wrapper of c++ function :cpapi:`CoolProp::AbstractState::true_critical_point`

umass(self) double#

Get the internal energy in J/kg - wrapper of c++ function :cpapi:`CoolProp::AbstractState::umass(void)`

umass_excess(self) double#

Get the mass-specific excess internal energy in J/kg - wrapper of c++ function :cpapi:`CoolProp::AbstractState::umass_excess(void)`

umass_idealgas(self) double#

Get the mass-specific ideal gas internal energy in J/kg - wrapper of c++ function :cpapi:`CoolProp::AbstractState::umass_idealgas(void)`

umolar(self) double#

Get the internal energy in J/mol - wrapper of c++ function :cpapi:`CoolProp::AbstractState::umolar(void)`

umolar_excess(self) double#

Get the mole-specific excess internal energy in J/mol - wrapper of c++ function :cpapi:`CoolProp::AbstractState::umolar_excess(void)`

umolar_idealgas(self) double#

Get the mole-specific ideal gas internal energy in J/mol - wrapper of c++ function :cpapi:`CoolProp::AbstractState::umolar_idealgas(void)`

unspecify_phase(self)#

Unspecify the phase - wrapper of c++ function :cpapi:`CoolProp::AbstractState::unspecify_phase`

update(p=None, T=None, rho=None, h=None, s=None, phase=None, **kwargs)#

Update the state.

This method simplifies the state update. Only keyword arguments are required to update.

Parameters:
pfloat, pint.Quantity

Pressure (Pa).

Tfloat, pint.Quantity

Temperature (degK).

rhofloat, pint.Quantity

Specific mass (kg/m**3).

hfloat, pint.Quantity

Enthalpy (J/kg).

sfloat, pint.Quantity

Entropy (J/(kg*degK)).

phasestr, optional

String with phase information. Options are: - “liquid” - “gas” - “two_phase” - “supercritical_liquid” - “supercritical_gas” - “supercritical” Default is the phase defined in the state initialization.

update_QT_pure_superanc(self, double Q, double T)#

Update function - wrapper of c++ function :cpapi:`CoolProp::AbstractState::update`

update_with_guesses(self, input_pairs ipair, double Value1, double Value2, PyGuessesStructure guesses)#

Update function - wrapper of c++ function :cpapi:`CoolProp::AbstractState::update`

v(units=None)#

Specific volume (m**3/kilogram).

Returns:
vpint.Quantity

Specific volume (m**3/kilogram).

viscosity(units=None)#

Viscosity in pascal second.

Returns:
viscositypint.Quantity

Viscosity (pascal second)

viscosity_contributions(self) dict#

Retrieve each of the contributions to the viscosity, each in Pa-s - wrapper of c++ function :cpapi:`CoolProp::AbstractState::viscosity_contributions`

volumemass_excess(self) double#

Get the mass-specific excess volume in m^3/kg - wrapper of c++ function :cpapi:`CoolProp::AbstractState::volumemass_excess(void)`

volumemolar_excess(self) double#

Get the mole-specific excess volume in m^3/mol - wrapper of c++ function :cpapi:`CoolProp::AbstractState::volumemolar_excess(void)`

z(units=None)#

Compressibility (dimensionless).

Returns:
zpint.Quantity

Compressibility (dimensionless).

Attributes

get_binary_interaction_double(signatures, ...)

Get a double precision interaction parameter - wrapper of c++ function :cpapi:`CoolProp::AbstractState::get_binary_interaction_double`

set_binary_interaction_double(signatures, ...)

Set a double precision interaction parameter - wrapper of c++ function :cpapi:`CoolProp::AbstractState::set_binary_interaction_double`

set_binary_interaction_string(signatures, ...)

Set a string interaction parameter - wrapper of c++ function :cpapi:`CoolProp::AbstractState::set_binary_interaction_string`