|
CoolProp 8.0.0
An open-source fluid property and humid air property database
|
A property provider for incompressible solutions and pure fluids.
This fluid instance is populated using an entry from a JSON file
Definition at line 59 of file IncompressibleFluid.h.
#include <IncompressibleFluid.h>
Public Member Functions | |
| IncompressibleFluid () | |
| virtual | ~IncompressibleFluid ()=default |
| std::string | getName () const |
| std::string | get_name () const |
| std::string | getDescription () const |
| std::string | getReference () const |
| double | getTmax () const |
| double | getTmin () const |
| double | getxmax () const |
| double | getxmin () const |
| composition_types | getxid () const |
| double | getTminPsat () const |
| double | getTbase () const |
| double | getxbase () const |
| void | setName (const std::string &name) |
| void | setDescription (const std::string &description) |
| void | setReference (const std::string &reference) |
| void | setTmax (double Tmax) |
| void | setTmin (double Tmin) |
| void | setxmax (double xmax) |
| void | setxmin (double xmin) |
| void | setxid (composition_types xid) |
| void | setTminPsat (double TminPsat) |
| void | setTbase (double Tbase) |
| void | setxbase (double xbase) |
| void | setDensity (IncompressibleData density) |
| Setters for the coefficients. More... | |
| void | setSpecificHeat (IncompressibleData specific_heat) |
| void | setViscosity (IncompressibleData viscosity) |
| void | setConductivity (IncompressibleData conductivity) |
| void | setPsat (IncompressibleData p_sat) |
| void | setTfreeze (IncompressibleData T_freeze) |
| void | setMass2input (IncompressibleData mass2input) |
| Setters for the concentration conversion coefficients. More... | |
| void | setVolume2input (IncompressibleData volume2input) |
| void | setMole2input (IncompressibleData mole2input) |
| void | validate () |
| A function to check coefficients and equation types. More... | |
| bool | is_pure () |
| A function to test the density coefficients for 1D or 2D. More... | |
| double | rho (double T, double p, double x) |
| Density as a function of temperature, pressure and composition. More... | |
| double | c (double T, double p, double x) |
| Heat capacities as a function of temperature, pressure and composition. More... | |
| double | cp (double T, double p, double x) |
| double | cv (double T, double p, double x) |
| double | s (double T, double p, double x) |
| Entropy as a function of temperature, pressure and composition. More... | |
| double | u (double T, double p, double x) |
| Internal energy as a function of temperature, pressure and composition. More... | |
| double | h (double T, double p, double x) |
| Enthalpy as a function of temperature, pressure and composition. More... | |
| double | visc (double T, double p, double x) |
| Viscosity as a function of temperature, pressure and composition. More... | |
| double | cond (double T, double p, double x) |
| Thermal conductivity as a function of temperature, pressure and composition. More... | |
| double | psat (double T, double x) |
| Saturation pressure as a function of temperature and composition. More... | |
| double | Tfreeze (double p, double x) |
| Freezing temperature as a function of pressure and composition. More... | |
| double | drhodTatPx (double T, double p, double x) |
| Partial derivative of density. More... | |
| double | dsdTatPxdT (double T, double p, double x) |
| Partial derivative of entropy. More... | |
| double | dhdTatPxdT (double T, double p, double x) |
| Partial derivative of enthalpy. More... | |
| double | inputFromMass (double T, double x) |
| Mass fraction conversion function. More... | |
| double | inputFromVolume (double T, double x) |
| Volume fraction conversion function. More... | |
| double | inputFromMole (double T, double x) |
| Mole fraction conversion function. More... | |
| double | T_rho (double Dmass, double p, double x) |
| Temperature as a function of density, pressure and composition. More... | |
| double | T_c (double Cmass, double p, double x) |
| Temperature as a function of heat capacities as a function of temperature, pressure and composition. More... | |
| double | T_s (double Smass, double p, double x) |
| Temperature as a function of entropy as a function of temperature, pressure and composition. More... | |
| double | T_u (double Umass, double p, double x) |
| Temperature as a function of internal energy as a function of temperature, pressure and composition. More... | |
| double | T_h (double Hmass, double p, double x) |
| Temperature as a function of enthalpy, pressure and composition. More... | |
| double | T_visc (double visc, double p, double x) |
| Viscosity as a function of temperature, pressure and composition. More... | |
| double | T_cond (double cond, double p, double x) |
| Thermal conductivity as a function of temperature, pressure and composition. More... | |
| double | T_psat (double psat, double x) |
| Saturation pressure as a function of temperature and composition. More... | |
| double | x_Tfreeze (double Tfreeze, double p) |
| Composition as a function of freezing temperature and pressure. More... | |
| bool | checkX (double x) |
| Check validity of composition input. More... | |
| bool | checkTPX (double T, double p, double x) |
| Check validity of temperature, pressure and composition input. More... | |
Protected Member Functions | |
| double | baseExponential (const IncompressibleData &data, double y, double ybase) |
| Base functions that handle the custom function types. More... | |
| double | baseLogexponential (const IncompressibleData &data, double y, double ybase) |
| Base exponential function with logarithmic term. More... | |
| double | baseExponentialOffset (IncompressibleData data, double y) |
| double | basePolyOffset (IncompressibleData data, double y, double z=0.0) |
| double | h_u (double T, double p, double x) |
| Enthalpy from u, p and rho. More... | |
| double | u_h (double T, double p, double x) |
| Internal energy from h, p and rho. More... | |
| bool | checkT (double T, double p, double x) |
| Check validity of temperature input. More... | |
| bool | checkP (double T, double p, double x) |
| Check validity of pressure input. More... | |
Protected Attributes | |
| bool | strict |
| std::string | name |
| std::string | description |
| std::string | reference |
| double | Tmin |
| double | Tmax |
| double | xmin |
| double | xmax |
| composition_types | xid |
| double | TminPsat |
| double | xbase |
| double | Tbase |
| IncompressibleData | density |
| These are the objects that hold the coefficients. More... | |
| IncompressibleData | specific_heat |
| Specific heat coefficients. More... | |
| IncompressibleData | viscosity |
| Viscosity coefficients. More... | |
| IncompressibleData | conductivity |
| Conductivity coefficients. More... | |
| IncompressibleData | p_sat |
| Saturation pressure coefficients. More... | |
| IncompressibleData | T_freeze |
| Freezing temperature coefficients. More... | |
| IncompressibleData | mass2input |
| Mass fraction conversion coefficients. More... | |
| IncompressibleData | volume2input |
| Volume fraction conversion coefficients. More... | |
| IncompressibleData | mole2input |
| Mole fraction conversion coefficients. More... | |
| Polynomial2DFrac | poly |
|
inline |
Definition at line 142 of file IncompressibleFluid.h.
|
virtualdefault |
|
protected |
Base functions that handle the custom function types.
Base exponential function.
Definition at line 38 of file IncompressibleFluid.cpp.
|
protected |
|
protected |
Base exponential function with logarithmic term.
Definition at line 64 of file IncompressibleFluid.cpp.
|
protected |
Definition at line 89 of file IncompressibleFluid.cpp.
| double CoolProp::IncompressibleFluid::c | ( | double | T, |
| double | p, | ||
| double | x | ||
| ) |
Heat capacities as a function of temperature, pressure and composition.
Definition at line 132 of file IncompressibleFluid.cpp.
|
protected |
Check validity of pressure input.
Compares the given pressure p to the saturation pressure at temperature T and throws and exception if p is lower than the saturation conditions. The default value for psat is -1 yielding true if psat is not redefined in the subclass.
Definition at line 458 of file IncompressibleFluid.cpp.
|
protected |
Check validity of temperature input.
Compares the given temperature T to the result of a freezing point calculation. This is not necessarily defined for all fluids, default values do not cause errors.
Definition at line 441 of file IncompressibleFluid.cpp.
|
inline |
Check validity of temperature, pressure and composition input.
Definition at line 425 of file IncompressibleFluid.h.
| bool CoolProp::IncompressibleFluid::checkX | ( | double | x | ) |
Check validity of composition input.
Compares the given composition x to a stored minimum and maximum value. Enforces the redefinition of xmin and xmax since the default values cause an error.
Definition at line 483 of file IncompressibleFluid.cpp.
| double CoolProp::IncompressibleFluid::cond | ( | double | T, |
| double | p, | ||
| double | x | ||
| ) |
Thermal conductivity as a function of temperature, pressure and composition.
Definition at line 167 of file IncompressibleFluid.cpp.
|
inline |
Definition at line 271 of file IncompressibleFluid.h.
|
inline |
Definition at line 274 of file IncompressibleFluid.h.
| double CoolProp::IncompressibleFluid::dhdTatPxdT | ( | double | T, |
| double | p, | ||
| double | x | ||
| ) |
Partial derivative of enthalpy.
Definition at line 271 of file IncompressibleFluid.cpp.
| double CoolProp::IncompressibleFluid::drhodTatPx | ( | double | T, |
| double | p, | ||
| double | x | ||
| ) |
Partial derivative of density.
Partial derivative of density with respect to temperature at constant pressure and composition.
Definition at line 241 of file IncompressibleFluid.cpp.
| double CoolProp::IncompressibleFluid::dsdTatPxdT | ( | double | T, |
| double | p, | ||
| double | x | ||
| ) |
Partial derivative of entropy.
Definition at line 256 of file IncompressibleFluid.cpp.
|
inline |
Definition at line 151 of file IncompressibleFluid.h.
|
inline |
Definition at line 154 of file IncompressibleFluid.h.
|
inline |
Definition at line 148 of file IncompressibleFluid.h.
|
inline |
Definition at line 157 of file IncompressibleFluid.h.
|
inline |
Definition at line 179 of file IncompressibleFluid.h.
|
inline |
Definition at line 161 of file IncompressibleFluid.h.
|
inline |
Definition at line 164 of file IncompressibleFluid.h.
|
inline |
Definition at line 176 of file IncompressibleFluid.h.
|
inline |
Definition at line 182 of file IncompressibleFluid.h.
|
inline |
Definition at line 173 of file IncompressibleFluid.h.
|
inline |
Definition at line 167 of file IncompressibleFluid.h.
|
inline |
Definition at line 170 of file IncompressibleFluid.h.
|
inline |
Enthalpy as a function of temperature, pressure and composition.
Definition at line 288 of file IncompressibleFluid.h.
|
inlineprotected |
Enthalpy from u, p and rho.
Calculate enthalpy as a function of temperature and pressure employing functions for internal energy and density. Provides consistent formulations.
Definition at line 384 of file IncompressibleFluid.h.
| double CoolProp::IncompressibleFluid::inputFromMass | ( | double | T, |
| double | x | ||
| ) |
Mass fraction conversion function.
If the fluid type is mass-based, it does not do anything. Otherwise, it converts the mass fraction to the required input.
Definition at line 287 of file IncompressibleFluid.cpp.
| double CoolProp::IncompressibleFluid::inputFromMole | ( | double | T, |
| double | x | ||
| ) |
Mole fraction conversion function.
If the fluid type is mole-based, it does not do anything. Otherwise, it converts the mole fraction to the required input.
Definition at line 361 of file IncompressibleFluid.cpp.
| double CoolProp::IncompressibleFluid::inputFromVolume | ( | double | T, |
| double | x | ||
| ) |
Volume fraction conversion function.
If the fluid type is volume-based, it does not do anything. Otherwise, it converts the volume fraction to the required input.
Definition at line 324 of file IncompressibleFluid.cpp.
| bool CoolProp::IncompressibleFluid::is_pure | ( | ) |
A function to test the density coefficients for 1D or 2D.
Definition at line 32 of file IncompressibleFluid.cpp.
| double CoolProp::IncompressibleFluid::psat | ( | double | T, |
| double | x | ||
| ) |
Saturation pressure as a function of temperature and composition.
Definition at line 187 of file IncompressibleFluid.cpp.
| double CoolProp::IncompressibleFluid::rho | ( | double | T, |
| double | p, | ||
| double | x | ||
| ) |
Density as a function of temperature, pressure and composition.
Definition at line 111 of file IncompressibleFluid.cpp.
|
inline |
Entropy as a function of temperature, pressure and composition.
Definition at line 278 of file IncompressibleFluid.h.
|
inline |
Definition at line 230 of file IncompressibleFluid.h.
|
inline |
Setters for the coefficients.
Definition at line 221 of file IncompressibleFluid.h.
|
inline |
Definition at line 189 of file IncompressibleFluid.h.
|
inline |
Setters for the concentration conversion coefficients.
Definition at line 241 of file IncompressibleFluid.h.
|
inline |
Definition at line 247 of file IncompressibleFluid.h.
|
inline |
Definition at line 186 of file IncompressibleFluid.h.
|
inline |
Definition at line 233 of file IncompressibleFluid.h.
|
inline |
Definition at line 192 of file IncompressibleFluid.h.
|
inline |
Definition at line 224 of file IncompressibleFluid.h.
|
inline |
Definition at line 213 of file IncompressibleFluid.h.
|
inline |
Definition at line 236 of file IncompressibleFluid.h.
|
inline |
Definition at line 195 of file IncompressibleFluid.h.
|
inline |
Definition at line 198 of file IncompressibleFluid.h.
|
inline |
Definition at line 210 of file IncompressibleFluid.h.
|
inline |
Definition at line 227 of file IncompressibleFluid.h.
|
inline |
Definition at line 244 of file IncompressibleFluid.h.
|
inline |
Definition at line 216 of file IncompressibleFluid.h.
|
inline |
Definition at line 207 of file IncompressibleFluid.h.
|
inline |
Definition at line 201 of file IncompressibleFluid.h.
|
inline |
Definition at line 204 of file IncompressibleFluid.h.
| double CoolProp::IncompressibleFluid::T_c | ( | double | Cmass, |
| double | p, | ||
| double | x | ||
| ) |
Temperature as a function of heat capacities as a function of temperature, pressure and composition.
Definition at line 417 of file IncompressibleFluid.cpp.
|
inline |
Thermal conductivity as a function of temperature, pressure and composition.
Definition at line 363 of file IncompressibleFluid.h.
|
inline |
Temperature as a function of enthalpy, pressure and composition.
Definition at line 355 of file IncompressibleFluid.h.
|
inline |
Saturation pressure as a function of temperature and composition.
Definition at line 367 of file IncompressibleFluid.h.
| double CoolProp::IncompressibleFluid::T_rho | ( | double | Dmass, |
| double | p, | ||
| double | x | ||
| ) |
Temperature as a function of density, pressure and composition.
Definition at line 403 of file IncompressibleFluid.cpp.
|
inline |
Temperature as a function of entropy as a function of temperature, pressure and composition.
Definition at line 347 of file IncompressibleFluid.h.
|
inline |
Temperature as a function of internal energy as a function of temperature, pressure and composition.
Definition at line 351 of file IncompressibleFluid.h.
|
inline |
Viscosity as a function of temperature, pressure and composition.
Definition at line 359 of file IncompressibleFluid.h.
| double CoolProp::IncompressibleFluid::Tfreeze | ( | double | p, |
| double | x | ||
| ) |
Freezing temperature as a function of pressure and composition.
Definition at line 216 of file IncompressibleFluid.cpp.
|
inline |
Internal energy as a function of temperature, pressure and composition.
Definition at line 283 of file IncompressibleFluid.h.
|
inlineprotected |
Internal energy from h, p and rho.
Calculate internal energy as a function of temperature and pressure employing functions for enthalpy and density. Provides consistent formulations.
Definition at line 392 of file IncompressibleFluid.h.
| void CoolProp::IncompressibleFluid::validate | ( | ) |
A function to check coefficients and equation types.
A thermophysical property provider for all properties.
This fluid instance is populated using an entry from a JSON file and uses simplified polynomial and exponential functions to calculate thermophysical and transport properties.
Definition at line 24 of file IncompressibleFluid.cpp.
| double CoolProp::IncompressibleFluid::visc | ( | double | T, |
| double | p, | ||
| double | x | ||
| ) |
Viscosity as a function of temperature, pressure and composition.
Definition at line 147 of file IncompressibleFluid.cpp.
|
inline |
Composition as a function of freezing temperature and pressure.
Definition at line 371 of file IncompressibleFluid.h.
|
protected |
Conductivity coefficients.
If 2D, the rows are temperature and the columns are concentration. If 1D, should be a column vector of temperature coefficients
Definition at line 107 of file IncompressibleFluid.h.
|
protected |
These are the objects that hold the coefficients.
Note that all polynomials require a 2-dimensional array of coefficients. This array may have only one row or column, but the structure should be 2D. This behaviour is hard-coded in the JSON file reader that resides inside the IncompressibleLibrary.cpp All other functions, also polyoffset, can only handle 1D input and throw an error if you feed them other coefficients. Density coefficients If 2D, the rows are temperature and the columns are concentration. If 1D, should be a column vector of temperature coefficients
Definition at line 90 of file IncompressibleFluid.h.
|
protected |
Definition at line 66 of file IncompressibleFluid.h.
|
protected |
Mass fraction conversion coefficients.
If the fluid type is mass-based, it does not do anything. Otherwise, it converts the mass fraction to the required input.
Definition at line 123 of file IncompressibleFluid.h.
|
protected |
Mole fraction conversion coefficients.
If the fluid type is mole-based, it does not do anything. Otherwise, it converts the mole fraction to the required input.
Definition at line 133 of file IncompressibleFluid.h.
|
protected |
Definition at line 65 of file IncompressibleFluid.h.
|
protected |
Saturation pressure coefficients.
If 2D, the rows are temperature and the columns are concentration. If 1D, should be a column vector of temperature coefficients
Definition at line 112 of file IncompressibleFluid.h.
|
protected |
Definition at line 135 of file IncompressibleFluid.h.
|
protected |
Definition at line 67 of file IncompressibleFluid.h.
|
protected |
Specific heat coefficients.
If 2D, the rows are temperature and the columns are concentration. If 1D, should be a column vector of temperature coefficients Fails for all other forms than polynomial due to the automatic integration for internal energy and entropy.
Definition at line 97 of file IncompressibleFluid.h.
|
protected |
Definition at line 63 of file IncompressibleFluid.h.
|
protected |
Freezing temperature coefficients.
If 2D, the rows are concentration and the columns are pressure. If 1D, should be a column vector of concentration coefficients
Definition at line 117 of file IncompressibleFluid.h.
|
protected |
Definition at line 74 of file IncompressibleFluid.h.
|
protected |
Definition at line 69 of file IncompressibleFluid.h.
|
protected |
Definition at line 69 of file IncompressibleFluid.h.
|
protected |
Definition at line 73 of file IncompressibleFluid.h.
|
protected |
Viscosity coefficients.
If 2D, the rows are temperature and the columns are concentration. If 1D, should be a column vector of temperature coefficients
Definition at line 102 of file IncompressibleFluid.h.
|
protected |
Volume fraction conversion coefficients.
If the fluid type is volume-based, it does not do anything. Otherwise, it converts the volume fraction to the required input.
Definition at line 128 of file IncompressibleFluid.h.
|
protected |
Definition at line 74 of file IncompressibleFluid.h.
|
protected |
Definition at line 71 of file IncompressibleFluid.h.
|
protected |
Definition at line 70 of file IncompressibleFluid.h.
|
protected |
Definition at line 70 of file IncompressibleFluid.h.