www.mooseframework.org
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
TabulatedFluidProperties Class Reference

Class for fluid properties read from a file. More...

#include <TabulatedFluidProperties.h>

Inheritance diagram for TabulatedFluidProperties:
[legend]

Public Member Functions

 TabulatedFluidProperties (const InputParameters &parameters)
 
virtual ~TabulatedFluidProperties ()
 
virtual void initialSetup () override
 
virtual std::string fluidName () const override
 Fluid name. More...
 
virtual Real molarMass () const override
 Molar mass [kg/mol]. More...
 
virtual Real rho_from_p_T (Real pressure, Real temperature) const override
 
virtual void rho_from_p_T (Real pressure, Real temperature, Real &rho, Real &drho_dp, Real &drho_dT) const override
 
virtual Real e_from_p_T (Real pressure, Real temperature) const override
 Internal energy from pressure and temperature. More...
 
virtual void e_from_p_T (Real pressure, Real temperature, Real &e, Real &de_dp, Real &de_dT) const override
 Internal energy and its derivatives from pressure and temperature. More...
 
virtual Real h_from_p_T (Real p, Real T) const override
 
virtual void h_from_p_T (Real pressure, Real temperature, Real &h, Real &dh_dp, Real &dh_dT) const override
 
virtual Real mu_from_p_T (Real pressure, Real temperature) const override
 
virtual void mu_from_p_T (Real pressure, Real temperature, Real &mu, Real &dmu_dp, Real &dmu_dT) const override
 
virtual Real cp_from_p_T (Real pressure, Real temperature) const override
 
virtual Real cv_from_p_T (Real pressure, Real temperature) const override
 
virtual Real c_from_p_T (Real pressure, Real temperature) const override
 
virtual Real k_from_p_T (Real pressure, Real temperature) const override
 
virtual void k_from_p_T (Real pressure, Real temperature, Real &k, Real &dk_dp, Real &dk_dT) const override
 
virtual Real s_from_p_T (Real pressure, Real temperature) const override
 
virtual void s_from_p_T (Real p, Real T, Real &s, Real &ds_dp, Real &ds_dT) const override
 
virtual Real henryConstant (Real temperature) const override
 Henry's law constant for dissolution in water. More...
 
virtual void henryConstant (Real temperature, Real &Kh, Real &dKh_dT) const override
 Henry's law constant for dissolution in water and derivative wrt temperature. More...
 
virtual Real vaporPressure (Real temperature) const override
 Vapor pressure. More...
 
virtual void vaporPressure (Real temperature, Real &psat, Real &dpsat_dT) const override
 Vapor pressure. More...
 
virtual Real rho (Real p, Real T) const
 Density from pressure and temperature. More...
 
e e e e s T T T T T rho v v T virtual e Real s (Real pressure, Real temperature) const
 
virtual void mu_from_rho_T (Real density, Real temperature, Real ddensity_dT, Real &mu, Real &dmu_drho, Real &dmu_dT) const
 Dynamic viscosity and its derivatives wrt density and temperature TODO: this shouldn't need 3 input args - AD will assume/call the 2-input version. More...
 
virtual Real beta_from_p_T (Real, Real) const
 
virtual void beta_from_p_T (Real, Real, Real &, Real &, Real &) const
 
virtual void rho_dpT (Real pressure, Real temperature, Real &rho, Real &drho_dp, Real &drho_dT) const
 Density and its derivatives from pressure and temperature. More...
 
virtual Real v_from_p_T (Real p, Real T) const
 Specific volume from pressure and temperature. More...
 
virtual void v_from_p_T (Real p, Real T, Real &v, Real &dv_dp, Real &dv_dT) const
 Specific volume and its derivatives from pressure and temperature. More...
 
virtual Real e_spndl_from_v (Real v) const
 Specific internal energy from temperature and specific volume. More...
 
virtual void v_e_spndl_from_T (Real T, Real &v, Real &e) const
 Specific internal energy from temperature and specific volume. More...
 
virtual Real h (Real p, Real T) const
 Specific enthalpy from pressure and temperature. More...
 
virtual void h_dpT (Real pressure, Real temperature, Real &h, Real &dh_dp, Real &dh_dT) const
 Specific enthalpy and its derivatives from pressure and temperature. More...
 
virtual Real e (Real pressure, Real temperature) const
 
virtual void e_dpT (Real pressure, Real temperature, Real &e, Real &de_dp, Real &de_dT) const
 
virtual Real beta (Real pressure, Real temperature) const
 
virtual Real T_from_p_h (Real pressure, Real enthalpy) const
 Temperature from pressure and specific enthalpy. More...
 
virtual Real criticalPressure () const
 Critical pressure. More...
 
virtual Real criticalTemperature () const
 Critical temperature. More...
 
virtual Real criticalDensity () const
 Critical density. More...
 
virtual Real criticalInternalEnergy () const
 Critical specific internal energy. More...
 
virtual Real triplePointPressure () const
 Triple point pressure. More...
 
virtual Real triplePointTemperature () const
 Triple point temperature. More...
 
virtual void rho_e_from_p_T (Real pressure, Real temperature, Real &rho, Real &drho_dp, Real &drho_dT, Real &e, Real &de_dp, Real &de_dT) const
 Density and internal energy and their derivatives wrt pressure and temperature. More...
 
virtual void rho_e_dpT (Real pressure, Real temperature, Real &rho, Real &drho_dp, Real &drho_dT, Real &e, Real &de_dp, Real &de_dT) const
 
virtual Real c (Real pressure, Real temperature) const
 
virtual Real gamma_from_v_e (Real v, Real e) const
 Adiabatic index - ratio of specific heats. More...
 
virtual Real gamma_from_p_T (Real pressure, Real temperature) const
 Adiabatic index - ratio of specific heats. More...
 
virtual Real mu (Real pressure, Real temperature) const
 Dynamic viscosity. More...
 
virtual void mu_dpT (Real pressure, Real temperature, Real &mu, Real &dmu_dp, Real &dmu_dT) const
 Dynamic viscosity and its derivatives wrt pressure and temperature. More...
 
virtual void mu_drhoT_from_rho_T (Real density, Real temperature, Real ddensity_dT, Real &mu, Real &dmu_drho, Real &dmu_dT) const
 
virtual void rho_mu (Real pressure, Real temperature, Real &rho, Real &mu) const
 Density and viscosity. More...
 
virtual void rho_mu_from_p_T (Real pressure, Real temperature, Real &rho, Real &mu) const
 
virtual void rho_mu_from_p_T (Real pressure, Real temperature, Real &rho, Real &drho_dp, Real &drho_dT, Real &mu, Real &dmu_dp, Real &dmu_dT) const
 Density and viscosity and their derivatives wrt pressure and temperature. More...
 
virtual void rho_mu_dpT (Real pressure, Real temperature, Real &rho, Real &drho_dp, Real &drho_dT, Real &mu, Real &dmu_dp, Real &dmu_dT) const
 
virtual Real k (Real pressure, Real temperature) const
 Thermal conductivity. More...
 
virtual void k_dpT (Real pressure, Real temperature, Real &k, Real &dk_dp, Real &dk_dT) const
 Thermal conductivity and its derivatives wrt pressure and temperature. More...
 
virtual void henryConstant_dT (Real temperature, Real &Kh, Real &dKh_dT) const
 
virtual void vaporPressure_dT (Real temperature, Real &psat, Real &dpsat_dT) const
 
virtual void execute () final
 
virtual void initialize () final
 
virtual void finalize () final
 
virtual void threadJoin (const UserObject &) final
 
virtual void subdomainSetup () final
 

Protected Member Functions

void writeTabulatedData (std::string file_name)
 Writes tabulated data to a file. More...
 
virtual void checkInputVariables (Real &pressure, Real &temperature) const
 Checks that the inputs are within the range of the tabulated data, and throws an error if they are not. More...
 
virtual void generateTabulatedData ()
 Generates a table of fluid properties by looping over pressure and temperature and calculating properties using the FluidProperties UserObject _fp. More...
 
void reshapeData2D (unsigned int nrow, unsigned int ncol, const std::vector< Real > &vec, std::vector< std::vector< Real >> &mat)
 Forms a 2D matrix from a single std::vector. More...
 
virtual Real henryConstantIAPWS (Real temperature, Real A, Real B, Real C) const
 IAPWS formulation of Henry's law constant for dissolution in water From Guidelines on the Henry's constant and vapour liquid distribution constant for gases in H20 and D20 at high temperatures, IAPWS (2004) More...
 
virtual void henryConstantIAPWS (Real temperature, Real &Kh, Real &dKh_dT, Real A, Real B, Real C) const
 
virtual void henryConstantIAPWS_dT (Real temperature, Real &Kh, Real &dKh_dT, Real A, Real B, Real C) const
 

Protected Attributes

FileName _file_name
 File name of tabulated data file. More...
 
std::vector< Real > _pressure
 Pressure vector. More...
 
std::vector< Real > _temperature
 Temperature vector. More...
 
std::vector< std::vector< Real > > _properties
 Tabulated fluid properties. More...
 
std::vector< std::unique_ptr< BicubicInterpolation > > _property_ipol
 Interpolated fluid property. More...
 
Real _temperature_min
 Minimum temperature in tabulated data. More...
 
Real _temperature_max
 Maximum temperature in tabulated data. More...
 
Real _pressure_min
 Minimum pressure in tabulated data. More...
 
Real _pressure_max
 Maximum pressure in tabulated data. More...
 
unsigned int _num_T
 Number of temperature points in the tabulated data. More...
 
unsigned int _num_p
 Number of pressure points in the tabulated data. More...
 
const bool _save_file
 Whether to save a generated fluid properties file to disk. More...
 
const SinglePhaseFluidProperties_fp
 SinglePhaseFluidPropertiesPT UserObject. More...
 
const std::vector< std::string > _required_columns {"pressure", "temperature"}
 List of required column names to be read. More...
 
const std::vector< std::string > _property_columns
 List of possible property column names to be read. More...
 
MultiMooseEnum _interpolated_properties_enum
 Properties to be interpolated entered in the input file. More...
 
std::vector< std::string > _interpolated_properties
 List of properties to be interpolated. More...
 
bool _interpolate_density
 Set of flags to note whether a property is to be interpolated. More...
 
bool _interpolate_enthalpy
 
bool _interpolate_internal_energy
 
bool _interpolate_viscosity
 
bool _interpolate_k
 
bool _interpolate_cp
 
bool _interpolate_cv
 
bool _interpolate_entropy
 
unsigned int _density_idx
 Index of each property. More...
 
unsigned int _enthalpy_idx
 
unsigned int _internal_energy_idx
 
unsigned int _viscosity_idx
 
unsigned int _k_idx
 
unsigned int _cp_idx
 
unsigned int _cv_idx
 
unsigned int _entropy_idx
 
MooseUtils::DelimitedFileReader _csv_reader
 The MOOSE delimited file reader. More...
 
const Real _R
 Universal gas constant (J/mol/K) More...
 
const Real _T_c2k
 Conversion of temperature from Celsius to Kelvin. More...
 
const bool _allow_imperfect_jacobians
 Flag to set unimplemented Jacobian entries to zero. More...
 
 propfunc (p, v, e) propfunc(T
 Compute a fluid property given for the state defined by two given properties. More...
 
e propfunc (c, v, e) propfunc(cp
 
e e propfunc (cv, v, e) propfunc(mu
 
e e e propfunc (k, v, e) propfunc(s
 
e e e e propfunc (s, h, p) propfunc(rho
 
e e e e s propfunc (e, v, h) propfunc(s
 
e e e e s T propfunc (pp_sat, p, T) propfunc(mu
 
e e e e s T T propfunc (k, rho, T) propfunc(c
 
e e e e s T T T propfunc (cp, p, T) propfunc(cv
 
e e e e s T T T T propfunc (mu, p, T) propfunc(k
 
e e e e s T T T T T propfunc (rho, p, T) propfunc(e
 
e e e e s T T T T T rho propfunc (e, T, v) propfunc(p
 
e e e e s T T T T T rho v propfunc (h, T, v) propfunc(s
 
e e e e s T T T T T rho v v propfunc (cv, T, v) propfunc(h
 
e e e e s T T T T T rho v v T propfunc (p, h, s) propfunc(g
 
 v
 
e v
 
e e v
 
e e e v
 
e e e e s T T T T T rho v v T v
 
e e e e p
 
e e e e s p
 
e e e e s T T p
 
e e e e s T T T p
 
e e e e s T T T T p
 
e e e e s T T T T T p
 
e e e e s T T T T T rho v v p
 
e e e e s T rho
 
e e e e s T T T T T rho T
 
e e e e s T T T T T rho v T
 

Detailed Description

Class for fluid properties read from a file.

Property values are read from a CSV file containing property data. Monotonically increasing values of pressure and temperature must be included in the data file, specifying the phase space where tabulated fluid properties will be defined. An error is thrown if either temperature or pressure data is not included or not monotonic, and an error is also thrown if this UserObject is requested to provide a fluid property outside this phase space.

This class is intended to be used when complicated formulations for fluid properties (for example, density or enthalpy) are required, which can be computationally expensive. This is particularly the case where the fluid equation of state is based on a Helmholtz free energy that is a function of density and temperature, like that used in CO2FluidProperties. In this case, density must be solved iteratively using pressure and temperature, which increases the computational burden.

Using interpolation to calculate these fluid properties can significantly reduce the computational time for these cases.

The expected file format for the tabulated fluid properties is now described. The first line must be the header containing the required column names "pressure" and "temperature", and the names of the fluid properties to be read. Available fluid property names are: "density", "enthalpy", "internal_energy", "viscosity", "k" (thermal conductivity), "cp" (isobaric specific heat capacity), "cv" (isochoric specific heat capacity), and "entropy". Note: the order is not important, although having pressure and temperature first makes the data easier for a human to read).

The data in the pressure and temperature columns must be monotonically increasing. This file format does require duplication of the pressure and temperature data - each pressure value must be included num_T times, while each temperature value is repeated num_p times, where num_T and num_p are the number of temperature and pressure points, respectively. This class will check that the required number of data points have been entered (num_T * num_p).

An example of a valid fluid properties file is provided below:

pressure, temperature, density, enthalpy, internal_energy 200000, 275, 3.90056, -21487, -72761.7 200000, 277, 3.86573, -19495.4, -71232.0 200000, 280, 3.83155, -17499.1, -69697.3 300000, 275, 6.07273, -22728.3, -73626.5 300000, 277, 6.01721, -20711.5, -72079.3 300000, 280, 5.96277, -18691.0, -70527.7

and so on.

If no tabulated fluid property data file exists, then data for the fluid supplied by the required FluidProperties UserObject will be generated using the pressure and temperature ranges specified in the input file at the beginning of the simulation. The properties to be tabulated are provided in the "interpolated_properties" input parameter (the properties that can be tabulated are listed above).

This tabulated data will be written to file in the correct format, enabling suitable data files to be created for future use. There is an upfront computational expense required for this initial data generation, depending on the required number of pressure and temperature points. However, provided that the number of data points required to generate the tabulated data is smaller than the number of times the property members in the FluidProperties UserObject are used, the initial time to generate the data and the subsequent interpolation time can be much less than using the original FluidProperties UserObject.

Properties specified in the data file or listed in the input file (and their derivatives wrt pressure and temperature) will be calculated using bicubic interpolation, while all remaining fluid properties are calculated using the supplied FluidProperties UserObject.

Definition at line 93 of file TabulatedFluidProperties.h.

Constructor & Destructor Documentation

◆ TabulatedFluidProperties()

TabulatedFluidProperties::TabulatedFluidProperties ( const InputParameters &  parameters)

Definition at line 60 of file TabulatedFluidProperties.C.

61  : SinglePhaseFluidProperties(parameters),
62  _file_name(getParam<FileName>("fluid_property_file")),
63  _temperature_min(getParam<Real>("temperature_min")),
64  _temperature_max(getParam<Real>("temperature_max")),
65  _pressure_min(getParam<Real>("pressure_min")),
66  _pressure_max(getParam<Real>("pressure_max")),
67  _num_T(getParam<unsigned int>("num_T")),
68  _num_p(getParam<unsigned int>("num_p")),
69  _save_file(getParam<bool>("save_file")),
70  _fp(getUserObject<SinglePhaseFluidProperties>("fp")),
71  _interpolated_properties_enum(getParam<MultiMooseEnum>("interpolated_properties")),
73  _interpolate_density(false),
74  _interpolate_enthalpy(false),
77  _interpolate_k(false),
78  _interpolate_cp(false),
79  _interpolate_cv(false),
80  _interpolate_entropy(false),
81  _density_idx(0),
82  _enthalpy_idx(0),
84  _viscosity_idx(0),
85  _k_idx(0),
86  _cp_idx(0),
87  _cv_idx(0),
88  _entropy_idx(0),
89  _csv_reader(_file_name, &_communicator)
90 {
91  // Sanity check on minimum and maximum temperatures and pressures
93  mooseError(name(), ": temperature_max must be greater than temperature_min");
95  mooseError(name(), ": pressure_max must be greater than pressure_min");
96 
97  // Lines starting with # in the data file are treated as comments
98  _csv_reader.setComment("#");
99 }
Real _temperature_max
Maximum temperature in tabulated data.
Real _pressure_max
Maximum pressure in tabulated data.
MooseUtils::DelimitedFileReader _csv_reader
The MOOSE delimited file reader.
SinglePhaseFluidProperties(const InputParameters &parameters)
MultiMooseEnum _interpolated_properties_enum
Properties to be interpolated entered in the input file.
Real _temperature_min
Minimum temperature in tabulated data.
const std::string name
Definition: Setup.h:22
std::vector< std::string > _interpolated_properties
List of properties to be interpolated.
unsigned int _num_T
Number of temperature points in the tabulated data.
Real _pressure_min
Minimum pressure in tabulated data.
unsigned int _num_p
Number of pressure points in the tabulated data.
unsigned int _density_idx
Index of each property.
bool _interpolate_density
Set of flags to note whether a property is to be interpolated.
const bool _save_file
Whether to save a generated fluid properties file to disk.
const SinglePhaseFluidProperties & _fp
SinglePhaseFluidPropertiesPT UserObject.
FileName _file_name
File name of tabulated data file.

◆ ~TabulatedFluidProperties()

TabulatedFluidProperties::~TabulatedFluidProperties ( )
virtual

Definition at line 101 of file TabulatedFluidProperties.C.

101 {}

Member Function Documentation

◆ beta()

Real SinglePhaseFluidProperties::beta ( Real  pressure,
Real  temperature 
) const
virtualinherited

◆ beta_from_p_T() [1/2]

Real SinglePhaseFluidProperties::beta_from_p_T ( Real  p,
Real  T 
) const
virtualinherited

Reimplemented in SimpleFluidProperties.

Definition at line 79 of file SinglePhaseFluidProperties.C.

Referenced by SinglePhaseFluidProperties::beta().

80 {
81  // The volumetric thermal expansion coefficient is defined as
82  // 1/v dv/dT)_p
83  // It is the fractional change rate of volume with respect to temperature change
84  // at constant pressure. Here it is coded as
85  // - 1/rho drho/dT)_p
86  // using chain rule with v = v(rho)
87 
88  Real rho, drho_dp, drho_dT;
89  rho_from_p_T(p, T, rho, drho_dp, drho_dT);
90  return -drho_dT / rho;
91 }

◆ beta_from_p_T() [2/2]

void SinglePhaseFluidProperties::beta_from_p_T ( Real  ,
Real  ,
Real &  ,
Real &  ,
Real &   
) const
virtualinherited

Reimplemented in SimpleFluidProperties.

Definition at line 73 of file SinglePhaseFluidProperties.C.

74 {
75  mooseError(name(), ": ", __PRETTY_FUNCTION__, " is not implemented.");
76 }
const std::string name
Definition: Setup.h:22

◆ c()

Real SinglePhaseFluidProperties::c ( Real  pressure,
Real  temperature 
) const
virtualinherited

Definition at line 336 of file SinglePhaseFluidProperties.C.

Referenced by StiffenedGasFluidProperties::c_from_v_e(), IdealGasFluidProperties::c_from_v_e(), Water97FluidProperties::densityRegion3(), Water97FluidProperties::subregionVolume(), and Water97FluidProperties::vaporPressure().

337 {
338  mooseDeprecated(name(), ": c() is deprecated. Use c_from_p_T() instead");
339 
340  return c_from_p_T(p, T);
341 }
const std::string name
Definition: Setup.h:22

◆ c_from_p_T()

Real TabulatedFluidProperties::c_from_p_T ( Real  pressure,
Real  temperature 
) const
overridevirtual

Definition at line 420 of file TabulatedFluidProperties.C.

421 {
422  return _fp.c_from_p_T(pressure, temperature);
423 }
const std::string temperature
Definition: NS.h:27
const std::string pressure
Definition: NS.h:26
const SinglePhaseFluidProperties & _fp
SinglePhaseFluidPropertiesPT UserObject.

◆ checkInputVariables()

void TabulatedFluidProperties::checkInputVariables ( Real &  pressure,
Real &  temperature 
) const
protectedvirtual

Checks that the inputs are within the range of the tabulated data, and throws an error if they are not.

Parameters
pressureinput pressure (Pa)
temperatureinput temperature (K)

Definition at line 641 of file TabulatedFluidProperties.C.

Referenced by cp_from_p_T(), cv_from_p_T(), e_from_p_T(), h_from_p_T(), k_from_p_T(), mu_from_p_T(), rho_from_p_T(), and s_from_p_T().

642 {
643  if (pressure < _pressure_min || pressure > _pressure_max)
644  throw MooseException(
645  "Pressure " + Moose::stringify(pressure) + " is outside the range of tabulated pressure (" +
646  Moose::stringify(_pressure_min) + ", " + Moose::stringify(_pressure_max) + ").");
647 
648  if (temperature < _temperature_min || temperature > _temperature_max)
649  throw MooseException("Temperature " + Moose::stringify(temperature) +
650  " is outside the range of tabulated temperature (" +
651  Moose::stringify(_temperature_min) + ", " +
652  Moose::stringify(_temperature_max) + ").");
653 }
Real _temperature_max
Maximum temperature in tabulated data.
Real _pressure_max
Maximum pressure in tabulated data.
const std::string temperature
Definition: NS.h:27
Real _temperature_min
Minimum temperature in tabulated data.
Real _pressure_min
Minimum pressure in tabulated data.
const std::string pressure
Definition: NS.h:26

◆ cp_from_p_T()

Real TabulatedFluidProperties::cp_from_p_T ( Real  pressure,
Real  temperature 
) const
overridevirtual

Definition at line 426 of file TabulatedFluidProperties.C.

427 {
428  if (_interpolate_cp)
429  {
431  return _property_ipol[_cp_idx]->sample(pressure, temperature);
432  }
433  else
434  return _fp.cp_from_p_T(pressure, temperature);
435 }
const std::string temperature
Definition: NS.h:27
virtual void checkInputVariables(Real &pressure, Real &temperature) const
Checks that the inputs are within the range of the tabulated data, and throws an error if they are no...
const std::string pressure
Definition: NS.h:26
std::vector< std::unique_ptr< BicubicInterpolation > > _property_ipol
Interpolated fluid property.
const SinglePhaseFluidProperties & _fp
SinglePhaseFluidPropertiesPT UserObject.

◆ criticalDensity()

Real SinglePhaseFluidProperties::criticalDensity ( ) const
virtualinherited

◆ criticalInternalEnergy()

Real SinglePhaseFluidProperties::criticalInternalEnergy ( ) const
virtualinherited

Critical specific internal energy.

Returns
specific internal energy (J/kg)

Reimplemented in StiffenedGasFluidProperties.

Definition at line 124 of file SinglePhaseFluidProperties.C.

Referenced by IdealRealGasMixtureFluidProperties::p_T_from_v_e().

125 {
126  mooseError(name(), ": criticalInternalEnergy() is not implemented");
127 }
const std::string name
Definition: Setup.h:22

◆ criticalPressure()

Real SinglePhaseFluidProperties::criticalPressure ( ) const
virtualinherited

Critical pressure.

Returns
critical pressure (Pa)

Reimplemented in HydrogenFluidProperties, CO2FluidProperties, NitrogenFluidProperties, MethaneFluidProperties, NaClFluidProperties, and Water97FluidProperties.

Definition at line 106 of file SinglePhaseFluidProperties.C.

107 {
108  mooseError(name(), ": criticalPressure() is not implemented");
109 }
const std::string name
Definition: Setup.h:22

◆ criticalTemperature()

Real SinglePhaseFluidProperties::criticalTemperature ( ) const
virtualinherited

◆ cv_from_p_T()

Real TabulatedFluidProperties::cv_from_p_T ( Real  pressure,
Real  temperature 
) const
overridevirtual

Definition at line 438 of file TabulatedFluidProperties.C.

439 {
440  if (_interpolate_cv)
441  {
443  return _property_ipol[_cv_idx]->sample(pressure, temperature);
444  }
445  else
446  return _fp.cv_from_p_T(pressure, temperature);
447 }
const std::string temperature
Definition: NS.h:27
virtual void checkInputVariables(Real &pressure, Real &temperature) const
Checks that the inputs are within the range of the tabulated data, and throws an error if they are no...
const std::string pressure
Definition: NS.h:26
std::vector< std::unique_ptr< BicubicInterpolation > > _property_ipol
Interpolated fluid property.
const SinglePhaseFluidProperties & _fp
SinglePhaseFluidPropertiesPT UserObject.

◆ e()

Real SinglePhaseFluidProperties::e ( Real  pressure,
Real  temperature 
) const
virtualinherited

Definition at line 291 of file SinglePhaseFluidProperties.C.

Referenced by Water97FluidProperties::b2bc(), StiffenedGasFluidProperties::c_from_v_e(), IdealGasFluidProperties::c_from_v_e(), NaClFluidProperties::cp_from_p_T(), StiffenedGasFluidProperties::cp_from_v_e(), IdealGasFluidProperties::cp_from_v_e(), Water97FluidProperties::densityRegion3(), SinglePhaseFluidProperties::e_dpT(), StiffenedGasFluidProperties::e_from_p_rho(), IdealGasFluidProperties::e_from_p_rho(), HelmholtzFluidProperties::e_from_p_T(), Water97FluidProperties::e_from_p_T(), NaClFluidProperties::e_from_p_T(), IdealGasFluidProperties::e_from_p_T(), StiffenedGasFluidProperties::e_from_p_T(), SimpleFluidProperties::e_from_p_T(), e_from_p_T(), SinglePhaseFluidProperties::e_from_p_T(), StiffenedGasFluidProperties::e_from_T_v(), IdealGasFluidProperties::e_from_T_v(), IdealGasFluidProperties::e_from_v_h(), StiffenedGasFluidProperties::e_from_v_h(), IdealGasFluidProperties::g_from_v_e(), StiffenedGasFluidProperties::g_from_v_e(), SinglePhaseFluidProperties::gamma_from_v_e(), NaClFluidProperties::h_from_p_T(), NitrogenFluidProperties::mu_from_rho_T(), HydrogenFluidProperties::mu_from_rho_T(), CO2FluidProperties::mu_from_rho_T(), StiffenedGasFluidProperties::p_from_T_v(), StiffenedGasFluidProperties::p_from_v_e(), IdealGasFluidProperties::p_from_v_e(), SinglePhaseFluidProperties::rho_e_dpT(), SinglePhaseFluidProperties::rho_e_from_p_T(), StiffenedGasFluidProperties::s_from_T_v(), StiffenedGasFluidProperties::s_from_v_e(), IdealGasFluidProperties::s_from_v_e(), Water97FluidProperties::subregion3(), Water97FluidProperties::subregionVolume(), SinglePhaseFluidProperties::T_from_p_h(), StiffenedGasFluidProperties::T_from_v_e(), IdealGasFluidProperties::T_from_v_e(), StiffenedGasFluidProperties::v_e_spndl_from_T(), and Water97FluidProperties::vaporTemperature().

292 {
293  mooseDeprecated(name(), ": e() is deprecated. Use e_from_p_T() instead");
294 
295  return e_from_p_T(p, T);
296 }
virtual Real e_from_p_T(Real p, Real T) const
Internal energy from pressure and temperature.
const std::string name
Definition: Setup.h:22

◆ e_dpT()

void SinglePhaseFluidProperties::e_dpT ( Real  pressure,
Real  temperature,
Real &  e,
Real &  de_dp,
Real &  de_dT 
) const
virtualinherited

Definition at line 299 of file SinglePhaseFluidProperties.C.

300 {
301  mooseDeprecated(name(), ": e_dpT() is deprecated. Use e_from_p_T() instead");
302 
303  e_from_p_T(p, T, e, de_dp, de_dT);
304 }
virtual Real e_from_p_T(Real p, Real T) const
Internal energy from pressure and temperature.
const std::string name
Definition: Setup.h:22
virtual Real e(Real pressure, Real temperature) const

◆ e_from_p_T() [1/2]

Real TabulatedFluidProperties::e_from_p_T ( Real  p,
Real  T 
) const
overridevirtual

Internal energy from pressure and temperature.

Parameters
[in]ppressure (Pa)
[in]Ttemperature (K)
Returns
internal energy (J/kg)

Reimplemented from SinglePhaseFluidProperties.

Definition at line 342 of file TabulatedFluidProperties.C.

343 {
345  {
348  }
349  else
351 }
const std::string temperature
Definition: NS.h:27
virtual Real e_from_p_T(Real p, Real T) const
Internal energy from pressure and temperature.
virtual void checkInputVariables(Real &pressure, Real &temperature) const
Checks that the inputs are within the range of the tabulated data, and throws an error if they are no...
const std::string pressure
Definition: NS.h:26
std::vector< std::unique_ptr< BicubicInterpolation > > _property_ipol
Interpolated fluid property.
const SinglePhaseFluidProperties & _fp
SinglePhaseFluidPropertiesPT UserObject.

◆ e_from_p_T() [2/2]

void TabulatedFluidProperties::e_from_p_T ( Real  p,
Real  T,
Real &  e,
Real &  de_dp,
Real &  de_dT 
) const
overridevirtual

Internal energy and its derivatives from pressure and temperature.

Parameters
[in]ppressure (Pa)
[in]Ttemperature (K)
[out]einternal energy (J/kg)
[out]de_dpderivative of internal energy w.r.t. pressure
[out]de_dTderivative of internal energy w.r.t. temperature

Reimplemented from SinglePhaseFluidProperties.

Definition at line 354 of file TabulatedFluidProperties.C.

356 {
358  {
360  _property_ipol[_internal_energy_idx]->sampleValueAndDerivatives(
361  pressure, temperature, e, de_dp, de_dT);
362  }
363  else
364  _fp.e_from_p_T(pressure, temperature, e, de_dp, de_dT);
365 }
const std::string temperature
Definition: NS.h:27
virtual Real e_from_p_T(Real p, Real T) const
Internal energy from pressure and temperature.
virtual void checkInputVariables(Real &pressure, Real &temperature) const
Checks that the inputs are within the range of the tabulated data, and throws an error if they are no...
const std::string pressure
Definition: NS.h:26
std::vector< std::unique_ptr< BicubicInterpolation > > _property_ipol
Interpolated fluid property.
virtual Real e(Real pressure, Real temperature) const
const SinglePhaseFluidProperties & _fp
SinglePhaseFluidPropertiesPT UserObject.

◆ e_spndl_from_v()

Real SinglePhaseFluidProperties::e_spndl_from_v ( Real  v) const
virtualinherited

Specific internal energy from temperature and specific volume.

Parameters
[in]Ttemperature
[in]vspecific volume

Reimplemented in StiffenedGasFluidProperties.

Definition at line 451 of file SinglePhaseFluidProperties.C.

Referenced by IdealRealGasMixtureFluidProperties::p_T_from_v_e().

452 {
453  mooseError(name(), ": ", __PRETTY_FUNCTION__, " not implemented.");
454 }
const std::string name
Definition: Setup.h:22

◆ execute()

virtual void FluidProperties::execute ( )
inlinefinalvirtualinherited

Definition at line 35 of file FluidProperties.h.

35 {}

◆ finalize()

virtual void FluidProperties::finalize ( )
inlinefinalvirtualinherited

Definition at line 37 of file FluidProperties.h.

37 {}

◆ fluidName()

std::string TabulatedFluidProperties::fluidName ( ) const
overridevirtual

Fluid name.

Returns
string representing fluid name

Reimplemented from SinglePhaseFluidProperties.

Definition at line 304 of file TabulatedFluidProperties.C.

305 {
306  return _fp.fluidName();
307 }
virtual std::string fluidName() const
Fluid name.
const SinglePhaseFluidProperties & _fp
SinglePhaseFluidPropertiesPT UserObject.

◆ gamma_from_p_T()

Real SinglePhaseFluidProperties::gamma_from_p_T ( Real  pressure,
Real  temperature 
) const
virtualinherited

Adiabatic index - ratio of specific heats.

Parameters
pressurefluid pressure (Pa)
temperaturefluid temperature (K)
Returns
gamma (-)

Reimplemented in IdealGasFluidProperties.

Definition at line 148 of file SinglePhaseFluidProperties.C.

149 {
150  return cp_from_p_T(p, T) / cv_from_p_T(p, T);
151 }

◆ gamma_from_v_e()

Real SinglePhaseFluidProperties::gamma_from_v_e ( Real  v,
Real  e 
) const
virtualinherited

Adiabatic index - ratio of specific heats.

Parameters
vspecific volume
especific internal energy
Returns
gamma (-)

Reimplemented in IdealGasFluidProperties.

Definition at line 142 of file SinglePhaseFluidProperties.C.

143 {
144  return cp_from_v_e(v, e) / cv_from_v_e(v, e);
145 }
virtual Real e(Real pressure, Real temperature) const

◆ generateTabulatedData()

void TabulatedFluidProperties::generateTabulatedData ( )
protectedvirtual

Generates a table of fluid properties by looping over pressure and temperature and calculating properties using the FluidProperties UserObject _fp.

Definition at line 550 of file TabulatedFluidProperties.C.

Referenced by initialSetup().

551 {
552  _pressure.resize(_num_p);
553  _temperature.resize(_num_T);
554 
555  // Generate data for all properties entered in input file
558 
559  for (std::size_t i = 0; i < _interpolated_properties_enum.size(); ++i)
561 
562  for (std::size_t i = 0; i < _properties.size(); ++i)
563  _properties[i].resize(_num_p * _num_T);
564 
565  // Temperature is divided equally into _num_T segments
566  Real delta_T = (_temperature_max - _temperature_min) / static_cast<Real>(_num_T - 1);
567 
568  for (unsigned int j = 0; j < _num_T; ++j)
569  _temperature[j] = _temperature_min + j * delta_T;
570 
571  // Divide the pressure into _num_p equal segments
572  Real delta_p = (_pressure_max - _pressure_min) / static_cast<Real>(_num_p - 1);
573 
574  for (unsigned int i = 0; i < _num_p; ++i)
575  _pressure[i] = _pressure_min + i * delta_p;
576 
577  // Generate the tabulated data at the pressure and temperature points
578  for (std::size_t i = 0; i < _properties.size(); ++i)
579  {
580  if (_interpolated_properties[i] == "density")
581  for (unsigned int p = 0; p < _num_p; ++p)
582  for (unsigned int t = 0; t < _num_T; ++t)
583  _properties[i][p * _num_T + t] = _fp.rho_from_p_T(_pressure[p], _temperature[t]);
584 
585  if (_interpolated_properties[i] == "enthalpy")
586  for (unsigned int p = 0; p < _num_p; ++p)
587  for (unsigned int t = 0; t < _num_T; ++t)
588  _properties[i][p * _num_T + t] = _fp.h_from_p_T(_pressure[p], _temperature[t]);
589 
590  if (_interpolated_properties[i] == "internal_energy")
591  for (unsigned int p = 0; p < _num_p; ++p)
592  for (unsigned int t = 0; t < _num_T; ++t)
594 
595  if (_interpolated_properties[i] == "viscosity")
596  for (unsigned int p = 0; p < _num_p; ++p)
597  for (unsigned int t = 0; t < _num_T; ++t)
598  _properties[i][p * _num_T + t] = _fp.mu_from_p_T(_pressure[p], _temperature[t]);
599 
600  if (_interpolated_properties[i] == "k")
601  for (unsigned int p = 0; p < _num_p; ++p)
602  for (unsigned int t = 0; t < _num_T; ++t)
603  _properties[i][p * _num_T + t] = _fp.k_from_p_T(_pressure[p], _temperature[t]);
604 
605  if (_interpolated_properties[i] == "cv")
606  for (unsigned int p = 0; p < _num_p; ++p)
607  for (unsigned int t = 0; t < _num_T; ++t)
608  _properties[i][p * _num_T + t] = _fp.cv_from_p_T(_pressure[p], _temperature[t]);
609 
610  if (_interpolated_properties[i] == "cp")
611  for (unsigned int p = 0; p < _num_p; ++p)
612  for (unsigned int t = 0; t < _num_T; ++t)
613  _properties[i][p * _num_T + t] = _fp.cp_from_p_T(_pressure[p], _temperature[t]);
614 
615  if (_interpolated_properties[i] == "entropy")
616  for (unsigned int p = 0; p < _num_p; ++p)
617  for (unsigned int t = 0; t < _num_T; ++t)
618  _properties[i][p * _num_T + t] = _fp.s_from_p_T(_pressure[p], _temperature[t]);
619  }
620 }
Real _temperature_max
Maximum temperature in tabulated data.
Real _pressure_max
Maximum pressure in tabulated data.
MultiMooseEnum _interpolated_properties_enum
Properties to be interpolated entered in the input file.
virtual Real e_from_p_T(Real p, Real T) const
Internal energy from pressure and temperature.
Real _temperature_min
Minimum temperature in tabulated data.
std::vector< std::string > _interpolated_properties
List of properties to be interpolated.
std::vector< Real > _pressure
Pressure vector.
std::vector< Real > _temperature
Temperature vector.
unsigned int _num_T
Number of temperature points in the tabulated data.
Real _pressure_min
Minimum pressure in tabulated data.
std::vector< std::vector< Real > > _properties
Tabulated fluid properties.
unsigned int _num_p
Number of pressure points in the tabulated data.
const SinglePhaseFluidProperties & _fp
SinglePhaseFluidPropertiesPT UserObject.

◆ h()

Real SinglePhaseFluidProperties::h ( Real  p,
Real  T 
) const
virtualinherited

◆ h_dpT()

void SinglePhaseFluidProperties::h_dpT ( Real  pressure,
Real  temperature,
Real &  h,
Real &  dh_dp,
Real &  dh_dT 
) const
virtualinherited

Specific enthalpy and its derivatives from pressure and temperature.

Parameters
[in]ppressure (Pa)
[in]Ttemperature (K)
[out]hspecific enthalpy (J/kg)
[out]dh_dpderivative of specific enthalpy w.r.t. pressure
[out]dh_dTderivative of specific enthalpy w.r.t. temperature

Definition at line 436 of file SinglePhaseFluidProperties.C.

437 {
438  mooseDeprecated(name(), ": h_dpT() is deprecated. Use h_from_p_T() instead");
439 
440  h_from_p_T(p, T, h, dh_dp, dh_dT);
441 }
virtual Real h(Real p, Real T) const
Specific enthalpy from pressure and temperature.
const std::string name
Definition: Setup.h:22

◆ h_from_p_T() [1/2]

Real TabulatedFluidProperties::h_from_p_T ( Real  p,
Real  T 
) const
overridevirtual

Definition at line 368 of file TabulatedFluidProperties.C.

369 {
371  {
374  }
375  else
376  return _fp.h_from_p_T(pressure, temperature);
377 }
const std::string temperature
Definition: NS.h:27
virtual void checkInputVariables(Real &pressure, Real &temperature) const
Checks that the inputs are within the range of the tabulated data, and throws an error if they are no...
const std::string pressure
Definition: NS.h:26
std::vector< std::unique_ptr< BicubicInterpolation > > _property_ipol
Interpolated fluid property.
const SinglePhaseFluidProperties & _fp
SinglePhaseFluidPropertiesPT UserObject.

◆ h_from_p_T() [2/2]

void TabulatedFluidProperties::h_from_p_T ( Real  pressure,
Real  temperature,
Real &  h,
Real &  dh_dp,
Real &  dh_dT 
) const
overridevirtual

Definition at line 380 of file TabulatedFluidProperties.C.

382 {
384  {
386  _property_ipol[_enthalpy_idx]->sampleValueAndDerivatives(
387  pressure, temperature, h, dh_dp, dh_dT);
388  }
389  else
390  _fp.h_from_p_T(pressure, temperature, h, dh_dp, dh_dT);
391 }
virtual Real h(Real p, Real T) const
Specific enthalpy from pressure and temperature.
const std::string temperature
Definition: NS.h:27
virtual void checkInputVariables(Real &pressure, Real &temperature) const
Checks that the inputs are within the range of the tabulated data, and throws an error if they are no...
const std::string pressure
Definition: NS.h:26
std::vector< std::unique_ptr< BicubicInterpolation > > _property_ipol
Interpolated fluid property.
const SinglePhaseFluidProperties & _fp
SinglePhaseFluidPropertiesPT UserObject.

◆ henryConstant() [1/2]

Real TabulatedFluidProperties::henryConstant ( Real  temperature) const
overridevirtual

Henry's law constant for dissolution in water.

Parameters
temperaturefluid temperature (K)
Returns
Henry's constant

Reimplemented from SinglePhaseFluidProperties.

Definition at line 494 of file TabulatedFluidProperties.C.

495 {
496  return _fp.henryConstant(temperature);
497 }
const std::string temperature
Definition: NS.h:27
virtual Real henryConstant(Real temperature) const
Henry&#39;s law constant for dissolution in water.
const SinglePhaseFluidProperties & _fp
SinglePhaseFluidPropertiesPT UserObject.

◆ henryConstant() [2/2]

void TabulatedFluidProperties::henryConstant ( Real  temperature,
Real &  Kh,
Real &  dKh_dT 
) const
overridevirtual

Henry's law constant for dissolution in water and derivative wrt temperature.

Parameters
temperaturefluid temperature (K)
[out]KhHenry's constant
[out]dKh_dTderivative of Kh wrt temperature

Reimplemented from SinglePhaseFluidProperties.

Definition at line 500 of file TabulatedFluidProperties.C.

501 {
502  _fp.henryConstant(temperature, Kh, dKh_dT);
503 }
const std::string temperature
Definition: NS.h:27
virtual Real henryConstant(Real temperature) const
Henry&#39;s law constant for dissolution in water.
const SinglePhaseFluidProperties & _fp
SinglePhaseFluidPropertiesPT UserObject.

◆ henryConstant_dT()

void SinglePhaseFluidProperties::henryConstant_dT ( Real  temperature,
Real &  Kh,
Real &  dKh_dT 
) const
virtualinherited

Definition at line 255 of file SinglePhaseFluidProperties.C.

256 {
257  mooseDeprecated(name(), ": henryConstant_dT() is deprecated. Use henryConstant() instead");
258 
259  henryConstant(T, Kh, dKh_dT);
260 }
const std::string name
Definition: Setup.h:22
virtual Real henryConstant(Real temperature) const
Henry&#39;s law constant for dissolution in water.

◆ henryConstantIAPWS() [1/2]

Real SinglePhaseFluidProperties::henryConstantIAPWS ( Real  temperature,
Real  A,
Real  B,
Real  C 
) const
protectedvirtualinherited

IAPWS formulation of Henry's law constant for dissolution in water From Guidelines on the Henry's constant and vapour liquid distribution constant for gases in H20 and D20 at high temperatures, IAPWS (2004)

Definition at line 160 of file SinglePhaseFluidProperties.C.

Referenced by MethaneFluidProperties::henryConstant(), NitrogenFluidProperties::henryConstant(), HydrogenFluidProperties::henryConstant(), CO2FluidProperties::henryConstant(), and SinglePhaseFluidProperties::henryConstantIAPWS_dT().

161 {
162  const Real Tr = T / 647.096;
163  const Real tau = 1.0 - Tr;
164 
165  const Real lnkh =
166  A / Tr + B * std::pow(tau, 0.355) / Tr + C * std::pow(Tr, -0.41) * std::exp(tau);
167 
168  // The vapor pressure used in this formulation
169  const std::vector<Real> a{
170  -7.85951783, 1.84408259, -11.7866497, 22.6807411, -15.9618719, 1.80122502};
171  const std::vector<Real> b{1.0, 1.5, 3.0, 3.5, 4.0, 7.5};
172  Real sum = 0.0;
173 
174  for (std::size_t i = 0; i < a.size(); ++i)
175  sum += a[i] * std::pow(tau, b[i]);
176 
177  return 22.064e6 * std::exp(sum / Tr) * std::exp(lnkh);
178 }
ExpressionBuilder::EBTerm pow(const ExpressionBuilder::EBTerm &left, T exponent)

◆ henryConstantIAPWS() [2/2]

void SinglePhaseFluidProperties::henryConstantIAPWS ( Real  temperature,
Real &  Kh,
Real &  dKh_dT,
Real  A,
Real  B,
Real  C 
) const
protectedvirtualinherited

Definition at line 181 of file SinglePhaseFluidProperties.C.

183 {
184  const Real pc = 22.064e6;
185  const Real Tc = 647.096;
186 
187  const Real Tr = T / Tc;
188  const Real tau = 1.0 - Tr;
189 
190  const Real lnkh =
191  A / Tr + B * std::pow(tau, 0.355) / Tr + C * std::pow(Tr, -0.41) * std::exp(tau);
192  const Real dlnkh_dT =
193  (-A / Tr / Tr - B * std::pow(tau, 0.355) / Tr / Tr - 0.355 * B * std::pow(tau, -0.645) / Tr -
194  0.41 * C * std::pow(Tr, -1.41) * std::exp(tau) - C * std::pow(Tr, -0.41) * std::exp(tau)) /
195  Tc;
196 
197  // The vapor pressure used in this formulation
198  const std::vector<Real> a{
199  -7.85951783, 1.84408259, -11.7866497, 22.6807411, -15.9618719, 1.80122502};
200  const std::vector<Real> b{1.0, 1.5, 3.0, 3.5, 4.0, 7.5};
201  Real sum = 0.0;
202  Real dsum = 0.0;
203 
204  for (std::size_t i = 0; i < a.size(); ++i)
205  {
206  sum += a[i] * std::pow(tau, b[i]);
207  dsum += a[i] * b[i] * std::pow(tau, b[i] - 1.0);
208  }
209 
210  const Real p = pc * std::exp(sum / Tr);
211  const Real dp_dT = -p / Tc / Tr * (sum / Tr + dsum);
212 
213  // Henry's constant and its derivative wrt temperature
214  Kh = p * std::exp(lnkh);
215  dKh_dT = (p * dlnkh_dT + dp_dT) * std::exp(lnkh);
216 }
ExpressionBuilder::EBTerm pow(const ExpressionBuilder::EBTerm &left, T exponent)

◆ henryConstantIAPWS_dT()

void SinglePhaseFluidProperties::henryConstantIAPWS_dT ( Real  temperature,
Real &  Kh,
Real &  dKh_dT,
Real  A,
Real  B,
Real  C 
) const
protectedvirtualinherited

Definition at line 219 of file SinglePhaseFluidProperties.C.

221 {
222  mooseDeprecated(name(),
223  ":henryConstantIAPWS_dT() is deprecated. Use henryConstantIAPWS() instead");
224 
225  henryConstantIAPWS(T, Kh, dKh_dT, A, B, C);
226 }
const std::string name
Definition: Setup.h:22
virtual Real henryConstantIAPWS(Real temperature, Real A, Real B, Real C) const
IAPWS formulation of Henry&#39;s law constant for dissolution in water From Guidelines on the Henry&#39;s con...

◆ initialize()

virtual void FluidProperties::initialize ( )
inlinefinalvirtualinherited

Definition at line 36 of file FluidProperties.h.

36 {}

◆ initialSetup()

void TabulatedFluidProperties::initialSetup ( )
overridevirtual

Definition at line 104 of file TabulatedFluidProperties.C.

105 {
106  // Check to see if _file_name supplied exists. If it does, that data
107  // will be used. If it does not exist, data will be generated and then
108  // written to _file_name.
109  std::ifstream file(_file_name.c_str());
110  if (file.good())
111  {
112  _console << name() + ": Reading tabulated properties from " << _file_name << "\n";
113  _csv_reader.read();
114 
115  const std::vector<std::string> & column_names = _csv_reader.getNames();
116 
117  // Check that all required columns are present
118  for (std::size_t i = 0; i < _required_columns.size(); ++i)
119  {
120  if (std::find(column_names.begin(), column_names.end(), _required_columns[i]) ==
121  column_names.end())
122  mooseError(name(),
123  ": no ",
125  " data read in ",
126  _file_name,
127  ". A column named ",
129  " must be present");
130  }
131 
132  // Check that any property names read from the file are present in the list of possible
133  // properties, and if they are, add them to the list of read properties
134  for (std::size_t i = 0; i < column_names.size(); ++i)
135  {
136  // Only check properties not in _required_columns
137  if (std::find(_required_columns.begin(), _required_columns.end(), column_names[i]) ==
138  _required_columns.end())
139  {
140  if (std::find(_property_columns.begin(), _property_columns.end(), column_names[i]) ==
141  _property_columns.end())
142  mooseError(name(),
143  ": ",
144  column_names[i],
145  " read in ",
146  _file_name,
147  " is not one of the properties that TabulatedFluidProperties understands");
148  else
149  _interpolated_properties.push_back(column_names[i]);
150  }
151  }
152 
153  std::map<std::string, unsigned int> data_index;
154  for (std::size_t i = 0; i < column_names.size(); ++i)
155  {
156  auto it = std::find(column_names.begin(), column_names.end(), column_names[i]);
157  data_index[column_names[i]] = std::distance(column_names.begin(), it);
158  }
159 
160  const std::vector<std::vector<Real>> & column_data = _csv_reader.getData();
161 
162  // Extract the pressure and temperature data vectors
163  _pressure = column_data[data_index.find("pressure")->second];
164  _temperature = column_data[data_index.find("temperature")->second];
165 
166  // Pressure and temperature data contains duplicates due to the csv format.
167  // First, check that pressure is monotonically increasing
168  if (!std::is_sorted(_pressure.begin(), _pressure.end()))
169  mooseError(
170  name(), ": the column data for pressure is not monotonically increasing in ", _file_name);
171 
172  // The first pressure value is repeated for each temperature value. Counting the
173  // number of repeats provides the number of temperature values
174  auto num_T = std::count(_pressure.begin(), _pressure.end(), _pressure.front());
175 
176  // Now remove the duplicates in the pressure vector
177  auto last_unique = std::unique(_pressure.begin(), _pressure.end());
178  _pressure.erase(last_unique, _pressure.end());
179  _num_p = _pressure.size();
180 
181  // Check that the number of rows in the csv file is equal to _num_p * _num_T
182  if (column_data[0].size() != _num_p * static_cast<unsigned int>(num_T))
183  mooseError(name(),
184  ": the number of rows in ",
185  _file_name,
186  " is not equal to the number of unique pressure values ",
187  _num_p,
188  " multiplied by the number of unique temperature values ",
189  num_T);
190 
191  // Need to make sure that the temperature values are provided in ascending order
192  // as well as duplicated for each pressure value
193  std::vector<Real> temp0(_temperature.begin(), _temperature.begin() + num_T);
194  if (!std::is_sorted(temp0.begin(), temp0.end()))
195  mooseError(name(),
196  ": the column data for temperature is not monotonically increasing in ",
197  _file_name);
198 
199  auto it_temp = _temperature.begin() + num_T;
200  for (std::size_t i = 1; i < _pressure.size(); ++i)
201  {
202  std::vector<Real> temp(it_temp, it_temp + num_T);
203  if (temp != temp0)
204  mooseError(name(),
205  ": temperature values for pressure ",
206  _pressure[i],
207  " are not identical to values for ",
208  _pressure[0]);
209 
210  std::advance(it_temp, num_T);
211  }
212 
213  // At this point, all temperature data has been provided in ascending order
214  // identically for each pressure value, so we can just keep the first range
215  _temperature.erase(_temperature.begin() + num_T, _temperature.end());
216  _num_T = _temperature.size();
217 
218  // Minimum and maximum pressure and temperature. Note that _pressure and
219  // _temperature are sorted
220  _pressure_min = _pressure.front();
221  _pressure_max = _pressure.back();
222  _temperature_min = _temperature.front();
224 
225  // Extract the fluid property data from the file
226  for (std::size_t i = 0; i < _interpolated_properties.size(); ++i)
227  _properties.push_back(column_data[data_index.find(_interpolated_properties[i])->second]);
228  }
229  else
230  {
231  _console << name() + ": No tabulated properties file named " << _file_name << " exists.\n";
232  _console << name() + ": Generating tabulated data\n";
233 
234  if (_save_file)
235  _console << name() + ": Writing tabulated data to " << _file_name << "\n";
236 
238 
239  // Write tabulated data to file
240  if (_save_file)
242  }
243 
244  // At this point, all properties read or generated are able to be used by
245  // TabulatedFluidProperties. Now set flags and indexes for each property in
246  //_interpolated_properties to use in property calculations
247  for (std::size_t i = 0; i < _interpolated_properties.size(); ++i)
248  {
249  if (_interpolated_properties[i] == "density")
250  {
251  _interpolate_density = true;
252  _density_idx = i;
253  }
254  if (_interpolated_properties[i] == "enthalpy")
255  {
256  _interpolate_enthalpy = true;
257  _enthalpy_idx = i;
258  }
259  if (_interpolated_properties[i] == "internal_energy")
260  {
263  }
264  if (_interpolated_properties[i] == "viscosity")
265  {
266  _interpolate_viscosity = true;
267  _viscosity_idx = i;
268  }
269  if (_interpolated_properties[i] == "k")
270  {
271  _interpolate_k = true;
272  _k_idx = i;
273  }
274  if (_interpolated_properties[i] == "cp")
275  {
276  _interpolate_cp = true;
277  _cp_idx = i;
278  }
279  if (_interpolated_properties[i] == "cv")
280  {
281  _interpolate_cv = true;
282  _cv_idx = i;
283  }
284  if (_interpolated_properties[i] == "entropy")
285  {
286  _interpolate_entropy = true;
287  _entropy_idx = i;
288  }
289  }
290 
291  // Construct bicubic interpolants from tabulated data
292  std::vector<std::vector<Real>> data_matrix;
293  _property_ipol.resize(_properties.size());
294 
295  for (std::size_t i = 0; i < _property_ipol.size(); ++i)
296  {
297  reshapeData2D(_num_p, _num_T, _properties[i], data_matrix);
298  _property_ipol[i] =
299  libmesh_make_unique<BicubicInterpolation>(_pressure, _temperature, data_matrix);
300  }
301 }
Real _temperature_max
Maximum temperature in tabulated data.
const std::vector< std::string > _required_columns
List of required column names to be read.
Real _pressure_max
Maximum pressure in tabulated data.
MooseUtils::DelimitedFileReader _csv_reader
The MOOSE delimited file reader.
Real _temperature_min
Minimum temperature in tabulated data.
const std::string name
Definition: Setup.h:22
std::vector< std::string > _interpolated_properties
List of properties to be interpolated.
std::vector< Real > _pressure
Pressure vector.
std::vector< Real > _temperature
Temperature vector.
unsigned int _num_T
Number of temperature points in the tabulated data.
Real _pressure_min
Minimum pressure in tabulated data.
std::vector< std::vector< Real > > _properties
Tabulated fluid properties.
unsigned int _num_p
Number of pressure points in the tabulated data.
const std::vector< std::string > _property_columns
List of possible property column names to be read.
unsigned int _density_idx
Index of each property.
bool _interpolate_density
Set of flags to note whether a property is to be interpolated.
void reshapeData2D(unsigned int nrow, unsigned int ncol, const std::vector< Real > &vec, std::vector< std::vector< Real >> &mat)
Forms a 2D matrix from a single std::vector.
const bool _save_file
Whether to save a generated fluid properties file to disk.
std::vector< std::unique_ptr< BicubicInterpolation > > _property_ipol
Interpolated fluid property.
virtual void generateTabulatedData()
Generates a table of fluid properties by looping over pressure and temperature and calculating proper...
void writeTabulatedData(std::string file_name)
Writes tabulated data to a file.
FileName _file_name
File name of tabulated data file.

◆ k()

Real SinglePhaseFluidProperties::k ( Real  pressure,
Real  temperature 
) const
virtualinherited

Thermal conductivity.

Parameters
pressurefluid pressure (Pa)
temperaturefluid temperature (K)
Returns
thermal conductivity (W/m/K)

Definition at line 404 of file SinglePhaseFluidProperties.C.

Referenced by SinglePhaseFluidProperties::k_dpT(), MethaneFluidProperties::k_from_p_T(), SimpleFluidProperties::k_from_p_T(), NitrogenFluidProperties::k_from_p_T(), HydrogenFluidProperties::k_from_p_T(), NaClFluidProperties::k_from_p_T(), IdealGasFluidProperties::k_from_p_T(), StiffenedGasFluidProperties::k_from_p_T(), k_from_p_T(), and CO2FluidProperties::k_from_p_T().

405 {
406  mooseDeprecated(name(), ": k() is deprecated. Use k_from_p_T() instead");
407 
408  return k_from_p_T(p, T);
409 }
const std::string name
Definition: Setup.h:22

◆ k_dpT()

void SinglePhaseFluidProperties::k_dpT ( Real  pressure,
Real  temperature,
Real &  k,
Real &  dk_dp,
Real &  dk_dT 
) const
virtualinherited

Thermal conductivity and its derivatives wrt pressure and temperature.

Parameters
pressurefluid pressure (Pa)
temperaturefluid temperature (K)
[out]thermalconductivity (W/m/K)
[out]derivativeof thermal conductivity wrt pressure
[out]derivativeof thermal conductivity wrt temperature

Definition at line 412 of file SinglePhaseFluidProperties.C.

413 {
414  mooseDeprecated(name(), ": k_dpT() is deprecated. Use k_from_p_T() instead");
415 
416  k_from_p_T(p, T, k, dk_dp, dk_dT);
417 }
virtual Real k(Real pressure, Real temperature) const
Thermal conductivity.
const std::string name
Definition: Setup.h:22

◆ k_from_p_T() [1/2]

Real TabulatedFluidProperties::k_from_p_T ( Real  pressure,
Real  temperature 
) const
overridevirtual

Definition at line 450 of file TabulatedFluidProperties.C.

451 {
452  if (_interpolate_k)
453  {
455  return _property_ipol[_k_idx]->sample(pressure, temperature);
456  }
457  else
458  return _fp.k_from_p_T(pressure, temperature);
459 }
const std::string temperature
Definition: NS.h:27
virtual void checkInputVariables(Real &pressure, Real &temperature) const
Checks that the inputs are within the range of the tabulated data, and throws an error if they are no...
const std::string pressure
Definition: NS.h:26
std::vector< std::unique_ptr< BicubicInterpolation > > _property_ipol
Interpolated fluid property.
const SinglePhaseFluidProperties & _fp
SinglePhaseFluidPropertiesPT UserObject.

◆ k_from_p_T() [2/2]

void TabulatedFluidProperties::k_from_p_T ( Real  pressure,
Real  temperature,
Real &  k,
Real &  dk_dp,
Real &  dk_dT 
) const
overridevirtual

Definition at line 462 of file TabulatedFluidProperties.C.

464 {
465  if (_interpolate_k)
466  {
468  return _property_ipol[_k_idx]->sampleValueAndDerivatives(
469  pressure, temperature, k, dk_dp, dk_dT);
470  }
471  else
472  return _fp.k_from_p_T(pressure, temperature, k, dk_dp, dk_dT);
473 }
const std::string temperature
Definition: NS.h:27
virtual Real k(Real pressure, Real temperature) const
Thermal conductivity.
virtual void checkInputVariables(Real &pressure, Real &temperature) const
Checks that the inputs are within the range of the tabulated data, and throws an error if they are no...
const std::string pressure
Definition: NS.h:26
std::vector< std::unique_ptr< BicubicInterpolation > > _property_ipol
Interpolated fluid property.
const SinglePhaseFluidProperties & _fp
SinglePhaseFluidPropertiesPT UserObject.

◆ molarMass()

Real TabulatedFluidProperties::molarMass ( ) const
overridevirtual

Molar mass [kg/mol].

Returns
molar mass

Reimplemented from SinglePhaseFluidProperties.

Definition at line 310 of file TabulatedFluidProperties.C.

311 {
312  return _fp.molarMass();
313 }
virtual Real molarMass() const
Molar mass [kg/mol].
const SinglePhaseFluidProperties & _fp
SinglePhaseFluidPropertiesPT UserObject.

◆ mu()

Real SinglePhaseFluidProperties::mu ( Real  pressure,
Real  temperature 
) const
virtualinherited

◆ mu_dpT()

void SinglePhaseFluidProperties::mu_dpT ( Real  pressure,
Real  temperature,
Real &  mu,
Real &  dmu_dp,
Real &  dmu_dT 
) const
virtualinherited

Dynamic viscosity and its derivatives wrt pressure and temperature.

Parameters
pressurefluid pressure (Pa)
temperaturefluid temperature (K)
[out]muviscosity (Pa.s)
[out]dmu_dpderivative of viscosity wrt pressure
[out]dmu_dTderivative of viscosity wrt temperature

Definition at line 352 of file SinglePhaseFluidProperties.C.

353 {
354  mooseDeprecated(name(), ": mu_dpT() is deprecated. Use mu_from_p_T() instead");
355 
356  mu_from_p_T(p, T, mu, dmu_dp, dmu_dT);
357 }
virtual Real mu(Real pressure, Real temperature) const
Dynamic viscosity.
const std::string name
Definition: Setup.h:22

◆ mu_drhoT_from_rho_T()

void SinglePhaseFluidProperties::mu_drhoT_from_rho_T ( Real  density,
Real  temperature,
Real  ddensity_dT,
Real &  mu,
Real &  dmu_drho,
Real &  dmu_dT 
) const
virtualinherited

Definition at line 235 of file SinglePhaseFluidProperties.C.

237 {
238  mooseDeprecated(name(), ":mu_drhoT_from_rho_T() is deprecated. Use mu_from_rho_T() instead");
239 
240  mu_from_rho_T(rho, T, drho_dT, mu, dmu_drho, dmu_dT);
241 }
virtual Real mu(Real pressure, Real temperature) const
Dynamic viscosity.
const std::string name
Definition: Setup.h:22
virtual void mu_from_rho_T(Real density, Real temperature, Real ddensity_dT, Real &mu, Real &dmu_drho, Real &dmu_dT) const
Dynamic viscosity and its derivatives wrt density and temperature TODO: this shouldn&#39;t need 3 input a...

◆ mu_from_p_T() [1/2]

Real TabulatedFluidProperties::mu_from_p_T ( Real  pressure,
Real  temperature 
) const
overridevirtual

Definition at line 394 of file TabulatedFluidProperties.C.

395 {
397  {
400  }
401  else
402  return _fp.mu_from_p_T(pressure, temperature);
403 }
const std::string temperature
Definition: NS.h:27
virtual void checkInputVariables(Real &pressure, Real &temperature) const
Checks that the inputs are within the range of the tabulated data, and throws an error if they are no...
const std::string pressure
Definition: NS.h:26
std::vector< std::unique_ptr< BicubicInterpolation > > _property_ipol
Interpolated fluid property.
const SinglePhaseFluidProperties & _fp
SinglePhaseFluidPropertiesPT UserObject.

◆ mu_from_p_T() [2/2]

void TabulatedFluidProperties::mu_from_p_T ( Real  pressure,
Real  temperature,
Real &  mu,
Real &  dmu_dp,
Real &  dmu_dT 
) const
overridevirtual

Definition at line 406 of file TabulatedFluidProperties.C.

408 {
410  {
412  _property_ipol[_viscosity_idx]->sampleValueAndDerivatives(
413  pressure, temperature, mu, dmu_dp, dmu_dT);
414  }
415  else
416  return _fp.mu_from_p_T(pressure, temperature, mu, dmu_dp, dmu_dT);
417 }
virtual Real mu(Real pressure, Real temperature) const
Dynamic viscosity.
const std::string temperature
Definition: NS.h:27
virtual void checkInputVariables(Real &pressure, Real &temperature) const
Checks that the inputs are within the range of the tabulated data, and throws an error if they are no...
const std::string pressure
Definition: NS.h:26
std::vector< std::unique_ptr< BicubicInterpolation > > _property_ipol
Interpolated fluid property.
const SinglePhaseFluidProperties & _fp
SinglePhaseFluidPropertiesPT UserObject.

◆ mu_from_rho_T()

void SinglePhaseFluidProperties::mu_from_rho_T ( Real  density,
Real  temperature,
Real  ddensity_dT,
Real &  mu,
Real &  dmu_drho,
Real &  dmu_dT 
) const
virtualinherited

Dynamic viscosity and its derivatives wrt density and temperature TODO: this shouldn't need 3 input args - AD will assume/call the 2-input version.

Parameters
densityfluid density (kg/m^3)
temperaturefluid temperature (K)
ddensity_dTderivative of density wrt temperature
[out]muviscosity (Pa.s)
[out]dmu_drhoderivative of viscosity wrt density
[out]dmu_dTderivative of viscosity wrt temperature

Reimplemented in Water97FluidProperties, CO2FluidProperties, HydrogenFluidProperties, and NitrogenFluidProperties.

Definition at line 229 of file SinglePhaseFluidProperties.C.

Referenced by SinglePhaseFluidProperties::mu_drhoT_from_rho_T().

230 {
231  mooseError(name(), ": mu_from_rho_T is not implemented.");
232 }
const std::string name
Definition: Setup.h:22

◆ propfunc() [1/15]

SinglePhaseFluidProperties::propfunc ( p  ,
v  ,
e   
)
inherited

Compute a fluid property given for the state defined by two given properties.

For all functions, the first two arguments are the given properties that define the fluid state. For the two-argument variants, the desired property is the return value. The five-argument variants also provide partial derivatives dx/da and dx/db where x is the desired property being computed, a is the first given property, and b is the second given property. The desired property, dx/da, and dx/db are stored into the 3rd, 4th, and 5th arguments respectively.

Properties/parameters used in these function are listed below with their units:

p pressure [Pa] T temperature [K] e specific internal energy [J/kg] v specific volume [m^3/kg] rho density [kg/m^3] h specific enthalpy [J/kg] s specific entropy [J/(kg*K)] mu viscosity [Pa*s] k thermal conductivity [W/(m*K)] c speed of sound [m/s] cp constant-pressure specific heat [J/K] cv constant-volume specific heat [J/K] beta volumetric thermal expansion coefficient [1/K] g Gibbs free energy [J] pp_sat partial pressure at saturation [Pa]

As an example:

// calculate pressure given specific vol and energy: auto pressure = your_fluid_properties_object.p_from_v_e(specific_vol, specific_energy);

// or use the derivative variant: Real dp_dv = 0; // derivative will be stored into here Real dp_de = 0; // derivative will be stored into here your_fluid_properties_object.p_from_v_e(specific_vol, specific_energy, pressure, dp_dv, dp_de);

Automatic differentiation (AD) support is provided through x_from_a_b(DualReal a, DualReal b) versions of the functions where a and b must be ADReal/DualNumber's calculated using all AD-supporting values:

auto v = 1/rho; // rho must be an AD non-linear variable. auto e = rhoE/rho - vel_energy; // rhoE and vel_energy must be AD variables/numbers also. auto pressure = your_fluid_properties_object.p_from_v_e(v, e); // pressure now contains partial derivatives w.r.t. all degrees of freedom

◆ propfunc() [2/15]

e SinglePhaseFluidProperties::propfunc ( c  ,
v  ,
e   
)
inherited

◆ propfunc() [3/15]

e e SinglePhaseFluidProperties::propfunc ( cv  ,
v  ,
e   
)
inherited

◆ propfunc() [4/15]

e e e SinglePhaseFluidProperties::propfunc ( k  ,
v  ,
e   
)
inherited

◆ propfunc() [5/15]

e e e e SinglePhaseFluidProperties::propfunc ( s  ,
h  ,
p   
)
inherited

◆ propfunc() [6/15]

e e e e s SinglePhaseFluidProperties::propfunc ( e  ,
v  ,
h   
)
inherited

◆ propfunc() [7/15]

e e e e s T SinglePhaseFluidProperties::propfunc ( pp_sat  ,
p  ,
T   
)
inherited

◆ propfunc() [8/15]

e e e e s T T SinglePhaseFluidProperties::propfunc ( k  ,
rho  ,
T   
)
inherited

◆ propfunc() [9/15]

e e e e s T T T SinglePhaseFluidProperties::propfunc ( cp  ,
p  ,
T   
)
inherited

◆ propfunc() [10/15]

e e e e s T T T T SinglePhaseFluidProperties::propfunc ( mu  ,
p  ,
T   
)
inherited

◆ propfunc() [11/15]

e e e e s T T T T T SinglePhaseFluidProperties::propfunc ( rho  ,
p  ,
T   
)
inherited

◆ propfunc() [12/15]

e e e e s T T T T T rho SinglePhaseFluidProperties::propfunc ( e  ,
T  ,
v   
)
inherited

◆ propfunc() [13/15]

e e e e s T T T T T rho v SinglePhaseFluidProperties::propfunc ( h  ,
T  ,
v   
)
inherited

◆ propfunc() [14/15]

e e e e s T T T T T rho v v SinglePhaseFluidProperties::propfunc ( cv  ,
T  ,
v   
)
inherited

◆ propfunc() [15/15]

e e e e s T T T T T rho v v T SinglePhaseFluidProperties::propfunc ( p  ,
h  ,
s   
)
inherited

◆ reshapeData2D()

void TabulatedFluidProperties::reshapeData2D ( unsigned int  nrow,
unsigned int  ncol,
const std::vector< Real > &  vec,
std::vector< std::vector< Real >> &  mat 
)
protected

Forms a 2D matrix from a single std::vector.

Parameters
nrownumber of rows in the matrix
ncolnumber of columns in the matrix
vec1D vector to reshape into a 2D matrix
[out]2Dmatrix formed by reshaping vec

Definition at line 623 of file TabulatedFluidProperties.C.

Referenced by initialSetup().

627 {
628  if (!vec.empty())
629  {
630  mat.resize(nrow);
631  for (unsigned int i = 0; i < nrow; ++i)
632  mat[i].resize(ncol);
633 
634  for (unsigned int i = 0; i < nrow; ++i)
635  for (unsigned int j = 0; j < ncol; ++j)
636  mat[i][j] = vec[i * ncol + j];
637  }
638 }

◆ rho()

virtual Real SinglePhaseFluidProperties::rho ( Real  p,
Real  T 
) const
virtualinherited

Density from pressure and temperature.

Parameters
[in]ppressure (Pa)
[in]Ttemperature (K)
Returns
density (kg/m^3)

◆ rho_dpT()

void SinglePhaseFluidProperties::rho_dpT ( Real  pressure,
Real  temperature,
Real &  rho,
Real &  drho_dp,
Real &  drho_dT 
) const
virtualinherited

Density and its derivatives from pressure and temperature.

Parameters
[in]ppressure (Pa)
[in]Ttemperature (K)
[out]rhodensity (kg/m^3)
[out]drho_dpderivative of density w.r.t. pressure
[out]drho_dTderivative of density w.r.t. temperature

Definition at line 282 of file SinglePhaseFluidProperties.C.

284 {
285  mooseDeprecated(name(), ": rho_dpT() is deprecated. Use rho_from_p_T() instead");
286 
287  rho_from_p_T(p, T, rho, drho_dp, drho_dT);
288 }
const std::string name
Definition: Setup.h:22

◆ rho_e_dpT()

void SinglePhaseFluidProperties::rho_e_dpT ( Real  pressure,
Real  temperature,
Real &  rho,
Real &  drho_dp,
Real &  drho_dT,
Real &  e,
Real &  de_dp,
Real &  de_dT 
) const
virtualinherited

Definition at line 321 of file SinglePhaseFluidProperties.C.

329 {
330  mooseDeprecated(name(), ": rho_e_dpT() is deprecated. Use rho_e_from_p_T() instead");
331 
332  rho_e_from_p_T(p, T, rho, drho_dp, drho_dT, e, de_dp, de_dT);
333 }
virtual void rho_e_from_p_T(Real pressure, Real temperature, Real &rho, Real &drho_dp, Real &drho_dT, Real &e, Real &de_dp, Real &de_dT) const
Density and internal energy and their derivatives wrt pressure and temperature.
const std::string name
Definition: Setup.h:22
virtual Real e(Real pressure, Real temperature) const

◆ rho_e_from_p_T()

void SinglePhaseFluidProperties::rho_e_from_p_T ( Real  pressure,
Real  temperature,
Real &  rho,
Real &  drho_dp,
Real &  drho_dT,
Real &  e,
Real &  de_dp,
Real &  de_dT 
) const
virtualinherited

Density and internal energy and their derivatives wrt pressure and temperature.

Parameters
pressurefluid pressure (Pa)
temperaturefluid temperature (K)
[out]rhodensity (kg/m^3)
[out]drho_dpderivative of density wrt pressure
[out]drho_dTderivative of density wrt temperature
[out]einternal energy (J/kg)
[out]de_dpderivative of internal energy wrt pressure
[out]de_dTderivative of internal energy wrt temperature

Definition at line 307 of file SinglePhaseFluidProperties.C.

Referenced by SinglePhaseFluidProperties::rho_e_dpT().

315 {
316  rho_from_p_T(p, T, rho, drho_dp, drho_dT);
317  e_from_p_T(p, T, e, de_dp, de_dT);
318 }
virtual Real e_from_p_T(Real p, Real T) const
Internal energy from pressure and temperature.
virtual Real e(Real pressure, Real temperature) const

◆ rho_from_p_T() [1/2]

Real TabulatedFluidProperties::rho_from_p_T ( Real  pressure,
Real  temperature 
) const
overridevirtual

Definition at line 316 of file TabulatedFluidProperties.C.

317 {
319  {
322  }
323  else
324  return _fp.rho_from_p_T(pressure, temperature);
325 }
const std::string temperature
Definition: NS.h:27
virtual void checkInputVariables(Real &pressure, Real &temperature) const
Checks that the inputs are within the range of the tabulated data, and throws an error if they are no...
const std::string pressure
Definition: NS.h:26
unsigned int _density_idx
Index of each property.
bool _interpolate_density
Set of flags to note whether a property is to be interpolated.
std::vector< std::unique_ptr< BicubicInterpolation > > _property_ipol
Interpolated fluid property.
const SinglePhaseFluidProperties & _fp
SinglePhaseFluidPropertiesPT UserObject.

◆ rho_from_p_T() [2/2]

void TabulatedFluidProperties::rho_from_p_T ( Real  pressure,
Real  temperature,
Real &  rho,
Real &  drho_dp,
Real &  drho_dT 
) const
overridevirtual

Definition at line 328 of file TabulatedFluidProperties.C.

330 {
332  {
334  _property_ipol[_density_idx]->sampleValueAndDerivatives(
335  pressure, temperature, rho, drho_dp, drho_dT);
336  }
337  else
338  _fp.rho_from_p_T(pressure, temperature, rho, drho_dp, drho_dT);
339 }
const std::string temperature
Definition: NS.h:27
virtual void checkInputVariables(Real &pressure, Real &temperature) const
Checks that the inputs are within the range of the tabulated data, and throws an error if they are no...
const std::string pressure
Definition: NS.h:26
unsigned int _density_idx
Index of each property.
bool _interpolate_density
Set of flags to note whether a property is to be interpolated.
std::vector< std::unique_ptr< BicubicInterpolation > > _property_ipol
Interpolated fluid property.
const SinglePhaseFluidProperties & _fp
SinglePhaseFluidPropertiesPT UserObject.

◆ rho_mu()

void SinglePhaseFluidProperties::rho_mu ( Real  pressure,
Real  temperature,
Real &  rho,
Real &  mu 
) const
virtualinherited

Density and viscosity.

Parameters
pressurefluid pressure (Pa)
temperaturefluid temperature (K)
[out]rhodensity (kg/m^3)
[out]muviscosity (Pa.s)

Definition at line 360 of file SinglePhaseFluidProperties.C.

361 {
362  mooseDeprecated(name(), ": rho_mu() is deprecated. Use rho_mu_from_p_T() instead");
363 
364  rho_mu_from_p_T(p, T, rho, mu);
365 }
virtual Real mu(Real pressure, Real temperature) const
Dynamic viscosity.
const std::string name
Definition: Setup.h:22
virtual void rho_mu_from_p_T(Real pressure, Real temperature, Real &rho, Real &mu) const

◆ rho_mu_dpT()

void SinglePhaseFluidProperties::rho_mu_dpT ( Real  pressure,
Real  temperature,
Real &  rho,
Real &  drho_dp,
Real &  drho_dT,
Real &  mu,
Real &  dmu_dp,
Real &  dmu_dT 
) const
virtualinherited

Definition at line 375 of file SinglePhaseFluidProperties.C.

383 {
384  mooseDeprecated(name(), ": rho_mu_dpT() is deprecated. Use rho_mu_from_p_T() instead");
385 
386  rho_mu_from_p_T(p, T, rho, drho_dp, drho_dT, mu, dmu_dp, dmu_dT);
387 }
virtual Real mu(Real pressure, Real temperature) const
Dynamic viscosity.
const std::string name
Definition: Setup.h:22
virtual void rho_mu_from_p_T(Real pressure, Real temperature, Real &rho, Real &mu) const

◆ rho_mu_from_p_T() [1/2]

void SinglePhaseFluidProperties::rho_mu_from_p_T ( Real  pressure,
Real  temperature,
Real &  rho,
Real &  mu 
) const
virtualinherited

◆ rho_mu_from_p_T() [2/2]

void SinglePhaseFluidProperties::rho_mu_from_p_T ( Real  pressure,
Real  temperature,
Real &  rho,
Real &  drho_dp,
Real &  drho_dT,
Real &  mu,
Real &  dmu_dp,
Real &  dmu_dT 
) const
virtualinherited

Density and viscosity and their derivatives wrt pressure and temperature.

Parameters
pressurefluid pressure (Pa)
temperaturefluid temperature (K)
[out]rhodensity (kg/m^3)
[out]drho_dpderivative of density wrt pressure
[out]drho_dTderivative of density wrt temperature
[out]muviscosity (Pa.s)
[out]dmu_dpderivative of viscosity wrt pressure
[out]dmu_dTderivative of viscosity wrt temperature

Reimplemented in Water97FluidProperties, CO2FluidProperties, HydrogenFluidProperties, and NitrogenFluidProperties.

Definition at line 390 of file SinglePhaseFluidProperties.C.

398 {
399  rho_from_p_T(p, T, rho, drho_dp, drho_dT);
400  mu_from_p_T(p, T, mu, dmu_dp, dmu_dT);
401 }
virtual Real mu(Real pressure, Real temperature) const
Dynamic viscosity.

◆ s()

Real SinglePhaseFluidProperties::s ( Real  pressure,
Real  temperature 
) const
virtualinherited

◆ s_from_p_T() [1/2]

Real TabulatedFluidProperties::s_from_p_T ( Real  pressure,
Real  temperature 
) const
overridevirtual

Definition at line 476 of file TabulatedFluidProperties.C.

477 {
479  {
482  }
483  else
484  return _fp.s_from_p_T(pressure, temperature);
485 }
const std::string temperature
Definition: NS.h:27
virtual void checkInputVariables(Real &pressure, Real &temperature) const
Checks that the inputs are within the range of the tabulated data, and throws an error if they are no...
const std::string pressure
Definition: NS.h:26
std::vector< std::unique_ptr< BicubicInterpolation > > _property_ipol
Interpolated fluid property.
const SinglePhaseFluidProperties & _fp
SinglePhaseFluidPropertiesPT UserObject.

◆ s_from_p_T() [2/2]

void TabulatedFluidProperties::s_from_p_T ( Real  p,
Real  T,
Real &  s,
Real &  ds_dp,
Real &  ds_dT 
) const
overridevirtual

Definition at line 488 of file TabulatedFluidProperties.C.

489 {
490  SinglePhaseFluidProperties::s_from_p_T(p, T, s, ds_dp, ds_dT);
491 }
e e e e s T T T T T rho v v T virtual e Real s(Real pressure, Real temperature) const

◆ subdomainSetup()

virtual void FluidProperties::subdomainSetup ( )
inlinefinalvirtualinherited

Definition at line 40 of file FluidProperties.h.

40 {}

◆ T_from_p_h()

Real SinglePhaseFluidProperties::T_from_p_h ( Real  pressure,
Real  enthalpy 
) const
virtualinherited

Temperature from pressure and specific enthalpy.

Parameters
[in]pressurepressure (Pa)
[in]enthalpyenthalpy (J/kg)
Returns
Temperature (K)

Reimplemented in IdealGasFluidProperties.

Definition at line 463 of file SinglePhaseFluidProperties.C.

464 {
465  const Real s = s_from_h_p(h, p);
466  const Real rho = rho_from_p_s(p, s);
467  const Real v = 1. / rho;
468  const Real e = e_from_v_h(v, h);
469  return T_from_v_e(v, e);
470 }
e e e e s T T T T T rho v v T virtual e Real s(Real pressure, Real temperature) const
virtual Real h(Real p, Real T) const
Specific enthalpy from pressure and temperature.
virtual Real e(Real pressure, Real temperature) const

◆ threadJoin()

virtual void FluidProperties::threadJoin ( const UserObject &  )
inlinefinalvirtualinherited

Definition at line 39 of file FluidProperties.h.

39 {}

◆ triplePointPressure()

Real SinglePhaseFluidProperties::triplePointPressure ( ) const
virtualinherited

Triple point pressure.

Returns
triple point pressure (Pa)

Reimplemented in HydrogenFluidProperties, CO2FluidProperties, NitrogenFluidProperties, MethaneFluidProperties, NaClFluidProperties, and Water97FluidProperties.

Definition at line 130 of file SinglePhaseFluidProperties.C.

131 {
132  mooseError(name(), ": triplePointPressure() is not implemented");
133 }
const std::string name
Definition: Setup.h:22

◆ triplePointTemperature()

Real SinglePhaseFluidProperties::triplePointTemperature ( ) const
virtualinherited

Triple point temperature.

Returns
triple point temperature (K)

Reimplemented in HydrogenFluidProperties, CO2FluidProperties, NitrogenFluidProperties, MethaneFluidProperties, NaClFluidProperties, and Water97FluidProperties.

Definition at line 136 of file SinglePhaseFluidProperties.C.

137 {
138  mooseError(name(), ": triplePointTemperature() is not implemented");
139 }
const std::string name
Definition: Setup.h:22

◆ v_e_spndl_from_T()

void SinglePhaseFluidProperties::v_e_spndl_from_T ( Real  T,
Real &  v,
Real &  e 
) const
virtualinherited

Specific internal energy from temperature and specific volume.

Parameters
[in]Ttemperature
[in]vspecific volume

Reimplemented in StiffenedGasFluidProperties.

Definition at line 457 of file SinglePhaseFluidProperties.C.

Referenced by IdealRealGasMixtureFluidProperties::v_from_p_T().

458 {
459  mooseError(name(), ": ", __PRETTY_FUNCTION__, " not implemented.");
460 }
const std::string name
Definition: Setup.h:22

◆ v_from_p_T() [1/2]

Real SinglePhaseFluidProperties::v_from_p_T ( Real  p,
Real  T 
) const
virtualinherited

◆ v_from_p_T() [2/2]

void SinglePhaseFluidProperties::v_from_p_T ( Real  p,
Real  T,
Real &  v,
Real &  dv_dp,
Real &  dv_dT 
) const
virtualinherited

Specific volume and its derivatives from pressure and temperature.

Parameters
[in]ppressure
[in]Ttemperature
[out]vspecific volume
[out]dv_dpderivative of specific volume w.r.t. pressure
[out]dv_dTderivative of specific volume w.r.t. temperature

Definition at line 60 of file SinglePhaseFluidProperties.C.

61 {
62  Real rho, drho_dp, drho_dT;
63  rho_from_p_T(p, T, rho, drho_dp, drho_dT);
64 
65  v = 1.0 / rho;
66  const Real dv_drho = -1.0 / (rho * rho);
67 
68  dv_dp = dv_drho * drho_dp;
69  dv_dT = dv_drho * drho_dT;
70 }

◆ vaporPressure() [1/2]

Real TabulatedFluidProperties::vaporPressure ( Real  temperature) const
overridevirtual

Vapor pressure.

Used to delineate liquid and gas phases. Valid for temperatures between the triple point temperature and the critical temperature

Parameters
temperaturewater temperature (K)
Returns
saturation pressure (Pa)

Reimplemented from SinglePhaseFluidProperties.

Definition at line 506 of file TabulatedFluidProperties.C.

507 {
508  return _fp.vaporPressure(temperature);
509 }
virtual Real vaporPressure(Real temperature) const
Vapor pressure.
const std::string temperature
Definition: NS.h:27
const SinglePhaseFluidProperties & _fp
SinglePhaseFluidPropertiesPT UserObject.

◆ vaporPressure() [2/2]

void TabulatedFluidProperties::vaporPressure ( Real  temperature,
Real &  psat,
Real &  dpsat_dT 
) const
overridevirtual

Vapor pressure.

Used to delineate liquid and gas phases. Valid for temperatures between the triple point temperature and the critical temperature

Parameters
temperaturewater temperature (K)
[out]saturationpressure (Pa)
[out]derivativeof saturation pressure wrt temperature (Pa/K)

Reimplemented from SinglePhaseFluidProperties.

Definition at line 512 of file TabulatedFluidProperties.C.

513 {
514  _fp.vaporPressure(temperature, psat, dpsat_dT);
515 }
virtual Real vaporPressure(Real temperature) const
Vapor pressure.
const std::string temperature
Definition: NS.h:27
const SinglePhaseFluidProperties & _fp
SinglePhaseFluidPropertiesPT UserObject.

◆ vaporPressure_dT()

void SinglePhaseFluidProperties::vaporPressure_dT ( Real  temperature,
Real &  psat,
Real &  dpsat_dT 
) const
virtualinherited

Definition at line 274 of file SinglePhaseFluidProperties.C.

275 {
276  mooseDeprecated(name(), ": vaporPressure_dT() is deprecated. Use vaporPressure() instead");
277 
278  vaporPressure(T, psat, dpsat_dT);
279 }
virtual Real vaporPressure(Real temperature) const
Vapor pressure.
const std::string name
Definition: Setup.h:22

◆ writeTabulatedData()

void TabulatedFluidProperties::writeTabulatedData ( std::string  file_name)
protected

Writes tabulated data to a file.

Parameters
file_namename of the file to be written

Definition at line 518 of file TabulatedFluidProperties.C.

Referenced by initialSetup().

519 {
520  if (processor_id() == 0)
521  {
522  MooseUtils::checkFileWriteable(file_name);
523 
524  std::ofstream file_out(file_name.c_str());
525 
526  // Write out date and fluid type
527  time_t now = time(&now);
528  file_out << "# " << _fp.fluidName() << " properties created by TabulatedFluidProperties on "
529  << ctime(&now) << "\n";
530 
531  // Write out column names
532  file_out << "pressure, temperature";
533  for (std::size_t i = 0; i < _interpolated_properties.size(); ++i)
534  file_out << ", " << _interpolated_properties[i];
535  file_out << "\n";
536 
537  // Write out the fluid property data
538  for (unsigned int p = 0; p < _num_p; ++p)
539  for (unsigned int t = 0; t < _num_T; ++t)
540  {
541  file_out << _pressure[p] << ", " << _temperature[t];
542  for (std::size_t i = 0; i < _properties.size(); ++i)
543  file_out << ", " << _properties[i][p * _num_T + t];
544  file_out << "\n";
545  }
546  }
547 }
std::vector< std::string > _interpolated_properties
List of properties to be interpolated.
std::vector< Real > _pressure
Pressure vector.
std::vector< Real > _temperature
Temperature vector.
unsigned int _num_T
Number of temperature points in the tabulated data.
std::vector< std::vector< Real > > _properties
Tabulated fluid properties.
unsigned int _num_p
Number of pressure points in the tabulated data.
virtual std::string fluidName() const
Fluid name.
const SinglePhaseFluidProperties & _fp
SinglePhaseFluidPropertiesPT UserObject.

Member Data Documentation

◆ _allow_imperfect_jacobians

const bool FluidProperties::_allow_imperfect_jacobians
protectedinherited

Flag to set unimplemented Jacobian entries to zero.

Definition at line 46 of file FluidProperties.h.

Referenced by SinglePhaseFluidProperties::fluidPropError().

◆ _cp_idx

unsigned int TabulatedFluidProperties::_cp_idx
protected

Definition at line 238 of file TabulatedFluidProperties.h.

Referenced by cp_from_p_T(), and initialSetup().

◆ _csv_reader

MooseUtils::DelimitedFileReader TabulatedFluidProperties::_csv_reader
protected

The MOOSE delimited file reader.

Definition at line 243 of file TabulatedFluidProperties.h.

Referenced by initialSetup(), and TabulatedFluidProperties().

◆ _cv_idx

unsigned int TabulatedFluidProperties::_cv_idx
protected

Definition at line 239 of file TabulatedFluidProperties.h.

Referenced by cv_from_p_T(), and initialSetup().

◆ _density_idx

unsigned int TabulatedFluidProperties::_density_idx
protected

Index of each property.

Definition at line 233 of file TabulatedFluidProperties.h.

Referenced by initialSetup(), and rho_from_p_T().

◆ _enthalpy_idx

unsigned int TabulatedFluidProperties::_enthalpy_idx
protected

Definition at line 234 of file TabulatedFluidProperties.h.

Referenced by h_from_p_T(), and initialSetup().

◆ _entropy_idx

unsigned int TabulatedFluidProperties::_entropy_idx
protected

Definition at line 240 of file TabulatedFluidProperties.h.

Referenced by initialSetup(), and s_from_p_T().

◆ _file_name

FileName TabulatedFluidProperties::_file_name
protected

File name of tabulated data file.

Definition at line 184 of file TabulatedFluidProperties.h.

Referenced by initialSetup().

◆ _fp

const SinglePhaseFluidProperties& TabulatedFluidProperties::_fp
protected

◆ _internal_energy_idx

unsigned int TabulatedFluidProperties::_internal_energy_idx
protected

Definition at line 235 of file TabulatedFluidProperties.h.

Referenced by e_from_p_T(), and initialSetup().

◆ _interpolate_cp

bool TabulatedFluidProperties::_interpolate_cp
protected

Definition at line 228 of file TabulatedFluidProperties.h.

Referenced by cp_from_p_T(), and initialSetup().

◆ _interpolate_cv

bool TabulatedFluidProperties::_interpolate_cv
protected

Definition at line 229 of file TabulatedFluidProperties.h.

Referenced by cv_from_p_T(), and initialSetup().

◆ _interpolate_density

bool TabulatedFluidProperties::_interpolate_density
protected

Set of flags to note whether a property is to be interpolated.

Definition at line 223 of file TabulatedFluidProperties.h.

Referenced by initialSetup(), and rho_from_p_T().

◆ _interpolate_enthalpy

bool TabulatedFluidProperties::_interpolate_enthalpy
protected

Definition at line 224 of file TabulatedFluidProperties.h.

Referenced by h_from_p_T(), and initialSetup().

◆ _interpolate_entropy

bool TabulatedFluidProperties::_interpolate_entropy
protected

Definition at line 230 of file TabulatedFluidProperties.h.

Referenced by initialSetup(), and s_from_p_T().

◆ _interpolate_internal_energy

bool TabulatedFluidProperties::_interpolate_internal_energy
protected

Definition at line 225 of file TabulatedFluidProperties.h.

Referenced by e_from_p_T(), and initialSetup().

◆ _interpolate_k

bool TabulatedFluidProperties::_interpolate_k
protected

Definition at line 227 of file TabulatedFluidProperties.h.

Referenced by initialSetup(), and k_from_p_T().

◆ _interpolate_viscosity

bool TabulatedFluidProperties::_interpolate_viscosity
protected

Definition at line 226 of file TabulatedFluidProperties.h.

Referenced by initialSetup(), and mu_from_p_T().

◆ _interpolated_properties

std::vector<std::string> TabulatedFluidProperties::_interpolated_properties
protected

List of properties to be interpolated.

Definition at line 221 of file TabulatedFluidProperties.h.

Referenced by generateTabulatedData(), initialSetup(), and writeTabulatedData().

◆ _interpolated_properties_enum

MultiMooseEnum TabulatedFluidProperties::_interpolated_properties_enum
protected

Properties to be interpolated entered in the input file.

Definition at line 219 of file TabulatedFluidProperties.h.

Referenced by generateTabulatedData().

◆ _k_idx

unsigned int TabulatedFluidProperties::_k_idx
protected

Definition at line 237 of file TabulatedFluidProperties.h.

Referenced by initialSetup(), and k_from_p_T().

◆ _num_p

unsigned int TabulatedFluidProperties::_num_p
protected

Number of pressure points in the tabulated data.

Definition at line 206 of file TabulatedFluidProperties.h.

Referenced by generateTabulatedData(), initialSetup(), and writeTabulatedData().

◆ _num_T

unsigned int TabulatedFluidProperties::_num_T
protected

Number of temperature points in the tabulated data.

Definition at line 204 of file TabulatedFluidProperties.h.

Referenced by generateTabulatedData(), initialSetup(), and writeTabulatedData().

◆ _pressure

std::vector<Real> TabulatedFluidProperties::_pressure
protected

Pressure vector.

Definition at line 186 of file TabulatedFluidProperties.h.

Referenced by generateTabulatedData(), initialSetup(), and writeTabulatedData().

◆ _pressure_max

Real TabulatedFluidProperties::_pressure_max
protected

Maximum pressure in tabulated data.

Definition at line 202 of file TabulatedFluidProperties.h.

Referenced by checkInputVariables(), generateTabulatedData(), initialSetup(), and TabulatedFluidProperties().

◆ _pressure_min

Real TabulatedFluidProperties::_pressure_min
protected

Minimum pressure in tabulated data.

Definition at line 200 of file TabulatedFluidProperties.h.

Referenced by checkInputVariables(), generateTabulatedData(), initialSetup(), and TabulatedFluidProperties().

◆ _properties

std::vector<std::vector<Real> > TabulatedFluidProperties::_properties
protected

Tabulated fluid properties.

Definition at line 190 of file TabulatedFluidProperties.h.

Referenced by generateTabulatedData(), initialSetup(), and writeTabulatedData().

◆ _property_columns

const std::vector<std::string> TabulatedFluidProperties::_property_columns
protected
Initial value:
{
"density", "enthalpy", "internal_energy", "viscosity", "k", "cv", "cp", "entropy"}

List of possible property column names to be read.

Definition at line 216 of file TabulatedFluidProperties.h.

Referenced by initialSetup().

◆ _property_ipol

std::vector<std::unique_ptr<BicubicInterpolation> > TabulatedFluidProperties::_property_ipol
protected

Interpolated fluid property.

Definition at line 193 of file TabulatedFluidProperties.h.

Referenced by cp_from_p_T(), cv_from_p_T(), e_from_p_T(), h_from_p_T(), initialSetup(), k_from_p_T(), mu_from_p_T(), rho_from_p_T(), and s_from_p_T().

◆ _R

const Real SinglePhaseFluidProperties::_R
protectedinherited

◆ _required_columns

const std::vector<std::string> TabulatedFluidProperties::_required_columns {"pressure", "temperature"}
protected

List of required column names to be read.

Definition at line 214 of file TabulatedFluidProperties.h.

Referenced by initialSetup().

◆ _save_file

const bool TabulatedFluidProperties::_save_file
protected

Whether to save a generated fluid properties file to disk.

Definition at line 208 of file TabulatedFluidProperties.h.

Referenced by initialSetup().

◆ _T_c2k

const Real FluidProperties::_T_c2k
protectedinherited

◆ _temperature

std::vector<Real> TabulatedFluidProperties::_temperature
protected

Temperature vector.

Definition at line 188 of file TabulatedFluidProperties.h.

Referenced by generateTabulatedData(), initialSetup(), and writeTabulatedData().

◆ _temperature_max

Real TabulatedFluidProperties::_temperature_max
protected

Maximum temperature in tabulated data.

Definition at line 198 of file TabulatedFluidProperties.h.

Referenced by checkInputVariables(), generateTabulatedData(), initialSetup(), and TabulatedFluidProperties().

◆ _temperature_min

Real TabulatedFluidProperties::_temperature_min
protected

Minimum temperature in tabulated data.

Definition at line 196 of file TabulatedFluidProperties.h.

Referenced by checkInputVariables(), generateTabulatedData(), initialSetup(), and TabulatedFluidProperties().

◆ _viscosity_idx

unsigned int TabulatedFluidProperties::_viscosity_idx
protected

Definition at line 236 of file TabulatedFluidProperties.h.

Referenced by initialSetup(), and mu_from_p_T().

◆ p [1/7]

e e e e SinglePhaseFluidProperties::p
inherited

Definition at line 146 of file SinglePhaseFluidProperties.h.

Referenced by SinglePhaseFluidProperties::beta(), SinglePhaseFluidProperties::beta_from_p_T(), SinglePhaseFluidProperties::c(), StiffenedGasFluidProperties::c_from_v_e(), IdealGasFluidProperties::cp_from_p_T(), SinglePhaseFluidProperties::e(), SinglePhaseFluidProperties::e_dpT(), StiffenedGasFluidProperties::e_from_p_rho(), IdealGasFluidProperties::e_from_p_rho(), IdealGasFluidProperties::e_from_p_T(), StiffenedGasFluidProperties::e_from_p_T(), SinglePhaseFluidProperties::e_from_p_T(), IdealGasFluidProperties::g_from_v_e(), StiffenedGasFluidProperties::g_from_v_e(), SinglePhaseFluidProperties::gamma_from_p_T(), generateTabulatedData(), SinglePhaseFluidProperties::h(), SinglePhaseFluidProperties::h_dpT(), IdealGasFluidProperties::h_from_p_T(), StiffenedGasFluidProperties::h_from_p_T(), SinglePhaseFluidProperties::henryConstantIAPWS(), SinglePhaseFluidProperties::k(), SinglePhaseFluidProperties::k_dpT(), IdealGasFluidProperties::k_from_p_T(), SinglePhaseFluidProperties::mu(), SinglePhaseFluidProperties::mu_dpT(), IdealGasFluidProperties::p_from_h_s(), StiffenedGasFluidProperties::p_from_h_s(), StiffenedGasFluidProperties::p_from_T_v(), IdealGasFluidProperties::p_from_T_v(), StiffenedGasFluidProperties::p_from_v_e(), IdealGasFluidProperties::p_from_v_e(), SinglePhaseFluidProperties::rho_dpT(), SinglePhaseFluidProperties::rho_e_dpT(), SinglePhaseFluidProperties::rho_e_from_p_T(), StiffenedGasFluidProperties::rho_from_p_s(), IdealGasFluidProperties::rho_from_p_s(), StiffenedGasFluidProperties::rho_from_p_T(), IdealGasFluidProperties::rho_from_p_T(), SinglePhaseFluidProperties::rho_mu(), SinglePhaseFluidProperties::rho_mu_dpT(), SinglePhaseFluidProperties::rho_mu_from_p_T(), SinglePhaseFluidProperties::s(), StiffenedGasFluidProperties::s_from_h_p(), IdealGasFluidProperties::s_from_h_p(), IdealGasFluidProperties::s_from_p_T(), StiffenedGasFluidProperties::s_from_p_T(), SimpleFluidProperties::s_from_p_T(), Water97FluidProperties::s_from_p_T(), s_from_p_T(), IdealGasFluidProperties::s_from_T_v(), StiffenedGasFluidProperties::s_from_v_e(), IdealGasFluidProperties::s_from_v_e(), SinglePhaseFluidProperties::T_from_p_h(), SinglePhaseFluidProperties::v_from_p_T(), Water97FluidProperties::vaporPressure(), and writeTabulatedData().

◆ p [2/7]

e e e e s SinglePhaseFluidProperties::p
inherited

Definition at line 148 of file SinglePhaseFluidProperties.h.

◆ p [3/7]

e e e e s T T SinglePhaseFluidProperties::p
inherited

Definition at line 152 of file SinglePhaseFluidProperties.h.

◆ p [4/7]

e e e e s T T T SinglePhaseFluidProperties::p
inherited

Definition at line 154 of file SinglePhaseFluidProperties.h.

◆ p [5/7]

e e e e s T T T T SinglePhaseFluidProperties::p
inherited

Definition at line 156 of file SinglePhaseFluidProperties.h.

◆ p [6/7]

e e e e s T T T T T SinglePhaseFluidProperties::p
inherited

Definition at line 158 of file SinglePhaseFluidProperties.h.

◆ p [7/7]

e e e e s T T T T T rho v v SinglePhaseFluidProperties::p
inherited

Definition at line 164 of file SinglePhaseFluidProperties.h.

◆ rho

Real SinglePhaseFluidProperties::rho
inherited

◆ T [1/2]

e e e e s T T T T T rho SinglePhaseFluidProperties::T
inherited

Definition at line 160 of file SinglePhaseFluidProperties.h.

Referenced by SinglePhaseFluidProperties::beta(), SinglePhaseFluidProperties::beta_from_p_T(), SinglePhaseFluidProperties::c(), IdealGasFluidProperties::c_from_p_T(), IdealGasFluidProperties::c_from_v_e(), IdealGasFluidProperties::cp_from_p_T(), SinglePhaseFluidProperties::e(), SinglePhaseFluidProperties::e_dpT(), IdealGasFluidProperties::e_from_p_T(), StiffenedGasFluidProperties::e_from_p_T(), SinglePhaseFluidProperties::e_from_p_T(), StiffenedGasFluidProperties::e_from_T_v(), IdealGasFluidProperties::e_from_T_v(), IdealGasFluidProperties::g_from_v_e(), StiffenedGasFluidProperties::g_from_v_e(), SinglePhaseFluidProperties::gamma_from_p_T(), SinglePhaseFluidProperties::h(), SinglePhaseFluidProperties::h_dpT(), IdealGasFluidProperties::h_from_p_T(), StiffenedGasFluidProperties::h_from_p_T(), StiffenedGasFluidProperties::h_from_T_v(), IdealGasFluidProperties::h_from_T_v(), SinglePhaseFluidProperties::henryConstant_dT(), SinglePhaseFluidProperties::henryConstantIAPWS(), SinglePhaseFluidProperties::henryConstantIAPWS_dT(), SinglePhaseFluidProperties::k(), SinglePhaseFluidProperties::k_dpT(), IdealGasFluidProperties::k_from_p_T(), SinglePhaseFluidProperties::mu(), SinglePhaseFluidProperties::mu_dpT(), SinglePhaseFluidProperties::mu_drhoT_from_rho_T(), IdealGasFluidProperties::mu_from_p_T(), StiffenedGasFluidProperties::p_from_T_v(), IdealGasFluidProperties::p_from_T_v(), SinglePhaseFluidProperties::rho_dpT(), SinglePhaseFluidProperties::rho_e_dpT(), SinglePhaseFluidProperties::rho_e_from_p_T(), StiffenedGasFluidProperties::rho_from_p_s(), IdealGasFluidProperties::rho_from_p_s(), StiffenedGasFluidProperties::rho_from_p_T(), IdealGasFluidProperties::rho_from_p_T(), SinglePhaseFluidProperties::rho_mu(), SinglePhaseFluidProperties::rho_mu_dpT(), SinglePhaseFluidProperties::rho_mu_from_p_T(), SinglePhaseFluidProperties::s(), IdealGasFluidProperties::s_from_p_T(), StiffenedGasFluidProperties::s_from_p_T(), SimpleFluidProperties::s_from_p_T(), Water97FluidProperties::s_from_p_T(), s_from_p_T(), StiffenedGasFluidProperties::s_from_T_v(), IdealGasFluidProperties::s_from_T_v(), StiffenedGasFluidProperties::s_from_v_e(), IdealGasFluidProperties::s_from_v_e(), StiffenedGasFluidProperties::T_from_v_e(), IdealGasFluidProperties::T_from_v_e(), SinglePhaseFluidProperties::v_from_p_T(), and SinglePhaseFluidProperties::vaporPressure_dT().

◆ T [2/2]

e e e e s T T T T T rho v SinglePhaseFluidProperties::T
inherited

Definition at line 162 of file SinglePhaseFluidProperties.h.

◆ v [1/5]

SinglePhaseFluidProperties::v
inherited

◆ v [2/5]

e SinglePhaseFluidProperties::v
inherited

Definition at line 140 of file SinglePhaseFluidProperties.h.

◆ v [3/5]

e e SinglePhaseFluidProperties::v
inherited

Definition at line 142 of file SinglePhaseFluidProperties.h.

◆ v [4/5]

e e e SinglePhaseFluidProperties::v
inherited

Definition at line 144 of file SinglePhaseFluidProperties.h.

◆ v [5/5]

e e e e s T T T T T rho v v T SinglePhaseFluidProperties::v
inherited

Definition at line 166 of file SinglePhaseFluidProperties.h.


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