https://mooseframework.inl.gov
Loading...
Searching...
No Matches
Public Types | Public Member Functions | Static Public Member Functions | Public Attributes | Static Public Attributes | Protected Types | Protected Member Functions | Static Protected Member Functions | Protected Attributes | Static Protected Attributes | Private Member Functions | Static Private Member Functions | Private Attributes | List of all members
StiffenedGasTwoPhaseFluidProperties Class Reference

Two-phase stiffened gas fluid properties. More...

#include <StiffenedGasTwoPhaseFluidProperties.h>

Inheritance diagram for StiffenedGasTwoPhaseFluidProperties:
[legend]

Public Types

typedef DataFileName DataFileParameterType
 

Public Member Functions

 StiffenedGasTwoPhaseFluidProperties (const InputParameters &parameters)
 
virtual Real p_critical () const override
 Returns the critical pressure.
 
virtual Real T_triple () const override
 Returns the triple-point temperature.
 
virtual Real L_fusion () const override
 Returns the latent heat of fusion.
 
virtual Real T_sat (Real pressure) const override
 Computes the saturation temperature at a pressure.
 
virtual Real p_sat (Real temperature) const override
 Computes the saturation pressure at a temperature.
 
virtual Real dT_sat_dp (Real pressure) const override
 Computes dT/dp along the saturation line.
 
virtual Real sigma_from_T (Real T) const override
 Computes surface tension sigma of saturated liquid in contact with saturated vapor.
 
virtual Real dsigma_dT_from_T (Real T) const override
 Computes dsigma/dT along the saturation line.
 
virtual bool supportsPhaseChange () const override
 Returns true if phase change is supported, otherwise false.
 
virtual const UserObjectName & getLiquidName () const
 Returns the name of the liquid single-phase fluid properties object.
 
virtual const UserObjectName & getVaporName () const
 Returns the name of the vapor single-phase fluid properties object.
 
virtual ADReal T_sat (const ADReal &p) const
 
virtual ADReal p_sat (const ADReal &T) const
 
virtual Real h_lat (Real p, Real T) const
 Computes latent heat of vaporization.
 
virtual ADReal h_lat (const ADReal &p, const ADReal &T) const
 
virtual ADReal sigma_from_T (const ADReal &T) const
 
virtual void execute () final
 
virtual void initialize () final
 
virtual void finalize () final
 
virtual void threadJoin (const UserObject &) final
 
virtual void subdomainSetup () final
 
bool needThreadedCopy () const override final
 
virtual Real spatialValue (const Point &) const
 
virtual const std::vector< Point > spatialPoints () const
 
void setPrimaryThreadCopy (UserObject *primary)
 
UserObjectprimaryThreadCopy ()
 
SubProblemgetSubProblem () const
 
bool shouldDuplicateInitialExecution () const
 
void gatherSum (T &value)
 
void gatherMax (T &value)
 
void gatherMin (T &value)
 
void gatherProxyValueMax (T1 &proxy, T2 &value)
 
void gatherProxyValueMin (T1 &proxy, T2 &value)
 
std::set< UserObjectName > getDependObjects () const
 
const std::set< std::string > & getRequestedItems () override
 
const std::set< std::string > & getSuppliedItems () override
 
unsigned int systemNumber () const
 
virtual bool enabled () const
 
std::shared_ptr< MooseObjectgetSharedPtr ()
 
std::shared_ptr< const MooseObjectgetSharedPtr () const
 
bool isKokkosObject () const
 
MooseAppgetMooseApp () const
 
const std::string & type () const
 
const std::string & name () const
 
std::string typeAndName () const
 
MooseObjectParameterName uniqueParameterName (const std::string &parameter_name) const
 
MooseObjectName uniqueName () const
 
const InputParametersparameters () const
 
const hit::Node * getHitNode () const
 
bool hasBase () const
 
const std::string & getBase () const
 
const TgetParam (const std::string &name) const
 
std::vector< std::pair< T1, T2 > > getParam (const std::string &param1, const std::string &param2) const
 
const TqueryParam (const std::string &name) const
 
const TgetRenamedParam (const std::string &old_name, const std::string &new_name) const
 
T getCheckedPointerParam (const std::string &name, const std::string &error_string="") const
 
bool isParamValid (const std::string &name) const
 
bool isParamSetByUser (const std::string &name) const
 
void connectControllableParams (const std::string &parameter, const std::string &object_type, const std::string &object_name, const std::string &object_parameter) const
 
void paramError (const std::string &param, Args... args) const
 
void paramWarning (const std::string &param, Args... args) const
 
void paramWarning (const std::string &param, Args... args) const
 
void paramInfo (const std::string &param, Args... args) const
 
std::string messagePrefix (const bool hit_prefix=true) const
 
std::string errorPrefix (const std::string &) const
 
void mooseError (Args &&... args) const
 
void mooseDocumentedError (const std::string &repo_name, const unsigned int issue_num, Args &&... args) const
 
void mooseErrorNonPrefixed (Args &&... args) const
 
void mooseWarning (Args &&... args) const
 
void mooseWarning (Args &&... args) const
 
void mooseWarningNonPrefixed (Args &&... args) const
 
void mooseWarningNonPrefixed (Args &&... args) const
 
void mooseDeprecated (Args &&... args) const
 
void mooseDeprecated (Args &&... args) const
 
void mooseDeprecatedNoTrace (Args &&... args) const
 
void mooseInfo (Args &&... args) const
 
void callMooseError (std::string msg, const bool with_prefix, const hit::Node *node=nullptr, const bool show_trace=true) const
 
std::string getDataFileName (const std::string &param) const
 
std::string getDataFileNameByName (const std::string &relative_path) const
 
std::string getDataFilePath (const std::string &relative_path) const
 
virtual void initialSetup ()
 
virtual void timestepSetup ()
 
virtual void jacobianSetup ()
 
virtual void residualSetup ()
 
virtual void customSetup (const ExecFlagType &)
 
const ExecFlagEnumgetExecuteOnEnum () const
 
UserObjectName getUserObjectName (const std::string &param_name) const
 
const TgetUserObject (const std::string &param_name, bool is_dependency=true) const
 
const TgetUserObjectByName (const UserObjectName &object_name, bool is_dependency=true) const
 
const UserObjectBasegetUserObjectBase (const std::string &param_name, bool is_dependency=true) const
 
const UserObjectBasegetUserObjectBaseByName (const UserObjectName &object_name, bool is_dependency=true) const
 
const std::vector< MooseVariableScalar * > & getCoupledMooseScalarVars ()
 
const std::set< TagID > & getScalarVariableCoupleableVectorTags () const
 
const std::set< TagID > & getScalarVariableCoupleableMatrixTags () const
 
const GenericMaterialProperty< T, is_ad > & getGenericMaterialProperty (const std::string &name, MaterialData &material_data, const unsigned int state=0)
 
const GenericMaterialProperty< T, is_ad > & getGenericMaterialProperty (const std::string &name, const unsigned int state=0)
 
const GenericMaterialProperty< T, is_ad > & getGenericMaterialProperty (const std::string &name, const unsigned int state=0)
 
const MaterialProperty< T > & getMaterialProperty (const std::string &name, MaterialData &material_data, const unsigned int state=0)
 
const MaterialProperty< T > & getMaterialProperty (const std::string &name, const unsigned int state=0)
 
const MaterialProperty< T > & getMaterialProperty (const std::string &name, const unsigned int state=0)
 
const ADMaterialProperty< T > & getADMaterialProperty (const std::string &name, MaterialData &material_data)
 
const ADMaterialProperty< T > & getADMaterialProperty (const std::string &name)
 
const ADMaterialProperty< T > & getADMaterialProperty (const std::string &name)
 
const MaterialProperty< T > & getMaterialPropertyOld (const std::string &name, MaterialData &material_data)
 
const MaterialProperty< T > & getMaterialPropertyOld (const std::string &name)
 
const MaterialProperty< T > & getMaterialPropertyOld (const std::string &name)
 
const MaterialProperty< T > & getMaterialPropertyOlder (const std::string &name, MaterialData &material_data)
 
const MaterialProperty< T > & getMaterialPropertyOlder (const std::string &name)
 
const MaterialProperty< T > & getMaterialPropertyOlder (const std::string &name)
 
const GenericMaterialProperty< T, is_ad > & getGenericMaterialPropertyByName (const MaterialPropertyName &name, MaterialData &material_data, const unsigned int state)
 
const GenericMaterialProperty< T, is_ad > & getGenericMaterialPropertyByName (const MaterialPropertyName &name, const unsigned int state=0)
 
const GenericMaterialProperty< T, is_ad > & getGenericMaterialPropertyByName (const MaterialPropertyName &name, const unsigned int state=0)
 
const MaterialProperty< T > & getMaterialPropertyByName (const MaterialPropertyName &name, MaterialData &material_data, const unsigned int state=0)
 
const MaterialProperty< T > & getMaterialPropertyByName (const MaterialPropertyName &name, const unsigned int state=0)
 
const MaterialProperty< T > & getMaterialPropertyByName (const MaterialPropertyName &name, const unsigned int state=0)
 
const ADMaterialProperty< T > & getADMaterialPropertyByName (const MaterialPropertyName &name, MaterialData &material_data)
 
const ADMaterialProperty< T > & getADMaterialPropertyByName (const MaterialPropertyName &name)
 
const ADMaterialProperty< T > & getADMaterialPropertyByName (const MaterialPropertyName &name)
 
const MaterialProperty< T > & getMaterialPropertyOldByName (const MaterialPropertyName &name, MaterialData &material_data)
 
const MaterialProperty< T > & getMaterialPropertyOldByName (const MaterialPropertyName &name)
 
const MaterialProperty< T > & getMaterialPropertyOldByName (const MaterialPropertyName &name)
 
const MaterialProperty< T > & getMaterialPropertyOlderByName (const MaterialPropertyName &name, MaterialData &material_data)
 
const MaterialProperty< T > & getMaterialPropertyOlderByName (const MaterialPropertyName &name)
 
const MaterialProperty< T > & getMaterialPropertyOlderByName (const MaterialPropertyName &name)
 
Moose::Kokkos::MaterialProperty< T, dimension > getKokkosMaterialPropertyByName (const std::string &prop_name_in)
 
Moose::Kokkos::MaterialProperty< T, dimension > getKokkosMaterialPropertyOldByName (const std::string &prop_name)
 
Moose::Kokkos::MaterialProperty< T, dimension > getKokkosMaterialPropertyOlderByName (const std::string &prop_name)
 
Moose::Kokkos::MaterialProperty< T, dimension > getKokkosMaterialProperty (const std::string &name)
 
Moose::Kokkos::MaterialProperty< T, dimension > getKokkosMaterialPropertyOld (const std::string &name)
 
Moose::Kokkos::MaterialProperty< T, dimension > getKokkosMaterialPropertyOlder (const std::string &name)
 
std::pair< const MaterialProperty< T > *, std::set< SubdomainID > > getBlockMaterialProperty (const MaterialPropertyName &name)
 
std::pair< Moose::Kokkos::MaterialProperty< T, dimension >, std::set< SubdomainID > > getKokkosBlockMaterialProperty (const MaterialPropertyName &name)
 
const GenericMaterialProperty< T, is_ad > & getGenericZeroMaterialProperty (const std::string &name)
 
const GenericMaterialProperty< T, is_ad > & getGenericZeroMaterialProperty ()
 
const GenericMaterialProperty< T, is_ad > & getGenericZeroMaterialPropertyByName (const std::string &prop_name)
 
const MaterialProperty< T > & getZeroMaterialProperty (Ts... args)
 
std::set< SubdomainIDgetMaterialPropertyBlocks (const std::string &name)
 
std::vector< SubdomainName > getMaterialPropertyBlockNames (const std::string &name)
 
std::set< BoundaryIDgetMaterialPropertyBoundaryIDs (const std::string &name)
 
std::vector< BoundaryName > getMaterialPropertyBoundaryNames (const std::string &name)
 
void checkBlockAndBoundaryCompatibility (std::shared_ptr< MaterialBase > discrete)
 
std::unordered_map< SubdomainID, std::vector< MaterialBase * > > buildRequiredMaterials (bool allow_stateful=true)
 
void statefulPropertiesAllowed (bool)
 
virtual bool getMaterialPropertyCalled () const
 
virtual const std::unordered_set< unsigned int > & getMatPropDependencies () const
 
virtual void resolveOptionalProperties ()
 
const GenericMaterialProperty< T, is_ad > & getPossiblyConstantGenericMaterialPropertyByName (const MaterialPropertyName &prop_name, MaterialData &material_data, const unsigned int state)
 
bool isImplicit ()
 
Moose::StateArg determineState () const
 
bool hasUserObject (const std::string &param_name) const
 
bool hasUserObject (const std::string &param_name) const
 
bool hasUserObject (const std::string &param_name) const
 
bool hasUserObject (const std::string &param_name) const
 
bool hasUserObjectByName (const UserObjectName &object_name) const
 
bool hasUserObjectByName (const UserObjectName &object_name) const
 
bool hasUserObjectByName (const UserObjectName &object_name) const
 
bool hasUserObjectByName (const UserObjectName &object_name) const
 
const GenericOptionalMaterialProperty< T, is_ad > & getGenericOptionalMaterialProperty (const std::string &name, const unsigned int state=0)
 
const GenericOptionalMaterialProperty< T, is_ad > & getGenericOptionalMaterialProperty (const std::string &name, const unsigned int state=0)
 
const OptionalMaterialProperty< T > & getOptionalMaterialProperty (const std::string &name, const unsigned int state=0)
 
const OptionalMaterialProperty< T > & getOptionalMaterialProperty (const std::string &name, const unsigned int state=0)
 
const OptionalADMaterialProperty< T > & getOptionalADMaterialProperty (const std::string &name)
 
const OptionalADMaterialProperty< T > & getOptionalADMaterialProperty (const std::string &name)
 
const OptionalMaterialProperty< T > & getOptionalMaterialPropertyOld (const std::string &name)
 
const OptionalMaterialProperty< T > & getOptionalMaterialPropertyOld (const std::string &name)
 
const OptionalMaterialProperty< T > & getOptionalMaterialPropertyOlder (const std::string &name)
 
const OptionalMaterialProperty< T > & getOptionalMaterialPropertyOlder (const std::string &name)
 
MaterialBasegetMaterial (const std::string &name)
 
MaterialBasegetMaterial (const std::string &name)
 
MaterialBasegetMaterialByName (const std::string &name, bool no_warn=false)
 
MaterialBasegetMaterialByName (const std::string &name, bool no_warn=false)
 
bool hasMaterialProperty (const std::string &name)
 
bool hasMaterialProperty (const std::string &name)
 
bool hasMaterialPropertyByName (const std::string &name)
 
bool hasMaterialPropertyByName (const std::string &name)
 
bool hasADMaterialProperty (const std::string &name)
 
bool hasADMaterialProperty (const std::string &name)
 
bool hasADMaterialPropertyByName (const std::string &name)
 
bool hasADMaterialPropertyByName (const std::string &name)
 
bool hasKokkosMaterialProperty (const std::string &name)
 
bool hasKokkosMaterialProperty (const std::string &name)
 
bool hasKokkosMaterialPropertyByName (const std::string &name)
 
bool hasKokkosMaterialPropertyByName (const std::string &name)
 
bool hasGenericMaterialProperty (const std::string &name)
 
bool hasGenericMaterialProperty (const std::string &name)
 
bool hasGenericMaterialPropertyByName (const std::string &name)
 
bool hasGenericMaterialPropertyByName (const std::string &name)
 
const FunctiongetFunction (const std::string &name) const
 
const FunctiongetFunctionByName (const FunctionName &name) const
 
bool hasFunction (const std::string &param_name) const
 
bool hasFunctionByName (const FunctionName &name) const
 
Moose::Kokkos::Function getKokkosFunction (const std::string &name) const
 
const TgetKokkosFunction (const std::string &name) const
 
Moose::Kokkos::Function getKokkosFunctionByName (const FunctionName &name) const
 
const TgetKokkosFunctionByName (const FunctionName &name) const
 
bool hasKokkosFunction (const std::string &param_name) const
 
bool hasKokkosFunctionByName (const FunctionName &name) const
 
bool isDefaultPostprocessorValue (const std::string &param_name, const unsigned int index=0) const
 
bool hasPostprocessor (const std::string &param_name, const unsigned int index=0) const
 
bool hasPostprocessorByName (const PostprocessorName &name) const
 
std::size_t coupledPostprocessors (const std::string &param_name) const
 
const PostprocessorName & getPostprocessorName (const std::string &param_name, const unsigned int index=0) const
 
const VectorPostprocessorValuegetVectorPostprocessorValue (const std::string &param_name, const std::string &vector_name) const
 
const VectorPostprocessorValuegetVectorPostprocessorValue (const std::string &param_name, const std::string &vector_name, bool needs_broadcast) const
 
const VectorPostprocessorValuegetVectorPostprocessorValueByName (const VectorPostprocessorName &name, const std::string &vector_name) const
 
const VectorPostprocessorValuegetVectorPostprocessorValueByName (const VectorPostprocessorName &name, const std::string &vector_name, bool needs_broadcast) const
 
const VectorPostprocessorValuegetVectorPostprocessorValueOld (const std::string &param_name, const std::string &vector_name) const
 
const VectorPostprocessorValuegetVectorPostprocessorValueOld (const std::string &param_name, const std::string &vector_name, bool needs_broadcast) const
 
const VectorPostprocessorValuegetVectorPostprocessorValueOldByName (const VectorPostprocessorName &name, const std::string &vector_name) const
 
const VectorPostprocessorValuegetVectorPostprocessorValueOldByName (const VectorPostprocessorName &name, const std::string &vector_name, bool needs_broadcast) const
 
const ScatterVectorPostprocessorValuegetScatterVectorPostprocessorValue (const std::string &param_name, const std::string &vector_name) const
 
const ScatterVectorPostprocessorValuegetScatterVectorPostprocessorValueByName (const VectorPostprocessorName &name, const std::string &vector_name) const
 
const ScatterVectorPostprocessorValuegetScatterVectorPostprocessorValueOld (const std::string &param_name, const std::string &vector_name) const
 
const ScatterVectorPostprocessorValuegetScatterVectorPostprocessorValueOldByName (const VectorPostprocessorName &name, const std::string &vector_name) const
 
bool hasVectorPostprocessor (const std::string &param_name, const std::string &vector_name) const
 
bool hasVectorPostprocessor (const std::string &param_name) const
 
bool hasVectorPostprocessorByName (const VectorPostprocessorName &name, const std::string &vector_name) const
 
bool hasVectorPostprocessorByName (const VectorPostprocessorName &name) const
 
const VectorPostprocessorName & getVectorPostprocessorName (const std::string &param_name) const
 
TgetSampler (const std::string &name)
 
SamplergetSampler (const std::string &name)
 
TgetSamplerByName (const SamplerName &name)
 
SamplergetSamplerByName (const SamplerName &name)
 
virtual void meshChanged ()
 
virtual void meshDisplaced ()
 
PerfGraphperfGraph ()
 
const PostprocessorValuegetPostprocessorValue (const std::string &param_name, const unsigned int index=0) const
 
const PostprocessorValuegetPostprocessorValue (const std::string &param_name, const unsigned int index=0) const
 
const PostprocessorValuegetPostprocessorValueOld (const std::string &param_name, const unsigned int index=0) const
 
const PostprocessorValuegetPostprocessorValueOld (const std::string &param_name, const unsigned int index=0) const
 
const PostprocessorValuegetPostprocessorValueOlder (const std::string &param_name, const unsigned int index=0) const
 
const PostprocessorValuegetPostprocessorValueOlder (const std::string &param_name, const unsigned int index=0) const
 
virtual const PostprocessorValuegetPostprocessorValueByName (const PostprocessorName &name) const
 
virtual const PostprocessorValuegetPostprocessorValueByName (const PostprocessorName &name) const
 
const PostprocessorValuegetPostprocessorValueOldByName (const PostprocessorName &name) const
 
const PostprocessorValuegetPostprocessorValueOldByName (const PostprocessorName &name) const
 
const PostprocessorValuegetPostprocessorValueOlderByName (const PostprocessorName &name) const
 
const PostprocessorValuegetPostprocessorValueOlderByName (const PostprocessorName &name) const
 
bool isVectorPostprocessorDistributed (const std::string &param_name) const
 
bool isVectorPostprocessorDistributed (const std::string &param_name) const
 
bool isVectorPostprocessorDistributedByName (const VectorPostprocessorName &name) const
 
bool isVectorPostprocessorDistributedByName (const VectorPostprocessorName &name) const
 
const DistributiongetDistribution (const std::string &name) const
 
const TgetDistribution (const std::string &name) const
 
const DistributiongetDistribution (const std::string &name) const
 
const TgetDistribution (const std::string &name) const
 
const DistributiongetDistributionByName (const DistributionName &name) const
 
const TgetDistributionByName (const std::string &name) const
 
const DistributiongetDistributionByName (const DistributionName &name) const
 
const TgetDistributionByName (const std::string &name) const
 
const Parallel::Communicator & comm () const
 
processor_id_type n_processors () const
 
processor_id_type processor_id () const
 

Static Public Member Functions

static InputParameters validParams ()
 
static void callMooseError (MooseApp *const app, const InputParameters &params, std::string msg, const bool with_prefix, const hit::Node *node, const bool show_trace=true)
 
static void sort (typename std::vector< T > &vector)
 
static void sortDFS (typename std::vector< T > &vector)
 
static void cyclicDependencyError (CyclicDependencyException< T2 > &e, const std::string &header, NameFunc &&name_func)
 
static void cyclicDependencyError (CyclicDependencyException< T2 > &e, const std::string &header)
 

Public Attributes

 usingCombinedWarningSolutionWarnings
 
const ConsoleStream _console
 

Static Public Attributes

static const Real _R = 8.3144598
 Universal gas constant (J/mol/K)
 
static const std::string type_param
 
static const std::string name_param
 
static const std::string unique_name_param
 
static const std::string app_param
 
static const std::string moose_base_param
 
static const std::string kokkos_object_param
 
static constexpr PropertyValue::id_type default_property_id
 
static constexpr PropertyValue::id_type zero_property_id
 
static constexpr auto SYSTEM
 
static constexpr auto NAME
 

Protected Types

enum  NaNMessage { NAN_MESSAGE_NONE = 0 , NAN_MESSAGE_WARNING = 1 , NAN_MESSAGE_EXCEPTION = 2 , NAN_MESSAGE_ERROR = 3 }
 

Protected Member Functions

Real compute_p_sat (const Real &T) const
 Computes saturation pressure value using Newton solve.
 
virtual void addPostprocessorDependencyHelper (const PostprocessorName &name) const override
 
virtual void addVectorPostprocessorDependencyHelper (const VectorPostprocessorName &name) const override
 
virtual void addUserObjectDependencyHelper (const UserObjectBase &uo) const override
 
void addReporterDependencyHelper (const ReporterName &reporter_name) override
 
void flagInvalidSolutionInternal (const InvalidSolutionID invalid_solution_id) const
 
InvalidSolutionID registerInvalidSolutionInternal (const std::string &message, const bool warning) const
 
const ReporterContextBasegetReporterContextBaseByName (const ReporterName &reporter_name) const
 
const ReporterNamegetReporterName (const std::string &param_name) const
 
TdeclareRestartableData (const std::string &data_name, Args &&... args)
 
ManagedValue< TdeclareManagedRestartableDataWithContext (const std::string &data_name, void *context, Args &&... args)
 
const TgetRestartableData (const std::string &data_name) const
 
TdeclareRestartableDataWithContext (const std::string &data_name, void *context, Args &&... args)
 
TdeclareRecoverableData (const std::string &data_name, Args &&... args)
 
TdeclareRestartableDataWithObjectName (const std::string &data_name, const std::string &object_name, Args &&... args)
 
TdeclareRestartableDataWithObjectNameWithContext (const std::string &data_name, const std::string &object_name, void *context, Args &&... args)
 
std::string restartableName (const std::string &data_name) const
 
const TgetMeshProperty (const std::string &data_name, const std::string &prefix)
 
const TgetMeshProperty (const std::string &data_name)
 
bool hasMeshProperty (const std::string &data_name, const std::string &prefix) const
 
bool hasMeshProperty (const std::string &data_name, const std::string &prefix) const
 
bool hasMeshProperty (const std::string &data_name) const
 
bool hasMeshProperty (const std::string &data_name) const
 
std::string meshPropertyName (const std::string &data_name) const
 
PerfID registerTimedSection (const std::string &section_name, const unsigned int level) const
 
PerfID registerTimedSection (const std::string &section_name, const unsigned int level, const std::string &live_message, const bool print_dots=true) const
 
std::string timedSectionName (const std::string &section_name) const
 
bool isCoupledScalar (const std::string &var_name, unsigned int i=0) const
 
unsigned int coupledScalarComponents (const std::string &var_name) const
 
unsigned int coupledScalar (const std::string &var_name, unsigned int comp=0) const
 
libMesh::Order coupledScalarOrder (const std::string &var_name, unsigned int comp=0) const
 
const VariableValuecoupledScalarValue (const std::string &var_name, unsigned int comp=0) const
 
const ADVariableValueadCoupledScalarValue (const std::string &var_name, unsigned int comp=0) const
 
const GenericVariableValue< is_ad > & coupledGenericScalarValue (const std::string &var_name, unsigned int comp=0) const
 
const GenericVariableValue< false > & coupledGenericScalarValue (const std::string &var_name, const unsigned int comp) const
 
const GenericVariableValue< true > & coupledGenericScalarValue (const std::string &var_name, const unsigned int comp) const
 
const VariableValuecoupledVectorTagScalarValue (const std::string &var_name, TagID tag, unsigned int comp=0) const
 
const VariableValuecoupledMatrixTagScalarValue (const std::string &var_name, TagID tag, unsigned int comp=0) const
 
const VariableValuecoupledScalarValueOld (const std::string &var_name, unsigned int comp=0) const
 
const VariableValuecoupledScalarValueOlder (const std::string &var_name, unsigned int comp=0) const
 
const VariableValuecoupledScalarDot (const std::string &var_name, unsigned int comp=0) const
 
const ADVariableValueadCoupledScalarDot (const std::string &var_name, unsigned int comp=0) const
 
const VariableValuecoupledScalarDotDot (const std::string &var_name, unsigned int comp=0) const
 
const VariableValuecoupledScalarDotOld (const std::string &var_name, unsigned int comp=0) const
 
const VariableValuecoupledScalarDotDotOld (const std::string &var_name, unsigned int comp=0) const
 
const VariableValuecoupledScalarDotDu (const std::string &var_name, unsigned int comp=0) const
 
const VariableValuecoupledScalarDotDotDu (const std::string &var_name, unsigned int comp=0) const
 
const MooseVariableScalargetScalarVar (const std::string &var_name, unsigned int comp) const
 
virtual void checkMaterialProperty (const std::string &name, const unsigned int state)
 
virtual void getKokkosMaterialPropertyHook (const std::string &, const unsigned int)
 
void markMatPropRequested (const std::string &)
 
MaterialPropertyName getMaterialPropertyName (const std::string &name) const
 
void checkExecutionStage ()
 
const TgetReporterValue (const std::string &param_name, const std::size_t time_index=0)
 
const TgetReporterValue (const std::string &param_name, ReporterMode mode, const std::size_t time_index=0)
 
const TgetReporterValue (const std::string &param_name, const std::size_t time_index=0)
 
const TgetReporterValue (const std::string &param_name, ReporterMode mode, const std::size_t time_index=0)
 
const TgetReporterValueByName (const ReporterName &reporter_name, const std::size_t time_index=0)
 
const TgetReporterValueByName (const ReporterName &reporter_name, ReporterMode mode, const std::size_t time_index=0)
 
const TgetReporterValueByName (const ReporterName &reporter_name, const std::size_t time_index=0)
 
const TgetReporterValueByName (const ReporterName &reporter_name, ReporterMode mode, const std::size_t time_index=0)
 
bool hasReporterValue (const std::string &param_name) const
 
bool hasReporterValue (const std::string &param_name) const
 
bool hasReporterValue (const std::string &param_name) const
 
bool hasReporterValue (const std::string &param_name) const
 
bool hasReporterValueByName (const ReporterName &reporter_name) const
 
bool hasReporterValueByName (const ReporterName &reporter_name) const
 
bool hasReporterValueByName (const ReporterName &reporter_name) const
 
bool hasReporterValueByName (const ReporterName &reporter_name) const
 
const GenericMaterialProperty< T, is_ad > * defaultGenericMaterialProperty (const std::string &name)
 
const GenericMaterialProperty< T, is_ad > * defaultGenericMaterialProperty (const std::string &name)
 
const MaterialProperty< T > * defaultMaterialProperty (const std::string &name)
 
const MaterialProperty< T > * defaultMaterialProperty (const std::string &name)
 
const ADMaterialProperty< T > * defaultADMaterialProperty (const std::string &name)
 
const ADMaterialProperty< T > * defaultADMaterialProperty (const std::string &name)
 
Real getNaN () const
 Throws an error or returns a NaN with or without a warning, with a default message.
 
template<typename... Args>
Real getNaN (Args &&... args) const
 Throws an error or returns a NaN with or without a warning.
 
std::vector< Real > getNaNVector (const unsigned int &n) const
 Throws an error or returns NaNs with or without a warning, with a default message.
 
template<typename... Args>
std::vector< Real > getNaNVector (const unsigned int &n, Args &&... args) const
 Throws an error or returns NaNs with or without a warning.
 

Static Protected Member Functions

static std::string meshPropertyName (const std::string &data_name, const std::string &prefix)
 

Protected Attributes

const Real _gamma_liquid
 
const Real _cv_liquid
 
const Real _cp_liquid
 
const Real _q_liquid
 
const Real _p_inf_liquid
 
const Real _q_prime_liquid
 
const Real _gamma_vapor
 
const Real _cv_vapor
 
const Real _cp_vapor
 
const Real _q_vapor
 
const Real _p_inf_vapor
 
const Real _q_prime_vapor
 
const Real & _T_c
 critical temperature
 
const Real & _p_c
 critical pressure
 
const Real & _T_triple
 Triple-point temperature.
 
const Real & _L_fusion
 Latent heat of fusion.
 
const Real & _sigma_A
 'A' constant used in surface tension correlation
 
const Real & _sigma_B
 'B' constant used in surface tension correlation
 
const Real & _sigma_C
 'C' constant used in surface tension correlation
 
const Real & _T_sat_min
 Minimum temperature value in saturation curve.
 
const Real & _T_sat_max
 Maximum temperature value in saturation curve.
 
const Real & _p_sat_guess
 Initial guess for saturation pressure Newton solve.
 
const unsigned int_n_sat_samples
 Number of samples to take in saturation curve.
 
const Real _dT_sat
 Temperature increments on saturation curve.
 
const Real _A
 
const Real _B
 
const Real _C
 
const Real _D
 
const Real _newton_tol
 Newton solve tolerance.
 
const unsigned int _newton_max_iter
 Newton max number of iterations.
 
std::vector< Real > _T_vec
 
std::vector< Real > _p_sat_vec
 
LinearInterpolation _ipol_temp
 
LinearInterpolation _ipol_pressure
 
const UserObjectName _liquid_name
 The name of the user object that provides liquid phase fluid properties.
 
const UserObjectName _vapor_name
 The name of the user object that provides vapor phase fluid properties.
 
const SinglePhaseFluidProperties_fp_liquid
 The user object that provides liquid phase fluid properties.
 
const SinglePhaseFluidProperties_fp_vapor
 The user object that provides vapor phase fluid properties.
 
const Real _T_c2k
 Conversion of temperature from Celsius to Kelvin.
 
const bool _allow_imperfect_jacobians
 Flag to set unimplemented Jacobian entries to zero.
 
const Moose::CoordinateSystemType_coord_sys
 
const THREAD_ID _tid
 
SubProblem_subproblem
 
FEProblemBase_fe_problem
 
SystemBase_sys
 
Assembly_assembly
 
const bool _duplicate_initial_execution
 
std::set< std::string > _depend_uo
 
const bool & _enabled
 
MooseApp_app
 
Factory_factory
 
ActionFactory_action_factory
 
const std::string & _type
 
const std::string & _name
 
const InputParameters_pars
 
const ExecFlagEnum_execute_enum
 
const ExecFlagType_current_execute_flag
 
MooseApp_restartable_app
 
const std::string _restartable_system_name
 
const THREAD_ID _restartable_tid
 
const bool _restartable_read_only
 
FEProblemBase_mci_feproblem
 
FEProblemBase_mdi_feproblem
 
MooseApp_pg_moose_app
 
const std::string _prefix
 
FEProblemBase_sc_fe_problem
 
const THREAD_ID _sc_tid
 
const Real & _real_zero
 
const VariableValue_scalar_zero
 
const Point & _point_zero
 
const InputParameters_mi_params
 
const std::string _mi_name
 
const MooseObjectName _mi_moose_object_name
 
FEProblemBase_mi_feproblem
 
SubProblem_mi_subproblem
 
const THREAD_ID _mi_tid
 
const bool _is_kokkos_object
 
const Moose::MaterialDataType _material_data_type
 
MaterialData_material_data
 
bool _stateful_allowed
 
bool _get_material_property_called
 
std::vector< std::unique_ptr< PropertyValue > > _default_properties
 
std::unordered_set< unsigned int_material_property_dependencies
 
const MaterialPropertyName _get_suffix
 
const bool _use_interpolated_state
 
const InputParameters_ti_params
 
FEProblemBase_ti_feproblem
 
bool _is_implicit
 
Real & _t
 
const Real & _t_old
 
int_t_step
 
Real & _dt
 
Real & _dt_old
 
bool _is_transient
 
const Parallel::Communicator & _communicator
 
const MooseObject *const _moose_object
 
enum NaNMessage _emit_on_nan
 Raise mooseWarning or mooseError?
 

Static Protected Attributes

static const std::string _interpolated_old
 
static const std::string _interpolated_older
 

Private Member Functions

const Moose::FunctionBasegetKokkosFunctionByNameHelper (const FunctionName &name) const
 
const UserObjectBasegetUserObjectFromFEProblem (const UserObjectName &object_name, const THREAD_ID tid=0) const
 
const TcastUserObject (const UserObjectBase &uo_base, const std::string &param_name="") const
 
void mooseObjectError (const std::string &param_name, std::stringstream &oss) const
 
const std::string & userObjectType (const UserObjectBase &uo) const
 
const std::string & userObjectName (const UserObjectBase &uo) const
 
const PostprocessorName & getPostprocessorNameInternal (const std::string &param_name, const unsigned int index, const bool allow_default_value=true) const
 
bool isDefaultPostprocessorValueByName (const PostprocessorName &name) const
 
PostprocessorValue getDefaultPostprocessorValueByName (const PostprocessorName &name) const
 
void checkParam (const std::string &param_name, const unsigned int index=std::numeric_limits< unsigned int >::max()) const
 
bool postprocessorsAdded () const
 
const VectorPostprocessorValuegetVectorPostprocessorByNameHelper (const VectorPostprocessorName &name, const std::string &vector_name, bool broadcast, std::size_t t_index) const
 
const VectorPostprocessorContext< VectorPostprocessorValue > & getVectorPostprocessorContextByNameHelper (const VectorPostprocessorName &name, const std::string &vector_name) const
 
bool vectorPostprocessorsAdded () const
 
bool reportersAdded () const
 
void possiblyCheckHasReporter (const ReporterName &reporter_name, const std::string &param_name="") const
 
RestartableDataValueregisterRestartableDataOnApp (std::unique_ptr< RestartableDataValue > data, THREAD_ID tid) const
 
void registerRestartableNameWithFilterOnApp (const std::string &name, Moose::RESTARTABLE_FILTER filter)
 
RestartableData< T > & declareRestartableDataHelper (const std::string &data_name, void *context, Args &&... args) const
 
virtual std::string meshPropertyPrefix (const std::string &data_name) const
 
const RestartableDataValuegetMeshPropertyInternal (const std::string &data_name, const std::string &prefix) const
 
void mooseErrorInternal (Args &&... args) const
 
const VariableValuegetDefaultValue (const std::string &var_name) const
 
const ADVariableValuegetADDefaultValue (const std::string &var_name) const
 
void checkVar (const std::string &var_name) const
 
void validateExecutionerType (const std::string &name, const std::string &fn_name) const
 
Moose::MaterialDataType getMaterialDataType (const std::set< BoundaryID > &boundary_ids) const
 
unsigned int getMaxQps () const
 
void addConsumedPropertyName (const MooseObjectName &obj_name, const std::string &prop_name)
 
const PostprocessorValuegetPostprocessorValueInternal (const std::string &param_name, unsigned int index, std::size_t t_index) const
 
const PostprocessorValuegetPostprocessorValueInternal (const std::string &param_name, unsigned int index, std::size_t t_index) const
 
const PostprocessorValuegetPostprocessorValueByNameInternal (const PostprocessorName &name, std::size_t t_index) const
 
const PostprocessorValuegetPostprocessorValueByNameInternal (const PostprocessorName &name, std::size_t t_index) const
 
void possiblyCheckHasVectorPostprocessor (const std::string &param_name, const std::string &vector_name) const
 
void possiblyCheckHasVectorPostprocessor (const std::string &param_name, const std::string &vector_name) const
 
void possiblyCheckHasVectorPostprocessorByName (const VectorPostprocessorName &name, const std::string &vector_name) const
 
void possiblyCheckHasVectorPostprocessorByName (const VectorPostprocessorName &name, const std::string &vector_name) const
 

Static Private Member Functions

static const hit::Node * getHitNode (const InputParameters &params)
 
static std::string messagePrefix (const InputParameters &params, const bool hit_prefix)
 

Private Attributes

UserObject_primary_thread_copy
 
std::set< std::string > _supplied_uo
 
const ParallelParamObject_parent
 
const MooseBase_si_moose_base
 
const FEProblemBase_si_problem
 
ExecFlagEnum _empty_execute_enum
 
const MooseObject_fni_object
 
const InputParameters_fni_params
 
FEProblemBase_fni_feproblem
 
const THREAD_ID _fni_tid
 
const MooseObject_uoi_moose_object
 
const FEProblemBase_uoi_feproblem
 
const THREAD_ID _uoi_tid
 
const MooseObject_ppi_moose_object
 
const InputParameters_ppi_params
 
const FEProblemBase_ppi_feproblem
 
std::map< PostprocessorName, std::unique_ptr< PostprocessorValue > > _default_values
 
const bool _broadcast_by_default
 
const MooseObject_vpi_moose_object
 
const FEProblemBase_vpi_feproblem
 
const THREAD_ID _vpi_tid
 
const InputParameters_ri_params
 
FEProblemBase_ri_fe_problem_base
 
const ReporterData_ri_reporter_data
 
const MooseObject_ri_moose_object
 
const InputParameters_dni_params
 
FEProblemBase_dni_feproblem
 
const MooseObject *const _dni_moose_object_ptr
 
const InputParameters_si_params
 
FEProblemBase_si_feproblem
 
THREAD_ID _si_tid
 
const RestartableDataMapName _metaname
 
std::string _restartable_name
 
MooseApp_meta_data_app
 
const MooseObject *const _meta_data_object
 
const InputParameters_sc_parameters
 
const std::string & _sc_name
 
const bool _sc_is_implicit
 
std::unordered_map< std::string, std::vector< MooseVariableScalar * > > _coupled_scalar_vars
 
std::unordered_map< std::string, std::unique_ptr< VariableValue > > _default_value
 
std::unordered_map< std::string, std::unique_ptr< ADVariableValue > > _dual_default_value
 
std::vector< MooseVariableScalar * > _coupled_moose_scalar_vars
 
std::unordered_map< std::string, std::vector< MooseVariableFieldBase * > > _sc_coupled_vars
 
std::set< TagID_sc_coupleable_vector_tags
 
std::set< TagID_sc_coupleable_matrix_tags
 
const MooseObject_mi_moose_object
 
const bool _mi_boundary_restricted
 
const std::set< SubdomainID > & _mi_block_ids
 
const std::set< BoundaryID > & _mi_boundary_ids
 
std::vector< std::unique_ptr< OptionalMaterialPropertyProxyBase< MaterialPropertyInterface > > > _optional_property_proxies
 
const std::string _ti_name
 

Detailed Description

Two-phase stiffened gas fluid properties.

Definition at line 24 of file StiffenedGasTwoPhaseFluidProperties.h.

Member Enumeration Documentation

◆ NaNMessage

enum NaNInterface::NaNMessage
protectedinherited
Enumerator
NAN_MESSAGE_NONE 
NAN_MESSAGE_WARNING 
NAN_MESSAGE_EXCEPTION 
NAN_MESSAGE_ERROR 

Definition at line 30 of file NaNInterface.h.

Constructor & Destructor Documentation

◆ StiffenedGasTwoPhaseFluidProperties()

StiffenedGasTwoPhaseFluidProperties::StiffenedGasTwoPhaseFluidProperties ( const InputParameters parameters)

Definition at line 65 of file StiffenedGasTwoPhaseFluidProperties.C.

68 NaNInterface(this),
69
70 _gamma_liquid(getParam<Real>("gamma_liquid")),
71 _cv_liquid(getParam<Real>("cv_liquid")),
73 _q_liquid(getParam<Real>("q_liquid")),
74 _p_inf_liquid(getParam<Real>("p_inf_liquid")),
75 _q_prime_liquid(getParam<Real>("q_prime_liquid")),
76
77 _gamma_vapor(getParam<Real>("gamma_vapor")),
78 _cv_vapor(getParam<Real>("cv_vapor")),
80 _q_vapor(getParam<Real>("q_vapor")),
81 _p_inf_vapor(getParam<Real>("p_inf_vapor")),
82 _q_prime_vapor(getParam<Real>("q_prime_vapor")),
83
84 _T_c(getParam<Real>("T_c")),
85 _p_c(getParam<Real>("p_c")),
86 _T_triple(getParam<Real>("T_triple")),
87 _L_fusion(getParam<Real>("L_fusion")),
88
89 _sigma_A(getParam<Real>("sigma_A")),
90 _sigma_B(getParam<Real>("sigma_B")),
91 _sigma_C(getParam<Real>("sigma_C")),
92
93 _T_sat_min(getParam<Real>("T_sat_min")),
94 _T_sat_max(getParam<Real>("T_sat_max")),
95 _p_sat_guess(getParam<Real>("p_sat_guess")),
96 _n_sat_samples(getParam<unsigned int>("n_sat_samples")),
98
103
104 _newton_tol(1.0e-8),
106{
107 if (_tid == 0)
108 {
109 std::string class_name = "StiffenedGasFluidProperties";
110 InputParameters params = _app.getFactory().getValidParams(class_name);
111 params.set<MooseEnum>("emit_on_nan") = getParam<MooseEnum>("emit_on_nan");
112 params.set<bool>("allow_nonphysical_states") = false;
113 params.set<Real>("gamma") = _gamma_liquid;
114 params.set<Real>("cv") = _cv_liquid;
115 params.set<Real>("q") = _q_liquid;
116 params.set<Real>("p_inf") = _p_inf_liquid;
117 params.set<Real>("q_prime") = _q_prime_liquid;
118 params.set<Real>("k") = getParam<Real>("k_liquid");
119 params.set<Real>("mu") = getParam<Real>("mu_liquid");
120 params.set<Real>("M") = getParam<Real>("M_liquid");
121 _fe_problem.addUserObject(class_name, _liquid_name, params);
122 }
124
125 if (_tid == 0)
126 {
127 std::string class_name = "StiffenedGasFluidProperties";
128 InputParameters params = _app.getFactory().getValidParams(class_name);
129 params.set<MooseEnum>("emit_on_nan") = getParam<MooseEnum>("emit_on_nan");
130 params.set<bool>("allow_nonphysical_states") = false;
131 params.set<Real>("gamma") = _gamma_vapor;
132 params.set<Real>("cv") = _cv_vapor;
133 params.set<Real>("q") = _q_vapor;
134 params.set<Real>("p_inf") = _p_inf_vapor;
135 params.set<Real>("q_prime") = _q_prime_vapor;
136 params.set<Real>("k") = getParam<Real>("k_vapor");
137 params.set<Real>("mu") = getParam<Real>("mu_vapor");
138 params.set<Real>("M") = getParam<Real>("M_vapor");
139 params.set<Real>("T_c") = getParam<Real>("T_c");
140 params.set<Real>("rho_c") = getParam<Real>("rho_c");
141 params.set<Real>("e_c") = getParam<Real>("e_c");
142 _fe_problem.addUserObject(class_name, _vapor_name, params);
143 }
145
146 // calculate the saturation curve p(T) and store the data in two vectors for re-use
147 {
148 _T_vec.resize(_n_sat_samples);
150
151 // loop over sample temperatures, starting with the minimum
152 Real T = _T_sat_min;
153 for (unsigned int i = 0; i < _n_sat_samples; i++)
154 {
155 _T_vec[i] = T;
157
158 // increment sample temperature
159 T += _dT_sat;
160 }
161 }
162
165}
const double T
T & getUserObject(const std::string &name, unsigned int tid=0) const
virtual std::vector< std::shared_ptr< UserObject > > addUserObject(const std::string &user_object_name, const std::string &name, InputParameters &parameters)
InputParameters getValidParams(const std::string &name) const
T & set(const std::string &name, bool quiet_mode=false)
void setData(const std::vector< Real > &X, const std::vector< Real > &Y)
Factory & getFactory()
const InputParameters & parameters() const
Interface class for producing errors, warnings, or just quiet NaNs.
Common class for single phase fluid properties.
const Real & _T_triple
Triple-point temperature.
const unsigned int & _n_sat_samples
Number of samples to take in saturation curve.
const Real & _T_sat_min
Minimum temperature value in saturation curve.
const Real & _sigma_C
'C' constant used in surface tension correlation
const unsigned int _newton_max_iter
Newton max number of iterations.
const Real & _sigma_A
'A' constant used in surface tension correlation
const Real & _T_sat_max
Maximum temperature value in saturation curve.
const Real & _sigma_B
'B' constant used in surface tension correlation
const Real & _p_sat_guess
Initial guess for saturation pressure Newton solve.
const Real _dT_sat
Temperature increments on saturation curve.
Real compute_p_sat(const Real &T) const
Computes saturation pressure value using Newton solve.
Base class for fluid properties used with two-phase flow.
const UserObjectName _liquid_name
The name of the user object that provides liquid phase fluid properties.
const UserObjectName _vapor_name
The name of the user object that provides vapor phase fluid properties.
const SinglePhaseFluidProperties * _fp_liquid
The user object that provides liquid phase fluid properties.
const SinglePhaseFluidProperties * _fp_vapor
The user object that provides vapor phase fluid properties.
FEProblemBase & _fe_problem
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real

Member Function Documentation

◆ compute_p_sat()

Real StiffenedGasTwoPhaseFluidProperties::compute_p_sat ( const Real &  T) const
protected

Computes saturation pressure value using Newton solve.

The process for determining the saturation pressure is given in the following reference:

Ray A. Berry, Richard Saurel, Olivier LeMetayer The discrete equation method (DEM) for fully compressible, two-phase flow in ducts of spatially varying cross-section Nuclear Engineering and Design 240 (2010) p. 3797-3818

The nonlinear equation to be solved is given by Equation (38) of this reference; it is obtained by reasoning that at thermodynamic equilibrium, the Gibbs free enthalpy of the phases must be equal at the interface.

Parameters
[in]Ttemperature at which saturation pressure is to be computed

Definition at line 198 of file StiffenedGasTwoPhaseFluidProperties.C.

199{
201 Real f_norm = 1.0e5;
202 unsigned int iter = 1;
203 while (std::fabs(f_norm / p_sat) > _newton_tol)
204 {
205 // check for maximum iteration
206 if (iter > _newton_max_iter)
207 mooseError("StiffenedGasTwoPhaseFluidProperties::compute_p_sat: ",
208 "Newton solve did not converge after ",
210 " iterations.");
211
212 // evaluate nonlinear residual and its derivative w.r.t. p_sat
213 Real f = std::log(p_sat + _p_inf_vapor) - _A - _B / T - _C * std::log(T) -
214 _D * std::log(p_sat + _p_inf_liquid);
215 Real f_prime = 1.0 / (p_sat + _p_inf_vapor) - _D / (p_sat + _p_inf_liquid);
216
217 // take Newton step
218 f_norm = f / f_prime;
219 p_sat -= f_norm;
220
221 iter++;
222 }
223 return p_sat;
224}
Real f(Real x)
Test function for Brents method.
void mooseError(Args &&... args) const
virtual Real p_sat(Real temperature) const override
Computes the saturation pressure at a temperature.

Referenced by StiffenedGasTwoPhaseFluidProperties().

◆ dsigma_dT_from_T()

Real StiffenedGasTwoPhaseFluidProperties::dsigma_dT_from_T ( Real  T) const
overridevirtual

Computes dsigma/dT along the saturation line.

Parameters
[in]Ttemperature (K)

Reimplemented from TwoPhaseFluidProperties.

Definition at line 240 of file StiffenedGasTwoPhaseFluidProperties.C.

241{
242 const Real aux = 1.0 - T / _T_c;
243 const Real daux_dT = -1.0 / _T_c;
244 const Real dsigma_daux =
245 _sigma_A * (_sigma_B * std::pow(aux, _sigma_B - 1.0) * (1.0 - _sigma_C * aux) -
246 _sigma_C * std::pow(aux, _sigma_B));
247 return dsigma_daux * daux_dT;
248}

◆ dT_sat_dp()

Real StiffenedGasTwoPhaseFluidProperties::dT_sat_dp ( Real  p) const
overridevirtual

Computes dT/dp along the saturation line.

Parameters
[in]ppressure

Implements TwoPhaseFluidProperties.

Definition at line 227 of file StiffenedGasTwoPhaseFluidProperties.C.

228{
229 return _ipol_temp.sampleDerivative(pressure);
230}
T sampleDerivative(const T &x) const

◆ execute()

virtual void FluidProperties::execute ( )
inlinefinalvirtualinherited

Implements ThreadedGeneralUserObject.

Definition at line 33 of file FluidProperties.h.

33{}

◆ finalize()

virtual void FluidProperties::finalize ( )
inlinefinalvirtualinherited

Implements ThreadedGeneralUserObject.

Definition at line 35 of file FluidProperties.h.

35{}

◆ getLiquidName()

virtual const UserObjectName & TwoPhaseFluidProperties::getLiquidName ( ) const
inlinevirtualinherited

Returns the name of the liquid single-phase fluid properties object.

Reimplemented in TwoPhaseNCGFluidProperties.

Definition at line 32 of file TwoPhaseFluidProperties.h.

32{ return _liquid_name; }

Referenced by StiffenedGasTwoPhaseFluidPropertiesTest::buildObjects(), TwoPhaseNCGFluidProperties::getLiquidName(), and SaturationDensityFunction::initialSetup().

◆ getNaN() [1/2]

Real NaNInterface::getNaN ( ) const
inlineprotectedinherited

◆ getNaN() [2/2]

template<typename... Args>
Real NaNInterface::getNaN ( Args &&...  args) const
inlineprotectedinherited

Throws an error or returns a NaN with or without a warning.

Definition at line 62 of file NaNInterface.h.

63 {
64 switch (_emit_on_nan)
65 {
67 mooseWarning(_moose_object->name(), ": ", std::forward<Args>(args)...);
68 break;
70 mooseException(_moose_object->name(), ": ", std::forward<Args>(args)...);
71 break;
72 case (NAN_MESSAGE_ERROR):
73 mooseError(_moose_object->name(), ": ", std::forward<Args>(args)...);
74 break;
75 default:
76 break;
77 }
78 // return a quiet NaN
79 return std::nan("");
80 }
void mooseWarning(Args &&... args)
void mooseError(Args &&... args)
const std::string & name() const
enum NaNMessage _emit_on_nan
Raise mooseWarning or mooseError?
const MooseObject *const _moose_object

◆ getNaNVector() [1/2]

std::vector< Real > NaNInterface::getNaNVector ( const unsigned int n) const
inlineprotectedinherited

Throws an error or returns NaNs with or without a warning, with a default message.

Parameters
[in]nVector size

Definition at line 53 of file NaNInterface.h.

54 {
55 return getNaNVector(n, "A NaN was produced.");
56 }
std::vector< Real > getNaNVector(const unsigned int &n) const
Throws an error or returns NaNs with or without a warning, with a default message.

Referenced by NaNInterface::getNaNVector(), and NaNInterfaceTestFluidProperties::returnNaNVector().

◆ getNaNVector() [2/2]

template<typename... Args>
std::vector< Real > NaNInterface::getNaNVector ( const unsigned int n,
Args &&...  args 
) const
inlineprotectedinherited

Throws an error or returns NaNs with or without a warning.

Parameters
[in]nVector size

Definition at line 88 of file NaNInterface.h.

89 {
90 switch (_emit_on_nan)
91 {
93 mooseWarning(_moose_object->name(), ": ", std::forward<Args>(args)...);
94 break;
96 mooseException(_moose_object->name(), ": ", std::forward<Args>(args)...);
97 break;
98 case (NAN_MESSAGE_ERROR):
99 mooseError(_moose_object->name(), ": ", std::forward<Args>(args)...);
100 break;
101 default:
102 break;
103 }
104 // return quiet NaNs
105 return std::vector<Real>(n, std::nan(""));
106 }

◆ getVaporName()

virtual const UserObjectName & TwoPhaseFluidProperties::getVaporName ( ) const
inlinevirtualinherited

Returns the name of the vapor single-phase fluid properties object.

Reimplemented in TwoPhaseNCGFluidProperties.

Definition at line 37 of file TwoPhaseFluidProperties.h.

37{ return _vapor_name; }

Referenced by StiffenedGasTwoPhaseFluidPropertiesTest::buildObjects(), TwoPhaseNCGFluidProperties::getVaporName(), and SaturationDensityFunction::initialSetup().

◆ h_lat() [1/2]

ADReal TwoPhaseFluidProperties::h_lat ( const ADReal p,
const ADReal T 
) const
virtualinherited

Reimplemented in TwoPhaseNCGFluidProperties.

Definition at line 98 of file TwoPhaseFluidProperties.C.

99{
100 return _fp_vapor->h_from_p_T(p, T) - _fp_liquid->h_from_p_T(p, T);
101}
const Real p

◆ h_lat() [2/2]

Real TwoPhaseFluidProperties::h_lat ( Real  p,
Real  T 
) const
virtualinherited

Computes latent heat of vaporization.

Parameters
ppressure
Ttemperature

Reimplemented in TwoPhaseNCGFluidProperties.

Definition at line 92 of file TwoPhaseFluidProperties.C.

93{
94 return _fp_vapor->h_from_p_T(p, T) - _fp_liquid->h_from_p_T(p, T);
95}

Referenced by FluidPropertiesInterrogator::compute2Phase(), TwoPhaseNCGFluidProperties::h_lat(), and TwoPhaseNCGFluidProperties::h_lat().

◆ initialize()

virtual void FluidProperties::initialize ( )
inlinefinalvirtualinherited

Implements ThreadedGeneralUserObject.

Definition at line 34 of file FluidProperties.h.

34{}

◆ L_fusion()

Real StiffenedGasTwoPhaseFluidProperties::L_fusion ( ) const
overridevirtual

Returns the latent heat of fusion.

Reimplemented from TwoPhaseFluidProperties.

Definition at line 180 of file StiffenedGasTwoPhaseFluidProperties.C.

181{
182 return _L_fusion;
183}

◆ p_critical()

Real StiffenedGasTwoPhaseFluidProperties::p_critical ( ) const
overridevirtual

Returns the critical pressure.

Implements TwoPhaseFluidProperties.

Definition at line 168 of file StiffenedGasTwoPhaseFluidProperties.C.

169{
170 return _p_c;
171}

◆ p_sat() [1/2]

ADReal TwoPhaseFluidProperties::p_sat ( const ADReal T) const
virtualinherited

Reimplemented in TwoPhaseFluidPropertiesIndependent, and TwoPhaseNCGFluidProperties.

Definition at line 80 of file TwoPhaseFluidProperties.C.

81{
82 const Real T_real = T.value();
83 const Real p_sat_real = p_sat(T_real);
84 const Real dp_sat_dT_real = 1.0 / dT_sat_dp(p_sat_real);
85
86 ADReal p_sat = p_sat_real;
87 p_sat.derivatives() = T.derivatives() * dp_sat_dT_real;
88 return p_sat;
89}
DualNumber< Real, DNDerivativeType, true > ADReal
virtual Real dT_sat_dp(Real p) const =0
Computes dT/dp along the saturation line.
virtual Real p_sat(Real T) const =0
Computes the saturation pressure at a temperature.

◆ p_sat() [2/2]

Real StiffenedGasTwoPhaseFluidProperties::p_sat ( Real  T) const
overridevirtual

Computes the saturation pressure at a temperature.

Parameters
[in]Ttemperature

Implements TwoPhaseFluidProperties.

Definition at line 192 of file StiffenedGasTwoPhaseFluidProperties.C.

193{
194 return _ipol_pressure.sample(temperature);
195}
T sample(const T &x) const

Referenced by compute_p_sat().

◆ sigma_from_T() [1/2]

ADReal TwoPhaseFluidProperties::sigma_from_T ( const ADReal T) const
virtualinherited

Reimplemented in TwoPhaseFluidPropertiesIndependent.

Definition at line 116 of file TwoPhaseFluidProperties.C.

117{
118 const Real T_real = T.value();
119 const Real sigma_real = sigma_from_T(T_real);
120 const Real dsigma_dT = dsigma_dT_from_T(T_real);
121
122 ADReal sigma = sigma_real;
123 sigma.derivatives() = T.derivatives() * dsigma_dT;
124 return sigma;
125}
virtual Real dsigma_dT_from_T(Real T) const
Computes dsigma/dT along the saturation line.
virtual Real sigma_from_T(Real T) const
Computes surface tension sigma of saturated liquid in contact with saturated vapor.

◆ sigma_from_T() [2/2]

Real StiffenedGasTwoPhaseFluidProperties::sigma_from_T ( Real  T) const
overridevirtual

Computes surface tension sigma of saturated liquid in contact with saturated vapor.

Parameters
Ttemperature

Reimplemented from TwoPhaseFluidProperties.

Definition at line 233 of file StiffenedGasTwoPhaseFluidProperties.C.

234{
235 const Real aux = 1.0 - T / _T_c;
236 return _sigma_A * std::pow(aux, _sigma_B) * (1.0 - _sigma_C * aux);
237}

◆ subdomainSetup()

virtual void FluidProperties::subdomainSetup ( )
inlinefinalvirtualinherited

Reimplemented from ThreadedGeneralUserObject.

Definition at line 38 of file FluidProperties.h.

38{}

◆ supportsPhaseChange()

virtual bool StiffenedGasTwoPhaseFluidProperties::supportsPhaseChange ( ) const
inlineoverridevirtual

Returns true if phase change is supported, otherwise false.

Implements TwoPhaseFluidProperties.

Definition at line 38 of file StiffenedGasTwoPhaseFluidProperties.h.

38{ return true; }

◆ T_sat() [1/2]

ADReal TwoPhaseFluidProperties::T_sat ( const ADReal p) const
virtualinherited

Reimplemented in TwoPhaseFluidPropertiesIndependent, and TwoPhaseNCGFluidProperties.

Definition at line 68 of file TwoPhaseFluidProperties.C.

69{
70 const Real p_real = p.value();
71 const Real T_sat_real = T_sat(p_real);
72 const Real dT_sat_dp_real = dT_sat_dp(p_real);
73
74 ADReal T_sat = T_sat_real;
75 T_sat.derivatives() = p.derivatives() * dT_sat_dp_real;
76 return T_sat;
77}
virtual Real T_sat(Real p) const =0
Computes the saturation temperature at a pressure.

◆ T_sat() [2/2]

Real StiffenedGasTwoPhaseFluidProperties::T_sat ( Real  p) const
overridevirtual

Computes the saturation temperature at a pressure.

Parameters
[in]ppressure

Implements TwoPhaseFluidProperties.

Definition at line 186 of file StiffenedGasTwoPhaseFluidProperties.C.

187{
188 return _ipol_temp.sample(pressure);
189}

◆ T_triple()

Real StiffenedGasTwoPhaseFluidProperties::T_triple ( ) const
overridevirtual

Returns the triple-point temperature.

Reimplemented from TwoPhaseFluidProperties.

Definition at line 174 of file StiffenedGasTwoPhaseFluidProperties.C.

175{
176 return _T_triple;
177}

◆ threadJoin()

virtual void FluidProperties::threadJoin ( const UserObject )
inlinefinalvirtualinherited

Reimplemented from ThreadedGeneralUserObject.

Definition at line 37 of file FluidProperties.h.

37{}

◆ validParams()

InputParameters StiffenedGasTwoPhaseFluidProperties::validParams ( )
static

Definition at line 16 of file StiffenedGasTwoPhaseFluidProperties.C.

17{
19 params += NaNInterface::validParams();
20
21 params.addParam<Real>("gamma_liquid", 2.35, "Liquid heat capacity ratio");
22 params.addParam<Real>("cv_liquid", 1816.0, "Liquid isochoric specific heat capacity");
23 params.addParam<Real>("q_liquid", -1.167e6, "Liquid reference specific internal energy");
24 params.addParam<Real>("p_inf_liquid", 1.0e9, "Liquid stiffness pressure");
25 params.addParam<Real>("q_prime_liquid", 0, "Liquid reference specific entropy");
26 params.addParam<Real>("k_liquid", 0.5, "Liquid thermal conductivity");
27 params.addParam<Real>("mu_liquid", 281.8e-6, "Liquid dynamic viscosity");
28 params.addParam<Real>("M_liquid", 0.01801488, "Liquid molar mass");
29
30 params.addParam<Real>("gamma_vapor", 1.43, "Vapor heat capacity ratio");
31 params.addParam<Real>("cv_vapor", 1040.0, "Vapor isochoric specific heat capacity");
32 params.addParam<Real>("q_vapor", 2.03e6, "Vapor reference specific internal energy");
33 params.addParam<Real>("p_inf_vapor", 0.0, "Vapor stiffness pressure");
34 params.addParam<Real>("q_prime_vapor", -2.3e4, "Vapor reference specific entropy");
35 params.addParam<Real>("k_vapor", 0.026, "Vapor thermal conductivity");
36 params.addParam<Real>("mu_vapor", 134.4e-7, "Vapor dynamic viscosity");
37 params.addParam<Real>("M_vapor", 0.01801488, "Vapor molar mass");
38
39 params.addParam<Real>("T_c", 647.096, "Critical temperature [K]");
40 params.addParam<Real>("p_c", 22.09e6, "Critical pressure [Pa]");
41 params.addParam<Real>("rho_c", 322.0, "Critical density [kg/m^3]");
42 params.addParam<Real>("e_c", 2702979.84310559, "Critical specific internal energy [J/kg]");
43 params.addParam<Real>("T_triple", 273.16, "Triple-point temperature [K]");
44 params.addParam<Real>("L_fusion", 0.334, "Latent heat of fusion [J/kg]");
45
46 params.addParam<Real>(
47 "sigma_A", 0.2358, "'A' constant used in surface tension correlation [N/m]");
48 params.addParam<Real>("sigma_B", 1.256, "'B' constant used in surface tension correlation");
49 params.addParam<Real>("sigma_C", 0.625, "'C' constant used in surface tension correlation");
50
51 // Default values correspond to water, from the freezing point to critical point, with 1 K
52 // increments
53 params.addParam<Real>("T_sat_min", 274.0, "Minimum temperature value in saturation curve [K]");
54 params.addParam<Real>("T_sat_max", 647.0, "Maximum temperature value in saturation curve [K]");
55 params.addParam<Real>(
56 "p_sat_guess", 611.0, "Initial guess for saturation pressure Newton solve [Pa]");
57 params.addParam<unsigned int>(
58 "n_sat_samples", 374, "Number of samples to take in saturation curve");
59
60 params.addClassDescription("Two-phase stiffened gas fluid properties");
61
62 return params;
63}
void addParam(const std::string &name, const std::initializer_list< typename T::value_type > &value, const std::string &doc_string)
void addClassDescription(const std::string &doc_string)
static InputParameters validParams()
static InputParameters validParams()

Member Data Documentation

◆ _A

const Real StiffenedGasTwoPhaseFluidProperties::_A
protected

Definition at line 103 of file StiffenedGasTwoPhaseFluidProperties.h.

Referenced by compute_p_sat().

◆ _allow_imperfect_jacobians

const bool FluidProperties::_allow_imperfect_jacobians
protectedinherited

◆ _B

const Real StiffenedGasTwoPhaseFluidProperties::_B
protected

Definition at line 104 of file StiffenedGasTwoPhaseFluidProperties.h.

Referenced by compute_p_sat().

◆ _C

const Real StiffenedGasTwoPhaseFluidProperties::_C
protected

Definition at line 105 of file StiffenedGasTwoPhaseFluidProperties.h.

Referenced by compute_p_sat().

◆ _cp_liquid

const Real StiffenedGasTwoPhaseFluidProperties::_cp_liquid
protected

Definition at line 62 of file StiffenedGasTwoPhaseFluidProperties.h.

◆ _cp_vapor

const Real StiffenedGasTwoPhaseFluidProperties::_cp_vapor
protected

Definition at line 70 of file StiffenedGasTwoPhaseFluidProperties.h.

◆ _cv_liquid

const Real StiffenedGasTwoPhaseFluidProperties::_cv_liquid
protected

◆ _cv_vapor

const Real StiffenedGasTwoPhaseFluidProperties::_cv_vapor
protected

◆ _D

const Real StiffenedGasTwoPhaseFluidProperties::_D
protected

Definition at line 106 of file StiffenedGasTwoPhaseFluidProperties.h.

Referenced by compute_p_sat().

◆ _dT_sat

const Real StiffenedGasTwoPhaseFluidProperties::_dT_sat
protected

Temperature increments on saturation curve.

Definition at line 100 of file StiffenedGasTwoPhaseFluidProperties.h.

Referenced by StiffenedGasTwoPhaseFluidProperties().

◆ _emit_on_nan

enum NaNMessage NaNInterface::_emit_on_nan
protectedinherited

Raise mooseWarning or mooseError?

Definition at line 41 of file NaNInterface.h.

Referenced by NaNInterface::getNaN(), and NaNInterface::getNaNVector().

◆ _fp_liquid

const SinglePhaseFluidProperties* TwoPhaseFluidProperties::_fp_liquid
protectedinherited

◆ _fp_vapor

const SinglePhaseFluidProperties* TwoPhaseFluidProperties::_fp_vapor
protectedinherited

◆ _gamma_liquid

const Real StiffenedGasTwoPhaseFluidProperties::_gamma_liquid
protected

◆ _gamma_vapor

const Real StiffenedGasTwoPhaseFluidProperties::_gamma_vapor
protected

◆ _ipol_pressure

LinearInterpolation StiffenedGasTwoPhaseFluidProperties::_ipol_pressure
protected

◆ _ipol_temp

LinearInterpolation StiffenedGasTwoPhaseFluidProperties::_ipol_temp
protected

◆ _L_fusion

const Real& StiffenedGasTwoPhaseFluidProperties::_L_fusion
protected

Latent heat of fusion.

Definition at line 82 of file StiffenedGasTwoPhaseFluidProperties.h.

Referenced by L_fusion().

◆ _liquid_name

const UserObjectName TwoPhaseFluidProperties::_liquid_name
protectedinherited

The name of the user object that provides liquid phase fluid properties.

Definition at line 109 of file TwoPhaseFluidProperties.h.

Referenced by TwoPhaseFluidProperties::getLiquidName(), StiffenedGasTwoPhaseFluidProperties(), and TwoPhaseFluidProperties::TwoPhaseFluidProperties().

◆ _moose_object

const MooseObject* const NaNInterface::_moose_object
protectedinherited

Definition at line 38 of file NaNInterface.h.

Referenced by NaNInterface::getNaN(), and NaNInterface::getNaNVector().

◆ _n_sat_samples

const unsigned int& StiffenedGasTwoPhaseFluidProperties::_n_sat_samples
protected

Number of samples to take in saturation curve.

Definition at line 98 of file StiffenedGasTwoPhaseFluidProperties.h.

Referenced by StiffenedGasTwoPhaseFluidProperties().

◆ _newton_max_iter

const unsigned int StiffenedGasTwoPhaseFluidProperties::_newton_max_iter
protected

Newton max number of iterations.

Definition at line 111 of file StiffenedGasTwoPhaseFluidProperties.h.

Referenced by compute_p_sat().

◆ _newton_tol

const Real StiffenedGasTwoPhaseFluidProperties::_newton_tol
protected

Newton solve tolerance.

Definition at line 109 of file StiffenedGasTwoPhaseFluidProperties.h.

Referenced by compute_p_sat().

◆ _p_c

const Real& StiffenedGasTwoPhaseFluidProperties::_p_c
protected

critical pressure

Definition at line 78 of file StiffenedGasTwoPhaseFluidProperties.h.

Referenced by p_critical().

◆ _p_inf_liquid

const Real StiffenedGasTwoPhaseFluidProperties::_p_inf_liquid
protected

◆ _p_inf_vapor

const Real StiffenedGasTwoPhaseFluidProperties::_p_inf_vapor
protected

◆ _p_sat_guess

const Real& StiffenedGasTwoPhaseFluidProperties::_p_sat_guess
protected

Initial guess for saturation pressure Newton solve.

Definition at line 96 of file StiffenedGasTwoPhaseFluidProperties.h.

Referenced by compute_p_sat().

◆ _p_sat_vec

std::vector<Real> StiffenedGasTwoPhaseFluidProperties::_p_sat_vec
protected

◆ _q_liquid

const Real StiffenedGasTwoPhaseFluidProperties::_q_liquid
protected

◆ _q_prime_liquid

const Real StiffenedGasTwoPhaseFluidProperties::_q_prime_liquid
protected

◆ _q_prime_vapor

const Real StiffenedGasTwoPhaseFluidProperties::_q_prime_vapor
protected

◆ _q_vapor

const Real StiffenedGasTwoPhaseFluidProperties::_q_vapor
protected

◆ _R

const Real FluidProperties::_R = 8.3144598
staticinherited

◆ _sigma_A

const Real& StiffenedGasTwoPhaseFluidProperties::_sigma_A
protected

'A' constant used in surface tension correlation

Definition at line 85 of file StiffenedGasTwoPhaseFluidProperties.h.

Referenced by dsigma_dT_from_T(), and sigma_from_T().

◆ _sigma_B

const Real& StiffenedGasTwoPhaseFluidProperties::_sigma_B
protected

'B' constant used in surface tension correlation

Definition at line 87 of file StiffenedGasTwoPhaseFluidProperties.h.

Referenced by dsigma_dT_from_T(), and sigma_from_T().

◆ _sigma_C

const Real& StiffenedGasTwoPhaseFluidProperties::_sigma_C
protected

'C' constant used in surface tension correlation

Definition at line 89 of file StiffenedGasTwoPhaseFluidProperties.h.

Referenced by dsigma_dT_from_T(), and sigma_from_T().

◆ _T_c

const Real& StiffenedGasTwoPhaseFluidProperties::_T_c
protected

critical temperature

Definition at line 76 of file StiffenedGasTwoPhaseFluidProperties.h.

Referenced by dsigma_dT_from_T(), and sigma_from_T().

◆ _T_c2k

const Real FluidProperties::_T_c2k
protectedinherited

◆ _T_sat_max

const Real& StiffenedGasTwoPhaseFluidProperties::_T_sat_max
protected

Maximum temperature value in saturation curve.

Definition at line 94 of file StiffenedGasTwoPhaseFluidProperties.h.

◆ _T_sat_min

const Real& StiffenedGasTwoPhaseFluidProperties::_T_sat_min
protected

Minimum temperature value in saturation curve.

Definition at line 92 of file StiffenedGasTwoPhaseFluidProperties.h.

Referenced by StiffenedGasTwoPhaseFluidProperties().

◆ _T_triple

const Real& StiffenedGasTwoPhaseFluidProperties::_T_triple
protected

Triple-point temperature.

Definition at line 80 of file StiffenedGasTwoPhaseFluidProperties.h.

Referenced by T_triple().

◆ _T_vec

std::vector<Real> StiffenedGasTwoPhaseFluidProperties::_T_vec
protected

◆ _vapor_name

const UserObjectName TwoPhaseFluidProperties::_vapor_name
protectedinherited

The name of the user object that provides vapor phase fluid properties.

Definition at line 111 of file TwoPhaseFluidProperties.h.

Referenced by TwoPhaseFluidProperties::getVaporName(), StiffenedGasTwoPhaseFluidProperties(), and TwoPhaseFluidProperties::TwoPhaseFluidProperties().


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