www.mooseframework.org
Public Types | Public Member Functions | Static Public Member Functions | Public Attributes | Static Public Attributes | Protected Types | Protected Member Functions | Static Protected Member Functions | Protected Attributes | Static Protected Attributes | List of all members
CavityPressureUserObject Class Reference

#include <CavityPressureUserObject.h>

Inheritance diagram for CavityPressureUserObject:
[legend]

Public Types

typedef DataFileName DataFileParameterType
 

Public Member Functions

 CavityPressureUserObject (const InputParameters &parameters)
 
virtual void execute () override
 
virtual void initialize () override
 
virtual void finalize () override
 
virtual Real computeCavityVolume ()
 
Real getValue (const MooseEnum &quantity) const
 
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 &value, T2 &proxy)
 
void gatherProxyValueMin (T1 &value, T2 &proxy)
 
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 & 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 &name, const std::string *param=nullptr) 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 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
 
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 ()
 
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 ()
 
const std::vector< MooseVariableScalar *> & getCoupledMooseScalarVars ()
 
const std::set< TagID > & getScalarVariableCoupleableVectorTags () const
 
const std::set< TagID > & getScalarVariableCoupleableMatrixTags () const
 
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 Types

enum  CAVITY_PRESSURE_USEROBJECT_QUANTITY { INITIAL_MOLES, CAVITY_PRESSURE }
 

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
 
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
 
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
 
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
 
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 ()
 
Moose::StateArg determineState () const
 
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

Real_cavity_pressure
 The pressure within the cavity. More...
 
Real_n0
 Initial number of moles of gas. More...
 
const Real _initial_pressure
 
std::vector< const PostprocessorValue * > _material_input
 Postprocessors containing additional material released to the cavity. More...
 
std::vector< const PostprocessorValue * > _volume
 Postprocessors whose sum equal the meshed cavity volume. More...
 
const Real _R
 The ideal gas constant. More...
 
const Real_temperature
 Reference to a postprocessor that contains the cavity temperature. More...
 
const bool _init_temp_given
 Whether or not an initial temperature is given. More...
 
const Real _init_temp
 The initial temperature. More...
 
const Real _startup_time
 The total time to ramp up the pressure to its initial value. More...
 
bool & _initialized
 
std::vector< const PostprocessorValue * > _additional_volumes
 Additional volume that communicates with the cavity volume but is not meshed. More...
 
std::vector< const PostprocessorValue * > _temperature_of_additional_volumes
 The temperature of the additional volume. More...
 
Real _start_time
 The time at which the pressure is at its maximum values. 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_sc_fe_problem
 
const THREAD_ID _sc_tid
 
const Real_real_zero
 
const VariableValue_scalar_zero
 
const Point & _point_zero
 
MooseApp_pg_moose_app
 
const std::string _prefix
 
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
 
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

Definition at line 14 of file CavityPressureUserObject.h.

Member Enumeration Documentation

◆ CAVITY_PRESSURE_USEROBJECT_QUANTITY

Constructor & Destructor Documentation

◆ CavityPressureUserObject()

CavityPressureUserObject::CavityPressureUserObject ( const InputParameters parameters)

Definition at line 54 of file CavityPressureUserObject.C.

55  : GeneralUserObject(params),
56  _cavity_pressure(declareRestartableData<Real>("cavity_pressure", 0.0)),
57  _n0(declareRestartableData<Real>("initial_moles", 0.0)),
58  _initial_pressure(getParam<Real>("initial_pressure")),
59  _material_input(params.get<std::vector<PostprocessorName>>("material_input").size()),
60  _volume(params.get<std::vector<PostprocessorName>>("volume").size()),
61  _R(getParam<Real>("R")),
62  _temperature(getPostprocessorValue("temperature")),
63  _init_temp_given(isParamValid("initial_temperature")),
64  _init_temp(_init_temp_given ? getParam<Real>("initial_temperature") : 0.0),
65  _startup_time(getParam<Real>("startup_time")),
66  _initialized(declareRestartableData<bool>("initialized", false)),
68  isParamValid("additional_volumes")
69  ? params.get<std::vector<PostprocessorName>>("additional_volumes").size()
70  : zero),
72  isParamValid("temperature_of_additional_volumes")
73  ? params.get<std::vector<PostprocessorName>>("temperature_of_additional_volumes").size()
74  : zero),
75  _start_time(0.0)
76 {
77  auto material_names = params.get<std::vector<PostprocessorName>>("material_input");
78  for (unsigned int i = 0; i < _material_input.size(); ++i)
79  _material_input[i] = &getPostprocessorValueByName(material_names[i]);
80 
81  auto volume_names = params.get<std::vector<PostprocessorName>>("volume");
82  for (unsigned int i = 0; i < volume_names.size(); ++i)
83  _volume[i] = &getPostprocessorValueByName(volume_names[i]);
84 
85  if (isParamValid("additional_volumes") != isParamValid("temperature_of_additional_volumes"))
86  mooseError("Both additional volumes and their corresponding temperatures must be specified");
87 
89  mooseError(
90  "The number of additional volumes and temperatures of additional volumes musts be equal.");
91 
92  auto additional_volume_names = params.get<std::vector<PostprocessorName>>("additional_volumes");
93  for (unsigned int i = 0; i < _additional_volumes.size(); ++i)
94  _additional_volumes[i] = &getPostprocessorValueByName(additional_volume_names[i]);
95 
96  auto temperature_of_additional_volume_names =
97  params.get<std::vector<PostprocessorName>>("temperature_of_additional_volumes");
98  for (unsigned int i = 0; i < _temperature_of_additional_volumes.size(); ++i)
100  &getPostprocessorValueByName(temperature_of_additional_volume_names[i]);
101 }
Real & _cavity_pressure
The pressure within the cavity.
const Real _init_temp
The initial temperature.
std::vector< const PostprocessorValue * > _volume
Postprocessors whose sum equal the meshed cavity volume.
T & declareRestartableData(const std::string &data_name, Args &&... args)
const Number zero
const PostprocessorValue & getPostprocessorValue(const std::string &param_name, const unsigned int index=0) const
std::vector< const PostprocessorValue * > _material_input
Postprocessors containing additional material released to the cavity.
const Real _R
The ideal gas constant.
bool isParamValid(const std::string &name) const
const bool _init_temp_given
Whether or not an initial temperature is given.
std::vector< const PostprocessorValue * > _temperature_of_additional_volumes
The temperature of the additional volume.
const T & getParam(const std::string &name) const
const Real & _temperature
Reference to a postprocessor that contains the cavity temperature.
virtual const PostprocessorValue & getPostprocessorValueByName(const PostprocessorName &name) const
const Real _startup_time
The total time to ramp up the pressure to its initial value.
Real & _n0
Initial number of moles of gas.
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
Real _start_time
The time at which the pressure is at its maximum values.
std::vector< const PostprocessorValue * > _additional_volumes
Additional volume that communicates with the cavity volume but is not meshed.
GeneralUserObject(const InputParameters &parameters)
void mooseError(Args &&... args) const
const Elem & get(const ElemType type_in)

Member Function Documentation

◆ computeCavityVolume()

Real CavityPressureUserObject::computeCavityVolume ( )
virtual

Definition at line 175 of file CavityPressureUserObject.C.

Referenced by execute(), and initialize().

176 {
177  Real volume = 0;
178  for (unsigned int i = 0; i < _volume.size(); ++i)
179  volume += *_volume[i];
180 
181  return volume;
182 }
std::vector< const PostprocessorValue * > _volume
Postprocessors whose sum equal the meshed cavity volume.
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real

◆ execute()

void CavityPressureUserObject::execute ( )
overridevirtual

Implements GeneralUserObject.

Definition at line 155 of file CavityPressureUserObject.C.

156 {
157  const Real cavity_volume = computeCavityVolume();
158 
159  Real mat = 0;
160 
161  for (unsigned int i = 0; i < _material_input.size(); ++i)
162  mat += *_material_input[i];
163 
164  Real volume_temp_ratio = cavity_volume / _temperature;
165 
166  for (unsigned int i = 0; i < _additional_volumes.size(); ++i)
167  volume_temp_ratio += *_additional_volumes[i] / *_temperature_of_additional_volumes[i];
168 
169  const Real pressure = (_n0 + mat) * _R / volume_temp_ratio;
170  const Real factor = _t >= _start_time + _startup_time ? 1.0 : (_t - _start_time) / _startup_time;
171  _cavity_pressure = factor * pressure;
172 }
Real & _cavity_pressure
The pressure within the cavity.
std::vector< const PostprocessorValue * > _material_input
Postprocessors containing additional material released to the cavity.
const Real _R
The ideal gas constant.
std::vector< const PostprocessorValue * > _temperature_of_additional_volumes
The temperature of the additional volume.
const Real & _temperature
Reference to a postprocessor that contains the cavity temperature.
const Real _startup_time
The total time to ramp up the pressure to its initial value.
Real & _n0
Initial number of moles of gas.
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
Real _start_time
The time at which the pressure is at its maximum values.
std::vector< const PostprocessorValue * > _additional_volumes
Additional volume that communicates with the cavity volume but is not meshed.
static const std::string pressure
Definition: NS.h:56

◆ finalize()

virtual void CavityPressureUserObject::finalize ( )
inlineoverridevirtual

Implements GeneralUserObject.

Definition at line 23 of file CavityPressureUserObject.h.

23 {}

◆ getValue()

Real CavityPressureUserObject::getValue ( const MooseEnum quantity) const

Definition at line 104 of file CavityPressureUserObject.C.

Referenced by CavityPressurePostprocessor::getValue().

105 {
106  Real value = 0;
107  if (quantity == INITIAL_MOLES)
108  {
109  if (_n0 < 0.0)
110  mooseError("In ",
111  _name,
112  ": Negative number of moles calculated as an input for the cavity pressure");
113 
114  value = _n0;
115  }
116  else if (quantity == CAVITY_PRESSURE)
118  else
119  mooseError("In ", _name, ": Unknown quantity.");
120 
121  return value;
122 }
Real & _cavity_pressure
The pressure within the cavity.
Real value(unsigned n, unsigned alpha, unsigned beta, Real x)
const std::string _name
Real & _n0
Initial number of moles of gas.
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
void mooseError(Args &&... args) const

◆ initialize()

void CavityPressureUserObject::initialize ( )
overridevirtual

Implements GeneralUserObject.

Definition at line 125 of file CavityPressureUserObject.C.

126 {
127  const Real cavity_volume = computeCavityVolume();
128 
129  if (!_initialized)
130  {
131  Real init_temp = _temperature;
132  if (_init_temp_given)
133  init_temp = _init_temp;
134 
135  if (MooseUtils::absoluteFuzzyLessEqual(init_temp, 0.0))
136  mooseError("Cannot have initial temperature of zero when initializing cavity pressure. "
137  "Does the supplied Postprocessor for temperature execute at initial?");
138 
139  Real volume_temp_ratio = cavity_volume / init_temp;
140 
141  for (unsigned int i = 0; i < _additional_volumes.size(); ++i)
142  volume_temp_ratio += *_additional_volumes[i] / *_temperature_of_additional_volumes[i];
143 
144  _n0 = _initial_pressure * volume_temp_ratio / _R;
145 
146  _start_time = _t - _dt;
147  const Real factor =
150  _initialized = true;
151  }
152 }
Real & _cavity_pressure
The pressure within the cavity.
const Real _init_temp
The initial temperature.
const Real _R
The ideal gas constant.
const bool _init_temp_given
Whether or not an initial temperature is given.
std::vector< const PostprocessorValue * > _temperature_of_additional_volumes
The temperature of the additional volume.
const Real & _temperature
Reference to a postprocessor that contains the cavity temperature.
const Real _startup_time
The total time to ramp up the pressure to its initial value.
Real & _n0
Initial number of moles of gas.
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
Real _start_time
The time at which the pressure is at its maximum values.
std::vector< const PostprocessorValue * > _additional_volumes
Additional volume that communicates with the cavity volume but is not meshed.
bool absoluteFuzzyLessEqual(const T &var1, const T2 &var2, const T3 &tol=libMesh::TOLERANCE *libMesh::TOLERANCE)
void mooseError(Args &&... args) const

◆ validParams()

InputParameters CavityPressureUserObject::validParams ( )
static

Definition at line 15 of file CavityPressureUserObject.C.

Referenced by CavityPressureUOAction::validParams().

16 {
18  params.addClassDescription("Uses the ideal gas law to compute internal pressure "
19  "and an initial moles of gas quantity.");
20  params.addRangeCheckedParam<Real>(
21  "initial_pressure",
22  0.0,
23  "initial_pressure >= 0.0",
24  "The initial pressure in the cavity. If not given, a zero initial pressure will be used.");
25  params.addParam<std::vector<PostprocessorName>>("material_input",
26  "The name of the postprocessor(s) that holds the "
27  "amount of material injected into the cavity.");
29  "R", "R > 0.0", "The universal gas constant for the units used.");
30  params.addRequiredParam<PostprocessorName>(
31  "temperature", "The name of the average temperature postprocessor value.");
32  params.addRangeCheckedParam<Real>(
33  "initial_temperature", "initial_temperature > 0.0", "Initial temperature (optional)");
34  params.addRequiredParam<std::vector<PostprocessorName>>(
35  "volume",
36  "The name of the postprocessor(s) that holds the value of the internal volume in the cavity");
37 
38  params.addParam<std::vector<PostprocessorName>>(
39  "additional_volumes",
40  "The name of the postprocessor(s) that hold additional volumes that are connected to the "
41  "cavity but not meshed.");
42  params.addParam<std::vector<PostprocessorName>>(
43  "temperature_of_additional_volumes",
44  "The name of the postprocessor(s) that hold the temperatures of the additional volumes.");
45  params.addParam<Real>(
46  "startup_time",
47  0.0,
48  "The amount of time during which the pressure will ramp from zero to its true value.");
49  params.set<bool>("use_displaced_mesh") = true;
50 
51  return params;
52 }
void addRequiredRangeCheckedParam(const std::string &name, const std::string &parsed_function, const std::string &doc_string)
static InputParameters validParams()
void addParam(const std::string &name, const std::initializer_list< typename T::value_type > &value, const std::string &doc_string)
T & set(const std::string &name, bool quiet_mode=false)
void addRequiredParam(const std::string &name, const std::string &doc_string)
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
void addClassDescription(const std::string &doc_string)
void addRangeCheckedParam(const std::string &name, const T &value, const std::string &parsed_function, const std::string &doc_string)

Member Data Documentation

◆ _additional_volumes

std::vector<const PostprocessorValue *> CavityPressureUserObject::_additional_volumes
protected

Additional volume that communicates with the cavity volume but is not meshed.

Definition at line 68 of file CavityPressureUserObject.h.

Referenced by CavityPressureUserObject(), execute(), and initialize().

◆ _cavity_pressure

Real& CavityPressureUserObject::_cavity_pressure
protected

The pressure within the cavity.

Definition at line 37 of file CavityPressureUserObject.h.

Referenced by execute(), getValue(), and initialize().

◆ _init_temp

const Real CavityPressureUserObject::_init_temp
protected

The initial temperature.

Definition at line 60 of file CavityPressureUserObject.h.

Referenced by initialize().

◆ _init_temp_given

const bool CavityPressureUserObject::_init_temp_given
protected

Whether or not an initial temperature is given.

Definition at line 57 of file CavityPressureUserObject.h.

Referenced by initialize().

◆ _initial_pressure

const Real CavityPressureUserObject::_initial_pressure
protected

Definition at line 42 of file CavityPressureUserObject.h.

Referenced by initialize().

◆ _initialized

bool& CavityPressureUserObject::_initialized
protected

Definition at line 65 of file CavityPressureUserObject.h.

Referenced by initialize().

◆ _material_input

std::vector<const PostprocessorValue *> CavityPressureUserObject::_material_input
protected

Postprocessors containing additional material released to the cavity.

Definition at line 45 of file CavityPressureUserObject.h.

Referenced by CavityPressureUserObject(), and execute().

◆ _n0

Real& CavityPressureUserObject::_n0
protected

Initial number of moles of gas.

Definition at line 40 of file CavityPressureUserObject.h.

Referenced by execute(), getValue(), and initialize().

◆ _R

const Real CavityPressureUserObject::_R
protected

The ideal gas constant.

Definition at line 51 of file CavityPressureUserObject.h.

Referenced by execute(), and initialize().

◆ _start_time

Real CavityPressureUserObject::_start_time
protected

The time at which the pressure is at its maximum values.

Definition at line 74 of file CavityPressureUserObject.h.

Referenced by execute(), and initialize().

◆ _startup_time

const Real CavityPressureUserObject::_startup_time
protected

The total time to ramp up the pressure to its initial value.

Definition at line 63 of file CavityPressureUserObject.h.

Referenced by execute(), and initialize().

◆ _temperature

const Real& CavityPressureUserObject::_temperature
protected

Reference to a postprocessor that contains the cavity temperature.

Definition at line 54 of file CavityPressureUserObject.h.

Referenced by execute(), and initialize().

◆ _temperature_of_additional_volumes

std::vector<const PostprocessorValue *> CavityPressureUserObject::_temperature_of_additional_volumes
protected

The temperature of the additional volume.

Definition at line 71 of file CavityPressureUserObject.h.

Referenced by CavityPressureUserObject(), execute(), and initialize().

◆ _volume

std::vector<const PostprocessorValue *> CavityPressureUserObject::_volume
protected

Postprocessors whose sum equal the meshed cavity volume.

Definition at line 48 of file CavityPressureUserObject.h.

Referenced by CavityPressureUserObject(), and computeCavityVolume().


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