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 | Static Public Member Functions | List of all members
REFPROPFluidClass Class Reference

#include <REFPROP.h>

Inheritance diagram for REFPROPFluidClass:
Fluid

Public Member Functions

 REFPROPFluidClass ()
 
 REFPROPFluidClass (std::string FluidName, std::vector< double > xmol)
 
double R (void)
 
double phir (double tau, double delta)
 
double dphir_dDelta (double tau, double delta)
 
double dphir_dTau (double tau, double delta)
 
double d2phir_dDelta_dTau (double tau, double delta)
 
double d2phir_dDelta2 (double tau, double delta)
 
double d2phir_dTau2 (double tau, double delta)
 
double phi0 (double tau, double delta)
 
double dphi0_dTau (double tau, double delta)
 
double d2phi0_dTau2 (double tau, double delta)
 
double viscosity_Trho (double T, double rho)
 
double conductivity_Trho (double T, double rho)
 
double surface_tension_T (double T)
 
void saturation_T (double T, bool UseLUT, double &psatLout, double &psatVout, double &rhosatLout, double &rhosatVout)
 
void saturation_p (double p, bool UseLUT, double &TsatLout, double &TsatVout, double &rhosatLout, double &rhosatVout)
 
void temperature_ph (double p, double h, double &Tout, double &rhoout, double &rhoLout, double &rhoVout, double &TsatLout, double &TsatVout, double T0, double rho0)
 
void temperature_ps (double p, double s, double &Tout, double &rhoout, double &rhoLout, double &rhoVout, double &TsatLout, double &TsatVout)
 
void temperature_hs (double h, double s, double &Tout, double &rhoout, double &rhoLout, double &rhoVout, double &TsatLout, double &TsatVout)
 
double density_Tp (double T, double p)
 
double density_Tp (double T, double p, double rho_guess)
 
double psat (double T)
 
double rhosatL (double T)
 
double rhosatV (double T)
 
- Public Member Functions inherited from Fluid
 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 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 dphi0_dDelta (double tau, double delta)
 
virtual double d2phi0_dDelta2 (double tau, double delta)
 
virtual double d2phi0_dDelta_dTau (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 void density_Ts (double T, double s, double &rhoout, double &pout, double &rhoLout, double &rhoVout, double &psatLout, double &psatVout)
 
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 psatL (double T)
 
virtual double psatV (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)
 
void saturation_VdW (double T, double &rhoL, double &rhoV, double &p, double s0=-1)
 
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...
 

Static Public Member Functions

static bool refpropSupported ()
 

Additional Inherited Members

- Public Attributes inherited from Fluid
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 inherited from Fluid
double _get_rho_guess (double T, double p)
 
- Protected Attributes inherited from Fluid
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

Definition at line 5 of file REFPROP.h.

Constructor & Destructor Documentation

REFPROPFluidClass::REFPROPFluidClass ( )
REFPROPFluidClass::REFPROPFluidClass ( std::string  FluidName,
std::vector< double >  xmol 
)

Definition at line 1015 of file REFPROP.cpp.

Member Function Documentation

double REFPROPFluidClass::conductivity_Trho ( double  T,
double  rho 
)
virtual

Reimplemented from Fluid.

Definition at line 1225 of file REFPROP.cpp.

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

Reimplemented from Fluid.

Definition at line 1132 of file REFPROP.cpp.

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

Reimplemented from Fluid.

Definition at line 1165 of file REFPROP.cpp.

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

Reimplemented from Fluid.

Definition at line 1155 of file REFPROP.cpp.

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

Reimplemented from Fluid.

Definition at line 1143 of file REFPROP.cpp.

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

Reimplemented from Fluid.

Definition at line 1344 of file REFPROP.cpp.

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

Reimplemented from Fluid.

Definition at line 1348 of file REFPROP.cpp.

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

Reimplemented from Fluid.

Definition at line 1185 of file REFPROP.cpp.

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

Reimplemented from Fluid.

Definition at line 1112 of file REFPROP.cpp.

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

Reimplemented from Fluid.

Definition at line 1122 of file REFPROP.cpp.

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

Reimplemented from Fluid.

Definition at line 1195 of file REFPROP.cpp.

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

Reimplemented from Fluid.

Definition at line 1175 of file REFPROP.cpp.

double REFPROPFluidClass::psat ( double  T)
virtual

Reimplemented from Fluid.

Definition at line 1359 of file REFPROP.cpp.

double REFPROPFluidClass::R ( void  )
inline

Definition at line 15 of file REFPROP.h.

bool REFPROPFluidClass::refpropSupported ( )
static

Definition at line 1066 of file REFPROP.cpp.

double REFPROPFluidClass::rhosatL ( double  T)
virtual

Reimplemented from Fluid.

Definition at line 1382 of file REFPROP.cpp.

double REFPROPFluidClass::rhosatV ( double  T)
virtual

Reimplemented from Fluid.

Definition at line 1371 of file REFPROP.cpp.

void REFPROPFluidClass::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 from Fluid.

Definition at line 1253 of file REFPROP.cpp.

void REFPROPFluidClass::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 from Fluid.

Definition at line 1235 of file REFPROP.cpp.

double REFPROPFluidClass::surface_tension_T ( double  T)
virtual

Reimplemented from Fluid.

Definition at line 1208 of file REFPROP.cpp.

void REFPROPFluidClass::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 from Fluid.

Definition at line 1318 of file REFPROP.cpp.

void REFPROPFluidClass::temperature_ph ( double  p,
double  h,
double &  Tout,
double &  rhoout,
double &  rhoL,
double &  rhoV,
double &  TsatLout,
double &  TsatVout,
double  T0,
double  rho0 
)
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 from Fluid.

Definition at line 1268 of file REFPROP.cpp.

void REFPROPFluidClass::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 from Fluid.

Definition at line 1293 of file REFPROP.cpp.

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

Reimplemented from Fluid.

Definition at line 1216 of file REFPROP.cpp.


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