CoolProp  4.2.5
An open-source fluid property and humid air property database
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Member Functions | Public Attributes | Protected Member Functions | Protected Attributes | List of all members
Fluid Class Reference

Fluid is the abstract base class that is employed by all the other fluids. More...

#include <FluidClass.h>

Inheritance diagram for Fluid:
AceticAcidClass AcetoneClass AirClass ArgonClass BenzeneClass CarbonMonoxideClass CarbonylSulfideClass Cis2ButeneClass CyclohexaneClass CyclopentaneClass CycloPropaneClass DecamethylcyclopentasiloxaneClass DecamethyltetrasiloxaneClass DecaneClass DeuteriumClass DimethylCarbonateClass DimethylEtherClass DodecamethylcyclohexasiloxaneClass DodecamethylpentasiloxaneClass EthaneClass EthanolClass EthylBenzeneClass EthyleneClass FluorineClass HeliumClass HexamethyldisiloxaneClass HFE143mClass HydrogenClass HydrogenSulfideClass IncompressibleFluid IsoButaneClass IsoButeneClass IsohexaneClass IsopentaneClass KryptonClass MethaneClass MethanolClass MethylLinoleateClass MethylLinolenateClass MethylOleateClass MethylPalmitateClass MethylStearateClass mXyleneClass nButaneClass nDodecaneClass NeonClass NeopentaneClass nHeptaneClass nHexaneClass NitrogenClass NitrousOxideClass nOctaneClass NonaneClass nPentaneClass OctamethylcyclotetrasiloxaneClass OctamethyltrisiloxaneClass OneButeneClass OrthoDeuteriumClass OrthoHydrogenClass OxygenClass oXyleneClass ParaDeuteriumClass ParaHydrogenClass PropyleneClass PropyneClass pXyleneClass R113Class R114Class R116Class R11Class R1233zdEClass R1234yfClass R1234zeClass R1234zeZClass R123Class R124Class R125Class R12Class R134aClass R13Class R141bClass R142bClass R143AClass R14Class R152AClass R161Class R218Class R21Class R227EAClass R22Class R236EAClass R236FAClass R23Class R245faClass R290Class R32Class R365MFCClass R404AClass R407CClass R407FClass R410AClass R41Class R507AClass R717Class R744Class RC318Class REFPROPFluidClass SES36Class SulfurDioxideClass SulfurHexafluorideClass TetradecamethylhexasiloxaneClass TolueneClass Trans2ButeneClass UndecaneClass WaterClass XenonClass

Public Member Functions

 Fluid ()
 A vector of instances of the phi_BC classes for the ideal-gas Helmholtz energy contribution. More...
 
virtual ~Fluid ()
 
void post_load (rapidjson::Document &JSON, rapidjson::Document &JSON_CAS)
 
void add_alias (std::string alias)
 
std::string get_name ()
 Returns a std::string with the name of the fluid. More...
 
char * get_namec ()
 Returns a char* with the name of the fluid. More...
 
std::string get_REFPROPname ()
 
std::string get_EOSReference ()
 
std::string get_TransportReference ()
 
std::vector< std::string > get_aliases ()
 
bool pure ()
 Returns true if the fluid is pure, false if pseudo-pure or a mixture. More...
 
double R ()
 Returns the mass-specific gas constant for the fluid in the desired units. More...
 
virtual double conductivity_Trho (double T, double rho)
 
virtual double viscosity_Trho (double T, double rho)
 
virtual double phir (double tau, double delta)
 
virtual double dphir_dDelta (double tau, double delta)
 
virtual double dphir_dTau (double tau, double delta)
 
virtual double d2phir_dDelta2 (double tau, double delta)
 
virtual double d2phir_dDelta_dTau (double tau, double delta)
 
virtual double d2phir_dTau2 (double tau, double delta)
 
virtual double d3phir_dDelta3 (double tau, double delta)
 
virtual double d3phir_dDelta2_dTau (double tau, double delta)
 
virtual double d3phir_dDelta_dTau2 (double tau, double delta)
 
virtual double d3phir_dTau3 (double tau, double delta)
 
virtual double phi0 (double tau, double delta)
 
virtual double dphi0_dDelta (double tau, double delta)
 
virtual double dphi0_dTau (double tau, double delta)
 
virtual double d2phi0_dDelta2 (double tau, double delta)
 
virtual double d2phi0_dDelta_dTau (double tau, double delta)
 
virtual double d2phi0_dTau2 (double tau, double delta)
 
virtual double d3phi0_dDelta3 (double tau, double delta)
 
virtual double d3phi0_dDelta2_dTau (double tau, double delta)
 
virtual double d3phi0_dDelta_dTau2 (double tau, double delta)
 
virtual double d3phi0_dTau3 (double tau, double delta)
 
double pressure_Trho (double T, double rho)
 
double enthalpy_Trho (double T, double rho)
 
double entropy_Trho (double T, double rho)
 
double internal_energy_Trho (double T, double rho)
 
double speed_sound_Trho (double T, double rho)
 
double specific_heat_p_Trho (double T, double rho)
 
double specific_heat_p_ideal_Trho (double T)
 
double specific_heat_v_Trho (double T, double rho)
 
double gibbs_Trho (double T, double rho)
 
double dpdT_Trho (double T, double rho)
 
double dpdrho_Trho (double T, double rho)
 
double drhodT_p_Trho (double T, double rho)
 
double density_Tp_Soave (double T, double p, int iValue=0)
 Get the density using the Soave EOS. More...
 
virtual double density_Tp (double T, double p)
 
virtual double density_Tp (double T, double p, double rho_guess)
 
virtual void density_Ts (double T, double s, double &rhoout, double &pout, double &rhoLout, double &rhoVout, double &psatLout, double &psatVout)
 
virtual void temperature_hs (double h, double s, double &Tout, double &rhoout, double &rhoL, double &rhoV, double &TsatLout, double &TsatVout)
 
virtual void temperature_ps (double p, double s, double &Tout, double &rhoout, double &rhoL, double &rhoV, double &TsatLout, double &TsatVout)
 
virtual void temperature_ph (double p, double h, double &Tout, double &rhoout, double &rhoL, double &rhoV, double &TsatLout, double &TsatVout, double T0=-1, double rho0=-1)
 
double temperature_prho (double p, double rho, double T0)
 
double temperature_prho_VanDerWaals (double p, double rho)
 
double temperature_prho_PengRobinson (double p, double rho)
 
std::string phase_Tp (double T, double p, double &pL, double &pV, double &rhoL, double &rhoV)
 Return the phase given the temperature and pressure. More...
 
long phase_Tp_indices (double T, double p, double &pL, double &pV, double &rhoL, double &rhoV)
 Return the phase using the phase flags from phase enum in CoolProp.h. More...
 
std::string phase_Trho (double T, double rho, double &pL, double &pV, double &rhoL, double &rhoV)
 Return the phase given the temperature and the density. More...
 
long phase_Trho_indices (double T, double rho, double &pL, double &pV, double &rhoL, double &rhoV)
 Return the phase using the phase flags from phase enum in CoolProp.h. More...
 
long phase_prho_indices (double p, double rho, double &T, double &TL, double &TV, double &rhoL, double &rhoV)
 
virtual double psat (double T)
 
virtual double psatL (double T)
 
virtual double psatV (double T)
 
virtual double rhosatL (double T)
 
virtual double rhosatV (double T)
 
double psatL_anc (double T)
 
double psatV_anc (double T)
 
double hsatV_anc (double T)
 
double hsatL_anc (double T)
 
double ssatV_anc (double T)
 
double ssatL_anc (double T)
 
double cpsatV_anc (double T)
 
double cpsatL_anc (double T)
 
double drhodT_pL_anc (double T)
 
double drhodT_pV_anc (double T)
 
double Tsat_anc (double p, double Q)
 
double density_Tp_PengRobinson (double T, double p, int solution)
 
std::vector< double > ConformalTemperature (Fluid *InterestFluid, Fluid *ReferenceFluid, double T, double rho, double T0, double rho0, std::string *errstring)
 
virtual void ECSParams (double *e_k, double *sigma)
 
virtual double ECS_psi_viscosity (double rhor)
 
virtual double ECS_chi_conductivity (double rhor)
 
virtual double ECS_f_int (double T)
 
double viscosity_ECS_Trho (double T, double rho, Fluid *ReferenceFluid)
 
double conductivity_ECS_Trho (double T, double rho, Fluid *ReferenceFluid)
 
virtual double conductivity_background (double T, double rho)
 
double conductivity_critical (double T, double rho, double qd=2e9, double GAMMA=0.0496, double zeta0=1.94e-10)
 
virtual double viscosity_dilute (double T, double e_k, double sigma)
 
virtual double viscosity_residual (double T, double rho)
 
virtual double viscosity_background (double T, double rho)
 
virtual double surface_tension_T (double T)
 
void saturation_VdW (double T, double &rhoL, double &rhoV, double &p, double s0=-1)
 
virtual void saturation_T (double T, bool UseLUT, double &psatLout, double &psatVout, double &rhoLout, double &rhoVout)
 
virtual void saturation_p (double p, bool UseLUT, double &TsatLout, double &TsatVout, double &rhoLout, double &rhoVout)
 
virtual void saturation_h (double h, double Tmin, double Tmax, int Q, double &Tsatout, double &rhoout, double &TsatLout, double &TsatVout, double &rhoLout, double &rhoVout)
 
virtual void saturation_s (double s, int Q, double &Tsatout, double &rhoout, double &TsatLout, double &TsatVout, double &rhoLout, double &rhoVout)
 
void rhosatPure (double T, double &rhoLout, double &rhoVout, double &pout, double omega, bool use_guesses)
 
void rhosatPure_Akasaka (double T, double &rhoLout, double &rhoVout, double &pout, double omega, bool use_guesses=false)
 
void rhosatPure_Brent (double T, double &rhoLout, double &rhoVout, double &pout)
 
void rhosatPure_BrentrhoV (double T, double &rhoLout, double &rhoVout, double &pout)
 
double Tsat (double p, double Q, double T_guess)
 
double Tsat (double p, double Q, double T_guess, bool UseLUT, double &rhoLout, double &rhoVout)
 
bool isAlias (std::string name)
 
void enable_EXTTP (void)
 
bool isenabled_EXTTP (void)
 Check if TTSE is enabled. More...
 
void disable_EXTTP (void)
 Disable the TTSE. More...
 
void enable_TTSE_LUT (void)
 
bool isenabled_TTSE_LUT (void)
 Check if TTSE is enabled. More...
 
void disable_TTSE_LUT (void)
 Disable the TTSE. More...
 
void enable_TTSE_LUT_writing (void)
 Enable the writing of TTSE tables to file. More...
 
bool isenabled_TTSE_LUT_writing (void)
 Check if the writing of TTSE tables to file is enabled. More...
 
void disable_TTSE_LUT_writing (void)
 Disable the writing of TTSE tables to file. More...
 
void set_TTSESat_LUT_size (int Nsat)
 Over-ride the default size of both of the saturation LUT. More...
 
void set_TTSESinglePhase_LUT_size (int Np, int Nh)
 Over-ride the default size of the single-phase LUT. More...
 
void set_TTSESinglePhase_LUT_range (double hmin, double hmax, double pmin, double pmax)
 Over-ride the default range of the single-phase LUT. More...
 
void get_TTSESinglePhase_LUT_range (double *hmin, double *hmax, double *pmin, double *pmax)
 Get the current range of the single-phase LUT. More...
 
bool build_TTSE_LUT (bool force=false)
 Build of the TTSE LUT. More...
 
double interpolate_in_TTSE_LUT (long iParam, long iInput1, double Input1, long iInput2, double Input2)
 Interpolate within the TTSE LUT. More...
 
std::string to_json ()
 Export this fluid as a JSON file;. More...
 

Public Attributes

BibTeXKeysStruct BibTeXKeys
 
EnvironmentalFactorsStruct environment
 
std::vector< phi_BC * > phirlist
 
std::vector< phi_BC * > phi0list
 A vector of instances of the phi_BC classes for the residual Helmholtz energy contribution. More...
 
struct CriticalStruct crit
 
struct FluidLimits limits
 
struct OtherParameters params
 
struct CriticalStructpreduce
 
struct CriticalStruct reduce
 A pointer to the point that is used to reduce the T and rho for EOS. More...
 
struct HSContainer HS
 The point that is used to reduce the T and rho for EOS. More...
 
TTSETwoPhaseTableClass TTSESatL
 
TTSETwoPhaseTableClass TTSESatV
 
TTSESinglePhaseTableClass TTSESinglePhase
 
CriticalSplineStruct_T CriticalSpline_T
 
bool enabled_TTSE_LUT
 Parameters for the Tabular Taylor Series Expansion (TTSE) Method. More...
 
bool enabled_EXTTP
 
bool built_TTSE_LUT
 
bool enable_writing_tables_to_files
 

Protected Member Functions

double _get_rho_guess (double T, double p)
 

Protected Attributes

FluidCache cache
 
std::string name
 A container to hold the cache for residual Helmholtz derivatives. More...
 
std::string REFPROPname
 The name of the fluid. More...
 
std::vector< std::string > aliases
 The REFPROP-compliant name if REFPROP-"name" is not a compatible fluid name. If not included, "name" is assumed to be a valid name for REFPROP. More...
 
std::string ECSReferenceFluid
 A list of aliases of names for the Fluid, each element is a std::string instance. More...
 
double ECS_qd
 A string that gives the name of the fluids that should be used for the ECS method for transport properties. More...
 
std::string EOSReference
 The critical qd parameter for the Olchowy-Sengers cross-over term. More...
 
std::string TransportReference
 A std::string that contains a reference for thermo properties for the fluid. More...
 
bool isPure
 A std::string that contains a reference for the transport properties of the fluid. More...
 
AncillaryCurveClassh_ancillary
 True if it is a pure fluid, false otherwise. More...
 
AncillaryCurveClasss_ancillary
 
double hmin_TTSE
 
double hmax_TTSE
 
double pmin_TTSE
 
double pmax_TTSE
 
unsigned int Nsat_TTSE
 
unsigned int Nh_TTSE
 
unsigned int Np_TTSE
 

Detailed Description

Fluid is the abstract base class that is employed by all the other fluids.

Definition at line 147 of file FluidClass.h.

Constructor & Destructor Documentation

Fluid::Fluid ( )
inline

A vector of instances of the phi_BC classes for the ideal-gas Helmholtz energy contribution.

Constructor for the Fluid class. This is an abstract base class that is not meant to be instantiated directly. Rather it should be subclassed to implement new fluids. Examples of this behavior are the R134aClass or the R290Class classes.

Default molar gas constant [kJ/kmol/K]

true if fluid is one-component pure fluid, false otherwise

pointer to the reducing parameters

Definition at line 185 of file FluidClass.h.

Fluid::~Fluid ( )
virtual

Definition at line 147 of file FluidClass.cpp.

Member Function Documentation

double Fluid::_get_rho_guess ( double  T,
double  p 
)
protected

Obtain a guess value for the density of the fluid for a given set of temperature and pressure

Parameters
TTemperature [K]
pPressure [kPa(abs)]

Definition at line 1378 of file FluidClass.cpp.

void Fluid::add_alias ( std::string  alias)
inline

Definition at line 215 of file FluidClass.h.

bool Fluid::build_TTSE_LUT ( bool  force = false)

Build of the TTSE LUT.

Definition at line 3681 of file FluidClass.cpp.

virtual double Fluid::conductivity_background ( double  T,
double  rho 
)
inlinevirtual

The background viscosity for the fluid. The viscosity minus the critical contribution minus the dilute-gas contribution This function is optional, and returns a NotImplementedError if the derived class does not implement it. Hopefully the calling function catches the error

See also
viscosity_Trho
Parameters
TTemperature [K]
rhoDensity [kg/m3]

Reimplemented in nDodecaneClass, R290Class, R134aClass, and NitrogenClass.

Definition at line 443 of file FluidClass.h.

double Fluid::conductivity_critical ( double  T,
double  rho,
double  qd = 2e9,
double  GAMMA = 0.0496,
double  zeta0 = 1.94e-10 
)

The critical term for the thermal conductivity from Olchowy and Sengers

Parameters
TTemperature [K]
rhoDensity [kg/m^3]
qdqd term in term [1/m]
GAMMAGamma term
zeta0zeta0 term in crossover

Definition at line 3260 of file FluidClass.cpp.

double Fluid::conductivity_ECS_Trho ( double  T,
double  rho,
Fluid ReferenceFluid 
)

This function is optional, and returns a NotImplementedError if the derived class does not implement it. Hopefully the calling function catches the error

Parameters
TTemperature [K]
rhoDensity [kg/m3]
ReferenceFluidA pointer to an instance of a Fluid class that is used as the reference fluid for the ECS model

Definition at line 3587 of file FluidClass.cpp.

double Fluid::conductivity_Trho ( double  T,
double  rho 
)
virtual
std::vector< double > Fluid::ConformalTemperature ( Fluid InterestFluid,
Fluid ReferenceFluid,
double  T,
double  rho,
double  T0,
double  rho0,
std::string *  errstring 
)

Definition at line 3381 of file FluidClass.cpp.

double Fluid::cpsatL_anc ( double  T)
double Fluid::cpsatV_anc ( double  T)
double Fluid::d2phi0_dDelta2 ( double  tau,
double  delta 
)
virtual

Definition at line 396 of file FluidClass.cpp.

double Fluid::d2phi0_dDelta_dTau ( double  tau,
double  delta 
)
virtual

Definition at line 427 of file FluidClass.cpp.

double Fluid::d2phi0_dTau2 ( double  tau,
double  delta 
)
virtual

Reimplemented in REFPROPFluidClass.

Definition at line 411 of file FluidClass.cpp.

double Fluid::d2phir_dDelta2 ( double  tau,
double  delta 
)
virtual

Reimplemented in REFPROPFluidClass.

Definition at line 276 of file FluidClass.cpp.

double Fluid::d2phir_dDelta_dTau ( double  tau,
double  delta 
)
virtual

Reimplemented in REFPROPFluidClass.

Definition at line 329 of file FluidClass.cpp.

double Fluid::d2phir_dTau2 ( double  tau,
double  delta 
)
virtual

Reimplemented in REFPROPFluidClass.

Definition at line 312 of file FluidClass.cpp.

virtual double Fluid::d3phi0_dDelta2_dTau ( double  tau,
double  delta 
)
inlinevirtual

Definition at line 275 of file FluidClass.h.

virtual double Fluid::d3phi0_dDelta3 ( double  tau,
double  delta 
)
inlinevirtual

Definition at line 274 of file FluidClass.h.

virtual double Fluid::d3phi0_dDelta_dTau2 ( double  tau,
double  delta 
)
inlinevirtual

Definition at line 276 of file FluidClass.h.

double Fluid::d3phi0_dTau3 ( double  tau,
double  delta 
)
virtual

Definition at line 419 of file FluidClass.cpp.

double Fluid::d3phir_dDelta2_dTau ( double  tau,
double  delta 
)
virtual

Definition at line 370 of file FluidClass.cpp.

double Fluid::d3phir_dDelta3 ( double  tau,
double  delta 
)
virtual

Definition at line 353 of file FluidClass.cpp.

double Fluid::d3phir_dDelta_dTau2 ( double  tau,
double  delta 
)
virtual

Definition at line 362 of file FluidClass.cpp.

double Fluid::d3phir_dTau3 ( double  tau,
double  delta 
)
virtual

Definition at line 346 of file FluidClass.cpp.

double Fluid::density_Tp ( double  T,
double  p 
)
virtual

Reimplemented in REFPROPFluidClass.

Definition at line 719 of file FluidClass.cpp.

double Fluid::density_Tp ( double  T,
double  p,
double  rho_guess 
)
virtual

Reimplemented in REFPROPFluidClass.

Definition at line 733 of file FluidClass.cpp.

double Fluid::density_Tp_PengRobinson ( double  T,
double  p,
int  solution 
)

Definition at line 607 of file FluidClass.cpp.

double Fluid::density_Tp_Soave ( double  T,
double  p,
int  iValue = 0 
)

Get the density using the Soave EOS.

Definition at line 543 of file FluidClass.cpp.

void Fluid::density_Ts ( double  T,
double  s,
double &  rhoout,
double &  pout,
double &  rhoLout,
double &  rhoVout,
double &  psatLout,
double &  psatVout 
)
virtual

Density as a function of temperature and entropy

Parameters
TTemperature [K]
sEntropy [kJ/kg/K]
rhooutDensity [kg/m^3]
poutPressure [kPa]
rhoLoutSaturated liquid density [kg/m^3]
rhoVoutSaturated vapor density [kg/m^3]

Definition at line 2733 of file FluidClass.cpp.

void Fluid::disable_EXTTP ( void  )

Disable the TTSE.

Definition at line 3747 of file FluidClass.cpp.

void Fluid::disable_TTSE_LUT ( void  )

Disable the TTSE.

Definition at line 3755 of file FluidClass.cpp.

void Fluid::disable_TTSE_LUT_writing ( void  )

Disable the writing of TTSE tables to file.

Definition at line 3761 of file FluidClass.cpp.

double Fluid::dpdrho_Trho ( double  T,
double  rho 
)

Definition at line 529 of file FluidClass.cpp.

double Fluid::dpdT_Trho ( double  T,
double  rho 
)

Definition at line 521 of file FluidClass.cpp.

double Fluid::dphi0_dDelta ( double  tau,
double  delta 
)
virtual

Definition at line 389 of file FluidClass.cpp.

double Fluid::dphi0_dTau ( double  tau,
double  delta 
)
virtual

Reimplemented in REFPROPFluidClass.

Definition at line 403 of file FluidClass.cpp.

double Fluid::dphir_dDelta ( double  tau,
double  delta 
)
virtual

Reimplemented in REFPROPFluidClass.

Definition at line 257 of file FluidClass.cpp.

double Fluid::dphir_dTau ( double  tau,
double  delta 
)
virtual

Reimplemented in REFPROPFluidClass.

Definition at line 295 of file FluidClass.cpp.

double Fluid::drhodT_p_Trho ( double  T,
double  rho 
)

Definition at line 537 of file FluidClass.cpp.

double Fluid::drhodT_pL_anc ( double  T)
double Fluid::drhodT_pV_anc ( double  T)
virtual double Fluid::ECS_chi_conductivity ( double  rhor)
inlinevirtual

This function is optional, the default value of 1.0 is used otherwise

Parameters
rhorThe reduced density where rhor = rho/rhoc

Reimplemented in R218Class, R142bClass, R141bClass, R245faClass, R116Class, R14Class, R13Class, R124Class, RC318Class, R227EAClass, R236EAClass, R236FAClass, PropyleneClass, R22Class, and R32Class.

Definition at line 415 of file FluidClass.h.

virtual double Fluid::ECS_f_int ( double  T)
inlinevirtual

This function is optional, the default value of 1.32e-3 is used otherwise

Parameters
TThe temperature

Reimplemented in R218Class, R142bClass, R141bClass, R245faClass, R116Class, R14Class, R13Class, R124Class, RC318Class, R227EAClass, R236EAClass, R236FAClass, PropyleneClass, R22Class, and R32Class.

Definition at line 420 of file FluidClass.h.

virtual double Fluid::ECS_psi_viscosity ( double  rhor)
inlinevirtual

This function is optional, the default value of 1.0 is used otherwise

Parameters
rhorThe reduced density where rhor = rho/rhoc

Reimplemented in R218Class, R142bClass, R141bClass, R245faClass, R116Class, R14Class, R13Class, HexamethyldisiloxaneClass, RC318Class, R227EAClass, R236EAClass, R236FAClass, PropyleneClass, R124Class, R22Class, R32Class, and OctamethyltrisiloxaneClass.

Definition at line 410 of file FluidClass.h.

void Fluid::ECSParams ( double *  e_k,
double *  sigma 
)
virtual
void Fluid::enable_EXTTP ( void  )

Enable the extended two-phase calculations If you want to over-ride parameters, must be done before calling this function

Enable the two-phase properties If you want to over-ride parameters, must be done before calling this function

Definition at line 3743 of file FluidClass.cpp.

void Fluid::enable_TTSE_LUT ( void  )

Enable the TTSE If you want to over-ride parameters, must be done before calling this function

Definition at line 3751 of file FluidClass.cpp.

void Fluid::enable_TTSE_LUT_writing ( void  )

Enable the writing of TTSE tables to file.

Definition at line 3757 of file FluidClass.cpp.

double Fluid::enthalpy_Trho ( double  T,
double  rho 
)

Definition at line 457 of file FluidClass.cpp.

double Fluid::entropy_Trho ( double  T,
double  rho 
)

Definition at line 473 of file FluidClass.cpp.

std::vector<std::string> Fluid::get_aliases ( )
inline

Definition at line 241 of file FluidClass.h.

std::string Fluid::get_EOSReference ( )
inline

Definition at line 239 of file FluidClass.h.

std::string Fluid::get_name ( void  )
inline

Returns a std::string with the name of the fluid.

Definition at line 235 of file FluidClass.h.

char* Fluid::get_namec ( )
inline

Returns a char* with the name of the fluid.

Definition at line 237 of file FluidClass.h.

std::string Fluid::get_REFPROPname ( )
inline

Definition at line 238 of file FluidClass.h.

std::string Fluid::get_TransportReference ( )
inline

Definition at line 240 of file FluidClass.h.

void Fluid::get_TTSESinglePhase_LUT_range ( double *  hmin,
double *  hmax,
double *  pmin,
double *  pmax 
)

Get the current range of the single-phase LUT.

Definition at line 3769 of file FluidClass.cpp.

double Fluid::gibbs_Trho ( double  T,
double  rho 
)

Definition at line 513 of file FluidClass.cpp.

double Fluid::hsatL_anc ( double  T)

Definition at line 1365 of file FluidClass.cpp.

double Fluid::hsatV_anc ( double  T)

Definition at line 1353 of file FluidClass.cpp.

double Fluid::internal_energy_Trho ( double  T,
double  rho 
)

Definition at line 465 of file FluidClass.cpp.

double Fluid::interpolate_in_TTSE_LUT ( long  iParam,
long  iInput1,
double  Input1,
long  iInput2,
double  Input2 
)

Interpolate within the TTSE LUT.

bool Fluid::isAlias ( std::string  name)

Returns true if the given name is an alias of the Fluid name. (Case-sensitive!!)

Parameters
nameThe given name

Definition at line 435 of file FluidClass.cpp.

bool Fluid::isenabled_EXTTP ( void  )

Check if TTSE is enabled.

Definition at line 3745 of file FluidClass.cpp.

bool Fluid::isenabled_TTSE_LUT ( void  )

Check if TTSE is enabled.

Definition at line 3753 of file FluidClass.cpp.

bool Fluid::isenabled_TTSE_LUT_writing ( void  )

Check if the writing of TTSE tables to file is enabled.

Definition at line 3759 of file FluidClass.cpp.

long Fluid::phase_prho_indices ( double  p,
double  rho,
double &  T,
double &  TL,
double &  TV,
double &  rhoL,
double &  rhoV 
)

Definition at line 1640 of file FluidClass.cpp.

std::string Fluid::phase_Tp ( double  T,
double  p,
double &  pL,
double &  pV,
double &  rhoL,
double &  rhoV 
)

Return the phase given the temperature and pressure.

Definition at line 1441 of file FluidClass.cpp.

long Fluid::phase_Tp_indices ( double  T,
double  p,
double &  pL,
double &  pV,
double &  rhoL,
double &  rhoV 
)

Return the phase using the phase flags from phase enum in CoolProp.h.

Definition at line 1465 of file FluidClass.cpp.

std::string Fluid::phase_Trho ( double  T,
double  rho,
double &  pL,
double &  pV,
double &  rhoL,
double &  rhoV 
)

Return the phase given the temperature and the density.

Definition at line 1539 of file FluidClass.cpp.

long Fluid::phase_Trho_indices ( double  T,
double  rho,
double &  pL,
double &  pV,
double &  rhoL,
double &  rhoV 
)

Return the phase using the phase flags from phase enum in CoolProp.h.

Definition at line 1563 of file FluidClass.cpp.

double Fluid::phi0 ( double  tau,
double  delta 
)
virtual

Reimplemented in REFPROPFluidClass.

Definition at line 381 of file FluidClass.cpp.

double Fluid::phir ( double  tau,
double  delta 
)
virtual

Reimplemented in REFPROPFluidClass.

Definition at line 237 of file FluidClass.cpp.

void Fluid::post_load ( rapidjson::Document JSON,
rapidjson::Document JSON_CAS 
)

Definition at line 162 of file FluidClass.cpp.

double Fluid::pressure_Trho ( double  T,
double  rho 
)

Definition at line 449 of file FluidClass.cpp.

virtual double Fluid::psat ( double  T)
inlinevirtual

Reimplemented in R218Class, R142bClass, R141bClass, SulfurDioxideClass, NitrousOxideClass, R41Class, R245faClass, AcetoneClass, R116Class, XenonClass, TolueneClass, R11Class, NonaneClass, R123Class, KryptonClass, R152AClass, IsohexaneClass, R14Class, NeopentaneClass, CyclohexaneClass, DecamethylcyclopentasiloxaneClass, OctamethylcyclotetrasiloxaneClass, IsopentaneClass, IsoButaneClass, nDodecaneClass, TetradecamethylhexasiloxaneClass, R13Class, HydrogenSulfideClass, nOctaneClass, nButaneClass, R114Class, HexamethyldisiloxaneClass, Trans2ButeneClass, DecaneClass, DodecamethylcyclohexasiloxaneClass, MethylLinolenateClass, R21Class, R365MFCClass, nHeptaneClass, REFPROPFluidClass, OrthoHydrogenClass, Cis2ButeneClass, EthylBenzeneClass, DodecamethylpentasiloxaneClass, OrthoDeuteriumClass, MethylLinoleateClass, EthaneClass, ParaHydrogenClass, CarbonylSulfideClass, pXyleneClass, MethylOleateClass, ParaDeuteriumClass, DecamethyltetrasiloxaneClass, nHexaneClass, IsoButeneClass, R113Class, R1234zeZClass, PropyneClass, mXyleneClass, MethylStearateClass, NitrogenClass, ArgonClass, HeliumClass, R717Class, WaterClass, HydrogenClass, NeonClass, OxygenClass, R134aClass, R290Class, R744Class, CarbonMonoxideClass, OctamethyltrisiloxaneClass, AceticAcidClass, MethaneClass, BenzeneClass, OneButeneClass, CyclopentaneClass, CycloPropaneClass, DeuteriumClass, DimethylCarbonateClass, EthanolClass, DimethylEtherClass, EthyleneClass, MethylPalmitateClass, FluorineClass, HFE143mClass, MethanolClass, PropyleneClass, R1233zdEClass, R1234yfClass, R1234zeClass, R124Class, R125Class, R12Class, R143AClass, R161Class, R22Class, R227EAClass, R23Class, R236EAClass, R236FAClass, R32Class, RC318Class, nPentaneClass, SulfurHexafluorideClass, UndecaneClass, and oXyleneClass.

Definition at line 359 of file FluidClass.h.

virtual double Fluid::psatL ( double  T)
inlinevirtual

Reimplemented in R404AClass, R407CClass, R410AClass, R507AClass, AirClass, R407FClass, and SES36Class.

Definition at line 362 of file FluidClass.h.

double Fluid::psatL_anc ( double  T)
inline

Definition at line 374 of file FluidClass.h.

virtual double Fluid::psatV ( double  T)
inlinevirtual

Reimplemented in R404AClass, R407CClass, R410AClass, R507AClass, AirClass, R407FClass, and SES36Class.

Definition at line 365 of file FluidClass.h.

double Fluid::psatV_anc ( double  T)
inline

Definition at line 380 of file FluidClass.h.

bool Fluid::pure ( )
inline

Returns true if the fluid is pure, false if pseudo-pure or a mixture.

Definition at line 243 of file FluidClass.h.

double Fluid::R ( void  )

Returns the mass-specific gas constant for the fluid in the desired units.

Definition at line 3235 of file FluidClass.cpp.

virtual double Fluid::rhosatL ( double  T)
inlinevirtual

Reimplemented in R218Class, R142bClass, R141bClass, SulfurDioxideClass, NitrousOxideClass, R41Class, R245faClass, AcetoneClass, R116Class, XenonClass, TolueneClass, R11Class, NonaneClass, R123Class, KryptonClass, R152AClass, IsohexaneClass, R14Class, NeopentaneClass, CyclohexaneClass, DecamethylcyclopentasiloxaneClass, OctamethylcyclotetrasiloxaneClass, IsopentaneClass, IsoButaneClass, nDodecaneClass, TetradecamethylhexasiloxaneClass, R13Class, HydrogenSulfideClass, nOctaneClass, nButaneClass, R114Class, HexamethyldisiloxaneClass, Trans2ButeneClass, DecaneClass, DodecamethylcyclohexasiloxaneClass, MethylLinolenateClass, R21Class, R365MFCClass, nHeptaneClass, REFPROPFluidClass, OrthoHydrogenClass, Cis2ButeneClass, EthylBenzeneClass, DodecamethylpentasiloxaneClass, OrthoDeuteriumClass, MethylLinoleateClass, EthaneClass, ParaHydrogenClass, CarbonylSulfideClass, pXyleneClass, MethylOleateClass, ParaDeuteriumClass, DecamethyltetrasiloxaneClass, nHexaneClass, IsoButeneClass, R113Class, R1234zeZClass, PropyneClass, mXyleneClass, MethylStearateClass, NitrogenClass, ArgonClass, HeliumClass, R404AClass, R407CClass, R410AClass, R507AClass, AirClass, R717Class, WaterClass, R407FClass, HydrogenClass, NeonClass, OxygenClass, R134aClass, R290Class, R744Class, SES36Class, CarbonMonoxideClass, OctamethyltrisiloxaneClass, AceticAcidClass, MethaneClass, BenzeneClass, OneButeneClass, CyclopentaneClass, CycloPropaneClass, DeuteriumClass, DimethylCarbonateClass, EthanolClass, DimethylEtherClass, EthyleneClass, MethylPalmitateClass, FluorineClass, HFE143mClass, MethanolClass, PropyleneClass, R1233zdEClass, R1234yfClass, R1234zeClass, R124Class, R125Class, R12Class, R143AClass, R161Class, R22Class, R227EAClass, R23Class, R236EAClass, R236FAClass, R32Class, RC318Class, nPentaneClass, SulfurHexafluorideClass, UndecaneClass, and oXyleneClass.

Definition at line 368 of file FluidClass.h.

void Fluid::rhosatPure ( double  T,
double &  rhoLout,
double &  rhoVout,
double &  pout,
double  omega = 1.0,
bool  use_guesses = false 
)

NB: Only valid for pure fluids - no pseudo-pure or mixtures. Get the saturated liquid, vapor densities and the saturated pressure

Parameters
TTemperature [K]]
poutSaturated pressure [kPa(abs)]
rhoLoutSaturated liquid pressure [kg/m3]
rhoVoutSaturated vapor pressure [kg/m3]
omegaRelaxation parameter [-]

Definition at line 1285 of file FluidClass.cpp.

void Fluid::rhosatPure_Akasaka ( double  T,
double &  rhoLout,
double &  rhoVout,
double &  pout,
double  omega = 1.0,
bool  use_guesses = false 
)

NB: Only valid for pure fluids - no pseudo-pure or mixtures. Get the saturated liquid, vapor densities and the saturated pressure using the method from Akasaka given by Ryo Akasaka, "A reliable and useful Method to Determine the Saturation State from Helmholtz Energy Equations of State", Journal of Thermal Science and Technology, v.3 n3 2008, 442-451

Parameters
TTemperature [K]]
poutSaturated pressure [kPa(abs)]
rhoLoutSaturated liquid pressure [kg/m3]
rhoVoutSaturated vapor pressure [kg/m3]
omegaRelaxation parameter [-]

This function implements the method of Akasaka to do analytic Newton-Raphson for the saturation calcs

Definition at line 1141 of file FluidClass.cpp.

void Fluid::rhosatPure_Brent ( double  T,
double &  rhoLout,
double &  rhoVout,
double &  pout 
)

Get the saturated liquid, vapor densities and the saturated pressure using Brent's method and adjusting the pressure

Parameters
TTemperature [K]]
poutSaturated pressure [kPa(abs)]
rhoLoutSaturated liquid pressure [kg/m3]
rhoVoutSaturated vapor pressure [kg/m3]

Definition at line 1064 of file FluidClass.cpp.

void Fluid::rhosatPure_BrentrhoV ( double  T,
double &  rhoLout,
double &  rhoVout,
double &  pout 
)

Get the saturated liquid, vapor densities and the saturated pressure using Brent's method and adjusting the density

Parameters
TTemperature [K]]
poutSaturated pressure [kPa(abs)]
rhoLoutSaturated liquid pressure [kg/m3]
rhoVoutSaturated vapor pressure [kg/m3]

Definition at line 1128 of file FluidClass.cpp.

virtual double Fluid::rhosatV ( double  T)
inlinevirtual

Reimplemented in R218Class, R142bClass, R141bClass, SulfurDioxideClass, NitrousOxideClass, R41Class, R245faClass, AcetoneClass, R116Class, XenonClass, TolueneClass, R11Class, NonaneClass, R123Class, KryptonClass, R152AClass, IsohexaneClass, R14Class, NeopentaneClass, CyclohexaneClass, DecamethylcyclopentasiloxaneClass, OctamethylcyclotetrasiloxaneClass, IsopentaneClass, IsoButaneClass, nDodecaneClass, TetradecamethylhexasiloxaneClass, R13Class, HydrogenSulfideClass, nOctaneClass, nButaneClass, R114Class, HexamethyldisiloxaneClass, Trans2ButeneClass, DecaneClass, DodecamethylcyclohexasiloxaneClass, MethylLinolenateClass, R21Class, R365MFCClass, nHeptaneClass, REFPROPFluidClass, OrthoHydrogenClass, Cis2ButeneClass, EthylBenzeneClass, DodecamethylpentasiloxaneClass, OrthoDeuteriumClass, MethylLinoleateClass, EthaneClass, ParaHydrogenClass, CarbonylSulfideClass, pXyleneClass, MethylOleateClass, ParaDeuteriumClass, DecamethyltetrasiloxaneClass, nHexaneClass, IsoButeneClass, R113Class, R1234zeZClass, PropyneClass, mXyleneClass, MethylStearateClass, NitrogenClass, ArgonClass, HeliumClass, R404AClass, R407CClass, R410AClass, R507AClass, AirClass, R717Class, WaterClass, R407FClass, HydrogenClass, NeonClass, OxygenClass, R134aClass, R290Class, R744Class, SES36Class, CarbonMonoxideClass, OctamethyltrisiloxaneClass, AceticAcidClass, MethaneClass, BenzeneClass, OneButeneClass, CyclopentaneClass, CycloPropaneClass, DeuteriumClass, DimethylCarbonateClass, EthanolClass, DimethylEtherClass, EthyleneClass, MethylPalmitateClass, FluorineClass, HFE143mClass, MethanolClass, PropyleneClass, R1233zdEClass, R1234yfClass, R1234zeClass, R124Class, R125Class, R12Class, R143AClass, R161Class, R22Class, R227EAClass, R23Class, R236EAClass, R236FAClass, R32Class, RC318Class, nPentaneClass, SulfurHexafluorideClass, UndecaneClass, and oXyleneClass.

Definition at line 371 of file FluidClass.h.

void Fluid::saturation_h ( double  h,
double  Tmin,
double  Tmax,
int  Q,
double &  Tsatout,
double &  rhoout,
double &  TsatLout,
double &  TsatVout,
double &  rhoLout,
double &  rhoVout 
)
virtual

Saturation temperature and saturated liquid and vapor densities as a function of the enthalpy. (The phase must be provided)

Parameters
hEnthalpy [kJ/kg/K]
TminMinimum temperature [K]
TmaxMaximum temperature [K]
QQuality [kg/kg]
TsatoutSaturated temperature [K]
rhooutSaturated density [kg/m3]
TsatLoutSaturated liquid temperature [K]
TsatVoutSaturated vapor temperature [K]
rhoLoutSaturated liquid density [kg/m3]
rhoVoutSaturated vapor density [kg/m3]

Definition at line 875 of file FluidClass.cpp.

void Fluid::saturation_p ( double  p,
bool  UseLUT,
double &  TsatLout,
double &  TsatVout,
double &  rhoLout,
double &  rhoVout 
)
virtual

Saturation temperature and saturated liquid and vapor densities as a function of the pressure.

Parameters
pPressure [kPa(abs)]
UseLUTIf True, use the Saturation Lookup tables, otherwise use the EOS and the equal gibbs function and equal pressure criterion to determine saturation state
TsatLoutSaturated liquid temperature [K]
TsatVoutSaturated vapor temperature [K]
rhoLoutSaturated liquid density [kg/m3]
rhoVoutSaturated vapor density [kg/m3]

Reimplemented in REFPROPFluidClass.

Definition at line 3060 of file FluidClass.cpp.

void Fluid::saturation_s ( double  s,
int  Q,
double &  Tsatout,
double &  rhoout,
double &  TsatLout,
double &  TsatVout,
double &  rhoLout,
double &  rhoVout 
)
virtual

Saturation temperature and saturated liquid and vapor densities as a function of the entropy. (The phase must be provided)

Parameters
sEntropy [kJ/kg/K]
Qquality [kg/kg]
TsatoutSaturated temperature [K]
rhooutSaturated density [kg/m3]
TsatLoutSaturated liquid temperature [K]
TsatVoutSaturated vapor temperature [K]
rhoLoutSaturated liquid density [kg/m3]
rhoVoutSaturated vapor density [kg/m3]

Definition at line 803 of file FluidClass.cpp.

void Fluid::saturation_T ( double  T,
bool  UseLUT,
double &  psatLout,
double &  psatVout,
double &  rhoLout,
double &  rhoVout 
)
virtual

Saturation pressure and saturated liquid and vapor densities as a function of the temperature.

Parameters
TTemperature [K]
UseLUTIf True, use the Saturation Lookup tables, otherwise use the EOS and the equal gibbs function and equal pressure criterion to determine saturation state
psatLoutSaturated liquid pressure [kPa(abs)]
psatVoutSaturated vapor pressure [kPa(abs)]
rhoLoutSaturated liquid density [kg/m3]
rhoVoutSaturated vapor density [kg/m3]

Reimplemented in REFPROPFluidClass.

Definition at line 948 of file FluidClass.cpp.

void Fluid::saturation_VdW ( double  T,
double &  rhoL,
double &  rhoV,
double &  p,
double  s0 = -1 
)

Definition at line 1258 of file FluidClass.cpp.

void Fluid::set_TTSESat_LUT_size ( int  Nsat)

Over-ride the default size of both of the saturation LUT.

Definition at line 3763 of file FluidClass.cpp.

void Fluid::set_TTSESinglePhase_LUT_range ( double  hmin,
double  hmax,
double  pmin,
double  pmax 
)

Over-ride the default range of the single-phase LUT.

Definition at line 3767 of file FluidClass.cpp.

void Fluid::set_TTSESinglePhase_LUT_size ( int  Np,
int  Nh 
)

Over-ride the default size of the single-phase LUT.

Definition at line 3765 of file FluidClass.cpp.

double Fluid::specific_heat_p_ideal_Trho ( double  T)

Definition at line 497 of file FluidClass.cpp.

double Fluid::specific_heat_p_Trho ( double  T,
double  rho 
)

Definition at line 487 of file FluidClass.cpp.

double Fluid::specific_heat_v_Trho ( double  T,
double  rho 
)

Definition at line 480 of file FluidClass.cpp.

double Fluid::speed_sound_Trho ( double  T,
double  rho 
)

Definition at line 503 of file FluidClass.cpp.

double Fluid::ssatL_anc ( double  T)

Definition at line 1371 of file FluidClass.cpp.

double Fluid::ssatV_anc ( double  T)

Definition at line 1359 of file FluidClass.cpp.

double Fluid::surface_tension_T ( double  T)
virtual
void Fluid::temperature_hs ( double  h,
double  s,
double &  Tout,
double &  rhoout,
double &  rhoL,
double &  rhoV,
double &  TsatLout,
double &  TsatVout 
)
virtual

Temperature as a function of pressure and entropy

Parameters
hEnthalpy [kJ/kg/K]
sEntropy [kJ/kg/K]
ToutTemperature [K]
rhooutDensity [kg/m^3]
rhoLSaturated liquid density [kg/m^3]
rhoVSaturated vapor density [kg/m^3]

Reimplemented in REFPROPFluidClass.

Definition at line 2286 of file FluidClass.cpp.

void Fluid::temperature_ph ( double  p,
double  h,
double &  Tout,
double &  rhoout,
double &  rhoL,
double &  rhoV,
double &  TsatLout,
double &  TsatVout,
double  T0 = -1,
double  rho0 = -1 
)
virtual

Temperature as a function of pressure and enthalpy

Parameters
pPressure [kPa]
hEnthalpy [kJ/kg]
ToutTemperature [K]
rhooutDensity [kg/m^3]
rhoLSaturated liquid density [kg/m^3]
rhoVSaturated vapor density [kg/m^3]
T0Starting temperature for the solver
rho0Starting density value for the solver

Reimplemented in REFPROPFluidClass.

Definition at line 1713 of file FluidClass.cpp.

double Fluid::temperature_prho ( double  p,
double  rho,
double  T0 
)

Definition at line 1682 of file FluidClass.cpp.

double Fluid::temperature_prho_PengRobinson ( double  p,
double  rho 
)

\[ \begin{array}{l} p = \frac{{RT}}{{v - b}} - \frac{{a\alpha }}{{v\left( {v + b} \right)}}\\ \alpha = \left( {1 + \kappa \left( {1 - \sqrt {{T_r}} } \right)} \right)\left( {1 + \kappa \left( {1 - \sqrt {{T_r}} } \right)} \right) = 1 + 2\kappa \left( {1 - \sqrt {{T_r}} } \right) + {\kappa ^2}{\left( {1 - \sqrt {{T_r}} } \right)^2}\\ \alpha = 1 + 2\kappa \left( {1 - \sqrt {{T_r}} } \right) + {\kappa ^2}{\left( {1 - \sqrt {{T_r}} } \right)^2}\\ \alpha = 1 + 2\kappa - 2\kappa \sqrt {{T_r}} + {\kappa ^2}\left[ {1 - 2\sqrt {{T_r}} + {T_r}} \right]\\ T = {T_r}{T_c}\\ p = \frac{{R{T_r}{T_c}}}{{v - b}} - \frac{{a\left( {1 + 2\kappa - 2\kappa \sqrt {{T_r}} + {\kappa ^2}\left[ {1 - 2\sqrt {{T_r}} + {T_r}} \right]} \right)}}{{v\left( {v + b} \right)}}\\ \\ {\rm{Factor in terms of }}\sqrt {{T_r}} \\ \\ p = \frac{{R{T_r}{T_c}}}{{v - b}} - \frac{{a\left( {1 + 2\kappa + {\kappa ^2} - 2\kappa \sqrt {{T_r}} + {\kappa ^2}\left[ { - 2\sqrt {{T_r}} + {T_r}} \right]} \right)}}{{v\left( {v + b} \right)}}\\ p = \frac{{R{T_r}{T_c}}}{{v - b}} - \frac{{a\left( {1 + 2\kappa + {\kappa ^2} - 2\kappa (1 + \kappa )\sqrt {{T_r}} + {\kappa ^2}{T_r}} \right)}}{{v\left( {v + b} \right)}}\\ p = \frac{{R{T_r}{T_c}}}{{v - b}} - \frac{{a\left( {1 + 2\kappa + {\kappa ^2}} \right)}}{{v\left( {v + b} \right)}} + \frac{{2a\kappa (1 + \kappa )}}{{v\left( {v + b} \right)}}\sqrt {{T_r}} - \frac{{a{\kappa ^2}}}{{v\left( {v + b} \right)}}{T_r}\\ 0 = \left[ {\frac{{R{T_c}}}{{v - b}} - \frac{{a{\kappa ^2}}}{{v\left( {v + b} \right)}}} \right]{T_r} + \frac{{2a\kappa (1 + \kappa )}}{{v\left( {v + b} \right)}}\sqrt {{T_r}} - \frac{{a\left( {1 + 2\kappa + {\kappa ^2}} \right)}}{{v\left( {v + b} \right)}} - p \end{array} \]

Definition at line 687 of file FluidClass.cpp.

double Fluid::temperature_prho_VanDerWaals ( double  p,
double  rho 
)

Definition at line 710 of file FluidClass.cpp.

void Fluid::temperature_ps ( double  p,
double  s,
double &  Tout,
double &  rhoout,
double &  rhoL,
double &  rhoV,
double &  TsatLout,
double &  TsatVout 
)
virtual

Temperature as a function of pressure and entropy

Parameters
pPressure [kPa]
sEntropy [kJ/kg/K]
ToutTemperature [K]
rhooutDensity [kg/m^3]
rhoLSaturated liquid density [kg/m^3]
rhoVSaturated vapor density [kg/m^3]

Reimplemented in REFPROPFluidClass.

Definition at line 2034 of file FluidClass.cpp.

std::string Fluid::to_json ( )

Export this fluid as a JSON file;.

Definition at line 4043 of file FluidClass.cpp.

double Fluid::Tsat ( double  p,
double  Q,
double  T_guess 
)

The saturation temperature of the fluid for a given pressure and quality. If the fluid is pure, the saturated vapor and saturated liquid temperatures are the same. If not, give the "correct" saturation temperature.

Parameters
pSaturation pressure [kPa(abs)]
QVapor quality in the range [0,1]
T_guessNot currently used due to the use of the Brent solver. Used to be the guess temperature

Definition at line 3165 of file FluidClass.cpp.

double Fluid::Tsat ( double  p,
double  Q,
double  T_guess,
bool  UseLUT,
double &  rhoLout,
double &  rhoVout 
)

The saturation temperature of the fluid for a given pressure and quality. If the fluid is pure, the saturated vapor and saturated liquid temperatures are the same. If not, give the "correct" saturation temperature.

Parameters
pSaturation pressure [kPa(abs)]
QVapor quality in the range [0,1]
T_guessNot currently used due to the use of the Brent solver. Used to be the guess temperature
UseLUTUse the Lookup table (True), or not (False)
rhoLoutThe saturated liquid density [kg/m3]
rhoVoutThe saturated vapor density [kg/m3]

Definition at line 3171 of file FluidClass.cpp.

double Fluid::Tsat_anc ( double  p,
double  Q 
)

The saturation temperature of the fluid for a given pressure and quality (1 or 0) using only the ancillary equations

Parameters
pSaturation pressure [kPa(abs)]
QVapor quality in the range [0,1]

Definition at line 2827 of file FluidClass.cpp.

virtual double Fluid::viscosity_background ( double  T,
double  rho 
)
inlinevirtual

The background viscosity for the fluid. The viscosity minus the critical contribution minus the dilute-gas contribution This function is optional, and returns a NotImplementedError if the derived class does not implement it. Hopefully the calling function catches the error

See also
viscosity_Trho
Parameters
TTemperature [K]
rhoDensity [kg/m3]

Reimplemented in nDodecaneClass, R290Class, R134aClass, and NitrogenClass.

Definition at line 477 of file FluidClass.h.

double Fluid::viscosity_dilute ( double  T,
double  e_k,
double  sigma 
)
virtual

This function returns the dilute portion of the viscosity

Parameters
TTemperature [K]
e_kepsilon/k_B for the fluid [K]
sigma[nm]
Returns
mu Dilute-gas viscosity in the limit of zero density [Pa-s]

Definition at line 3240 of file FluidClass.cpp.

double Fluid::viscosity_ECS_Trho ( double  T,
double  rho,
Fluid ReferenceFluid 
)

This function is optional, and returns a NotImplementedError if the derived class does not implement it. Hopefully the calling function catches the error

Parameters
TTemperature [K]
rhoDensity [kg/m3]
ReferenceFluidA pointer to an instance of a Fluid class that is used as the reference fluid for the ECS model

Definition at line 3472 of file FluidClass.cpp.

virtual double Fluid::viscosity_residual ( double  T,
double  rho 
)
inlinevirtual

The residual viscosity for the fluid. The sum of the background and critical contributions. This function is optional, and returns a NotImplementedError if the derived class does not implement it. Hopefully the calling function catches the error

See also
viscosity_Trho
Parameters
TTemperature [K]
rhoDensity [kg/m3]

Reimplemented in EthaneClass, R134aClass, R290Class, MethaneClass, and NitrogenClass.

Definition at line 468 of file FluidClass.h.

double Fluid::viscosity_Trho ( double  T,
double  rho 
)
virtual

Member Data Documentation

std::vector<std::string> Fluid::aliases
protected

The REFPROP-compliant name if REFPROP-"name" is not a compatible fluid name. If not included, "name" is assumed to be a valid name for REFPROP.

Definition at line 153 of file FluidClass.h.

BibTeXKeysStruct Fluid::BibTeXKeys

Definition at line 175 of file FluidClass.h.

bool Fluid::built_TTSE_LUT

Definition at line 584 of file FluidClass.h.

FluidCache Fluid::cache
protected

Definition at line 150 of file FluidClass.h.

struct CriticalStruct Fluid::crit

Definition at line 218 of file FluidClass.h.

CriticalSplineStruct_T Fluid::CriticalSpline_T

Definition at line 231 of file FluidClass.h.

double Fluid::ECS_qd
protected

A string that gives the name of the fluids that should be used for the ECS method for transport properties.

Definition at line 156 of file FluidClass.h.

std::string Fluid::ECSReferenceFluid
protected

A list of aliases of names for the Fluid, each element is a std::string instance.

Definition at line 154 of file FluidClass.h.

bool Fluid::enable_writing_tables_to_files

Definition at line 584 of file FluidClass.h.

bool Fluid::enabled_EXTTP

Definition at line 584 of file FluidClass.h.

bool Fluid::enabled_TTSE_LUT

Parameters for the Tabular Taylor Series Expansion (TTSE) Method.

Definition at line 584 of file FluidClass.h.

EnvironmentalFactorsStruct Fluid::environment

Definition at line 176 of file FluidClass.h.

std::string Fluid::EOSReference
protected

The critical qd parameter for the Olchowy-Sengers cross-over term.

Definition at line 157 of file FluidClass.h.

AncillaryCurveClass* Fluid::h_ancillary
protected

True if it is a pure fluid, false otherwise.

Definition at line 162 of file FluidClass.h.

double Fluid::hmax_TTSE
protected

Definition at line 171 of file FluidClass.h.

double Fluid::hmin_TTSE
protected

Definition at line 171 of file FluidClass.h.

struct HSContainer Fluid::HS

The point that is used to reduce the T and rho for EOS.

Values for the enthalpy-entropy solver

Definition at line 223 of file FluidClass.h.

bool Fluid::isPure
protected

A std::string that contains a reference for the transport properties of the fluid.

Definition at line 159 of file FluidClass.h.

struct FluidLimits Fluid::limits

Definition at line 219 of file FluidClass.h.

std::string Fluid::name
protected

A container to hold the cache for residual Helmholtz derivatives.

Definition at line 151 of file FluidClass.h.

unsigned int Fluid::Nh_TTSE
protected

Definition at line 172 of file FluidClass.h.

unsigned int Fluid::Np_TTSE
protected

Definition at line 172 of file FluidClass.h.

unsigned int Fluid::Nsat_TTSE
protected

Definition at line 172 of file FluidClass.h.

struct OtherParameters Fluid::params

Definition at line 220 of file FluidClass.h.

std::vector<phi_BC*> Fluid::phi0list

A vector of instances of the phi_BC classes for the residual Helmholtz energy contribution.

Definition at line 179 of file FluidClass.h.

std::vector<phi_BC*> Fluid::phirlist

Definition at line 178 of file FluidClass.h.

double Fluid::pmax_TTSE
protected

Definition at line 171 of file FluidClass.h.

double Fluid::pmin_TTSE
protected

Definition at line 171 of file FluidClass.h.

struct CriticalStruct* Fluid::preduce

Definition at line 221 of file FluidClass.h.

struct CriticalStruct Fluid::reduce

A pointer to the point that is used to reduce the T and rho for EOS.

Definition at line 222 of file FluidClass.h.

std::string Fluid::REFPROPname
protected

The name of the fluid.

Definition at line 152 of file FluidClass.h.

AncillaryCurveClass* Fluid::s_ancillary
protected

Definition at line 163 of file FluidClass.h.

std::string Fluid::TransportReference
protected

A std::string that contains a reference for thermo properties for the fluid.

Definition at line 158 of file FluidClass.h.

TTSETwoPhaseTableClass Fluid::TTSESatL

Definition at line 226 of file FluidClass.h.

TTSETwoPhaseTableClass Fluid::TTSESatV

Definition at line 227 of file FluidClass.h.

TTSESinglePhaseTableClass Fluid::TTSESinglePhase

Definition at line 228 of file FluidClass.h.


The documentation for this class was generated from the following files: