15 #include "libmesh/utility.h" 20 #pragma GCC diagnostic push 21 #pragma GCC diagnostic ignored "-Woverloaded-virtual" 36 virtual std::string
fluidName()
const override;
48 ADReal & drho_dT)
const override;
90 using SinglePhaseFluidProperties::cp_from_p_T;
162 using SinglePhaseFluidProperties::c_from_v_e;
163 using SinglePhaseFluidProperties::p_from_v_e;
164 using SinglePhaseFluidProperties::T_from_v_e;
179 template <
typename T>
188 template <
typename T>
204 std::vector<Real> & v2,
205 const std::string & file_name,
206 const std::string & v1_name,
207 const std::string & v2_name);
392 #pragma GCC diagnostic pop virtual Real k_from_p_T(Real pressure, Real temperature) const override
bool _log_space_v
log-space the specific volume interpolation grid axis instead of linear
FileName _file_name_ve_in
File name of input (v,e) tabulated data file.
void readFileTabulationData(bool use_pT)
Read tabulation data from file.
virtual void initialSetup() override
virtual Real rho_from_p_s(Real p, Real s) const override
virtual Real triplePointTemperature() const override
Triple point temperature.
e e e e s T T T T T rho T
virtual Real v_from_p_T(Real pressure, Real temperature) const override
const bool _create_direct_ve_interpolations
Whether to create direct (v,e) interpolations.
static const std::string cv
bool _interpolate_viscosity
void checkFileTabulationGrids(std::vector< Real > &v1, std::vector< Real > &v2, const std::string &file_name, const std::string &v1_name, const std::string &v2_name)
Check that the tabulation grids in the file are correct (no repeats etc)
Class for fluid properties read from a tabulation in a file.
virtual Real criticalDensity() const override
Critical density.
std::unique_ptr< BidimensionalInterpolation > _p_from_v_h_ipol
Bidimensional interpolation of pressure from (v,h)
const bool _create_direct_pT_interpolations
Whether to create direct (p,T) interpolations.
virtual Real e_from_v_h(Real v, Real h) const override
unsigned int _viscosity_idx
Real _temperature_max
Maximum temperature in tabulated data.
Real _h_max
Maximum specific enthalpy in tabulated data.
Real _e_max
Maximum internal energy in tabulated data (can be user-specified)
virtual Real T_from_p_s(Real p, Real s) const
bool _interpolate_entropy
virtual Real T_from_v_e(Real v, Real e) const override
virtual void checkInitialGuess() const
Checks initial guess for Newton Method.
Real _e_min
Minimum internal energy in tabulated data (can be user-specified)
Real _pressure_max
Maximum pressure in tabulated data.
bool _e_bounds_specified
Whether the specific internal energy bounds were set by the user.
bool _interpolate_temperature
MooseUtils::DelimitedFileReader _csv_reader
The MOOSE delimited file reader.
static const std::string temperature
bool _log_space_e
log-space the internal energy interpolation grid axis instead of linear
void createVEGridVectors()
virtual Real s_from_p_T(Real pressure, Real temperature) const override
MooseEnum _OOBBehavior
User-selected out-of-bounds behavior.
MultiMooseEnum _interpolated_properties_enum
Properties to be interpolated entered in the input file.
void computePropertyIndicesInInterpolationVectors()
Retrieves the index for each property in the vector of interpolations.
bool _v_bounds_specified
Whether the specific volume bounds were set by the user.
DualNumber< Real, DNDerivativeType, true > ADReal
unsigned int _internal_energy_idx
std::vector< std::unique_ptr< BidimensionalInterpolation > > _property_ve_ipol
Vector of bi-dimensional interpolation of fluid properties directly in (v,e)
std::unique_ptr< BidimensionalInterpolation > _p_from_v_e_ipol
Bi-dimensional interpolation of pressure from (v,e)
Real _h_min
Minimum specific enthalpy in tabulated data.
virtual Real s_from_h_p(Real h, Real pressure) const override
virtual Real vaporTemperature(Real pressure) const override
Vapor temperature.
std::unique_ptr< BidimensionalInterpolation > _T_from_v_e_ipol
Bi-dimensional interpolation of temperature from (v,e)
FileName _file_name_ve_out
File name of output (v,e) tabulated data file.
std::vector< Real > _enthalpy
Specific enthalpy vector.
unsigned int _num_v
Number of specific volume points in the tabulated data.
static const std::string cp
bool _construct_pT_from_ve
if the lookup table p(v, e) and T(v, e) should be constructed
bool _interpolate_pressure
Real _temperature_min
Minimum temperature in tabulated data.
e e e e s T T T T T rho v v T e h
void createVHGridVectors()
Create (or reset) the grid vectors for the specific volume and enthalpy interpolation The order of pr...
void FluidPropertiesForwardError(const std::string &desired_routine) const
bool _construct_pT_from_vh
if the lookup table p(v, h) and T(v, h) should be constructed
virtual Real molarMass() const override
Molar mass [kg/mol].
FileName _file_name_out
File name of output tabulated data file.
virtual Real h_from_p_T(Real p, Real T) const override
virtual Real e_from_p_rho(Real pressure, Real rho) const override
virtual Real vaporPressure(Real temperature) const override
Vapor pressure.
void checkInputVariablesVE(T &v, T &e) const
Checks that the inputs are within the range of the tabulated data, and throws an error if they are no...
static InputParameters validParams()
virtual Real k_from_v_e(Real v, Real e) const override
static const std::string mu
bool _interpolate_internal_energy
virtual void generateVETabulatedData()
Generates a table of fluid properties by looping over specific volume and internal energy and calcula...
virtual Real cv_from_v_e(Real v, Real e) const override
virtual Real c_from_p_T(Real pressure, Real temperature) const override
Common class for single phase fluid properties.
bool _log_space_h
log-space the enthalpy interpolation grid axis instead of linear
Real _v_min
Minimum specific volume in tabulated data (can be user-specified)
virtual Real triplePointPressure() const override
Triple point pressure.
std::vector< std::string > _interpolated_properties
List of properties to be interpolated.
virtual Real g_from_v_e(Real v, Real e) const override
virtual Real e_from_p_T(Real pressure, Real temperature) const override
virtual Real c_from_v_e(Real v, Real e) const override
TabulatedFluidProperties(const InputParameters ¶meters)
std::vector< Real > _pressure
Pressure vector.
std::vector< Real > _temperature
Temperature vector.
virtual Real rho_from_p_T(Real pressure, Real temperature) const override
virtual Real criticalTemperature() const override
Critical temperature.
unsigned int _num_T
Number of temperature points in the tabulated data.
bool _initial_setup_done
keeps track of whether initialSetup has been performed
void checkInputVariables(T &pressure, T &temperature) const
Checks that the inputs are within the range of the tabulated data, and throws an error if they are no...
virtual Real criticalPressure() const override
Critical pressure.
virtual std::string fluidName() const override
Fluid name.
const SinglePhaseFluidProperties *const _fp
SinglePhaseFluidPropertiesPT UserObject.
void missingVEInterpolationError(const std::string &function_name) const
Standardized error message for missing interpolation.
virtual Real s_from_v_e(Real v, Real e) const override
Real _pressure_min
Minimum pressure in tabulated data.
std::vector< std::vector< Real > > _properties
Tabulated fluid properties (read from file OR computed from _fp)
virtual Real mu_from_p_T(Real pressure, Real temperature) const override
virtual Real cp_from_p_T(Real pressure, Real temperature) const override
unsigned int _enthalpy_idx
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
unsigned int _num_p
Number of pressure points in the tabulated data.
virtual Real T_from_p_h(Real pressure, Real enthalpy) const override
const bool _allow_fp_and_tabulation
Whether to allow a fp object when a tabulation is in use.
virtual Real cv_from_p_T(Real pressure, Real temperature) const override
std::vector< std::vector< Real > > _properties_ve
Tabulated fluid properties in (v,e) (read from file OR computed from _fp)
Real _v_max
Maximum specific volume in tabulated data (can be user-specified)
static const std::string pressure
virtual Real T_from_h_s(Real h, Real s) const
std::vector< Real > _specific_volume
Specific volume vector.
virtual Real p_from_v_e(Real v, Real e) const override
Derivatives like dc_dv & dc_de are computed using the chain rule dy/dx(p,T) = dy/dp * dp/dx + dy/dT *...
unsigned int _entropy_idx
virtual Real cp_from_v_e(Real v, Real e) const override
unsigned int _density_idx
Index of each property.
const InputParameters & parameters() const
std::vector< Real > _internal_energy
Specific internal energy vector.
std::unique_ptr< BidimensionalInterpolation > _T_from_v_h_ipol
Bi-dimensional interpolation of temperature from (v,h)
bool _interpolate_density
Set of flags to note whether a property is to be interpolated.
virtual std::vector< Real > henryCoefficients() const override
The following routines are simply forwarded to the 'fp' companion FluidProperties as they are not inc...
void createVGridVector()
Create (or reset) the grid vectors for the specific volume and internal energy interpolations The ord...
std::vector< std::unique_ptr< BidimensionalInterpolation > > _property_ipol
Vector of bi-dimensional interpolation of fluid properties.
const bool _save_file
Whether to save a generated fluid properties file to disk.
virtual Real mu_from_v_e(Real v, Real e) const override
OOBBehavior
Enum specifying all the behavior on out of bounds data options.
bool _interpolate_enthalpy
virtual void generateTabulatedData()
Generates a table of fluid properties by looping over pressure and temperature and calculating proper...
virtual void constructInterpolation()=0
static const std::string k
void writeTabulatedData(std::string file_name)
Writes tabulated data to a file.
virtual Real T_from_p_rho(Real pressure, Real rho) const
FileName _file_name_in
File name of input tabulated data file.
unsigned int _num_e
Number of internal energy points in tabulated data.