https://mooseframework.inl.gov
Loading...
Searching...
No Matches
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 | Private Member Functions | Static Private Member Functions | Private Attributes | List of all members
FluidPropertiesInterrogator Class Reference

User object for querying a single-phase or two-phase fluid properties object. More...

#include <FluidPropertiesInterrogator.h>

Inheritance diagram for FluidPropertiesInterrogator:
[legend]

Public Types

typedef DataFileName DataFileParameterType
 

Public Member Functions

 FluidPropertiesInterrogator (const InputParameters &parameters)
 
virtual void initialize () override
 
virtual void execute () override
 
virtual void finalize () override
 
virtual Real spatialValue (const Point &) const
 
virtual const std::vector< Point > spatialPoints () const
 
void setPrimaryThreadCopy (UserObject *primary)
 
UserObjectprimaryThreadCopy ()
 
SubProblemgetSubProblem () const
 
bool shouldDuplicateInitialExecution () const
 
void gatherSum (T &value)
 
void gatherMax (T &value)
 
void gatherMin (T &value)
 
void gatherProxyValueMax (T1 &proxy, T2 &value)
 
void gatherProxyValueMin (T1 &proxy, T2 &value)
 
std::set< UserObjectName > getDependObjects () const
 
const std::set< std::string > & getRequestedItems () override
 
const std::set< std::string > & getSuppliedItems () override
 
unsigned int systemNumber () const
 
virtual bool needThreadedCopy () const
 
virtual bool enabled () const
 
std::shared_ptr< MooseObjectgetSharedPtr ()
 
std::shared_ptr< const MooseObjectgetSharedPtr () const
 
bool isKokkosObject () const
 
MooseAppgetMooseApp () const
 
const std::string & type () const
 
const std::string & name () const
 
std::string typeAndName () const
 
MooseObjectParameterName uniqueParameterName (const std::string &parameter_name) const
 
MooseObjectName uniqueName () const
 
const InputParametersparameters () const
 
const hit::Node * getHitNode () const
 
bool hasBase () const
 
const std::string & getBase () const
 
const TgetParam (const std::string &name) const
 
std::vector< std::pair< T1, T2 > > getParam (const std::string &param1, const std::string &param2) const
 
const TqueryParam (const std::string &name) const
 
const TgetRenamedParam (const std::string &old_name, const std::string &new_name) const
 
T getCheckedPointerParam (const std::string &name, const std::string &error_string="") const
 
bool isParamValid (const std::string &name) const
 
bool isParamSetByUser (const std::string &name) const
 
void connectControllableParams (const std::string &parameter, const std::string &object_type, const std::string &object_name, const std::string &object_parameter) const
 
void paramError (const std::string &param, Args... args) const
 
void paramWarning (const std::string &param, Args... args) const
 
void paramWarning (const std::string &param, Args... args) const
 
void paramInfo (const std::string &param, Args... args) const
 
std::string messagePrefix (const bool hit_prefix=true) const
 
std::string errorPrefix (const std::string &) const
 
void mooseError (Args &&... args) const
 
void mooseDocumentedError (const std::string &repo_name, const unsigned int issue_num, Args &&... args) const
 
void mooseErrorNonPrefixed (Args &&... args) const
 
void mooseWarning (Args &&... args) const
 
void mooseWarning (Args &&... args) const
 
void mooseWarningNonPrefixed (Args &&... args) const
 
void mooseWarningNonPrefixed (Args &&... args) const
 
void mooseDeprecated (Args &&... args) const
 
void mooseDeprecated (Args &&... args) const
 
void mooseDeprecatedNoTrace (Args &&... args) const
 
void mooseInfo (Args &&... args) const
 
void callMooseError (std::string msg, const bool with_prefix, const hit::Node *node=nullptr, const bool show_trace=true) const
 
std::string getDataFileName (const std::string &param) const
 
std::string getDataFileNameByName (const std::string &relative_path) const
 
std::string getDataFilePath (const std::string &relative_path) const
 
virtual void initialSetup ()
 
virtual void timestepSetup ()
 
virtual void jacobianSetup ()
 
virtual void residualSetup ()
 
virtual void customSetup (const ExecFlagType &)
 
const ExecFlagEnumgetExecuteOnEnum () const
 
UserObjectName getUserObjectName (const std::string &param_name) const
 
const TgetUserObject (const std::string &param_name, bool is_dependency=true) const
 
const TgetUserObjectByName (const UserObjectName &object_name, bool is_dependency=true) const
 
const UserObjectBasegetUserObjectBase (const std::string &param_name, bool is_dependency=true) const
 
const UserObjectBasegetUserObjectBaseByName (const UserObjectName &object_name, bool is_dependency=true) const
 
const std::vector< MooseVariableScalar * > & getCoupledMooseScalarVars ()
 
const std::set< TagID > & getScalarVariableCoupleableVectorTags () const
 
const std::set< TagID > & getScalarVariableCoupleableMatrixTags () const
 
const GenericMaterialProperty< T, is_ad > & getGenericMaterialProperty (const std::string &name, MaterialData &material_data, const unsigned int state=0)
 
const GenericMaterialProperty< T, is_ad > & getGenericMaterialProperty (const std::string &name, const unsigned int state=0)
 
const GenericMaterialProperty< T, is_ad > & getGenericMaterialProperty (const std::string &name, const unsigned int state=0)
 
const MaterialProperty< T > & getMaterialProperty (const std::string &name, MaterialData &material_data, const unsigned int state=0)
 
const MaterialProperty< T > & getMaterialProperty (const std::string &name, const unsigned int state=0)
 
const MaterialProperty< T > & getMaterialProperty (const std::string &name, const unsigned int state=0)
 
const ADMaterialProperty< T > & getADMaterialProperty (const std::string &name, MaterialData &material_data)
 
const ADMaterialProperty< T > & getADMaterialProperty (const std::string &name)
 
const ADMaterialProperty< T > & getADMaterialProperty (const std::string &name)
 
const MaterialProperty< T > & getMaterialPropertyOld (const std::string &name, MaterialData &material_data)
 
const MaterialProperty< T > & getMaterialPropertyOld (const std::string &name)
 
const MaterialProperty< T > & getMaterialPropertyOld (const std::string &name)
 
const MaterialProperty< T > & getMaterialPropertyOlder (const std::string &name, MaterialData &material_data)
 
const MaterialProperty< T > & getMaterialPropertyOlder (const std::string &name)
 
const MaterialProperty< T > & getMaterialPropertyOlder (const std::string &name)
 
const GenericMaterialProperty< T, is_ad > & getGenericMaterialPropertyByName (const MaterialPropertyName &name, MaterialData &material_data, const unsigned int state)
 
const GenericMaterialProperty< T, is_ad > & getGenericMaterialPropertyByName (const MaterialPropertyName &name, const unsigned int state=0)
 
const GenericMaterialProperty< T, is_ad > & getGenericMaterialPropertyByName (const MaterialPropertyName &name, const unsigned int state=0)
 
const MaterialProperty< T > & getMaterialPropertyByName (const MaterialPropertyName &name, MaterialData &material_data, const unsigned int state=0)
 
const MaterialProperty< T > & getMaterialPropertyByName (const MaterialPropertyName &name, const unsigned int state=0)
 
const MaterialProperty< T > & getMaterialPropertyByName (const MaterialPropertyName &name, const unsigned int state=0)
 
const ADMaterialProperty< T > & getADMaterialPropertyByName (const MaterialPropertyName &name, MaterialData &material_data)
 
const ADMaterialProperty< T > & getADMaterialPropertyByName (const MaterialPropertyName &name)
 
const ADMaterialProperty< T > & getADMaterialPropertyByName (const MaterialPropertyName &name)
 
const MaterialProperty< T > & getMaterialPropertyOldByName (const MaterialPropertyName &name, MaterialData &material_data)
 
const MaterialProperty< T > & getMaterialPropertyOldByName (const MaterialPropertyName &name)
 
const MaterialProperty< T > & getMaterialPropertyOldByName (const MaterialPropertyName &name)
 
const MaterialProperty< T > & getMaterialPropertyOlderByName (const MaterialPropertyName &name, MaterialData &material_data)
 
const MaterialProperty< T > & getMaterialPropertyOlderByName (const MaterialPropertyName &name)
 
const MaterialProperty< T > & getMaterialPropertyOlderByName (const MaterialPropertyName &name)
 
Moose::Kokkos::MaterialProperty< T, dimension > getKokkosMaterialPropertyByName (const std::string &prop_name_in)
 
Moose::Kokkos::MaterialProperty< T, dimension > getKokkosMaterialPropertyOldByName (const std::string &prop_name)
 
Moose::Kokkos::MaterialProperty< T, dimension > getKokkosMaterialPropertyOlderByName (const std::string &prop_name)
 
Moose::Kokkos::MaterialProperty< T, dimension > getKokkosMaterialProperty (const std::string &name)
 
Moose::Kokkos::MaterialProperty< T, dimension > getKokkosMaterialPropertyOld (const std::string &name)
 
Moose::Kokkos::MaterialProperty< T, dimension > getKokkosMaterialPropertyOlder (const std::string &name)
 
std::pair< const MaterialProperty< T > *, std::set< SubdomainID > > getBlockMaterialProperty (const MaterialPropertyName &name)
 
std::pair< Moose::Kokkos::MaterialProperty< T, dimension >, std::set< SubdomainID > > getKokkosBlockMaterialProperty (const MaterialPropertyName &name)
 
const GenericMaterialProperty< T, is_ad > & getGenericZeroMaterialProperty (const std::string &name)
 
const GenericMaterialProperty< T, is_ad > & getGenericZeroMaterialProperty ()
 
const GenericMaterialProperty< T, is_ad > & getGenericZeroMaterialPropertyByName (const std::string &prop_name)
 
const MaterialProperty< T > & getZeroMaterialProperty (Ts... args)
 
std::set< SubdomainIDgetMaterialPropertyBlocks (const std::string &name)
 
std::vector< SubdomainName > getMaterialPropertyBlockNames (const std::string &name)
 
std::set< BoundaryIDgetMaterialPropertyBoundaryIDs (const std::string &name)
 
std::vector< BoundaryName > getMaterialPropertyBoundaryNames (const std::string &name)
 
void checkBlockAndBoundaryCompatibility (std::shared_ptr< MaterialBase > discrete)
 
std::unordered_map< SubdomainID, std::vector< MaterialBase * > > buildRequiredMaterials (bool allow_stateful=true)
 
void statefulPropertiesAllowed (bool)
 
virtual bool getMaterialPropertyCalled () const
 
virtual const std::unordered_set< unsigned int > & getMatPropDependencies () const
 
virtual void resolveOptionalProperties ()
 
const GenericMaterialProperty< T, is_ad > & getPossiblyConstantGenericMaterialPropertyByName (const MaterialPropertyName &prop_name, MaterialData &material_data, const unsigned int state)
 
bool isImplicit ()
 
Moose::StateArg determineState () const
 
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 hasKokkosMaterialProperty (const std::string &name)
 
bool hasKokkosMaterialProperty (const std::string &name)
 
bool hasKokkosMaterialPropertyByName (const std::string &name)
 
bool hasKokkosMaterialPropertyByName (const std::string &name)
 
bool hasGenericMaterialProperty (const std::string &name)
 
bool hasGenericMaterialProperty (const std::string &name)
 
bool hasGenericMaterialPropertyByName (const std::string &name)
 
bool hasGenericMaterialPropertyByName (const std::string &name)
 
const FunctiongetFunction (const std::string &name) const
 
const FunctiongetFunctionByName (const FunctionName &name) const
 
bool hasFunction (const std::string &param_name) const
 
bool hasFunctionByName (const FunctionName &name) const
 
Moose::Kokkos::Function getKokkosFunction (const std::string &name) const
 
const TgetKokkosFunction (const std::string &name) const
 
Moose::Kokkos::Function getKokkosFunctionByName (const FunctionName &name) const
 
const TgetKokkosFunctionByName (const FunctionName &name) const
 
bool hasKokkosFunction (const std::string &param_name) const
 
bool hasKokkosFunctionByName (const FunctionName &name) const
 
bool isDefaultPostprocessorValue (const std::string &param_name, const unsigned int index=0) const
 
bool hasPostprocessor (const std::string &param_name, const unsigned int index=0) const
 
bool hasPostprocessorByName (const PostprocessorName &name) const
 
std::size_t coupledPostprocessors (const std::string &param_name) const
 
const PostprocessorName & getPostprocessorName (const std::string &param_name, const unsigned int index=0) const
 
const VectorPostprocessorValuegetVectorPostprocessorValue (const std::string &param_name, const std::string &vector_name) const
 
const VectorPostprocessorValuegetVectorPostprocessorValue (const std::string &param_name, const std::string &vector_name, bool needs_broadcast) const
 
const VectorPostprocessorValuegetVectorPostprocessorValueByName (const VectorPostprocessorName &name, const std::string &vector_name) const
 
const VectorPostprocessorValuegetVectorPostprocessorValueByName (const VectorPostprocessorName &name, const std::string &vector_name, bool needs_broadcast) const
 
const VectorPostprocessorValuegetVectorPostprocessorValueOld (const std::string &param_name, const std::string &vector_name) const
 
const VectorPostprocessorValuegetVectorPostprocessorValueOld (const std::string &param_name, const std::string &vector_name, bool needs_broadcast) const
 
const VectorPostprocessorValuegetVectorPostprocessorValueOldByName (const VectorPostprocessorName &name, const std::string &vector_name) const
 
const VectorPostprocessorValuegetVectorPostprocessorValueOldByName (const VectorPostprocessorName &name, const std::string &vector_name, bool needs_broadcast) const
 
const ScatterVectorPostprocessorValuegetScatterVectorPostprocessorValue (const std::string &param_name, const std::string &vector_name) const
 
const ScatterVectorPostprocessorValuegetScatterVectorPostprocessorValueByName (const VectorPostprocessorName &name, const std::string &vector_name) const
 
const ScatterVectorPostprocessorValuegetScatterVectorPostprocessorValueOld (const std::string &param_name, const std::string &vector_name) const
 
const ScatterVectorPostprocessorValuegetScatterVectorPostprocessorValueOldByName (const VectorPostprocessorName &name, const std::string &vector_name) const
 
bool hasVectorPostprocessor (const std::string &param_name, const std::string &vector_name) const
 
bool hasVectorPostprocessor (const std::string &param_name) const
 
bool hasVectorPostprocessorByName (const VectorPostprocessorName &name, const std::string &vector_name) const
 
bool hasVectorPostprocessorByName (const VectorPostprocessorName &name) const
 
const VectorPostprocessorName & getVectorPostprocessorName (const std::string &param_name) const
 
TgetSampler (const std::string &name)
 
SamplergetSampler (const std::string &name)
 
TgetSamplerByName (const SamplerName &name)
 
SamplergetSamplerByName (const SamplerName &name)
 
virtual void meshChanged ()
 
virtual void meshDisplaced ()
 
PerfGraphperfGraph ()
 
const PostprocessorValuegetPostprocessorValue (const std::string &param_name, const unsigned int index=0) const
 
const PostprocessorValuegetPostprocessorValue (const std::string &param_name, const unsigned int index=0) const
 
const PostprocessorValuegetPostprocessorValueOld (const std::string &param_name, const unsigned int index=0) const
 
const PostprocessorValuegetPostprocessorValueOld (const std::string &param_name, const unsigned int index=0) const
 
const PostprocessorValuegetPostprocessorValueOlder (const std::string &param_name, const unsigned int index=0) const
 
const PostprocessorValuegetPostprocessorValueOlder (const std::string &param_name, const unsigned int index=0) const
 
virtual const PostprocessorValuegetPostprocessorValueByName (const PostprocessorName &name) const
 
virtual const PostprocessorValuegetPostprocessorValueByName (const PostprocessorName &name) const
 
const PostprocessorValuegetPostprocessorValueOldByName (const PostprocessorName &name) const
 
const PostprocessorValuegetPostprocessorValueOldByName (const PostprocessorName &name) const
 
const PostprocessorValuegetPostprocessorValueOlderByName (const PostprocessorName &name) const
 
const PostprocessorValuegetPostprocessorValueOlderByName (const PostprocessorName &name) const
 
bool isVectorPostprocessorDistributed (const std::string &param_name) const
 
bool isVectorPostprocessorDistributed (const std::string &param_name) const
 
bool isVectorPostprocessorDistributedByName (const VectorPostprocessorName &name) const
 
bool isVectorPostprocessorDistributedByName (const VectorPostprocessorName &name) const
 
const DistributiongetDistribution (const std::string &name) const
 
const TgetDistribution (const std::string &name) const
 
const DistributiongetDistribution (const std::string &name) const
 
const TgetDistribution (const std::string &name) const
 
const DistributiongetDistributionByName (const DistributionName &name) const
 
const TgetDistributionByName (const std::string &name) const
 
const DistributiongetDistributionByName (const DistributionName &name) const
 
const TgetDistributionByName (const std::string &name) const
 
const Parallel::Communicator & comm () const
 
processor_id_type n_processors () const
 
processor_id_type processor_id () const
 

Static Public Member Functions

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

Public Attributes

 usingCombinedWarningSolutionWarnings
 
const ConsoleStream _console
 

Static Public Attributes

static const std::string type_param
 
static const std::string name_param
 
static const std::string unique_name_param
 
static const std::string app_param
 
static const std::string moose_base_param
 
static const std::string kokkos_object_param
 
static constexpr PropertyValue::id_type default_property_id
 
static constexpr PropertyValue::id_type zero_property_id
 
static constexpr auto SYSTEM
 
static constexpr auto NAME
 

Protected Member Functions

InputParameters compute1Phase (const SinglePhaseFluidProperties *const fp_1phase, bool throw_error_if_no_match)
 Queries a 1-phase fluid properties object.
 
InputParameters computeVaporMixture (bool throw_error_if_no_match)
 Queries a vapor mixture fluid properties object.
 
InputParameters compute2Phase ()
 Queries a 2-phase fluid properties object.
 
std::map< std::string, bool > getSpecifiedSetMap (const std::vector< std::vector< std::string > > &parameter_sets, const std::string &fp_type, bool throw_error_if_no_match) const
 Gets a map of a parameter set to a flag telling whether that set was provided.
 
void buildJSON1Phase (nlohmann::json &json, const InputParameters &params)
 Build 1-phase fluid properties in JSON format.
 
void buildJSON2Phase (nlohmann::json &json, const InputParameters &params)
 Build 2-phase fluid properties in JSON format.
 
void buildJSONVaporMixture (nlohmann::json &json, const InputParameters &params)
 Build vapor mixture fluid properties in JSON format.
 
void outputASCII1Phase (const std::string &description, const InputParameters &params)
 Output 1-phase fluid properties in plain text format.
 
void outputASCII2Phase (const InputParameters &params)
 Output 2-phase fluid properties in plain text format.
 
void outputASCIIVaporMixture (const InputParameters &params)
 Output vapor mixture fluid properties in plain text format.
 
void outputHeader (const std::string &header) const
 Outputs a header for a section of properties.
 
void outputProperty (const std::string &name, const Real &value, const std::string &units)
 Outputs a property value.
 
void outputStaticProperties (const InputParameters &params)
 Outputs static properties for a single-phase fluid properties object.
 
void outputStagnationProperties (const InputParameters &params)
 Outputs stagnation properties for a single-phase fluid properties object.
 
void outputVaporMixtureStaticProperties (const InputParameters &params)
 Outputs static properties for a vapor mixture fluid properties object.
 
void outputVaporMixtureStagnationProperties (const InputParameters &params)
 Outputs stagnation properties for a vapor mixture fluid properties object.
 
virtual void addPostprocessorDependencyHelper (const PostprocessorName &name) const override
 
virtual void addVectorPostprocessorDependencyHelper (const VectorPostprocessorName &name) const override
 
virtual void addUserObjectDependencyHelper (const UserObjectBase &uo) const override
 
void addReporterDependencyHelper (const ReporterName &reporter_name) override
 
void flagInvalidSolutionInternal (const InvalidSolutionID invalid_solution_id) const
 
InvalidSolutionID registerInvalidSolutionInternal (const std::string &message, const bool warning) const
 
const ReporterContextBasegetReporterContextBaseByName (const ReporterName &reporter_name) const
 
const ReporterNamegetReporterName (const std::string &param_name) const
 
TdeclareRestartableData (const std::string &data_name, Args &&... args)
 
ManagedValue< TdeclareManagedRestartableDataWithContext (const std::string &data_name, void *context, Args &&... args)
 
const TgetRestartableData (const std::string &data_name) const
 
TdeclareRestartableDataWithContext (const std::string &data_name, void *context, Args &&... args)
 
TdeclareRecoverableData (const std::string &data_name, Args &&... args)
 
TdeclareRestartableDataWithObjectName (const std::string &data_name, const std::string &object_name, Args &&... args)
 
TdeclareRestartableDataWithObjectNameWithContext (const std::string &data_name, const std::string &object_name, void *context, Args &&... args)
 
std::string restartableName (const std::string &data_name) const
 
const TgetMeshProperty (const std::string &data_name, const std::string &prefix)
 
const TgetMeshProperty (const std::string &data_name)
 
bool hasMeshProperty (const std::string &data_name, const std::string &prefix) const
 
bool hasMeshProperty (const std::string &data_name, const std::string &prefix) const
 
bool hasMeshProperty (const std::string &data_name) const
 
bool hasMeshProperty (const std::string &data_name) const
 
std::string meshPropertyName (const std::string &data_name) const
 
PerfID registerTimedSection (const std::string &section_name, const unsigned int level) const
 
PerfID registerTimedSection (const std::string &section_name, const unsigned int level, const std::string &live_message, const bool print_dots=true) const
 
std::string timedSectionName (const std::string &section_name) const
 
bool isCoupledScalar (const std::string &var_name, unsigned int i=0) const
 
unsigned int coupledScalarComponents (const std::string &var_name) const
 
unsigned int coupledScalar (const std::string &var_name, unsigned int comp=0) const
 
libMesh::Order coupledScalarOrder (const std::string &var_name, unsigned int comp=0) const
 
const VariableValuecoupledScalarValue (const std::string &var_name, unsigned int comp=0) const
 
const ADVariableValueadCoupledScalarValue (const std::string &var_name, unsigned int comp=0) const
 
const GenericVariableValue< is_ad > & coupledGenericScalarValue (const std::string &var_name, unsigned int comp=0) const
 
const GenericVariableValue< false > & coupledGenericScalarValue (const std::string &var_name, const unsigned int comp) const
 
const GenericVariableValue< true > & coupledGenericScalarValue (const std::string &var_name, const unsigned int comp) const
 
const VariableValuecoupledVectorTagScalarValue (const std::string &var_name, TagID tag, unsigned int comp=0) const
 
const VariableValuecoupledMatrixTagScalarValue (const std::string &var_name, TagID tag, unsigned int comp=0) const
 
const VariableValuecoupledScalarValueOld (const std::string &var_name, unsigned int comp=0) const
 
const VariableValuecoupledScalarValueOlder (const std::string &var_name, unsigned int comp=0) const
 
const VariableValuecoupledScalarDot (const std::string &var_name, unsigned int comp=0) const
 
const ADVariableValueadCoupledScalarDot (const std::string &var_name, unsigned int comp=0) const
 
const VariableValuecoupledScalarDotDot (const std::string &var_name, unsigned int comp=0) const
 
const VariableValuecoupledScalarDotOld (const std::string &var_name, unsigned int comp=0) const
 
const VariableValuecoupledScalarDotDotOld (const std::string &var_name, unsigned int comp=0) const
 
const VariableValuecoupledScalarDotDu (const std::string &var_name, unsigned int comp=0) const
 
const VariableValuecoupledScalarDotDotDu (const std::string &var_name, unsigned int comp=0) const
 
const MooseVariableScalargetScalarVar (const std::string &var_name, unsigned int comp) const
 
virtual void checkMaterialProperty (const std::string &name, const unsigned int state)
 
virtual void getKokkosMaterialPropertyHook (const std::string &, const unsigned int)
 
void markMatPropRequested (const std::string &)
 
MaterialPropertyName getMaterialPropertyName (const std::string &name) const
 
void checkExecutionStage ()
 
const TgetReporterValue (const std::string &param_name, const std::size_t time_index=0)
 
const TgetReporterValue (const std::string &param_name, ReporterMode mode, const std::size_t time_index=0)
 
const TgetReporterValue (const std::string &param_name, const std::size_t time_index=0)
 
const TgetReporterValue (const std::string &param_name, ReporterMode mode, const std::size_t time_index=0)
 
const TgetReporterValueByName (const ReporterName &reporter_name, const std::size_t time_index=0)
 
const TgetReporterValueByName (const ReporterName &reporter_name, ReporterMode mode, const std::size_t time_index=0)
 
const TgetReporterValueByName (const ReporterName &reporter_name, const std::size_t time_index=0)
 
const TgetReporterValueByName (const ReporterName &reporter_name, ReporterMode mode, const std::size_t time_index=0)
 
bool hasReporterValue (const std::string &param_name) const
 
bool hasReporterValue (const std::string &param_name) const
 
bool hasReporterValue (const std::string &param_name) const
 
bool hasReporterValue (const std::string &param_name) const
 
bool hasReporterValueByName (const ReporterName &reporter_name) const
 
bool hasReporterValueByName (const ReporterName &reporter_name) const
 
bool hasReporterValueByName (const ReporterName &reporter_name) const
 
bool hasReporterValueByName (const ReporterName &reporter_name) const
 
const GenericMaterialProperty< T, is_ad > * defaultGenericMaterialProperty (const std::string &name)
 
const GenericMaterialProperty< T, is_ad > * defaultGenericMaterialProperty (const std::string &name)
 
const MaterialProperty< T > * defaultMaterialProperty (const std::string &name)
 
const MaterialProperty< T > * defaultMaterialProperty (const std::string &name)
 
const ADMaterialProperty< T > * defaultADMaterialProperty (const std::string &name)
 
const ADMaterialProperty< T > * defaultADMaterialProperty (const std::string &name)
 

Static Protected Member Functions

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

Protected Attributes

const bool & _json
 true if the output should use JSON format
 
const FluidProperties *const _fp
 pointer to fluid properties object
 
const SinglePhaseFluidProperties *const _fp_1phase
 pointer to 1-phase fluid properties object (if provided 1-phase object)
 
const TwoPhaseFluidProperties *const _fp_2phase
 pointer to 2-phase fluid properties object (if provided 2-phase object)
 
const TwoPhaseNCGFluidProperties *const _fp_2phase_ncg
 pointer to 2-phase NCG fluid properties object (if provided 2-phase NCG object)
 
const TwoPhaseNCGPartialPressureFluidProperties *const _fp_2phase_ncg_partial_pressure
 pointer to 2-phase NCG partial pressure fluid properties object (if provided)
 
const bool _has_1phase
 flag that user provided 1-phase fluid properties
 
const bool _has_vapor_mixture
 flag that user provided vapor mixture fluid properties
 
const bool _has_2phase
 flag that user provided 2-phase fluid properties
 
const bool _has_2phase_ncg
 flag that user provided 2-phase NCG fluid properties
 
const bool _has_2phase_ncg_partial_pressure
 flag that user provided 2-phase NCG partial pressure fluid properties
 
const SinglePhaseFluidProperties *const _fp_liquid
 pointer to liquid fluid properties object (if provided 2-phase object)
 
const SinglePhaseFluidProperties *const _fp_vapor
 pointer to vapor fluid properties object (if provided 2-phase object)
 
const VaporMixtureFluidProperties *const _fp_vapor_mixture
 pointer to vapor mixture fluid properties object (if provided 2-phase NCG object)
 
bool _nan_encountered
 flag that NaN has been encountered
 
const unsigned int_precision
 Precision used for printing values.
 
const Moose::CoordinateSystemType_coord_sys
 
const THREAD_ID _tid
 
SubProblem_subproblem
 
FEProblemBase_fe_problem
 
SystemBase_sys
 
Assembly_assembly
 
const bool _duplicate_initial_execution
 
std::set< std::string > _depend_uo
 
const bool & _enabled
 
MooseApp_app
 
Factory_factory
 
ActionFactory_action_factory
 
const std::string & _type
 
const std::string & _name
 
const InputParameters_pars
 
const ExecFlagEnum_execute_enum
 
const ExecFlagType_current_execute_flag
 
MooseApp_restartable_app
 
const std::string _restartable_system_name
 
const THREAD_ID _restartable_tid
 
const bool _restartable_read_only
 
FEProblemBase_mci_feproblem
 
FEProblemBase_mdi_feproblem
 
MooseApp_pg_moose_app
 
const std::string _prefix
 
FEProblemBase_sc_fe_problem
 
const THREAD_ID _sc_tid
 
const Real & _real_zero
 
const VariableValue_scalar_zero
 
const Point & _point_zero
 
const InputParameters_mi_params
 
const std::string _mi_name
 
const MooseObjectName _mi_moose_object_name
 
FEProblemBase_mi_feproblem
 
SubProblem_mi_subproblem
 
const THREAD_ID _mi_tid
 
const bool _is_kokkos_object
 
const Moose::MaterialDataType _material_data_type
 
MaterialData_material_data
 
bool _stateful_allowed
 
bool _get_material_property_called
 
std::vector< std::unique_ptr< PropertyValue > > _default_properties
 
std::unordered_set< unsigned int_material_property_dependencies
 
const MaterialPropertyName _get_suffix
 
const bool _use_interpolated_state
 
const InputParameters_ti_params
 
FEProblemBase_ti_feproblem
 
bool _is_implicit
 
Real & _t
 
const Real & _t_old
 
int_t_step
 
Real & _dt
 
Real & _dt_old
 
bool _is_transient
 
const Parallel::Communicator & _communicator
 

Static Protected Attributes

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

Private Member Functions

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

Static Private Member Functions

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

Private Attributes

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

Detailed Description

User object for querying a single-phase or two-phase fluid properties object.

Definition at line 25 of file FluidPropertiesInterrogator.h.

Constructor & Destructor Documentation

◆ FluidPropertiesInterrogator()

FluidPropertiesInterrogator::FluidPropertiesInterrogator ( const InputParameters parameters)

Definition at line 43 of file FluidPropertiesInterrogator.C.

45 _json(getParam<bool>("json")),
46 _fp(&getUserObject<FluidProperties>("fp")),
47 _fp_1phase(dynamic_cast<const SinglePhaseFluidProperties * const>(_fp)),
48 _fp_2phase(dynamic_cast<const TwoPhaseFluidProperties * const>(_fp)),
49 _fp_2phase_ncg(dynamic_cast<const TwoPhaseNCGFluidProperties * const>(_fp)),
51 dynamic_cast<const TwoPhaseNCGPartialPressureFluidProperties * const>(_fp)),
53 _has_vapor_mixture(dynamic_cast<const VaporMixtureFluidProperties * const>(_fp)),
58 ? &getUserObjectByName<SinglePhaseFluidProperties>(_fp_2phase->getLiquidName())
59 : nullptr),
62 : nullptr),
64 ? dynamic_cast<const VaporMixtureFluidProperties * const>(_fp)
66 _fp_2phase_ncg->getVaporMixtureName())
67 : nullptr)),
68 _nan_encountered(false),
69 _precision(getParam<unsigned int>("precision"))
70{
73 "The type of the parameter 'fp' must be derived from type 'SinglePhaseFluidProperties', "
74 "'VaporMixtureFluidProperties', or 'TwoPhaseFluidProperties'.");
75}
void ErrorVector unsigned int
const SinglePhaseFluidProperties *const _fp_liquid
pointer to liquid fluid properties object (if provided 2-phase object)
const TwoPhaseFluidProperties *const _fp_2phase
pointer to 2-phase fluid properties object (if provided 2-phase object)
const bool _has_2phase
flag that user provided 2-phase fluid properties
const bool _has_vapor_mixture
flag that user provided vapor mixture fluid properties
const VaporMixtureFluidProperties *const _fp_vapor_mixture
pointer to vapor mixture fluid properties object (if provided 2-phase NCG object)
const SinglePhaseFluidProperties *const _fp_vapor
pointer to vapor fluid properties object (if provided 2-phase object)
bool _nan_encountered
flag that NaN has been encountered
const unsigned int & _precision
Precision used for printing values.
const SinglePhaseFluidProperties *const _fp_1phase
pointer to 1-phase fluid properties object (if provided 1-phase object)
const TwoPhaseNCGFluidProperties *const _fp_2phase_ncg
pointer to 2-phase NCG fluid properties object (if provided 2-phase NCG object)
const bool & _json
true if the output should use JSON format
const bool _has_2phase_ncg_partial_pressure
flag that user provided 2-phase NCG partial pressure fluid properties
const bool _has_1phase
flag that user provided 1-phase fluid properties
const bool _has_2phase_ncg
flag that user provided 2-phase NCG fluid properties
const TwoPhaseNCGPartialPressureFluidProperties *const _fp_2phase_ncg_partial_pressure
pointer to 2-phase NCG partial pressure fluid properties object (if provided)
const FluidProperties *const _fp
pointer to fluid properties object
const InputParameters & parameters() const
void mooseError(Args &&... args) const
const T & getParam(const std::string &name) const
Common class for single phase fluid properties.
Base class for fluid properties used with two-phase flow.
virtual const UserObjectName & getLiquidName() const
Returns the name of the liquid single-phase fluid properties object.
Base class for fluid properties used with 2-phase flow with non-condensable gases (NCGs) present.
Two-phase fluid with single NCG using partial pressure mixture model.
const T & getUserObjectByName(const UserObjectName &object_name, bool is_dependency=true) const
Base class for fluid properties of vapor mixtures.

Member Function Documentation

◆ buildJSON1Phase()

void FluidPropertiesInterrogator::buildJSON1Phase ( nlohmann::json &  json,
const InputParameters params 
)
protected

Build 1-phase fluid properties in JSON format.

Definition at line 508 of file FluidPropertiesInterrogator.C.

509{
510 for (auto p : {"rho", "e", "p", "T", "v", "h", "s", "c", "mu", "cp", "cv", "k", "beta"})
511 json["static"][p] = params.get<Real>(p);
512
513 if (params.have_parameter<Real>("vel"))
514 for (auto p : {"vel",
515 "rho0",
516 "s0",
517 "v0",
518 "e0",
519 "h0",
520 "p0",
521 "T0",
522 "c0",
523 "mu0",
524 "cp0",
525 "cv0",
526 "k0",
527 "beta0"})
528 json["stagnation"][p] = params.get<Real>(p);
529}
const Real p
std::vector< std::pair< R1, R2 > > get(const std::string &param1, const std::string &param2) const
bool have_parameter(std::string_view name) const

Referenced by execute().

◆ buildJSON2Phase()

void FluidPropertiesInterrogator::buildJSON2Phase ( nlohmann::json &  json,
const InputParameters params 
)
protected

Build 2-phase fluid properties in JSON format.

Definition at line 532 of file FluidPropertiesInterrogator.C.

533{
534 json["p_critical"] = params.get<Real>("p_critical");
535 for (auto p : {"T_sat", "p_sat", "h_lat", "sigma"})
536 if (params.have_parameter<Real>(p))
537 json[p] = params.get<Real>(p);
538}
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real

Referenced by execute().

◆ buildJSONVaporMixture()

void FluidPropertiesInterrogator::buildJSONVaporMixture ( nlohmann::json &  json,
const InputParameters params 
)
protected

Build vapor mixture fluid properties in JSON format.

Definition at line 541 of file FluidPropertiesInterrogator.C.

543{
544 for (auto p : {"p", "T", "rho", "e", "v", "h", "s", "c", "mu", "cp", "cv", "k"})
545 if (params.have_parameter<Real>(p))
546 json["static"][p] = params.get<Real>(p);
547
548 if (params.have_parameter<Real>("vel"))
549 json["stagnation"]["h0"] = params.get<Real>("h0");
550}

Referenced by execute().

◆ compute1Phase()

InputParameters FluidPropertiesInterrogator::compute1Phase ( const SinglePhaseFluidProperties *const  fp_1phase,
bool  throw_error_if_no_match 
)
protected

Queries a 1-phase fluid properties object.

Returns
Input parameters holding the computed values
Parameters
[in]fp_1phase1-phase fluid properties
[in]throw_error_if_no_matchOption to throw an error if no sets match the inputs

Definition at line 189 of file FluidPropertiesInterrogator.C.

191{
193
194 // reset NaN flag
195 _nan_encountered = false;
196
197 // determine how state is specified
198 std::vector<std::vector<std::string>> parameter_sets = {{"p", "T"}, {"rho", "e"}, {"rho", "p"}};
199 if (_has_1phase)
200 parameter_sets.push_back({"rho", "rhou", "rhoE"});
201 auto specified = getSpecifiedSetMap(parameter_sets, "one-phase", throw_error_if_no_match);
202
203 // compute/determine rho, e, p, T, vel
204
205 Real rho, e, p, T, vel = 0;
206 bool specified_a_set = false;
207 if (specified["rho,e"])
208 {
209 rho = getParam<Real>("rho");
210 e = getParam<Real>("e");
211 const Real v = 1.0 / rho;
212 p = fp_1phase->p_from_v_e(v, e);
213 T = fp_1phase->T_from_v_e(v, e);
214 if (isParamValid("vel"))
215 vel = getParam<Real>("vel");
216
217 specified_a_set = true;
218 }
219 else if (specified["rho,p"])
220 {
221 rho = getParam<Real>("rho");
222 p = getParam<Real>("p");
223 const Real v = 1.0 / rho;
224 e = fp_1phase->e_from_p_rho(p, rho);
225 T = fp_1phase->T_from_v_e(v, e);
226 if (isParamValid("vel"))
227 vel = getParam<Real>("vel");
228
229 specified_a_set = true;
230 }
231 else if (specified["p,T"])
232 {
233 p = getParam<Real>("p");
234 T = getParam<Real>("T");
235 rho = fp_1phase->rho_from_p_T(p, T);
236 e = fp_1phase->e_from_p_rho(p, rho);
237 if (isParamValid("vel"))
238 vel = getParam<Real>("vel");
239
240 specified_a_set = true;
241 }
242 else if (specified["rho,rhou,rhoE"])
243 {
244 rho = getParam<Real>("rho");
245 const Real rhou = getParam<Real>("rhou");
246 const Real rhoE = getParam<Real>("rhoE");
247
248 vel = rhou / rho;
249 const Real E = rhoE / rho;
250 e = E - 0.5 * vel * vel;
251
252 const Real v = 1.0 / rho;
253 p = fp_1phase->p_from_v_e(v, e);
254 T = fp_1phase->T_from_v_e(v, e);
255
256 specified_a_set = true;
257 }
258
259 if (specified_a_set)
260 {
261 params.set<bool>("specified") = true;
262
263 const Real v = 1.0 / rho;
264
265 params.set<Real>("rho") = rho;
266 params.set<Real>("e") = e;
267 params.set<Real>("p") = p;
268 params.set<Real>("T") = T;
269 params.set<Real>("v") = v;
270 params.set<Real>("h") = fp_1phase->h_from_p_T(p, T);
271 params.set<Real>("s") = fp_1phase->s_from_v_e(v, e);
272 params.set<Real>("c") = fp_1phase->c_from_v_e(v, e);
273 params.set<Real>("mu") = fp_1phase->mu_from_v_e(v, e);
274 params.set<Real>("cp") = fp_1phase->cp_from_v_e(v, e);
275 params.set<Real>("cv") = fp_1phase->cv_from_v_e(v, e);
276 params.set<Real>("k") = fp_1phase->k_from_v_e(v, e);
277 params.set<Real>("beta") = fp_1phase->beta_from_p_T(p, T);
278
279 if (isParamValid("vel") || specified["rho,rhou,rhoE"])
280 {
281 const Real s = fp_1phase->s_from_v_e(v, e);
282 const Real s0 = s;
283 const Real h = fp_1phase->h_from_p_T(p, T);
284 const Real h0 = h + 0.5 * vel * vel;
285 const Real p0 = fp_1phase->p_from_h_s(h0, s0);
286 const Real rho0 = fp_1phase->rho_from_p_s(p0, s0);
287 const Real e0 = fp_1phase->e_from_p_rho(p0, rho0);
288 const Real v0 = 1.0 / rho0;
289 const Real T0 = fp_1phase->T_from_v_e(v0, e0);
290 const Real c0 = fp_1phase->c_from_v_e(v0, e0);
291 const Real mu0 = fp_1phase->mu_from_v_e(v0, e0);
292 const Real cp0 = fp_1phase->cp_from_v_e(v0, e0);
293 const Real cv0 = fp_1phase->cv_from_v_e(v0, e0);
294 const Real k0 = fp_1phase->k_from_v_e(v0, e0);
295 const Real beta0 = fp_1phase->beta_from_p_T(p0, T0);
296
297 params.set<Real>("vel") = vel;
298 params.set<Real>("rho0") = rho0;
299 params.set<Real>("s0") = s0;
300 params.set<Real>("v0") = v0;
301 params.set<Real>("e0") = e0;
302 params.set<Real>("h0") = h0;
303 params.set<Real>("p0") = p0;
304 params.set<Real>("T0") = T0;
305 params.set<Real>("c0") = c0;
306 params.set<Real>("mu0") = mu0;
307 params.set<Real>("cp0") = cp0;
308 params.set<Real>("cv0") = cv0;
309 params.set<Real>("k0") = k0;
310 params.set<Real>("beta0") = beta0;
311 }
312
313 // warn if NaN encountered
316 "At least one NaN was encountered. This implies one of the following:\n",
317 " 1. The specified thermodynamic state is inconsistent with the equation of state\n",
318 " (for example, the state corresponds to a different phase of the fluid).\n",
319 " 2. There is a problem with the equation of state package at this state\n",
320 " (for example, the supplied state is outside of the valid state space\n",
321 " that was programmed in the package).");
322 }
323
324 return params;
325}
const double rho
const double T
const double v
InputParameters emptyInputParameters()
std::map< std::string, bool > getSpecifiedSetMap(const std::vector< std::vector< std::string > > &parameter_sets, const std::string &fp_type, bool throw_error_if_no_match) const
Gets a map of a parameter set to a flag telling whether that set was provided.
T & set(const std::string &name, bool quiet_mode=false)
void mooseWarning(Args &&... args) const
bool isParamValid(const std::string &name) const

Referenced by execute().

◆ compute2Phase()

InputParameters FluidPropertiesInterrogator::compute2Phase ( )
protected

Queries a 2-phase fluid properties object.

Returns
Input parameters holding the computed values

Definition at line 328 of file FluidPropertiesInterrogator.C.

329{
331
332 // reset NaN flag
333 _nan_encountered = false;
334
335 // determine how state is specified
336 std::vector<std::vector<std::string>> parameter_sets = {{"p", "T"}, {"p"}, {"T"}};
337 auto specified = getSpecifiedSetMap(parameter_sets, "two-phase", true);
338
339 const Real p_critical = _fp_2phase->p_critical();
340 params.set<Real>("p_critical") = p_critical;
341 if (specified["p"])
342 {
343 const Real p = getParam<Real>("p");
344 const Real T_sat = _fp_2phase->T_sat(p);
345 const Real h_lat = _fp_2phase->h_lat(p, T_sat);
346
347 params.set<Real>("p") = p;
348 params.set<Real>("T_sat") = T_sat;
349 params.set<Real>("h_lat") = h_lat;
350 }
351 else if (specified["T"])
352 {
353 const Real T = getParam<Real>("T");
354 const Real p_sat = _fp_2phase->p_sat(T);
355 const Real h_lat = _fp_2phase->h_lat(p_sat, T);
356 const Real sigma = _fp_2phase->sigma_from_T(T);
357
358 params.set<Real>("T") = T;
359 params.set<Real>("p_sat") = p_sat;
360 params.set<Real>("h_lat") = h_lat;
361 params.set<Real>("sigma") = sigma;
362 }
363 else if (specified["p,T"])
364 {
365 const Real p = getParam<Real>("p");
366 const Real T = getParam<Real>("T");
367 const Real h_lat = _fp_2phase->h_lat(p, T);
368
369 params.set<Real>("p") = p;
370 params.set<Real>("T") = T;
371 params.set<Real>("h_lat") = h_lat;
372 }
373
374 // warn if NaN encountered
376 mooseWarning("At least one NaN was encountered.");
377
378 return params;
379}
virtual Real p_critical() const =0
Returns the critical pressure.
virtual Real sigma_from_T(Real T) const
Computes surface tension sigma of saturated liquid in contact with saturated vapor.
virtual Real p_sat(Real T) const =0
Computes the saturation pressure at a temperature.
virtual Real h_lat(Real p, Real T) const
Computes latent heat of vaporization.
virtual Real T_sat(Real p) const =0
Computes the saturation temperature at a pressure.

Referenced by execute().

◆ computeVaporMixture()

InputParameters FluidPropertiesInterrogator::computeVaporMixture ( bool  throw_error_if_no_match)
protected

Queries a vapor mixture fluid properties object.

Returns
Input parameters holding the computed values
Parameters
[in]throw_error_if_no_matchOption to throw an error if no sets match the inputs

Definition at line 382 of file FluidPropertiesInterrogator.C.

383{
385
386 // reset NaN flag
387 _nan_encountered = false;
388
389 // determine how state is specified
390 std::vector<std::vector<std::string>> parameter_sets = {
391 {"p", "T", "x_ncg"}, {"rho", "e", "x_ncg"}, {"rho", "rhou", "rhoE", "x_ncg"}};
393 parameter_sets.push_back({"p", "T"});
394 auto specified = getSpecifiedSetMap(parameter_sets, "vapor mixture", throw_error_if_no_match);
395
396 // compute/determine rho, e, p, T, vel
397
398 Real rho, e, p, T, vel = 0;
399 std::vector<Real> x_ncg;
400 bool specified_a_set = false;
401 if (specified["rho,e,x_ncg"])
402 {
403 rho = getParam<Real>("rho");
404 e = getParam<Real>("e");
405 x_ncg = getParam<std::vector<Real>>("x_ncg");
406 const Real v = 1.0 / rho;
407 p = _fp_vapor_mixture->p_from_v_e(v, e, x_ncg);
408 T = _fp_vapor_mixture->T_from_v_e(v, e, x_ncg);
409 if (isParamValid("vel"))
410 vel = getParam<Real>("vel");
411
412 specified_a_set = true;
413 }
414 else if (specified["p,T,x_ncg"])
415 {
416 p = getParam<Real>("p");
417 T = getParam<Real>("T");
418 x_ncg = getParam<std::vector<Real>>("x_ncg");
419 const Real v = _fp_vapor_mixture->v_from_p_T(p, T, x_ncg);
420 rho = 1.0 / v;
421 e = _fp_vapor_mixture->e_from_p_T(p, T, x_ncg);
422 if (isParamValid("vel"))
423 vel = getParam<Real>("vel");
424
425 specified_a_set = true;
426 }
427 else if (_has_2phase_ncg_partial_pressure && specified["p,T"])
428 {
429 p = getParam<Real>("p");
430 T = getParam<Real>("T");
432 const Real v = _fp_vapor_mixture->v_from_p_T(p, T, x_ncg);
433 rho = 1.0 / v;
434 e = _fp_vapor_mixture->e_from_p_T(p, T, x_ncg);
435 if (isParamValid("vel"))
436 vel = getParam<Real>("vel");
437
438 specified_a_set = true;
439 }
440 else if (specified["rho,rhou,rhoE,x_ncg"])
441 {
442 rho = getParam<Real>("rho");
443 const Real rhou = getParam<Real>("rhou");
444 const Real rhoE = getParam<Real>("rhoE");
445 x_ncg = getParam<std::vector<Real>>("x_ncg");
446
447 vel = rhou / rho;
448 const Real E = rhoE / rho;
449 e = E - 0.5 * vel * vel;
450
451 const Real v = 1.0 / rho;
452 p = _fp_vapor_mixture->p_from_v_e(v, e, x_ncg);
453 T = _fp_vapor_mixture->T_from_v_e(v, e, x_ncg);
454
455 specified_a_set = true;
456 }
457
458 if (specified_a_set)
459 {
460 params.set<bool>("specified") = true;
461
462 const Real v = 1.0 / rho;
463 const Real h = e + p / rho;
464 const Real s = _fp_vapor_mixture->s_from_p_T(p, T, x_ncg);
465 const Real c = _fp_vapor_mixture->c_from_p_T(p, T, x_ncg);
466 const Real mu = _fp_vapor_mixture->mu_from_p_T(p, T, x_ncg);
467 const Real cp = _fp_vapor_mixture->cp_from_p_T(p, T, x_ncg);
468 const Real cv = _fp_vapor_mixture->cv_from_p_T(p, T, x_ncg);
469 const Real k = _fp_vapor_mixture->k_from_p_T(p, T, x_ncg);
470
471 params.set<std::vector<Real>>("x_ncg") = x_ncg;
472 params.set<Real>("p") = p;
473 params.set<Real>("T") = T;
474 params.set<Real>("rho") = rho;
475 params.set<Real>("e") = e;
476 params.set<Real>("v") = v;
477 params.set<Real>("h") = h;
478 params.set<Real>("s") = s;
479 params.set<Real>("c") = c;
480 params.set<Real>("mu") = mu;
481 params.set<Real>("cp") = cp;
482 params.set<Real>("cv") = cv;
483 params.set<Real>("k") = k;
484
485 if (isParamValid("vel") || specified["rho,rhou,rhoE,x_ncg"])
486 {
487 const Real h = e + p / rho;
488 const Real h0 = h + 0.5 * vel * vel;
489
490 params.set<Real>("h0") = h0;
491 }
492
493 // warn if NaN encountered
496 "At least one NaN was encountered. This implies one of the following:\n",
497 " 1. The specified thermodynamic state is inconsistent with the equation of state\n",
498 " (for example, the state corresponds to a different phase of the fluid).\n",
499 " 2. There is a problem with the equation of state package at this state\n",
500 " (for example, the supplied state is outside of the valid state space\n",
501 " that was programmed in the package).");
502 }
503
504 return params;
505}
const double mu
Real x_sat_ncg_from_p_T(Real p, Real T) const
Computes the NCG mass fraction with the CG saturated at the given temperature.

Referenced by execute().

◆ execute()

void FluidPropertiesInterrogator::execute ( )
overridevirtual

Implements GeneralUserObject.

Definition at line 83 of file FluidPropertiesInterrogator.C.

84{
86 {
87 InputParameters pars_2phase = compute2Phase();
88 InputParameters pars_liquid = compute1Phase(_fp_liquid, false);
89 InputParameters pars_mixture = computeVaporMixture(false);
90
91 if (_json)
92 {
93 nlohmann::json json;
94
95 auto & json_2phase = json["2-phase"];
96 buildJSON2Phase(json_2phase, pars_2phase);
97 auto & json_liquid = json["liquid"];
98 buildJSON1Phase(json_liquid, pars_liquid);
99 auto & json_mixture = json["vapor-mixture"];
100 buildJSONVaporMixture(json_mixture, pars_mixture);
101
102 Moose::out << "**START JSON DATA**\n";
103 Moose::out << json << "\n";
104 Moose::out << "**END JSON DATA**" << std::endl;
105 }
106 else
107 {
108 outputASCII2Phase(pars_2phase);
109 outputASCII1Phase("LIQUID phase", pars_liquid);
110 outputASCIIVaporMixture(pars_mixture);
111 }
112 }
113 else if (_has_2phase)
114 {
115 InputParameters pars_2phase = compute2Phase();
116 InputParameters pars_liquid = compute1Phase(_fp_liquid, false);
117 InputParameters pars_vapor = compute1Phase(_fp_vapor, false);
118
119 if (_json)
120 {
121 nlohmann::json json;
122
123 auto & json_2phase = json["2-phase"];
124 buildJSON2Phase(json_2phase, pars_2phase);
125 if (pars_liquid.have_parameter<bool>("specified"))
126 {
127 auto & json_liquid = json["liquid"];
128 buildJSON1Phase(json_liquid, pars_liquid);
129 }
130 if (pars_vapor.have_parameter<bool>("specified"))
131 {
132 auto & json_vapor = json["vapor"];
133 buildJSON1Phase(json_vapor, pars_vapor);
134 }
135
136 Moose::out << "**START JSON DATA**\n";
137 Moose::out << json << "\n";
138 Moose::out << "**END JSON DATA**" << std::endl;
139 }
140 else
141 {
142 outputASCII2Phase(pars_2phase);
143 if (pars_liquid.have_parameter<bool>("specified"))
144 outputASCII1Phase("LIQUID phase", pars_liquid);
145 if (pars_vapor.have_parameter<bool>("specified"))
146 outputASCII1Phase("VAPOR phase", pars_vapor);
147 }
148 }
149 else if (_has_vapor_mixture)
150 {
151 InputParameters pars_mixture = computeVaporMixture(true);
152 if (_json)
153 {
154 nlohmann::json json;
155 buildJSONVaporMixture(json, pars_mixture);
156
157 Moose::out << "**START JSON DATA**\n";
158 Moose::out << json << "\n";
159 Moose::out << "**END JSON DATA**" << std::endl;
160 }
161 else
162 outputASCIIVaporMixture(pars_mixture);
163 }
164 else
165 {
166 InputParameters pars_1phase = compute1Phase(_fp_1phase, true);
167
168 if (_json)
169 {
170 nlohmann::json json;
171
172 buildJSON1Phase(json, pars_1phase);
173
174 Moose::out << "**START JSON DATA**\n";
175 Moose::out << json << "\n";
176 Moose::out << "**END JSON DATA**" << std::endl;
177 }
178 else
179 outputASCII1Phase("Single-phase", pars_1phase);
180 }
181}
void buildJSON2Phase(nlohmann::json &json, const InputParameters &params)
Build 2-phase fluid properties in JSON format.
InputParameters compute2Phase()
Queries a 2-phase fluid properties object.
void outputASCIIVaporMixture(const InputParameters &params)
Output vapor mixture fluid properties in plain text format.
void outputASCII2Phase(const InputParameters &params)
Output 2-phase fluid properties in plain text format.
InputParameters compute1Phase(const SinglePhaseFluidProperties *const fp_1phase, bool throw_error_if_no_match)
Queries a 1-phase fluid properties object.
void buildJSON1Phase(nlohmann::json &json, const InputParameters &params)
Build 1-phase fluid properties in JSON format.
void outputASCII1Phase(const std::string &description, const InputParameters &params)
Output 1-phase fluid properties in plain text format.
void buildJSONVaporMixture(nlohmann::json &json, const InputParameters &params)
Build vapor mixture fluid properties in JSON format.
InputParameters computeVaporMixture(bool throw_error_if_no_match)
Queries a vapor mixture fluid properties object.

◆ finalize()

void FluidPropertiesInterrogator::finalize ( )
overridevirtual

Implements GeneralUserObject.

Definition at line 184 of file FluidPropertiesInterrogator.C.

185{
186}

◆ getSpecifiedSetMap()

std::map< std::string, bool > FluidPropertiesInterrogator::getSpecifiedSetMap ( const std::vector< std::vector< std::string > > &  parameter_sets,
const std::string &  fp_type,
bool  throw_error_if_no_match 
) const
protected

Gets a map of a parameter set to a flag telling whether that set was provided.

Parameters
[in]parameter_setsvector of vectors of strings of parameter names. The first dimension is the parameter set, and the second dimension is a parameter within the set. If a set is a subset of another set, the subset should be after the other.
[in]fp_typestring used to identify the set of parameter sets
[in]throw_error_if_no_matchOption to throw an error if no sets match the inputs

Definition at line 600 of file FluidPropertiesInterrogator.C.

604{
605 // get union of parameters from all sets
606 std::vector<std::string> parameter_union;
607 for (auto & parameter_set : parameter_sets)
608 parameter_union.insert(parameter_union.end(), parameter_set.begin(), parameter_set.end());
609 std::sort(parameter_union.begin(), parameter_union.end());
610 parameter_union.erase(std::unique(parameter_union.begin(), parameter_union.end()),
611 parameter_union.end());
612
613 std::vector<std::string> parameter_set_names;
614 std::map<std::string, bool> specified;
615 bool specified_a_set = false;
616 for (const auto & parameter_set : parameter_sets)
617 {
618 // create unique string to identify parameter set
619 std::stringstream ss;
620 for (unsigned int i = 0; i < parameter_set.size(); i++)
621 if (i == 0)
622 ss << parameter_set[i];
623 else
624 ss << "," << parameter_set[i];
625 const std::string parameter_set_name = ss.str();
626 parameter_set_names.push_back(parameter_set_name);
627
628 // check if the set parameters were provided
629 bool all_parameters_provided = true;
630 for (const auto & parameter : parameter_set)
631 if (!isParamValid(parameter))
632 all_parameters_provided = false;
633
634 if (all_parameters_provided)
635 {
636 // exclude set if a superset (assumed to be ordered before this set) was specified
637 if (!specified_a_set)
638 {
639 specified[parameter_set_name] = true;
640
641 // check that there are no extraneous parameters
642 std::vector<std::string> parameter_set_sorted(parameter_set);
643 std::sort(parameter_set_sorted.begin(), parameter_set_sorted.end());
644 std::vector<std::string> extraneous_parameters;
645 std::set_difference(parameter_union.begin(),
646 parameter_union.end(),
647 parameter_set_sorted.begin(),
648 parameter_set_sorted.end(),
649 std::inserter(extraneous_parameters, extraneous_parameters.end()));
650 for (const auto & parameter : extraneous_parameters)
651 if (isParamValid(parameter))
652 mooseError("(",
653 parameter_set_name,
654 ") has been specified; ",
655 parameter,
656 " cannot be specified.");
657 }
658
659 specified_a_set = true;
660 }
661 else
662 specified[parameter_set_name] = false;
663 }
664
665 if (!specified_a_set && throw_error_if_no_match)
666 {
667 std::stringstream ss;
668 ss << "For " << fp_type
669 << " fluid properties, you must provide one of the following\n"
670 "combinations of thermodynamic properties:\n";
671 for (const auto & parameter_set_name : parameter_set_names)
672 ss << " * (" << parameter_set_name << ")\n";
673 mooseError(ss.str());
674 }
675
676 return specified;
677}
if(subdm)

Referenced by compute1Phase(), compute2Phase(), and computeVaporMixture().

◆ initialize()

void FluidPropertiesInterrogator::initialize ( )
overridevirtual

Implements GeneralUserObject.

Definition at line 78 of file FluidPropertiesInterrogator.C.

79{
80}

◆ outputASCII1Phase()

void FluidPropertiesInterrogator::outputASCII1Phase ( const std::string &  description,
const InputParameters params 
)
protected

Output 1-phase fluid properties in plain text format.

Parameters
[in]descriptionString describing the 1-phase fluid properties
[in]paramsInput parameters with values to print

Definition at line 553 of file FluidPropertiesInterrogator.C.

555{
556 // output static property values
557 outputHeader(description + " STATIC properties");
559
560 // output stagnation property values
561 if (params.have_parameter<Real>("vel"))
562 {
563 outputHeader(description + " STAGNATION properties");
565 }
566}
void outputStaticProperties(const InputParameters &params)
Outputs static properties for a single-phase fluid properties object.
void outputStagnationProperties(const InputParameters &params)
Outputs stagnation properties for a single-phase fluid properties object.
void outputHeader(const std::string &header) const
Outputs a header for a section of properties.

Referenced by execute().

◆ outputASCII2Phase()

void FluidPropertiesInterrogator::outputASCII2Phase ( const InputParameters params)
protected

Output 2-phase fluid properties in plain text format.

Parameters
[in]paramsInput parameters with values to print

Definition at line 569 of file FluidPropertiesInterrogator.C.

570{
571 outputHeader("TWO-PHASE properties");
572 outputProperty("Critical pressure", params.get<Real>("p_critical"), "Pa");
573 if (params.have_parameter<Real>("T_sat"))
574 outputProperty("Saturation temperature", params.get<Real>("T_sat"), "K");
575 if (params.have_parameter<Real>("p_sat"))
576 outputProperty("Saturation pressure", params.get<Real>("p_sat"), "Pa");
577 if (params.have_parameter<Real>("h_lat"))
578 outputProperty("Latent heat of vaporization", params.get<Real>("h_lat"), "J/kg");
579 if (params.have_parameter<Real>("sigma"))
580 outputProperty("Surface tension", params.get<Real>("sigma"), "N/m");
581 _console << std::endl;
582}
const ConsoleStream _console
void outputProperty(const std::string &name, const Real &value, const std::string &units)
Outputs a property value.

Referenced by execute().

◆ outputASCIIVaporMixture()

void FluidPropertiesInterrogator::outputASCIIVaporMixture ( const InputParameters params)
protected

Output vapor mixture fluid properties in plain text format.

Parameters
[in]paramsInput parameters with values to print

Definition at line 585 of file FluidPropertiesInterrogator.C.

586{
587 // output static property values
588 outputHeader("Vapor mixture STATIC properties");
590
591 // output stagnation property values
592 if (params.have_parameter<Real>("vel"))
593 {
594 outputHeader("Vapor mixture STAGNATION properties");
596 }
597}
void outputVaporMixtureStagnationProperties(const InputParameters &params)
Outputs stagnation properties for a vapor mixture fluid properties object.
void outputVaporMixtureStaticProperties(const InputParameters &params)
Outputs static properties for a vapor mixture fluid properties object.

Referenced by execute().

◆ outputHeader()

void FluidPropertiesInterrogator::outputHeader ( const std::string &  header) const
protected

Outputs a header for a section of properties.

Definition at line 680 of file FluidPropertiesInterrogator.C.

681{
682 _console << std::endl
683 << std::endl
684 << header << ":" << std::endl
685 << std::setfill('-') << std::setw(80) << "-" << std::setfill(' ') << std::endl;
686}

Referenced by outputASCII1Phase(), outputASCII2Phase(), and outputASCIIVaporMixture().

◆ outputProperty()

void FluidPropertiesInterrogator::outputProperty ( const std::string &  name,
const Real &  value,
const std::string &  units 
)
protected

Outputs a property value.

Definition at line 689 of file FluidPropertiesInterrogator.C.

692{
693 const bool use_scientific_notation = ((value < 0.001) || (value >= 10000.0));
694
695 // check for NaN value
696 const bool is_nan = value != value;
697 if (is_nan)
698 _nan_encountered = true;
699
700 const std::string units_printed = is_nan ? "" : units;
701
702 // The console output is not used directly because there is no way to reset
703 // format flags. For example, if scientific format is used, there is no way
704 // to restore the general format (not fixed format); for cout, there are
705 // methods to save and restore format flags, but Console does not provide these.
706 std::stringstream ss;
707
708 if (use_scientific_notation)
709 ss << std::setw(35) << std::left << name + ":" << std::setw(_precision + 10) << std::right
710 << std::setprecision(_precision) << std::scientific << value << " " << units_printed
711 << std::endl;
712 else
713 ss << std::setw(35) << std::left << name + ":" << std::setw(_precision + 10) << std::right
714 << std::setprecision(_precision) << value << " " << units_printed << std::endl;
715
716 _console << ss.str();
717}
const std::string & name() const
Real value(unsigned n, unsigned alpha, unsigned beta, Real x)

Referenced by outputASCII2Phase(), outputStagnationProperties(), outputStaticProperties(), outputVaporMixtureStagnationProperties(), and outputVaporMixtureStaticProperties().

◆ outputStagnationProperties()

void FluidPropertiesInterrogator::outputStagnationProperties ( const InputParameters params)
protected

Outputs stagnation properties for a single-phase fluid properties object.

Parameters
[in]paramsInput parameters with values to print

Definition at line 740 of file FluidPropertiesInterrogator.C.

741{
742 outputProperty("Pressure", params.get<Real>("p0"), "Pa");
743 outputProperty("Temperature", params.get<Real>("T0"), "K");
744 outputProperty("Density", params.get<Real>("rho0"), "kg/m^3");
745 outputProperty("Specific volume", params.get<Real>("v0"), "m^3/kg");
746 outputProperty("Specific internal energy", params.get<Real>("e0"), "J/kg");
747 outputProperty("Specific enthalpy", params.get<Real>("h0"), "J/kg");
748 outputProperty("Specific entropy", params.get<Real>("s0"), "J/(kg-K)");
749 _console << std::endl;
750 outputProperty("Sound speed", params.get<Real>("c0"), "m/s");
751 outputProperty("Dynamic viscosity", params.get<Real>("mu0"), "Pa-s");
752 outputProperty("Specific heat at constant pressure", params.get<Real>("cp0"), "J/(kg-K)");
753 outputProperty("Specific heat at constant volume", params.get<Real>("cv0"), "J/(kg-K)");
754 outputProperty("Thermal conductivity", params.get<Real>("k0"), "W/(m-K)");
755 outputProperty("Volumetric expansion coefficient", params.get<Real>("beta0"), "1/K");
756 _console << std::endl;
757}

Referenced by outputASCII1Phase().

◆ outputStaticProperties()

void FluidPropertiesInterrogator::outputStaticProperties ( const InputParameters params)
protected

Outputs static properties for a single-phase fluid properties object.

Parameters
[in]paramsInput parameters with values to print

Definition at line 720 of file FluidPropertiesInterrogator.C.

721{
722 outputProperty("Pressure", params.get<Real>("p"), "Pa");
723 outputProperty("Temperature", params.get<Real>("T"), "K");
724 outputProperty("Density", params.get<Real>("rho"), "kg/m^3");
725 outputProperty("Specific volume", params.get<Real>("v"), "m^3/kg");
726 outputProperty("Specific internal energy", params.get<Real>("e"), "J/kg");
727 outputProperty("Specific enthalpy", params.get<Real>("h"), "J/kg");
728 outputProperty("Specific entropy", params.get<Real>("s"), "J/(kg-K)");
729 _console << std::endl;
730 outputProperty("Sound speed", params.get<Real>("c"), "m/s");
731 outputProperty("Dynamic viscosity", params.get<Real>("mu"), "Pa-s");
732 outputProperty("Specific heat at constant pressure", params.get<Real>("cp"), "J/(kg-K)");
733 outputProperty("Specific heat at constant volume", params.get<Real>("cv"), "J/(kg-K)");
734 outputProperty("Thermal conductivity", params.get<Real>("k"), "W/(m-K)");
735 outputProperty("Volumetric expansion coefficient", params.get<Real>("beta"), "1/K");
736 _console << std::endl;
737}

Referenced by outputASCII1Phase().

◆ outputVaporMixtureStagnationProperties()

void FluidPropertiesInterrogator::outputVaporMixtureStagnationProperties ( const InputParameters params)
protected

Outputs stagnation properties for a vapor mixture fluid properties object.

Parameters
[in]paramsInput parameters with values to print

Definition at line 782 of file FluidPropertiesInterrogator.C.

783{
784 outputProperty("Specific enthalpy", params.get<Real>("h0"), "J/kg");
785 _console << std::endl;
786}

Referenced by outputASCIIVaporMixture().

◆ outputVaporMixtureStaticProperties()

void FluidPropertiesInterrogator::outputVaporMixtureStaticProperties ( const InputParameters params)
protected

Outputs static properties for a vapor mixture fluid properties object.

Parameters
[in]paramsInput parameters with values to print

Definition at line 760 of file FluidPropertiesInterrogator.C.

761{
762 const auto x_ncg = params.get<std::vector<Real>>("x_ncg");
763 for (unsigned int i = 0; i < x_ncg.size(); i++)
764 outputProperty("Mass fraction " + std::to_string(i), x_ncg[i], "-");
765 outputProperty("Pressure", params.get<Real>("p"), "Pa");
766 outputProperty("Temperature", params.get<Real>("T"), "K");
767 outputProperty("Density", params.get<Real>("rho"), "kg/m^3");
768 outputProperty("Specific volume", params.get<Real>("v"), "m^3/kg");
769 outputProperty("Specific internal energy", params.get<Real>("e"), "J/kg");
770 outputProperty("Specific enthalpy", params.get<Real>("h"), "J/kg");
771 outputProperty("Specific entropy", params.get<Real>("s"), "J/kg");
772 _console << std::endl;
773 outputProperty("Sound speed", params.get<Real>("c"), "m/s");
774 outputProperty("Dynamic viscosity", params.get<Real>("mu"), "Pa-s");
775 outputProperty("Specific heat at constant pressure", params.get<Real>("cp"), "J/(kg-K)");
776 outputProperty("Specific heat at constant volume", params.get<Real>("cv"), "J/(kg-K)");
777 outputProperty("Thermal conductivity", params.get<Real>("k"), "W/(m-K)");
778 _console << std::endl;
779}

Referenced by outputASCIIVaporMixture().

◆ validParams()

InputParameters FluidPropertiesInterrogator::validParams ( )
static

Definition at line 21 of file FluidPropertiesInterrogator.C.

22{
24 params.addRequiredParam<UserObjectName>("fp",
25 "The name of the fluid properties object to query.");
26 params.addParam<bool>("json", false, "Output in JSON format");
27 params.addParam<Real>("rho", "Density");
28 params.addParam<Real>("rhou", "Momentum density; rho * u");
29 params.addParam<Real>("rhoE", "Total energy density; rho * E");
30 params.addParam<Real>("e", "Specific internal energy");
31 params.addParam<Real>("p", "Pressure");
32 params.addParam<Real>("T", "Temperature");
33 params.addParam<Real>("vel", "Velocity");
34 params.addParam<std::vector<Real>>("x_ncg", "Mass fractions of NCGs");
35 params.addRequiredParam<unsigned int>("precision", "Precision for printing values");
36
38 "User object for querying a single-phase or two-phase fluid properties object");
39
40 return params;
41}
static InputParameters validParams()
void addRequiredParam(const std::string &name, const std::string &doc_string)
void addParam(const std::string &name, const std::initializer_list< typename T::value_type > &value, const std::string &doc_string)
void addClassDescription(const std::string &doc_string)

Member Data Documentation

◆ _fp

const FluidProperties* const FluidPropertiesInterrogator::_fp
protected

pointer to fluid properties object

Definition at line 158 of file FluidPropertiesInterrogator.h.

◆ _fp_1phase

const SinglePhaseFluidProperties* const FluidPropertiesInterrogator::_fp_1phase
protected

pointer to 1-phase fluid properties object (if provided 1-phase object)

Definition at line 160 of file FluidPropertiesInterrogator.h.

Referenced by execute().

◆ _fp_2phase

const TwoPhaseFluidProperties* const FluidPropertiesInterrogator::_fp_2phase
protected

pointer to 2-phase fluid properties object (if provided 2-phase object)

Definition at line 162 of file FluidPropertiesInterrogator.h.

Referenced by compute2Phase().

◆ _fp_2phase_ncg

const TwoPhaseNCGFluidProperties* const FluidPropertiesInterrogator::_fp_2phase_ncg
protected

pointer to 2-phase NCG fluid properties object (if provided 2-phase NCG object)

Definition at line 164 of file FluidPropertiesInterrogator.h.

◆ _fp_2phase_ncg_partial_pressure

const TwoPhaseNCGPartialPressureFluidProperties* const FluidPropertiesInterrogator::_fp_2phase_ncg_partial_pressure
protected

pointer to 2-phase NCG partial pressure fluid properties object (if provided)

Definition at line 166 of file FluidPropertiesInterrogator.h.

Referenced by computeVaporMixture().

◆ _fp_liquid

const SinglePhaseFluidProperties* const FluidPropertiesInterrogator::_fp_liquid
protected

pointer to liquid fluid properties object (if provided 2-phase object)

Definition at line 180 of file FluidPropertiesInterrogator.h.

Referenced by execute().

◆ _fp_vapor

const SinglePhaseFluidProperties* const FluidPropertiesInterrogator::_fp_vapor
protected

pointer to vapor fluid properties object (if provided 2-phase object)

Definition at line 182 of file FluidPropertiesInterrogator.h.

Referenced by execute().

◆ _fp_vapor_mixture

const VaporMixtureFluidProperties* const FluidPropertiesInterrogator::_fp_vapor_mixture
protected

pointer to vapor mixture fluid properties object (if provided 2-phase NCG object)

Definition at line 184 of file FluidPropertiesInterrogator.h.

Referenced by computeVaporMixture().

◆ _has_1phase

const bool FluidPropertiesInterrogator::_has_1phase
protected

flag that user provided 1-phase fluid properties

Definition at line 169 of file FluidPropertiesInterrogator.h.

Referenced by compute1Phase(), and FluidPropertiesInterrogator().

◆ _has_2phase

const bool FluidPropertiesInterrogator::_has_2phase
protected

flag that user provided 2-phase fluid properties

Definition at line 173 of file FluidPropertiesInterrogator.h.

Referenced by execute(), and FluidPropertiesInterrogator().

◆ _has_2phase_ncg

const bool FluidPropertiesInterrogator::_has_2phase_ncg
protected

flag that user provided 2-phase NCG fluid properties

Definition at line 175 of file FluidPropertiesInterrogator.h.

Referenced by execute().

◆ _has_2phase_ncg_partial_pressure

const bool FluidPropertiesInterrogator::_has_2phase_ncg_partial_pressure
protected

flag that user provided 2-phase NCG partial pressure fluid properties

Definition at line 177 of file FluidPropertiesInterrogator.h.

Referenced by computeVaporMixture().

◆ _has_vapor_mixture

const bool FluidPropertiesInterrogator::_has_vapor_mixture
protected

flag that user provided vapor mixture fluid properties

Definition at line 171 of file FluidPropertiesInterrogator.h.

Referenced by execute(), and FluidPropertiesInterrogator().

◆ _json

const bool& FluidPropertiesInterrogator::_json
protected

true if the output should use JSON format

Definition at line 156 of file FluidPropertiesInterrogator.h.

Referenced by execute().

◆ _nan_encountered

bool FluidPropertiesInterrogator::_nan_encountered
protected

flag that NaN has been encountered

Definition at line 187 of file FluidPropertiesInterrogator.h.

Referenced by compute1Phase(), compute2Phase(), computeVaporMixture(), and outputProperty().

◆ _precision

const unsigned int& FluidPropertiesInterrogator::_precision
protected

Precision used for printing values.

Definition at line 190 of file FluidPropertiesInterrogator.h.

Referenced by outputProperty().


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