https://mooseframework.inl.gov
Public Types | Public Member Functions | Static Public Member Functions | Public Attributes | Static Public Attributes | Protected Member Functions | Static Protected Member Functions | Protected Attributes | Static Protected Attributes | List of all members
PorousFlowWaterVapor Class Reference

Specialized class for water and vapor mixture using pressure and enthalpy. More...

#include <PorousFlowWaterVapor.h>

Inheritance diagram for PorousFlowWaterVapor:
[legend]

Public Types

typedef DataFileName DataFileParameterType
 

Public Member Functions

 PorousFlowWaterVapor (const InputParameters &parameters)
 
virtual std::string fluidStateName () const override
 Name of FluidState. More...
 
void thermophysicalProperties (Real pressure, Real enthalpy, unsigned int qp, std::vector< FluidStateProperties > &fsp) const override
 Determines the complete thermophysical state of the system for a given set of primary variables. More...
 
void thermophysicalProperties (const ADReal &pressure, const ADReal &enthalpy, unsigned int qp, std::vector< FluidStateProperties > &fsp) const override
 
void thermophysicalProperties (const ADReal &pressure, const ADReal &enthalpy, unsigned int qp, FluidStatePhaseEnum &phase_state, std::vector< FluidStateProperties > &fsp) const
 
unsigned int aqueousComponentIndex () const
 The index of the aqueous fluid component. More...
 
unsigned int gasComponentIndex () const
 The index of the gas fluid component. More...
 
unsigned int getPressureIndex () const
 
unsigned int getEnthalpyIndex () const
 
void initialize () final
 
void execute () final
 
void finalize () final
 
unsigned int numPhases () const
 The maximum number of phases in this model. More...
 
unsigned int numComponents () const
 The maximum number of components in this model. More...
 
unsigned int aqueousPhaseIndex () const
 The index of the aqueous phase. More...
 
unsigned int gasPhaseIndex () const
 The index of the gas phase. More...
 
void clearFluidStateProperties (std::vector< FluidStateProperties > &fsp) const
 Clears the contents of the FluidStateProperties data structure. More...
 
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
 
virtual bool needThreadedCopy () 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
 
virtual void threadJoin (const UserObject &) override
 
virtual void threadJoin (const UserObject &) override
 
virtual void subdomainSetup () override
 
virtual void subdomainSetup () override
 
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 constexpr PropertyValue::id_type default_property_id
 
static constexpr PropertyValue::id_type zero_property_id
 
static constexpr auto SYSTEM
 
static constexpr auto NAME
 

Protected Member Functions

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)
 

Static Protected Member Functions

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

Protected Attributes

const SinglePhaseFluidProperties_water_fp
 Fluid properties UserObject for water. More...
 
const Real _Mh2o
 Molar mass of water (kg/mol) More...
 
const Real _p_triple
 Triple point pressure of water (Pa) More...
 
const Real _p_critical
 Critical pressure of water (Pa) More...
 
const Real _T_triple
 Triple point temperature of water (K) More...
 
const Real _T_critical
 Critical temperature of water (K) More...
 
const unsigned int _fluid_component
 Fluid component number (only one fluid component in all phases) More...
 
const unsigned int _pidx
 Index of derivative wrt pressure. More...
 
const unsigned int _hidx
 Index of derivative wrt enthalpy. More...
 
const Real _dT
 Perturbation applied to saturation temperature to move to gas/liquid phase. More...
 
unsigned int _num_phases
 Number of phases. More...
 
unsigned int _num_components
 Number of components. More...
 
const unsigned int _aqueous_phase_number
 Phase number of the aqueous phase. More...
 
unsigned int _gas_phase_number
 Phase number of the gas phase. More...
 
const Real _R
 Universal gas constant (J/mol/K) More...
 
const Real _T_c2k
 Conversion from C to K. More...
 
const PorousFlowCapillaryPressure_pc
 Capillary pressure UserObject. More...
 
FluidStateProperties _empty_fsp
 Empty FluidStateProperties object. 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
 

Static Protected Attributes

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

Detailed Description

Specialized class for water and vapor mixture using pressure and enthalpy.

Note: It is important to note that this class must be used in a non-isothernal setting (i.e., with both fluid and heat transport) in order for the problem to be well posed.

Definition at line 22 of file PorousFlowWaterVapor.h.

Constructor & Destructor Documentation

◆ PorousFlowWaterVapor()

PorousFlowWaterVapor::PorousFlowWaterVapor ( const InputParameters parameters)

Definition at line 26 of file PorousFlowWaterVapor.C.

28  _water_fp(getUserObject<SinglePhaseFluidProperties>("water_fp")),
34 {
35  // Check that the correct FluidProperties UserObjects have been provided
36  if (_water_fp.fluidName() != "water")
37  paramError("water_fp", "A valid water FluidProperties UserObject must be provided in water_fp");
38 
39  // Set the number of phases and components, and their indexes
40  _num_phases = 2;
41  _num_components = 1;
43 
44  // Check that _aqueous_phase_number is <= total number of phases
46  paramError("liquid_phase_number",
47  "This value is larger than the possible number of phases ",
48  _num_phases);
49 
50  // Check that _fluid_component is <= total number of fluid components
52  paramError("fluid_component",
53  "This value is larger than the possible number of fluid components",
55 
57 }
const unsigned int _aqueous_phase_number
Phase number of the aqueous phase.
unsigned int _num_phases
Number of phases.
virtual Real triplePointTemperature() const
Triple point temperature.
virtual Real molarMass() const
Molar mass [kg/mol].
unsigned int _gas_phase_number
Phase number of the gas phase.
unsigned int _num_components
Number of components.
PorousFlowFluidStateSingleComponentBase(const InputParameters &parameters)
const Real _p_critical
Critical pressure of water (Pa)
const Real _Mh2o
Molar mass of water (kg/mol)
const Real _T_triple
Triple point temperature of water (K)
const Real _T_critical
Critical temperature of water (K)
virtual Real criticalTemperature() const
Critical temperature.
AD data structure to pass calculated thermophysical properties.
void paramError(const std::string &param, Args... args) const
virtual Real triplePointPressure() const
Triple point pressure.
const Real _p_triple
Triple point pressure of water (Pa)
const SinglePhaseFluidProperties & _water_fp
Fluid properties UserObject for water.
virtual Real criticalPressure() const
Critical pressure.
e e e e s T T T T T rho v v T e p T T virtual T std::string fluidName() const
Fluid name.
const InputParameters & parameters() const
FluidStateProperties _empty_fsp
Empty FluidStateProperties object.
const unsigned int _fluid_component
Fluid component number (only one fluid component in all phases)

Member Function Documentation

◆ aqueousComponentIndex()

unsigned int PorousFlowFluidStateSingleComponentBase::aqueousComponentIndex ( ) const
inlineinherited

The index of the aqueous fluid component.

Returns
aqueous fluid component number

Definition at line 29 of file PorousFlowFluidStateSingleComponentBase.h.

29 { return _fluid_component; };
const unsigned int _fluid_component
Fluid component number (only one fluid component in all phases)

◆ aqueousPhaseIndex()

unsigned int PorousFlowFluidStateBase::aqueousPhaseIndex ( ) const
inlineinherited

The index of the aqueous phase.

Returns
aqueous phase number

Definition at line 77 of file PorousFlowFluidStateBase.h.

77 { return _aqueous_phase_number; };
const unsigned int _aqueous_phase_number
Phase number of the aqueous phase.

◆ clearFluidStateProperties()

void PorousFlowFluidStateBase::clearFluidStateProperties ( std::vector< FluidStateProperties > &  fsp) const
inherited

Clears the contents of the FluidStateProperties data structure.

Parameters
[out]fspFluidStateProperties data structure with all data initialized to 0

Definition at line 33 of file PorousFlowFluidStateBase.C.

Referenced by PorousFlowWaterNCG::thermophysicalProperties(), and PorousFlowBrineCO2::thermophysicalProperties().

34 {
35  std::fill(fsp.begin(), fsp.end(), _empty_fsp);
36 }
FluidStateProperties _empty_fsp
Empty FluidStateProperties object.

◆ execute()

void PorousFlowFluidStateBase::execute ( )
inlinefinalvirtualinherited

Implements GeneralUserObject.

Definition at line 58 of file PorousFlowFluidStateBase.h.

58 {};

◆ finalize()

void PorousFlowFluidStateBase::finalize ( )
inlinefinalvirtualinherited

Implements GeneralUserObject.

Definition at line 59 of file PorousFlowFluidStateBase.h.

59 {};

◆ fluidStateName()

std::string PorousFlowWaterVapor::fluidStateName ( ) const
overridevirtual

Name of FluidState.

Implements PorousFlowFluidStateBase.

Definition at line 60 of file PorousFlowWaterVapor.C.

61 {
62  return "water-vapor";
63 }

◆ gasComponentIndex()

unsigned int PorousFlowFluidStateSingleComponentBase::gasComponentIndex ( ) const
inlineinherited

The index of the gas fluid component.

Returns
gas fluid component number

Definition at line 35 of file PorousFlowFluidStateSingleComponentBase.h.

35 { return _fluid_component; };
const unsigned int _fluid_component
Fluid component number (only one fluid component in all phases)

◆ gasPhaseIndex()

unsigned int PorousFlowFluidStateBase::gasPhaseIndex ( ) const
inlineinherited

The index of the gas phase.

Returns
gas phase number

Definition at line 83 of file PorousFlowFluidStateBase.h.

83 { return _gas_phase_number; };
unsigned int _gas_phase_number
Phase number of the gas phase.

◆ getEnthalpyIndex()

unsigned int PorousFlowFluidStateSingleComponentBase::getEnthalpyIndex ( ) const
inlineinherited

Definition at line 57 of file PorousFlowFluidStateSingleComponentBase.h.

57 { return _hidx; };
const unsigned int _hidx
Index of derivative wrt enthalpy.

◆ getPressureIndex()

unsigned int PorousFlowFluidStateSingleComponentBase::getPressureIndex ( ) const
inlineinherited

Definition at line 56 of file PorousFlowFluidStateSingleComponentBase.h.

56 { return _pidx; };
const unsigned int _pidx
Index of derivative wrt pressure.

◆ initialize()

void PorousFlowFluidStateBase::initialize ( )
inlinefinalvirtualinherited

Implements GeneralUserObject.

Definition at line 57 of file PorousFlowFluidStateBase.h.

57 {};

◆ numComponents()

unsigned int PorousFlowFluidStateBase::numComponents ( ) const
inlineinherited

The maximum number of components in this model.

Returns
number of components

Definition at line 71 of file PorousFlowFluidStateBase.h.

71 { return _num_components; };
unsigned int _num_components
Number of components.

◆ numPhases()

unsigned int PorousFlowFluidStateBase::numPhases ( ) const
inlineinherited

The maximum number of phases in this model.

Returns
number of phases

Definition at line 65 of file PorousFlowFluidStateBase.h.

Referenced by PorousFlowFluidStateSingleComponentTempl< is_ad >::PorousFlowFluidStateSingleComponentTempl(), and PorousFlowFluidStateTempl< is_ad >::PorousFlowFluidStateTempl().

65 { return _num_phases; };
unsigned int _num_phases
Number of phases.

◆ thermophysicalProperties() [1/3]

void PorousFlowWaterVapor::thermophysicalProperties ( Real  pressure,
Real  enthalpy,
unsigned int  qp,
std::vector< FluidStateProperties > &  fsp 
) const
overridevirtual

Determines the complete thermophysical state of the system for a given set of primary variables.

Parameters
pressuregas phase pressure (Pa)
enthalpyfluid enthalpy (J/kg)
qpquadpoint index
[out]fspthe FluidStateProperties struct containing all properties

Implements PorousFlowFluidStateSingleComponentBase.

Definition at line 66 of file PorousFlowWaterVapor.C.

Referenced by thermophysicalProperties().

70 {
71  // AD versions of primary variables
72  ADReal p = pressure;
73  Moose::derivInsert(p.derivatives(), _pidx, 1.0);
74  ADReal h = enthalpy;
75  Moose::derivInsert(h.derivatives(), _hidx, 1.0);
76 
77  thermophysicalProperties(p, h, qp, fsp);
78 }
const unsigned int _pidx
Index of derivative wrt pressure.
const unsigned int _hidx
Index of derivative wrt enthalpy.
DualNumber< Real, DNDerivativeType, true > ADReal
static const std::string pressure
Definition: NS.h:56
void derivInsert(SemiDynamicSparseNumberArray< Real, libMesh::dof_id_type, NWrapper< N >> &derivs, libMesh::dof_id_type index, Real value)
void thermophysicalProperties(Real pressure, Real enthalpy, unsigned int qp, std::vector< FluidStateProperties > &fsp) const override
Determines the complete thermophysical state of the system for a given set of primary variables...

◆ thermophysicalProperties() [2/3]

void PorousFlowWaterVapor::thermophysicalProperties ( const ADReal pressure,
const ADReal enthalpy,
unsigned int  qp,
std::vector< FluidStateProperties > &  fsp 
) const
overridevirtual

Implements PorousFlowFluidStateSingleComponentBase.

Definition at line 81 of file PorousFlowWaterVapor.C.

85 {
86  FluidStatePhaseEnum phase_state;
87 
88  thermophysicalProperties(pressure, enthalpy, qp, phase_state, fsp);
89 }
FluidStatePhaseEnum
Phase state enum.
static const std::string pressure
Definition: NS.h:56
void thermophysicalProperties(Real pressure, Real enthalpy, unsigned int qp, std::vector< FluidStateProperties > &fsp) const override
Determines the complete thermophysical state of the system for a given set of primary variables...

◆ thermophysicalProperties() [3/3]

void PorousFlowWaterVapor::thermophysicalProperties ( const ADReal pressure,
const ADReal enthalpy,
unsigned int  qp,
FluidStatePhaseEnum phase_state,
std::vector< FluidStateProperties > &  fsp 
) const

Definition at line 92 of file PorousFlowWaterVapor.C.

97 {
100 
101  ADReal Tsat = 0.0;
102  ADReal hl = 0.0;
103  ADReal hv = 0.0;
104 
105  // Determine the phase state of the system
106  if (pressure.value() >= _p_triple && pressure.value() <= _p_critical)
107  {
108  // Saturation temperature at the given pressure
110 
111  // Enthalpy of saturated liquid and saturated vapor
112  hl = _water_fp.h_from_p_T(pressure, Tsat - _dT);
113  hv = _water_fp.h_from_p_T(pressure, Tsat + _dT);
114 
115  if (enthalpy.value() < hl.value())
116  phase_state = FluidStatePhaseEnum::LIQUID;
117 
118  else if (enthalpy.value() >= hl.value() && enthalpy.value() <= hv.value())
119  phase_state = FluidStatePhaseEnum::TWOPHASE;
120 
121  else // h > hv
122  phase_state = FluidStatePhaseEnum::GAS;
123  }
124  else // p.value() > _p_critical
125  {
126  // Check whether the phase point is in the liquid or vapor state
127  const ADReal T = _water_fp.T_from_p_h(pressure, enthalpy);
128 
129  if (T.value() <= _T_critical)
130  phase_state = FluidStatePhaseEnum::LIQUID;
131  else
132  {
133  // The supercritical state is treated as a gas
134  phase_state = FluidStatePhaseEnum::GAS;
135  }
136  }
137 
138  // Calculate the properties for each phase as required
139  switch (phase_state)
140  {
142  {
143  gas.pressure = pressure + _pc.capillaryPressure(0.0, qp);
144  gas.saturation = 1.0;
145 
146  const ADReal T = _water_fp.T_from_p_h(gas.pressure, enthalpy);
147 
148  gas.temperature = T;
149  liquid.temperature = T;
150 
151  gas.density = _water_fp.rho_from_p_T(gas.pressure, T);
152  gas.viscosity = _water_fp.mu_from_p_T(gas.pressure, T);
153  gas.enthalpy = enthalpy;
154  gas.internal_energy = _water_fp.e_from_p_T(gas.pressure, T);
155  gas.mass_fraction[_fluid_component] = 1.0;
156 
157  break;
158  }
159 
161  {
162  const ADReal T = _water_fp.T_from_p_h(pressure, enthalpy);
163 
164  liquid.pressure = pressure;
165  liquid.temperature = T;
166  liquid.density = _water_fp.rho_from_p_T(pressure, T);
167  liquid.viscosity = _water_fp.mu_from_p_T(pressure, T);
168  liquid.enthalpy = enthalpy;
169  liquid.internal_energy = _water_fp.e_from_p_T(pressure, T);
170  liquid.saturation = 1.0;
171  liquid.mass_fraction[_fluid_component] = 1.0;
172 
173  break;
174  }
175 
177  {
178  // Latent heat of vaporization
179  const ADReal hvl = hv - hl;
180 
181  // Vapor quality
182  const ADReal X = (enthalpy - hl) / hvl;
183 
184  // Perturbed saturation temperature to ensure that the correct
185  // phase properties are calculated
186  const ADReal Tsatl = Tsat - _dT;
187  const ADReal Tsatv = Tsat + _dT;
188 
189  // Density
190  const ADReal rhol = _water_fp.rho_from_p_T(pressure, Tsatl);
191  const ADReal rhov = _water_fp.rho_from_p_T(pressure, Tsatv);
192 
193  // Vapor (gas) saturation
194  const ADReal satv = X * rhol / (rhov + X * (rhol - rhov));
195 
196  gas.temperature = Tsat;
197  gas.density = rhov;
198  gas.viscosity = _water_fp.mu_from_p_T(pressure, Tsatv);
199  gas.enthalpy = hv;
200  gas.internal_energy = _water_fp.e_from_p_T(pressure, Tsatv);
201  gas.saturation = satv;
202 
203  liquid.temperature = Tsat;
204  liquid.density = rhol;
205  liquid.viscosity = _water_fp.mu_from_p_T(pressure, Tsatl);
206  liquid.enthalpy = hl;
207  liquid.internal_energy = _water_fp.e_from_p_T(pressure, Tsatl);
208  liquid.saturation = 1.0 - satv;
209 
210  liquid.pressure = pressure;
211  gas.pressure = pressure + _pc.capillaryPressure(liquid.saturation, qp);
212 
213  gas.mass_fraction[_fluid_component] = 1.0;
214  liquid.mass_fraction[_fluid_component] = 1.0;
215 
216  break;
217  }
218  }
219 }
const unsigned int _aqueous_phase_number
Phase number of the aqueous phase.
unsigned int _gas_phase_number
Phase number of the gas phase.
const Real _p_critical
Critical pressure of water (Pa)
DualNumber< Real, DNDerivativeType, true > ADReal
const Real _T_critical
Critical temperature of water (K)
virtual Real vaporTemperature(Real p) const
Vapor temperature.
virtual Real capillaryPressure(Real saturation, unsigned qp=0) const
Capillary pressure is calculated as a function of true saturation.
AD data structure to pass calculated thermophysical properties.
const Real _p_triple
Triple point pressure of water (Pa)
const SinglePhaseFluidProperties & _water_fp
Fluid properties UserObject for water.
const PorousFlowCapillaryPressure & _pc
Capillary pressure UserObject.
const Real _dT
Perturbation applied to saturation temperature to move to gas/liquid phase.
static const std::string pressure
Definition: NS.h:56
const unsigned int _fluid_component
Fluid component number (only one fluid component in all phases)
std::vector< ADReal > mass_fraction

◆ validParams()

InputParameters PorousFlowWaterVapor::validParams ( )
static

Definition at line 18 of file PorousFlowWaterVapor.C.

19 {
21  params.addRequiredParam<UserObjectName>("water_fp", "The name of the user object for water");
22  params.addClassDescription("Fluid state class for water and vapor");
23  return params;
24 }
void addRequiredParam(const std::string &name, const std::string &doc_string)
void addClassDescription(const std::string &doc_string)

Member Data Documentation

◆ _aqueous_phase_number

const unsigned int PorousFlowFluidStateBase::_aqueous_phase_number
protectedinherited

◆ _dT

const Real PorousFlowFluidStateSingleComponentBase::_dT
protectedinherited

Perturbation applied to saturation temperature to move to gas/liquid phase.

Definition at line 67 of file PorousFlowFluidStateSingleComponentBase.h.

Referenced by thermophysicalProperties().

◆ _empty_fsp

FluidStateProperties PorousFlowFluidStateBase::_empty_fsp
protectedinherited

◆ _fluid_component

const unsigned int PorousFlowFluidStateSingleComponentBase::_fluid_component
protectedinherited

◆ _gas_phase_number

unsigned int PorousFlowFluidStateBase::_gas_phase_number
protectedinherited

◆ _hidx

const unsigned int PorousFlowFluidStateSingleComponentBase::_hidx
protectedinherited

Index of derivative wrt enthalpy.

Definition at line 65 of file PorousFlowFluidStateSingleComponentBase.h.

Referenced by PorousFlowFluidStateSingleComponentBase::getEnthalpyIndex(), and thermophysicalProperties().

◆ _Mh2o

const Real PorousFlowWaterVapor::_Mh2o
protected

Molar mass of water (kg/mol)

Definition at line 51 of file PorousFlowWaterVapor.h.

◆ _num_components

unsigned int PorousFlowFluidStateBase::_num_components
protectedinherited

◆ _num_phases

unsigned int PorousFlowFluidStateBase::_num_phases
protectedinherited

◆ _p_critical

const Real PorousFlowWaterVapor::_p_critical
protected

Critical pressure of water (Pa)

Definition at line 55 of file PorousFlowWaterVapor.h.

Referenced by thermophysicalProperties().

◆ _p_triple

const Real PorousFlowWaterVapor::_p_triple
protected

Triple point pressure of water (Pa)

Definition at line 53 of file PorousFlowWaterVapor.h.

Referenced by thermophysicalProperties().

◆ _pc

const PorousFlowCapillaryPressure& PorousFlowFluidStateBase::_pc
protectedinherited

◆ _pidx

const unsigned int PorousFlowFluidStateSingleComponentBase::_pidx
protectedinherited

Index of derivative wrt pressure.

Definition at line 63 of file PorousFlowFluidStateSingleComponentBase.h.

Referenced by PorousFlowFluidStateSingleComponentBase::getPressureIndex(), and thermophysicalProperties().

◆ _R

const Real PorousFlowFluidStateBase::_R
protectedinherited

Universal gas constant (J/mol/K)

Definition at line 106 of file PorousFlowFluidStateBase.h.

Referenced by PorousFlowWaterNCG::enthalpyOfDissolution(), and PorousFlowBrineCO2::enthalpyOfDissolutionGas().

◆ _T_c2k

const Real PorousFlowFluidStateBase::_T_c2k
protectedinherited

◆ _T_critical

const Real PorousFlowWaterVapor::_T_critical
protected

Critical temperature of water (K)

Definition at line 59 of file PorousFlowWaterVapor.h.

Referenced by thermophysicalProperties().

◆ _T_triple

const Real PorousFlowWaterVapor::_T_triple
protected

Triple point temperature of water (K)

Definition at line 57 of file PorousFlowWaterVapor.h.

◆ _water_fp

const SinglePhaseFluidProperties& PorousFlowWaterVapor::_water_fp
protected

Fluid properties UserObject for water.

Definition at line 49 of file PorousFlowWaterVapor.h.

Referenced by PorousFlowWaterVapor(), and thermophysicalProperties().


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