https://mooseframework.inl.gov
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 | 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. More...
 
virtual Real T_triple () const override
 Returns the triple-point temperature. More...
 
virtual Real L_fusion () const override
 Returns the latent heat of fusion. More...
 
virtual Real T_sat (Real pressure) const override
 Computes the saturation temperature at a pressure. More...
 
virtual Real p_sat (Real temperature) const override
 Computes the saturation pressure at a temperature. More...
 
virtual Real dT_sat_dp (Real pressure) const override
 Computes dT/dp along the saturation line. More...
 
virtual Real sigma_from_T (Real T) const override
 Computes surface tension sigma of saturated liquid in contact with saturated vapor. More...
 
virtual Real dsigma_dT_from_T (Real T) const override
 Computes dsigma/dT along the saturation line. More...
 
virtual bool supportsPhaseChange () const override
 Returns true if phase change is supported, otherwise false. More...
 
virtual const UserObjectName & getLiquidName () const
 Returns the name of the liquid single-phase fluid properties object. More...
 
virtual const UserObjectName & getVaporName () const
 Returns the name of the vapor single-phase fluid properties object. More...
 
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. More...
 
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
 
SubProblemgetSubProblem () const
 
bool shouldDuplicateInitialExecution () const
 
virtual Real spatialValue (const Point &) const
 
virtual const std::vector< Point > spatialPoints () 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)
 
void setPrimaryThreadCopy (UserObject *primary)
 
UserObjectprimaryThreadCopy ()
 
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
 
MooseAppgetMooseApp () const
 
const std::string & type () const
 
virtual const std::string & name () const
 
std::string typeAndName () const
 
std::string errorPrefix (const std::string &error_type) const
 
void callMooseError (std::string msg, const bool with_prefix) const
 
MooseObjectParameterName uniqueParameterName (const std::string &parameter_name) const
 
const InputParametersparameters () const
 
MooseObjectName uniqueName () const
 
const T & getParam (const std::string &name) const
 
std::vector< std::pair< T1, T2 > > getParam (const std::string &param1, const std::string &param2) const
 
const T * queryParam (const std::string &name) const
 
const T & getRenamedParam (const std::string &old_name, const std::string &new_name) const
 
getCheckedPointerParam (const std::string &name, const std::string &error_string="") const
 
bool isParamValid (const std::string &name) const
 
bool isParamSetByUser (const std::string &nm) const
 
void paramError (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
 
void connectControllableParams (const std::string &parameter, const std::string &object_type, const std::string &object_name, const std::string &object_parameter) const
 
void mooseError (Args &&... args) const
 
void mooseErrorNonPrefixed (Args &&... args) const
 
void mooseDocumentedError (const std::string &repo_name, const unsigned int issue_num, Args &&... args) const
 
void mooseWarning (Args &&... args) const
 
void mooseWarningNonPrefixed (Args &&... args) const
 
void mooseDeprecated (Args &&... args) const
 
void mooseInfo (Args &&... args) 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 T & getUserObject (const std::string &param_name, bool is_dependency=true) const
 
const T & getUserObjectByName (const UserObjectName &object_name, bool is_dependency=true) const
 
const UserObjectgetUserObjectBase (const std::string &param_name, bool is_dependency=true) const
 
const UserObjectgetUserObjectBaseByName (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)
 
std::pair< const MaterialProperty< T > *, std::set< SubdomainID > > getBlockMaterialProperty (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)
 
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 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
 
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
 
T & getSampler (const std::string &name)
 
SamplergetSampler (const std::string &name)
 
T & getSamplerByName (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 T & getDistribution (const std::string &name) const
 
const DistributiongetDistribution (const std::string &name) const
 
const T & getDistribution (const std::string &name) const
 
const DistributiongetDistributionByName (const DistributionName &name) const
 
const T & getDistributionByName (const std::string &name) const
 
const DistributiongetDistributionByName (const DistributionName &name) const
 
const T & getDistributionByName (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 sort (typename std::vector< T > &vector)
 
static void sortDFS (typename std::vector< T > &vector)
 
static void cyclicDependencyError (CyclicDependencyException< T2 > &e, const std::string &header)
 

Public Attributes

const ConsoleStream _console
 

Static Public Attributes

static const Real _R = 8.3144598
 Universal gas constant (J/mol/K) More...
 
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. More...
 
virtual void addPostprocessorDependencyHelper (const PostprocessorName &name) const override
 
virtual void addVectorPostprocessorDependencyHelper (const VectorPostprocessorName &name) const override
 
virtual void addUserObjectDependencyHelper (const UserObject &uo) const override
 
void addReporterDependencyHelper (const ReporterName &reporter_name) override
 
const ReporterNamegetReporterName (const std::string &param_name) const
 
T & declareRestartableData (const std::string &data_name, Args &&... args)
 
ManagedValue< T > declareManagedRestartableDataWithContext (const std::string &data_name, void *context, Args &&... args)
 
const T & getRestartableData (const std::string &data_name) const
 
T & declareRestartableDataWithContext (const std::string &data_name, void *context, Args &&... args)
 
T & declareRecoverableData (const std::string &data_name, Args &&... args)
 
T & declareRestartableDataWithObjectName (const std::string &data_name, const std::string &object_name, Args &&... args)
 
T & declareRestartableDataWithObjectNameWithContext (const std::string &data_name, const std::string &object_name, void *context, Args &&... args)
 
std::string restartableName (const std::string &data_name) const
 
const T & getMeshProperty (const std::string &data_name, const std::string &prefix)
 
const T & getMeshProperty (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)
 
void markMatPropRequested (const std::string &)
 
MaterialPropertyName getMaterialPropertyName (const std::string &name) const
 
void checkExecutionStage ()
 
const T & getReporterValue (const std::string &param_name, const std::size_t time_index=0)
 
const T & getReporterValue (const std::string &param_name, ReporterMode mode, const std::size_t time_index=0)
 
const T & getReporterValue (const std::string &param_name, const std::size_t time_index=0)
 
const T & getReporterValue (const std::string &param_name, ReporterMode mode, const std::size_t time_index=0)
 
const T & getReporterValueByName (const ReporterName &reporter_name, const std::size_t time_index=0)
 
const T & getReporterValueByName (const ReporterName &reporter_name, ReporterMode mode, const std::size_t time_index=0)
 
const T & getReporterValueByName (const ReporterName &reporter_name, const std::size_t time_index=0)
 
const T & getReporterValueByName (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)
 
void flagInvalidSolutionInternal (const InvalidSolutionID invalid_solution_id) const
 
InvalidSolutionID registerInvalidSolutionInternal (const std::string &message, const bool warning) const
 
Real getNaN () const
 Throws an error or returns a NaN with or without a warning, with a default message. More...
 
template<typename... Args>
Real getNaN (Args &&... args) const
 Throws an error or returns a NaN with or without a warning. More...
 
std::vector< RealgetNaNVector (const unsigned int &n) const
 Throws an error or returns NaNs with or without a warning, with a default message. More...
 
template<typename... Args>
std::vector< RealgetNaNVector (const unsigned int &n, Args &&... args) const
 Throws an error or returns NaNs with or without a warning. More...
 

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 More...
 
const Real_p_c
 critical pressure More...
 
const Real_T_triple
 Triple-point temperature. More...
 
const Real_L_fusion
 Latent heat of fusion. More...
 
const Real_sigma_A
 'A' constant used in surface tension correlation More...
 
const Real_sigma_B
 'B' constant used in surface tension correlation More...
 
const Real_sigma_C
 'C' constant used in surface tension correlation More...
 
const Real_T_sat_min
 Minimum temperature value in saturation curve. More...
 
const Real_T_sat_max
 Maximum temperature value in saturation curve. More...
 
const Real_p_sat_guess
 Initial guess for saturation pressure Newton solve. More...
 
const unsigned int_n_sat_samples
 Number of samples to take in saturation curve. More...
 
const Real _dT_sat
 Temperature increments on saturation curve. More...
 
const Real _A
 
const Real _B
 
const Real _C
 
const Real _D
 
const Real _newton_tol
 Newton solve tolerance. More...
 
const unsigned int _newton_max_iter
 Newton max number of iterations. More...
 
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. More...
 
const UserObjectName _vapor_name
 The name of the user object that provides vapor phase fluid properties. More...
 
const SinglePhaseFluidProperties_fp_liquid
 The user object that provides liquid phase fluid properties. More...
 
const SinglePhaseFluidProperties_fp_vapor
 The user object that provides vapor phase fluid properties. 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...
 
SubProblem_subproblem
 
FEProblemBase_fe_problem
 
SystemBase_sys
 
const THREAD_ID _tid
 
Assembly_assembly
 
const Moose::CoordinateSystemType_coord_sys
 
const bool _duplicate_initial_execution
 
std::set< std::string > _depend_uo
 
const bool & _enabled
 
MooseApp_app
 
const std::string _type
 
const std::string _name
 
const InputParameters_pars
 
Factory_factory
 
ActionFactory_action_factory
 
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 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? More...
 

Static Protected Attributes

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

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),
105  _newton_max_iter(200)
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);
149  _p_sat_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;
156  _p_sat_vec[i] = compute_p_sat(T);
157 
158  // increment sample temperature
159  T += _dT_sat;
160  }
161  }
162 
165 }
const SinglePhaseFluidProperties * _fp_vapor
The user object that provides vapor phase fluid properties.
NaNInterface(const MooseObject *moose_object)
Definition: NaNInterface.C:35
const UserObjectName _vapor_name
The name of the user object that provides vapor phase fluid properties.
const unsigned int & _n_sat_samples
Number of samples to take in saturation curve.
T & getUserObject(const std::string &name, unsigned int tid=0) const
const UserObjectName _liquid_name
The name of the user object that provides liquid phase fluid properties.
const Real _dT_sat
Temperature increments on saturation curve.
T & set(const std::string &name, bool quiet_mode=false)
TwoPhaseFluidProperties(const InputParameters &parameters)
InputParameters getValidParams(const std::string &name) const
const SinglePhaseFluidProperties * _fp_liquid
The user object that provides liquid phase fluid properties.
const Real & _sigma_B
&#39;B&#39; constant used in surface tension correlation
Factory & getFactory()
const Real & _T_sat_max
Maximum temperature value in saturation curve.
const unsigned int _newton_max_iter
Newton max number of iterations.
const Real & _sigma_C
&#39;C&#39; constant used in surface tension correlation
const Real & _T_triple
Triple-point temperature.
Common class for single phase fluid properties.
void setData(const std::vector< Real > &X, const std::vector< Real > &Y)
const Real & _p_sat_guess
Initial guess for saturation pressure Newton solve.
Real compute_p_sat(const Real &T) const
Computes saturation pressure value using Newton solve.
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
FEProblemBase & _fe_problem
virtual std::vector< std::shared_ptr< UserObject > > addUserObject(const std::string &user_object_name, const std::string &name, InputParameters &parameters)
const InputParameters & parameters() const
const Real & _T_sat_min
Minimum temperature value in saturation curve.
const Real & _sigma_A
&#39;A&#39; constant used in surface tension correlation

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.

Referenced by StiffenedGasTwoPhaseFluidProperties().

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 }
virtual Real p_sat(Real temperature) const override
Computes the saturation pressure at a temperature.
const unsigned int _newton_max_iter
Newton max number of iterations.
Real f(Real x)
Test function for Brents method.
const Real & _p_sat_guess
Initial guess for saturation pressure Newton solve.
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
void mooseError(Args &&... args) const

◆ 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 }
const Real & _sigma_B
&#39;B&#39; constant used in surface tension correlation
const Real & _sigma_C
&#39;C&#39; constant used in surface tension correlation
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
const Real & _sigma_A
&#39;A&#39; constant used in surface tension correlation
MooseUnits pow(const MooseUnits &, int)

◆ 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 {
230 }
T sampleDerivative(const T &x) const
static const std::string pressure
Definition: NS.h:56

◆ 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.

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

32 { return _liquid_name; }
const UserObjectName _liquid_name
The name of the user object that provides liquid phase fluid properties.

◆ 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  {
66  case (NAN_MESSAGE_WARNING):
67  mooseWarning(_moose_object->name(), ": ", std::forward<Args>(args)...);
68  break;
69  case (NAN_MESSAGE_EXCEPTION):
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 mooseError(Args &&... args)
void mooseWarning(Args &&... args)
virtual const std::string & name() const
enum NaNMessage _emit_on_nan
Raise mooseWarning or mooseError?
Definition: NaNInterface.h:41
const MooseObject *const _moose_object
Definition: NaNInterface.h:38

◆ 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.

Referenced by NaNInterfaceTestFluidProperties::returnNaNVector().

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.
Definition: NaNInterface.h:53

◆ 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  {
92  case (NAN_MESSAGE_WARNING):
93  mooseWarning(_moose_object->name(), ": ", std::forward<Args>(args)...);
94  break;
95  case (NAN_MESSAGE_EXCEPTION):
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  }
void mooseError(Args &&... args)
void mooseWarning(Args &&... args)
virtual const std::string & name() const
enum NaNMessage _emit_on_nan
Raise mooseWarning or mooseError?
Definition: NaNInterface.h:41
const MooseObject *const _moose_object
Definition: NaNInterface.h:38

◆ 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.

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

37 { return _vapor_name; }
const UserObjectName _vapor_name
The name of the user object that provides vapor phase fluid properties.

◆ h_lat() [1/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.

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

93 {
94  return _fp_vapor->h_from_p_T(p, T) - _fp_liquid->h_from_p_T(p, T);
95 }
const SinglePhaseFluidProperties * _fp_vapor
The user object that provides vapor phase fluid properties.
const SinglePhaseFluidProperties * _fp_liquid
The user object that provides liquid phase fluid properties.

◆ h_lat() [2/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 SinglePhaseFluidProperties * _fp_vapor
The user object that provides vapor phase fluid properties.
const SinglePhaseFluidProperties * _fp_liquid
The user object that provides liquid phase fluid properties.

◆ 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]

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.

Referenced by compute_p_sat().

193 {
195 }
T sample(const T &x) const
static const std::string temperature
Definition: NS.h:59

◆ p_sat() [2/2]

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

Reimplemented in TwoPhaseNCGFluidProperties, and TwoPhaseFluidPropertiesIndependent.

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.
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real

◆ sigma_from_T() [1/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 }
const Real & _sigma_B
&#39;B&#39; constant used in surface tension correlation
const Real & _sigma_C
&#39;C&#39; constant used in surface tension correlation
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
const Real & _sigma_A
&#39;A&#39; constant used in surface tension correlation
MooseUnits pow(const MooseUnits &, int)

◆ sigma_from_T() [2/2]

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

Reimplemented in TwoPhaseFluidPropertiesIndependent.

Definition at line 115 of file TwoPhaseFluidProperties.C.

116 {
117  const Real T_real = T.value();
118  const Real sigma_real = sigma_from_T(T_real);
119  const Real dsigma_dT = dsigma_dT_from_T(T_real);
120 
121  ADReal sigma = sigma_real;
122  sigma.derivatives() = T.derivatives() * dsigma_dT;
123  return sigma;
124 }
DualNumber< Real, DNDerivativeType, true > ADReal
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
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.

◆ 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]

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 sample(const T &x) const
static const std::string pressure
Definition: NS.h:56

◆ T_sat() [2/2]

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

Reimplemented in TwoPhaseNCGFluidProperties, and TwoPhaseFluidPropertiesIndependent.

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 }
DualNumber< Real, DNDerivativeType, true > ADReal
virtual Real dT_sat_dp(Real p) const =0
Computes dT/dp along the saturation line.
virtual Real T_sat(Real p) const =0
Computes the saturation temperature at a pressure.
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real

◆ 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 }
const Real & _T_triple
Triple-point temperature.

◆ 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)
static InputParameters validParams()
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
void addClassDescription(const std::string &doc_string)
static InputParameters validParams()
Definition: NaNInterface.C:15

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

Flag to set unimplemented Jacobian entries to zero.

Definition at line 47 of file FluidProperties.h.

Referenced by VaporMixtureFluidProperties::imperfectJacobianMessage(), and SinglePhaseFluidProperties::unimplementedDerivativeMethod().

◆ _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: