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 | Protected Attributes | Static Private Member Functions | Private Attributes | List of all members
FlowModel1PhaseBase Class Referenceabstract

Base class for a flow model for a single-phase fluid. More...

#include <FlowModel1PhaseBase.h>

Inheritance diagram for FlowModel1PhaseBase:
[legend]

Public Types

typedef DataFileName DataFileParameterType
 

Public Member Functions

 FlowModel1PhaseBase (const InputParameters &params)
 
virtual void addVariables () override
 Add variables the model uses.
 
virtual void addInitialConditions () override
 Add initial conditions.
 
virtual void addMooseObjects () override
 Add MOOSE objects this model uses.
 
virtual std::vector< VariableName > solutionVariableNames () const =0
 Returns the solution variable names for the flow model.
 
virtual void init ()
 Initialize the model.
 
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
 
const Parallel::Communicator & comm () const
 
processor_id_type n_processors () const
 
processor_id_type processor_id () const
 
std::string genName (const std::string &prefix, unsigned int id, const std::string &suffix="") const
 Build a name from a prefix, number and possible suffix.
 
std::string genName (const std::string &prefix, unsigned int i, unsigned int j, const std::string &suffix="") const
 Build a name from a prefix, 2 numbers and possible suffix.
 
std::string genName (const std::string &prefix, const std::string &name, unsigned int i) const
 Build a name from 2 strings and a number.
 
std::string genName (const std::string &prefix, const std::string &middle, const std::string &suffix="") const
 Build a name from strings.
 
std::string genSafeName (const std::string &prefix, const std::string &middle, const std::string &suffix="") const
 Build a name from strings that is safe to use in input files (i.e.
 

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)
 

Public Attributes

 usingCombinedWarningSolutionWarnings
 
const ConsoleStream _console
 

Static Public Attributes

static const std::string AREA = THM::AREA
 
static const std::string AREA_LINEAR = THM::AREA_LINEAR
 
static const std::string HEAT_FLUX_WALL = THM::HEAT_FLUX_WALL
 
static const std::string HEAT_FLUX_PERIMETER = THM::HEAT_FLUX_PERIMETER
 
static const std::string NUSSELT_NUMBER = THM::NUSSELT_NUMBER
 
static const std::string SURFACE_TENSION
 
static const std::string TEMPERATURE_WALL = THM::TEMPERATURE_WALL
 
static const std::string UNITY = THM::UNITY
 
static const std::string DIRECTION = THM::DIRECTION
 
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
 

Protected Member Functions

virtual Real getScalingFactorRhoA () const =0
 
virtual Real getScalingFactorRhoUA () const =0
 
virtual Real getScalingFactorRhoEA () const =0
 
bool ICParametersAreValid () const
 Returns true if all of the IC parameters are valid.
 
void addFunctionIC (const VariableName &var_name, const FunctionName &function_name)
 Adds an IC from a function.
 
virtual void addRhoAIC ()
 
virtual void addRhoUAIC ()
 
virtual void addRhoEAIC ()=0
 
virtual void addVelocityIC ()
 
virtual void addDensityIC ()=0
 
virtual void addSpecificVolumeIC ()
 
virtual void addSpecificInternalEnergyIC ()
 
virtual void addSpecificTotalEnthalpyIC ()
 
virtual void addKernels ()
 Adds the kernels.
 
void addTimeDerivativeKernelIfTransient (const VariableName &var_name)
 Adds a time derivative kernel for the given variable if problem is transient.
 
virtual void addMomentumAreaGradientKernel ()
 
virtual void addMomentumFrictionKernel ()
 
virtual void addMomentumGravityKernel ()
 
virtual void addEnergyGravityKernel ()
 
virtual void addDGKernels ()
 Adds the DG kernels.
 
virtual void addHeatConductionDGKernel ()
 
virtual void addAuxKernels ()
 Adds the aux kernels.
 
virtual void addPressureAux ()=0
 
virtual void addTemperatureAux ()=0
 
virtual void addVelocityAux ()
 
virtual void addDensityAux ()
 
virtual void addSpecificVolumeAux ()
 
virtual void addSpecificInternalEnergyAux ()
 
virtual void addSpecificTotalEnthalpyAux ()
 
virtual void addFunctorMaterials ()
 Adds the functor materials.
 
virtual void addFluidPropertiesMaterials ()=0
 Adds materials to compute fluid properties.
 
virtual void addNumericalFluxUserObject ()=0
 Adds numerical flux user object.
 
virtual void addRDGMooseObjects ()
 Adds RDG objects.
 
virtual void addSlopeReconstructionMaterial ()=0
 Adds slope reconstruction material.
 
virtual void addRDGAdvectionDGKernels ()=0
 Adds DG kernels.
 
virtual void addPostprocessors ()
 Adds post-processors.
 
const FunctionName & getVariableFn (const FunctionName &fn_param_name)
 
virtual void addCommonVariables ()
 Adds variables common to any flow model (A, P_hf, ...)
 
virtual void addCommonInitialConditions ()
 Adds initial conditions common to any flow model.
 
virtual void addCommonMooseObjects ()
 Adds common MOOSE objects.
 
void flagInvalidSolutionInternal (const InvalidSolutionID invalid_solution_id) const
 
InvalidSolutionID registerInvalidSolutionInternal (const std::string &message, const bool warning) const
 

Protected Attributes

const MooseEnum _rdg_slope_reconstruction
 Slope reconstruction type for rDG.
 
const UserObjectName _numerical_flux_name
 Numerical flux user object name.
 
THMProblem_sim
 
Factory_factory
 The Factory associated with the MooseApp.
 
FlowChannelBase_flow_channel
 The flow channel component that built this class.
 
const libMesh::FEType_fe_type
 The type of FE used for flow.
 
const UserObjectName _fp_name
 The name of the user object that defines fluid properties.
 
const std::string _comp_name
 The component name.
 
const RealVectorValue & _gravity_vector
 Gravitational acceleration vector.
 
const Real _gravity_magnitude
 Gravitational acceleration magnitude.
 
std::vector< VariableName > _solution_vars
 
std::vector< VariableName > _derivative_vars
 
const bool & _output_vector_velocity
 True if we output velocity as a vector-value field, false for outputting velocity as a scalar.
 
const bool & _enabled
 
MooseApp_app
 
ActionFactory_action_factory
 
const std::string & _type
 
const std::string & _name
 
const InputParameters_pars
 
const Parallel::Communicator & _communicator
 

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

const ParallelParamObject_parent
 
const MooseBase_si_moose_base
 
const FEProblemBase_si_problem
 

Detailed Description

Base class for a flow model for a single-phase fluid.

Definition at line 17 of file FlowModel1PhaseBase.h.

Constructor & Destructor Documentation

◆ FlowModel1PhaseBase()

FlowModel1PhaseBase::FlowModel1PhaseBase ( const InputParameters params)

Definition at line 24 of file FlowModel1PhaseBase.C.

25 : FlowModel(params),
26 _rdg_slope_reconstruction(params.get<MooseEnum>("rdg_slope_reconstruction")),
27 _numerical_flux_name(params.get<UserObjectName>("numerical_flux"))
28{
29}
const UserObjectName _numerical_flux_name
Numerical flux user object name.
const MooseEnum _rdg_slope_reconstruction
Slope reconstruction type for rDG.
Provides functions to setup the flow model.
Definition FlowModel.h:28
std::vector< std::pair< R1, R2 > > get(const std::string &param1, const std::string &param2) const

Member Function Documentation

◆ addAuxKernels()

void FlowModel1PhaseBase::addAuxKernels ( )
protectedvirtual

Adds the aux kernels.

Reimplemented in FlowModelGasMix.

Definition at line 316 of file FlowModel1PhaseBase.C.

317{
325}
virtual void addSpecificTotalEnthalpyAux()
virtual void addTemperatureAux()=0
virtual void addPressureAux()=0
virtual void addSpecificInternalEnergyAux()
virtual void addVelocityAux()
virtual void addSpecificVolumeAux()

Referenced by FlowModelGasMix::addAuxKernels(), and addMooseObjects().

◆ addCommonInitialConditions()

void FlowModel::addCommonInitialConditions ( )
protectedvirtualinherited

Adds initial conditions common to any flow model.

Definition at line 80 of file FlowModel.C.

81{
83 {
84 const std::vector<SubdomainName> & block = _flow_channel.getSubdomainNames();
85 const FunctionName & area_function = _flow_channel.getAreaFunctionName();
86
87 if (!_sim.hasFunction(area_function))
88 {
89 const Function & fn = _sim.getFunction(area_function);
90 _sim.addConstantIC(AREA, fn.value(0, Point()), block);
91 _sim.addConstantIC(AREA_LINEAR, fn.value(0, Point()), block);
92 }
93 else
94 {
95 _sim.addFunctionIC(AREA_LINEAR, area_function, block);
96
97 {
98 const std::string class_name = "FunctionNodalAverageIC";
99 InputParameters params = _factory.getValidParams(class_name);
100 params.set<VariableName>("variable") = AREA;
101 params.set<std::vector<SubdomainName>>("block") = block;
102 params.set<FunctionName>("function") = area_function;
103 _sim.addSimInitialCondition(class_name, genName(_comp_name, AREA, "ic"), params);
104 }
105 }
106 }
107}
virtual const std::vector< SubdomainName > & getSubdomainNames() const
Gets the subdomain names for this component.
Definition Component.C:345
virtual bool hasFunction(const std::string &name, const THREAD_ID tid=0)
virtual Function & getFunction(const std::string &name, const THREAD_ID tid=0)
const FunctionName & getAreaFunctionName() const
Get the name of the function describing the flow channel area.
FlowChannelBase & _flow_channel
The flow channel component that built this class.
Definition FlowModel.h:59
static const std::string AREA
Definition FlowModel.h:102
static const std::string AREA_LINEAR
Definition FlowModel.h:103
const std::string _comp_name
The component name.
Definition FlowModel.h:68
Factory & _factory
The Factory associated with the MooseApp.
Definition FlowModel.h:56
THMProblem & _sim
Definition FlowModel.h:53
virtual Real value(Real t, const Point &p) const
T & set(const std::string &name, bool quiet_mode=false)
bool isRestarting() const
bool isParamValid(const std::string &name) const
MooseApp & _app
std::string genName(const std::string &prefix, unsigned int id, const std::string &suffix="") const
Build a name from a prefix, number and possible suffix.
void addConstantIC(const VariableName &var_name, Real value, const std::vector< SubdomainName > &block_names)
Definition Simulation.C:512
void addFunctionIC(const VariableName &var_name, const std::string &func_name, const std::vector< SubdomainName > &block_names)
Definition Simulation.C:532
void addSimInitialCondition(const std::string &type, const std::string &name, InputParameters params)
Definition Simulation.C:495

Referenced by addInitialConditions().

◆ addCommonMooseObjects()

void FlowModel::addCommonMooseObjects ( )
protectedvirtualinherited

Adds common MOOSE objects.

Definition at line 110 of file FlowModel.C.

111{
112 // add material property equal to one, useful for dummy multiplier values
113 {
114 const std::string class_name = "ConstantMaterial";
115 InputParameters params = _factory.getValidParams(class_name);
116 params.set<std::vector<SubdomainName>>("block") = _flow_channel.getSubdomainNames();
117 params.set<std::string>("property_name") = FlowModel::UNITY;
118 params.set<Real>("value") = 1.0;
119 params.set<std::vector<VariableName>>("derivative_vars") = _derivative_vars;
120 _sim.addMaterial(class_name, genName(_comp_name, FlowModel::UNITY), params);
121 }
122}
virtual void addMaterial(const std::string &material_name, const std::string &name, InputParameters &parameters)
static const std::string UNITY
Definition FlowModel.h:109
std::vector< VariableName > _derivative_vars
Definition FlowModel.h:79
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real

Referenced by addMooseObjects().

◆ addCommonVariables()

void FlowModel::addCommonVariables ( )
protectedvirtualinherited

Adds variables common to any flow model (A, P_hf, ...)

Definition at line 70 of file FlowModel.C.

71{
72 const std::vector<SubdomainName> & subdomains = _flow_channel.getSubdomainNames();
73
74 _sim.addSimVariable(false, AREA, _fe_type, subdomains);
76 _sim.addSimVariable(false, AREA_LINEAR, FEType(FIRST, LAGRANGE), subdomains);
77}
const libMesh::FEType & _fe_type
The type of FE used for flow.
Definition FlowModel.h:62
static const std::string HEAT_FLUX_PERIMETER
Definition FlowModel.h:105
void addSimVariable(bool nl, const VariableName &name, libMesh::FEType fe_type, Real scaling_factor=1.0)
Queues a variable of type MooseVariableScalar to be added to the nonlinear or aux system.
Definition Simulation.C:271

Referenced by addVariables().

◆ addDensityAux()

void FlowModel1PhaseBase::addDensityAux ( )
protectedvirtual

Definition at line 361 of file FlowModel1PhaseBase.C.

362{
363 const std::string class_name = "QuotientAux";
364 InputParameters params = _factory.getValidParams(class_name);
365 params.set<AuxVariableName>("variable") = THM::DENSITY;
366 params.set<std::vector<SubdomainName>>("block") = _flow_channel.getSubdomainNames();
367 params.set<std::vector<VariableName>>("numerator") = {THM::RHOA};
368 params.set<std::vector<VariableName>>("denominator") = {THM::AREA};
369 params.set<ExecFlagEnum>("execute_on") = {EXEC_INITIAL, EXEC_TIMESTEP_END};
370 _sim.addAuxKernel(class_name, genName(_comp_name, "rho_aux"), params);
371}
const ExecFlagType EXEC_TIMESTEP_END
const ExecFlagType EXEC_INITIAL
virtual void addAuxKernel(const std::string &kernel_name, const std::string &name, InputParameters &parameters)
InputParameters getValidParams(const std::string &name) const
static const std::string AREA
Definition THMNames.h:14
static const std::string DENSITY
Definition THMNames.h:16
static const std::string RHOA
Definition THMNames.h:29

Referenced by addAuxKernels().

◆ addDensityIC()

virtual void FlowModel1PhaseBase::addDensityIC ( )
protectedpure virtual

Implemented in FlowModelGasMix, and FlowModelSinglePhase.

Referenced by addInitialConditions().

◆ addDGKernels()

void FlowModel1PhaseBase::addDGKernels ( )
protectedvirtual

Adds the DG kernels.

Reimplemented in FlowModelGasMix.

Definition at line 295 of file FlowModel1PhaseBase.C.

296{
297 if (_flow_channel.getParam<bool>("enable_heat_conduction"))
299}
virtual void addHeatConductionDGKernel()
const T & getParam(const std::string &name) const

Referenced by FlowModelGasMix::addDGKernels(), and addMooseObjects().

◆ addEnergyGravityKernel()

void FlowModel1PhaseBase::addEnergyGravityKernel ( )
protectedvirtual

Definition at line 280 of file FlowModel1PhaseBase.C.

281{
282 const std::string class_name = "ADOneD3EqnEnergyGravity";
283 InputParameters params = _factory.getValidParams(class_name);
284 params.set<NonlinearVariableName>("variable") = THM::RHOEA;
285 params.set<std::vector<SubdomainName>>("block") = _flow_channel.getSubdomainNames();
286 params.set<std::vector<VariableName>>("A") = {THM::AREA};
287 params.set<MaterialPropertyName>("direction") = THM::DIRECTION;
288 params.set<MaterialPropertyName>("rho") = THM::DENSITY;
289 params.set<MaterialPropertyName>("vel") = THM::VELOCITY;
290 params.set<RealVectorValue>("gravity_vector") = _gravity_vector;
291 _sim.addKernel(class_name, genName(_comp_name, "energy_gravity"), params);
292}
virtual void addKernel(const std::string &kernel_name, const std::string &name, InputParameters &parameters)
const RealVectorValue & _gravity_vector
Gravitational acceleration vector.
Definition FlowModel.h:71
static const std::string DIRECTION
Definition THMNames.h:17
static const std::string RHOEA
Definition THMNames.h:30
static const std::string VELOCITY
Definition THMNames.h:43
VectorValue< Real > RealVectorValue

Referenced by addKernels().

◆ addFluidPropertiesMaterials()

virtual void FlowModel1PhaseBase::addFluidPropertiesMaterials ( )
protectedpure virtual

Adds materials to compute fluid properties.

Implemented in FlowModelGasMix, and FlowModelSinglePhase.

Referenced by addMooseObjects().

◆ addFunctionIC()

void FlowModel1PhaseBase::addFunctionIC ( const VariableName &  var_name,
const FunctionName &  function_name 
)
protected

Adds an IC from a function.

Definition at line 98 of file FlowModel1PhaseBase.C.

100{
101 const std::string class_name = "FunctionIC";
102 InputParameters params = _factory.getValidParams(class_name);
103 params.set<VariableName>("variable") = var_name;
104 params.set<std::vector<SubdomainName>>("block") = _flow_channel.getSubdomainNames();
105 params.set<FunctionName>("function") = function_name;
106 _sim.addSimInitialCondition(class_name, genName(_comp_name, var_name + "_ic"), params);
107}

Referenced by addInitialConditions(), FlowModelGasMix::addInitialConditions(), and addVelocityIC().

◆ addFunctorMaterials()

virtual void FlowModel1PhaseBase::addFunctorMaterials ( )
inlineprotectedvirtual

Adds the functor materials.

Definition at line 77 of file FlowModel1PhaseBase.h.

77{}

Referenced by addMooseObjects().

◆ addHeatConductionDGKernel()

void FlowModel1PhaseBase::addHeatConductionDGKernel ( )
protectedvirtual

Definition at line 302 of file FlowModel1PhaseBase.C.

303{
304 const std::string class_name = "HeatConduction3EqnDGKernel";
305 InputParameters params = _factory.getValidParams(class_name);
306 params.set<NonlinearVariableName>("variable") = THM::RHOEA;
307 params.set<std::vector<SubdomainName>>("block") = _flow_channel.getSubdomainNames();
308 params.set<MaterialPropertyName>("k") = THM::THERMAL_CONDUCTIVITY;
309 params.set<MaterialPropertyName>("T") = THM::TEMPERATURE;
310 params.set<MaterialPropertyName>("direction") = THM::DIRECTION;
311 params.set<std::vector<VariableName>>("A") = {THM::AREA};
312 _sim.addDGKernel(class_name, genName(name(), "heat_cond"), params);
313}
virtual void addDGKernel(const std::string &kernel_name, const std::string &name, InputParameters &parameters)
const std::string & name() const
static const std::string TEMPERATURE
Definition THMNames.h:39
static const std::string THERMAL_CONDUCTIVITY
Definition THMNames.h:41

Referenced by addDGKernels().

◆ addInitialConditions()

void FlowModel1PhaseBase::addInitialConditions ( )
overridevirtual

Add initial conditions.

Implements FlowModel.

Reimplemented in FlowModelGasMix, and FlowModelSinglePhase.

Definition at line 64 of file FlowModel1PhaseBase.C.

65{
67
69 {
70 addRhoAIC();
71 addRhoUAIC();
72 addRhoEAIC();
73
74 addFunctionIC(THM::PRESSURE, _flow_channel.getParam<FunctionName>("initial_p"));
75 addFunctionIC(THM::TEMPERATURE, _flow_channel.getParam<FunctionName>("initial_T"));
81 }
82}
virtual void addRhoEAIC()=0
virtual void addSpecificTotalEnthalpyIC()
bool ICParametersAreValid() const
Returns true if all of the IC parameters are valid.
virtual void addSpecificInternalEnergyIC()
virtual void addSpecificVolumeIC()
virtual void addDensityIC()=0
void addFunctionIC(const VariableName &var_name, const FunctionName &function_name)
Adds an IC from a function.
virtual void addCommonInitialConditions()
Adds initial conditions common to any flow model.
Definition FlowModel.C:80
static const std::string PRESSURE
Definition THMNames.h:27

Referenced by FlowModelGasMix::addInitialConditions(), and FlowModelSinglePhase::addInitialConditions().

◆ addKernels()

void FlowModel1PhaseBase::addKernels ( )
protectedvirtual

Adds the kernels.

Reimplemented in FlowModelGasMix, and FlowModelSinglePhase.

Definition at line 208 of file FlowModel1PhaseBase.C.

209{
210 // Mass equation
212
213 // Momentum equation
218
219 // Energy equation
222}
virtual void addMomentumFrictionKernel()
virtual void addMomentumAreaGradientKernel()
virtual void addMomentumGravityKernel()
void addTimeDerivativeKernelIfTransient(const VariableName &var_name)
Adds a time derivative kernel for the given variable if problem is transient.
virtual void addEnergyGravityKernel()
static const std::string RHOUA
Definition THMNames.h:31

Referenced by FlowModelGasMix::addKernels(), FlowModelSinglePhase::addKernels(), and addMooseObjects().

◆ addMomentumAreaGradientKernel()

void FlowModel1PhaseBase::addMomentumAreaGradientKernel ( )
protectedvirtual

Definition at line 238 of file FlowModel1PhaseBase.C.

239{
240 const std::string class_name = "ADOneD3EqnMomentumAreaGradient";
241 InputParameters params = _factory.getValidParams(class_name);
242 params.set<NonlinearVariableName>("variable") = THM::RHOUA;
243 params.set<std::vector<SubdomainName>>("block") = _flow_channel.getSubdomainNames();
244 params.set<std::vector<VariableName>>("A") = {THM::AREA_LINEAR};
245 params.set<MaterialPropertyName>("direction") = THM::DIRECTION;
246 params.set<MaterialPropertyName>("p") = THM::PRESSURE;
247 _sim.addKernel(class_name, genName(_comp_name, "mom_area_grad"), params);
248}
static const std::string AREA_LINEAR
Definition THMNames.h:15

Referenced by addKernels().

◆ addMomentumFrictionKernel()

void FlowModel1PhaseBase::addMomentumFrictionKernel ( )
protectedvirtual

Definition at line 251 of file FlowModel1PhaseBase.C.

252{
253 const std::string class_name = "ADOneD3EqnMomentumFriction";
254 InputParameters params = _factory.getValidParams(class_name);
255 params.set<NonlinearVariableName>("variable") = THM::RHOUA;
256 params.set<std::vector<SubdomainName>>("block") = _flow_channel.getSubdomainNames();
257 params.set<std::vector<VariableName>>("A") = {THM::AREA};
258 params.set<MaterialPropertyName>("D_h") = {THM::HYDRAULIC_DIAMETER};
259 params.set<MaterialPropertyName>("rho") = THM::DENSITY;
260 params.set<MaterialPropertyName>("vel") = THM::VELOCITY;
261 params.set<MaterialPropertyName>("f_D") = THM::FRICTION_FACTOR_DARCY;
262 _sim.addKernel(class_name, genName(_comp_name, "mom_friction"), params);
263}
static const std::string FRICTION_FACTOR_DARCY
Definition THMNames.h:19
static const std::string HYDRAULIC_DIAMETER
Definition THMNames.h:23

Referenced by addKernels().

◆ addMomentumGravityKernel()

void FlowModel1PhaseBase::addMomentumGravityKernel ( )
protectedvirtual

Definition at line 266 of file FlowModel1PhaseBase.C.

267{
268 const std::string class_name = "ADOneD3EqnMomentumGravity";
269 InputParameters params = _factory.getValidParams(class_name);
270 params.set<NonlinearVariableName>("variable") = THM::RHOUA;
271 params.set<std::vector<SubdomainName>>("block") = _flow_channel.getSubdomainNames();
272 params.set<std::vector<VariableName>>("A") = {THM::AREA};
273 params.set<MaterialPropertyName>("direction") = THM::DIRECTION;
274 params.set<MaterialPropertyName>("rho") = THM::DENSITY;
275 params.set<RealVectorValue>("gravity_vector") = _gravity_vector;
276 _sim.addKernel(class_name, genName(_comp_name, "mom_gravity"), params);
277}

Referenced by addKernels().

◆ addMooseObjects()

void FlowModel1PhaseBase::addMooseObjects ( )
overridevirtual

Add MOOSE objects this model uses.

Implements FlowModel.

Definition at line 193 of file FlowModel1PhaseBase.C.

194{
196
197 addKernels();
198 addDGKernels();
205}
virtual void addFunctorMaterials()
Adds the functor materials.
virtual void addKernels()
Adds the kernels.
virtual void addPostprocessors()
Adds post-processors.
virtual void addFluidPropertiesMaterials()=0
Adds materials to compute fluid properties.
virtual void addRDGMooseObjects()
Adds RDG objects.
virtual void addAuxKernels()
Adds the aux kernels.
virtual void addNumericalFluxUserObject()=0
Adds numerical flux user object.
virtual void addDGKernels()
Adds the DG kernels.
virtual void addCommonMooseObjects()
Adds common MOOSE objects.
Definition FlowModel.C:110

◆ addNumericalFluxUserObject()

virtual void FlowModel1PhaseBase::addNumericalFluxUserObject ( )
protectedpure virtual

Adds numerical flux user object.

Implemented in FlowModelGasMix, and FlowModelSinglePhase.

Referenced by addMooseObjects().

◆ addPostprocessors()

virtual void FlowModel1PhaseBase::addPostprocessors ( )
inlineprotectedvirtual

Adds post-processors.

Definition at line 92 of file FlowModel1PhaseBase.h.

92{}

Referenced by addMooseObjects().

◆ addPressureAux()

virtual void FlowModel1PhaseBase::addPressureAux ( )
protectedpure virtual

Implemented in FlowModelGasMix, and FlowModelSinglePhase.

Referenced by addAuxKernels().

◆ addRDGAdvectionDGKernels()

virtual void FlowModel1PhaseBase::addRDGAdvectionDGKernels ( )
protectedpure virtual

Adds DG kernels.

Implemented in FlowModelGasMix, and FlowModelSinglePhase.

Referenced by addRDGMooseObjects().

◆ addRDGMooseObjects()

void FlowModel1PhaseBase::addRDGMooseObjects ( )
protectedvirtual

Adds RDG objects.

Definition at line 416 of file FlowModel1PhaseBase.C.

417{
420}
virtual void addRDGAdvectionDGKernels()=0
Adds DG kernels.
virtual void addSlopeReconstructionMaterial()=0
Adds slope reconstruction material.

Referenced by addMooseObjects().

◆ addRhoAIC()

void FlowModel1PhaseBase::addRhoAIC ( )
protectedvirtual

Definition at line 110 of file FlowModel1PhaseBase.C.

111{
112 const std::string class_name = "VariableProductIC";
113 InputParameters params = _factory.getValidParams(class_name);
114 params.set<VariableName>("variable") = THM::RHOA;
115 params.set<std::vector<SubdomainName>>("block") = _flow_channel.getSubdomainNames();
116 params.set<std::vector<VariableName>>("values") = {THM::DENSITY, THM::AREA};
117 _sim.addSimInitialCondition(class_name, genName(_comp_name, "rhoA_ic"), params);
118}

Referenced by addInitialConditions().

◆ addRhoEAIC()

virtual void FlowModel1PhaseBase::addRhoEAIC ( )
protectedpure virtual

Implemented in FlowModelGasMix, and FlowModelSinglePhase.

Referenced by addInitialConditions().

◆ addRhoUAIC()

void FlowModel1PhaseBase::addRhoUAIC ( )
protectedvirtual

Definition at line 121 of file FlowModel1PhaseBase.C.

122{
123 const std::string class_name = "VariableFunctionProductIC";
124 InputParameters params = _factory.getValidParams(class_name);
125 params.set<VariableName>("variable") = THM::RHOUA;
126 params.set<std::vector<SubdomainName>>("block") = _flow_channel.getSubdomainNames();
127 params.set<std::vector<VariableName>>("var") = {THM::RHOA};
128 params.set<FunctionName>("fn") = _flow_channel.getParam<FunctionName>("initial_vel");
129 _sim.addSimInitialCondition(class_name, genName(_comp_name, "rhouA_ic"), params);
130}

Referenced by addInitialConditions().

◆ addSlopeReconstructionMaterial()

virtual void FlowModel1PhaseBase::addSlopeReconstructionMaterial ( )
protectedpure virtual

Adds slope reconstruction material.

Implemented in FlowModelGasMix, and FlowModelSinglePhase.

Referenced by addRDGMooseObjects().

◆ addSpecificInternalEnergyAux()

void FlowModel1PhaseBase::addSpecificInternalEnergyAux ( )
protectedvirtual

Definition at line 387 of file FlowModel1PhaseBase.C.

388{
389 const std::string class_name = "THMSpecificInternalEnergyAux";
390 InputParameters params = _factory.getValidParams(class_name);
391 params.set<AuxVariableName>("variable") = THM::SPECIFIC_INTERNAL_ENERGY;
392 params.set<std::vector<SubdomainName>>("block") = _flow_channel.getSubdomainNames();
393 params.set<std::vector<VariableName>>("rhoA") = {THM::RHOA};
394 params.set<std::vector<VariableName>>("rhouA") = {THM::RHOUA};
395 params.set<std::vector<VariableName>>("rhoEA") = {THM::RHOEA};
396 params.set<ExecFlagEnum>("execute_on") = {EXEC_INITIAL, EXEC_TIMESTEP_END};
397 _sim.addAuxKernel(class_name, genName(_comp_name, "e_aux"), params);
398}
static const std::string SPECIFIC_INTERNAL_ENERGY
Definition THMNames.h:36

Referenced by addAuxKernels().

◆ addSpecificInternalEnergyIC()

void FlowModel1PhaseBase::addSpecificInternalEnergyIC ( )
protectedvirtual

Definition at line 166 of file FlowModel1PhaseBase.C.

167{
168 const std::string class_name = "SpecificInternalEnergyIC";
169 InputParameters params = _factory.getValidParams(class_name);
170 params.set<VariableName>("variable") = THM::SPECIFIC_INTERNAL_ENERGY;
171 params.set<std::vector<SubdomainName>>("block") = _flow_channel.getSubdomainNames();
172 params.set<std::vector<VariableName>>("rhoA") = {THM::RHOA};
173 params.set<std::vector<VariableName>>("rhouA") = {THM::RHOUA};
174 params.set<std::vector<VariableName>>("rhoEA") = {THM::RHOEA};
175 _sim.addSimInitialCondition(class_name, genName(_comp_name, "e_ic"), params);
176}

Referenced by addInitialConditions().

◆ addSpecificTotalEnthalpyAux()

void FlowModel1PhaseBase::addSpecificTotalEnthalpyAux ( )
protectedvirtual

Definition at line 401 of file FlowModel1PhaseBase.C.

402{
403 const std::string class_name = "SpecificTotalEnthalpyAux";
404 InputParameters params = _factory.getValidParams(class_name);
405 params.set<AuxVariableName>("variable") = THM::SPECIFIC_TOTAL_ENTHALPY;
406 params.set<std::vector<SubdomainName>>("block") = _flow_channel.getSubdomainNames();
407 params.set<std::vector<VariableName>>("rhoA") = {THM::RHOA};
408 params.set<std::vector<VariableName>>("rhoEA") = {THM::RHOEA};
409 params.set<std::vector<VariableName>>("p") = {THM::PRESSURE};
410 params.set<std::vector<VariableName>>("A") = {THM::AREA};
411 params.set<ExecFlagEnum>("execute_on") = {EXEC_INITIAL, EXEC_TIMESTEP_END};
412 _sim.addAuxKernel(class_name, genName(_comp_name, "H_auxkernel"), params);
413}
static const std::string SPECIFIC_TOTAL_ENTHALPY
Definition THMNames.h:37

Referenced by addAuxKernels().

◆ addSpecificTotalEnthalpyIC()

void FlowModel1PhaseBase::addSpecificTotalEnthalpyIC ( )
protectedvirtual

Definition at line 179 of file FlowModel1PhaseBase.C.

180{
181 const std::string class_name = "SpecificTotalEnthalpyIC";
182 InputParameters params = _factory.getValidParams(class_name);
183 params.set<VariableName>("variable") = THM::SPECIFIC_TOTAL_ENTHALPY;
184 params.set<std::vector<SubdomainName>>("block") = _flow_channel.getSubdomainNames();
185 params.set<std::vector<VariableName>>("p") = {THM::PRESSURE};
186 params.set<std::vector<VariableName>>("rhoA") = {THM::RHOA};
187 params.set<std::vector<VariableName>>("rhoEA") = {THM::RHOEA};
188 params.set<std::vector<VariableName>>("A") = {THM::AREA};
189 _sim.addSimInitialCondition(class_name, genName(_comp_name, "H_ic"), params);
190}

Referenced by addInitialConditions().

◆ addSpecificVolumeAux()

void FlowModel1PhaseBase::addSpecificVolumeAux ( )
protectedvirtual

Definition at line 374 of file FlowModel1PhaseBase.C.

375{
376 const std::string class_name = "THMSpecificVolumeAux";
377 InputParameters params = _factory.getValidParams(class_name);
378 params.set<AuxVariableName>("variable") = THM::SPECIFIC_VOLUME;
379 params.set<std::vector<SubdomainName>>("block") = _flow_channel.getSubdomainNames();
380 params.set<std::vector<VariableName>>("rhoA") = {THM::RHOA};
381 params.set<std::vector<VariableName>>("A") = {THM::AREA};
382 params.set<ExecFlagEnum>("execute_on") = {EXEC_INITIAL, EXEC_TIMESTEP_END};
383 _sim.addAuxKernel(class_name, genName(_comp_name, "v_aux"), params);
384}
static const std::string SPECIFIC_VOLUME
Definition THMNames.h:38

Referenced by addAuxKernels().

◆ addSpecificVolumeIC()

void FlowModel1PhaseBase::addSpecificVolumeIC ( )
protectedvirtual

Definition at line 154 of file FlowModel1PhaseBase.C.

155{
156 const std::string class_name = "SpecificVolumeIC";
157 InputParameters params = _factory.getValidParams(class_name);
158 params.set<VariableName>("variable") = THM::SPECIFIC_VOLUME;
159 params.set<std::vector<SubdomainName>>("block") = _flow_channel.getSubdomainNames();
160 params.set<std::vector<VariableName>>("rhoA") = {THM::RHOA};
161 params.set<std::vector<VariableName>>("A") = {THM::AREA};
162 _sim.addSimInitialCondition(class_name, genName(_comp_name, "v_ic"), params);
163}

Referenced by addInitialConditions().

◆ addTemperatureAux()

virtual void FlowModel1PhaseBase::addTemperatureAux ( )
protectedpure virtual

Implemented in FlowModelGasMix, and FlowModelSinglePhase.

Referenced by addAuxKernels().

◆ addTimeDerivativeKernelIfTransient()

void FlowModel1PhaseBase::addTimeDerivativeKernelIfTransient ( const VariableName &  var_name)
protected

Adds a time derivative kernel for the given variable if problem is transient.

Definition at line 225 of file FlowModel1PhaseBase.C.

226{
228 {
229 const std::string class_name = "ADTimeDerivative";
230 InputParameters params = _factory.getValidParams(class_name);
231 params.set<NonlinearVariableName>("variable") = var_name;
232 params.set<std::vector<SubdomainName>>("block") = _flow_channel.getSubdomainNames();
233 _sim.addKernel(class_name, genName(_comp_name, var_name + "_td"), params);
234 }
235}
bool problemIsTransient() const
Whether the problem is transient.
Definition Component.h:264

Referenced by addKernels(), FlowModelGasMix::addKernels(), and FlowModelSinglePhase::addKernels().

◆ addVariables()

void FlowModel1PhaseBase::addVariables ( )
overridevirtual

Add variables the model uses.

Implements FlowModel.

Reimplemented in FlowModelGasMix, and FlowModelSinglePhase.

Definition at line 32 of file FlowModel1PhaseBase.C.

33{
35
36 const std::vector<SubdomainName> & subdomains = _flow_channel.getSubdomainNames();
37
38 // Nonlinear variables
42
43 // Auxiliary variables
44 _sim.addSimVariable(false, THM::DENSITY, _fe_type, subdomains);
46 {
47 _sim.addSimVariable(false, THM::VELOCITY_X, _fe_type, subdomains);
48 _sim.addSimVariable(false, THM::VELOCITY_Y, _fe_type, subdomains);
49 _sim.addSimVariable(false, THM::VELOCITY_Z, _fe_type, subdomains);
50 }
51 else
52 _sim.addSimVariable(false, THM::VELOCITY, _fe_type, subdomains);
53 _sim.addSimVariable(false, THM::PRESSURE, _fe_type, subdomains);
56 _sim.addSimVariable(false, THM::TEMPERATURE, _fe_type, subdomains);
58
61}
virtual std::vector< VariableName > solutionVariableNames() const =0
Returns the solution variable names for the flow model.
virtual Real getScalingFactorRhoA() const =0
virtual Real getScalingFactorRhoEA() const =0
virtual Real getScalingFactorRhoUA() const =0
virtual void addCommonVariables()
Adds variables common to any flow model (A, P_hf, ...)
Definition FlowModel.C:70
const bool & _output_vector_velocity
True if we output velocity as a vector-value field, false for outputting velocity as a scalar.
Definition FlowModel.h:82
std::vector< VariableName > _solution_vars
Definition FlowModel.h:76
static const std::string VELOCITY_Y
Definition THMNames.h:45
static const std::string VELOCITY_X
Definition THMNames.h:44
static const std::string VELOCITY_Z
Definition THMNames.h:46

Referenced by FlowModelGasMix::addVariables(), and FlowModelSinglePhase::addVariables().

◆ addVelocityAux()

void FlowModel1PhaseBase::addVelocityAux ( )
protectedvirtual

Definition at line 328 of file FlowModel1PhaseBase.C.

329{
331 {
332 std::vector<AuxVariableName> var_names = {THM::VELOCITY_X, THM::VELOCITY_Y, THM::VELOCITY_Z};
333 for (const auto i : make_range(Moose::dim))
334 {
335 const std::string class_name = "ADVectorVelocityComponentAux";
336 InputParameters params = _factory.getValidParams(class_name);
337 params.set<AuxVariableName>("variable") = var_names[i];
338 params.set<std::vector<SubdomainName>>("block") = _flow_channel.getSubdomainNames();
339 params.set<std::vector<VariableName>>("arhoA") = {THM::RHOA};
340 params.set<std::vector<VariableName>>("arhouA") = {THM::RHOUA};
341 params.set<MaterialPropertyName>("direction") = THM::DIRECTION;
342 params.set<unsigned int>("component") = i;
343 params.set<ExecFlagEnum>("execute_on") = {EXEC_INITIAL, EXEC_TIMESTEP_END};
344 _sim.addAuxKernel(class_name, genName(_comp_name, i, "vel_vec"), params);
345 }
346 }
347 else
348 {
349 const std::string class_name = "QuotientAux";
350 InputParameters params = _factory.getValidParams(class_name);
351 params.set<AuxVariableName>("variable") = THM::VELOCITY;
352 params.set<std::vector<SubdomainName>>("block") = _flow_channel.getSubdomainNames();
353 params.set<std::vector<VariableName>>("numerator") = {THM::RHOUA};
354 params.set<std::vector<VariableName>>("denominator") = {THM::RHOA};
355 params.set<ExecFlagEnum>("execute_on") = {EXEC_INITIAL, EXEC_TIMESTEP_END};
356 _sim.addAuxKernel(class_name, genName(_comp_name, "vel"), params);
357 }
358}
unsigned int dim
IntRange< T > make_range(T beg, T end)

Referenced by addAuxKernels().

◆ addVelocityIC()

void FlowModel1PhaseBase::addVelocityIC ( )
protectedvirtual

Definition at line 133 of file FlowModel1PhaseBase.C.

134{
136 {
137 std::vector<VariableName> var_name = {THM::VELOCITY_X, THM::VELOCITY_Y, THM::VELOCITY_Z};
138 for (const auto i : make_range(Moose::dim))
139 {
140 const std::string class_name = "VectorVelocityIC";
141 InputParameters params = _factory.getValidParams(class_name);
142 params.set<VariableName>("variable") = var_name[i];
143 params.set<FunctionName>("vel_fn") = _flow_channel.getParam<FunctionName>("initial_vel");
144 params.set<std::vector<SubdomainName>>("block") = _flow_channel.getSubdomainNames();
145 params.set<unsigned int>("component") = i;
146 _sim.addSimInitialCondition(class_name, genName(_comp_name, "vel_ic", i), params);
147 }
148 }
149 else
150 addFunctionIC(THM::VELOCITY, _flow_channel.getParam<FunctionName>("initial_vel"));
151}

Referenced by addInitialConditions().

◆ genName() [1/4]

std::string NamingInterface::genName ( const std::string &  prefix,
const std::string &  middle,
const std::string &  suffix = "" 
) const
inlineinherited

Build a name from strings.

Definition at line 66 of file NamingInterface.h.

69 {
70 std::stringstream ss;
71 ss << prefix << ":" << middle;
72 if (!suffix.empty())
73 ss << ":" << suffix;
74 return ss.str();
75 }

◆ genName() [2/4]

std::string NamingInterface::genName ( const std::string &  prefix,
const std::string &  name,
unsigned int  i 
) const
inlineinherited

Build a name from 2 strings and a number.

Definition at line 56 of file NamingInterface.h.

57 {
58 std::stringstream ss;
59 ss << prefix << ":" << name << ":" << i;
60 return ss.str();
61 }
const std::string name
Definition Setup.h:21

◆ genName() [3/4]

std::string NamingInterface::genName ( const std::string &  prefix,
unsigned int  i,
unsigned int  j,
const std::string &  suffix = "" 
) const
inlineinherited

Build a name from a prefix, 2 numbers and possible suffix.

Definition at line 41 of file NamingInterface.h.

45 {
46 std::stringstream ss;
47 ss << prefix << ":" << i << ":" << j;
48 if (!suffix.empty())
49 ss << ":" << suffix;
50 return ss.str();
51 }

◆ genName() [4/4]

std::string NamingInterface::genName ( const std::string &  prefix,
unsigned int  id,
const std::string &  suffix = "" 
) const
inlineinherited

Build a name from a prefix, number and possible suffix.

Definition at line 29 of file NamingInterface.h.

30 {
31 std::stringstream ss;
32 ss << prefix << ":" << id;
33 if (!suffix.empty())
34 ss << ":" << suffix;
35 return ss.str();
36 }

Referenced by Closures1PhaseBase::addAverageWallTemperatureMaterial(), FlowModel::addCommonInitialConditions(), FlowModel::addCommonMooseObjects(), FlowChannelBase::addCommonObjects(), Simulation::addComponentScalarIC(), HeatStructureBase::addConstantDensitySolidPropertiesMaterial(), Simulation::addConstantIC(), Simulation::addConstantScalarIC(), addDensityAux(), FlowModelGasMix::addDensityIC(), FlowModelSinglePhase::addDensityIC(), addEnergyGravityKernel(), FlowChannel1Phase::addFlowChannel1PhaseFunctorMaterial(), FlowModelGasMix::addFluidPropertiesMaterials(), FlowModelSinglePhase::addFluidPropertiesMaterials(), VolumeJunctionCoupledFlux1Phase::addFluxTransfer(), addFunctionIC(), Simulation::addFunctionIC(), addHeatConductionDGKernel(), HeatTransferBase::addHeatedPerimeter(), HeatConductionModel::addHeatEquationRZ(), HeatConductionModel::addHeatEquationXYZ(), HeatTransferFromTemperature1Phase::addHeatTransferKernels(), FlowChannel1PhaseBase::addHydraulicDiameterMaterial(), FlowModelGasMix::addMassDiffusionEnergyDGKernel(), FlowModelGasMix::addMassDiffusionSpeciesDGKernel(), FlowModelGasMix::addMassFractionAux(), addMomentumAreaGradientKernel(), addMomentumFrictionKernel(), addMomentumGravityKernel(), FlowChannel1Phase::addMooseObjects(), FlowChannelBase::addMooseObjects(), FormLoss1PhaseBase::addMooseObjects(), FormLossFromExternalApp1Phase::addMooseObjects(), FormLossFromFunction1Phase::addMooseObjects(), GateValve1Phase::addMooseObjects(), HeatSourceFromPowerDensity::addMooseObjects(), HeatSourceFromTotalPower::addMooseObjects(), HeatSourceVolumetric1Phase::addMooseObjects(), HeatStructure2DCoupler::addMooseObjects(), HeatStructure2DRadiationCouplerRZ::addMooseObjects(), HeatTransferBase::addMooseObjects(), HeatTransferFromExternalAppHeatFlux1Phase::addMooseObjects(), HeatTransferFromHeatFlux1Phase::addMooseObjects(), HeatTransferFromHeatStructure1Phase::addMooseObjects(), HeatTransferFromHeatStructure3D1Phase::addMooseObjects(), HeatTransferFromSpecifiedTemperature1Phase::addMooseObjects(), HSBoundaryAmbientConvection::addMooseObjects(), HSBoundaryExternalAppConvection::addMooseObjects(), HSBoundaryExternalAppHeatFlux::addMooseObjects(), HSBoundaryExternalAppTemperature::addMooseObjects(), HSBoundaryHeatFlux::addMooseObjects(), HSBoundaryRadiation::addMooseObjects(), HSBoundarySpecifiedTemperature::addMooseObjects(), HSCoupler2D2DRadiation::addMooseObjects(), HSCoupler2D3D::addMooseObjects(), InletVelocityTemperature1Phase::addMooseObjects(), JunctionOneToOne1Phase::addMooseObjects(), Shaft::addMooseObjects(), ShaftConnectedCompressor1Phase::addMooseObjects(), ShaftConnectedPump1Phase::addMooseObjects(), ShaftConnectedTurbine1Phase::addMooseObjects(), SimpleTurbine1Phase::addMooseObjects(), TotalPower::addMooseObjects(), VolumeJunction1Phase::addMooseObjects(), FunctorClosures::addMooseObjectsFlowChannel(), Closures1PhaseSimple::addMooseObjectsHeatTransfer(), Component::addNonlinearStepFunctorMaterial(), FlowChannel1Phase::addNormalized1PhaseResidualNorm(), FlowModelSinglePhase::addPassiveTransportIC(), FlowModelGasMix::addPressureAux(), FlowModelSinglePhase::addPressureAux(), VolumeJunctionCoupledFlux1Phase::addPropertyTransfer(), FlowModelGasMix::addRDGAdvectionDGKernels(), FlowModelSinglePhase::addRDGAdvectionDGKernels(), addRhoAIC(), FlowModelGasMix::addRhoEAIC(), FlowModelSinglePhase::addRhoEAIC(), addRhoUAIC(), FlowModelGasMix::addSlopeReconstructionMaterial(), FlowModelSinglePhase::addSlopeReconstructionMaterial(), addSpecificInternalEnergyAux(), addSpecificInternalEnergyIC(), addSpecificTotalEnthalpyAux(), addSpecificTotalEnthalpyIC(), addSpecificVolumeAux(), addSpecificVolumeIC(), FlowModelGasMix::addTemperatureAux(), FlowModelSinglePhase::addTemperatureAux(), addTimeDerivativeKernelIfTransient(), FlowChannelBase::addVariables(), addVelocityAux(), addVelocityIC(), VolumeJunction1Phase::addVolumeJunctionIC(), VolumeJunctionCoupledFlux1Phase::addVolumeJunctionKernel(), Closures1PhaseTHM::addWallFFMaterial(), Closures1PhaseBase::addWallFrictionFunctionMaterial(), Closures1PhaseTHM::addWallHTCMaterial(), ClosuresBase::addWallTemperatureFromAuxMaterial(), Closures1PhaseSimple::addWallTemperatureFromHeatFluxMaterial(), FlowBoundary1Phase::addWeakBCs(), FlowBoundaryGasMix::addWeakBCs(), ClosuresBase::addWeightedAverageMaterial(), FlowModelGasMix::addXiRhoAIC(), ClosuresBase::addZeroMaterial(), FileMeshComponent::buildMesh(), Component1D::buildMesh(), Component2D::buildMesh(), HeatSourceBase::HeatSourceBase(), Component::nonlinearConvergenceName(), and Simulation::setupInitialConditionsFromFile().

◆ genSafeName()

std::string NamingInterface::genSafeName ( const std::string &  prefix,
const std::string &  middle,
const std::string &  suffix = "" 
) const
inlineinherited

Build a name from strings that is safe to use in input files (i.e.

can be exposed to users)

Definition at line 80 of file NamingInterface.h.

83 {
84 std::stringstream ss;
85 ss << prefix << "_" << middle;
86 if (!suffix.empty())
87 ss << "_" << suffix;
88 return ss.str();
89 }

Referenced by HSBoundaryAmbientConvection::addMooseObjects(), HSBoundaryExternalAppConvection::addMooseObjects(), HSBoundaryExternalAppHeatFlux::addMooseObjects(), HSBoundaryHeatFlux::addMooseObjects(), and HSBoundaryRadiation::addMooseObjects().

◆ getScalingFactorRhoA()

virtual Real FlowModel1PhaseBase::getScalingFactorRhoA ( ) const
protectedpure virtual

Implemented in FlowModelGasMix, and FlowModelSinglePhase.

Referenced by addVariables().

◆ getScalingFactorRhoEA()

virtual Real FlowModel1PhaseBase::getScalingFactorRhoEA ( ) const
protectedpure virtual

Implemented in FlowModelGasMix, and FlowModelSinglePhase.

Referenced by addVariables().

◆ getScalingFactorRhoUA()

virtual Real FlowModel1PhaseBase::getScalingFactorRhoUA ( ) const
protectedpure virtual

Implemented in FlowModelGasMix, and FlowModelSinglePhase.

Referenced by addVariables().

◆ getVariableFn()

const FunctionName & FlowModel::getVariableFn ( const FunctionName &  fn_param_name)
protectedinherited

Definition at line 56 of file FlowModel.C.

57{
58 const FunctionName & fn_name = _flow_channel.getParam<FunctionName>(fn_param_name);
59 const Function & fn = _sim.getFunction(fn_name);
60
61 if (dynamic_cast<const ConstantFunction *>(&fn) != nullptr)
62 {
63 _flow_channel.connectObject(fn.parameters(), fn_name, fn_param_name, "value");
64 }
65
66 return fn_name;
67}
void connectObject(const InputParameters &obj_params, const std::string &obj_name, const std::string &param) const
Connects a controllable parameter of the component to a controllable parameter of a constituent objec...
Definition Component.C:98

Referenced by FlowModelSinglePhase::addRhoEAIC().

◆ ICParametersAreValid()

bool FlowModel1PhaseBase::ICParametersAreValid ( ) const
protected

Returns true if all of the IC parameters are valid.

Definition at line 85 of file FlowModel1PhaseBase.C.

86{
87 const auto & flow_channel_1phase_base =
88 dynamic_cast<const FlowChannel1PhaseBase &>(_flow_channel);
89
90 for (const auto & param : flow_channel_1phase_base.ICParameters())
92 return false;
93
94 return true;
95}
Base class for single-phase flow channels.
if(subdm)

Referenced by addInitialConditions(), and FlowModelGasMix::addInitialConditions().

◆ init()

virtual void FlowModel::init ( )
inlinevirtualinherited

Initialize the model.

Definition at line 35 of file FlowModel.h.

35{}

◆ solutionVariableNames()

virtual std::vector< VariableName > FlowModel1PhaseBase::solutionVariableNames ( ) const
pure virtual

Returns the solution variable names for the flow model.

Implemented in FlowModelGasMix, and FlowModelSinglePhase.

Referenced by addVariables().

◆ validParams()

InputParameters FlowModel1PhaseBase::validParams ( )
static

Definition at line 15 of file FlowModel1PhaseBase.C.

16{
18 params.addRequiredParam<UserObjectName>("numerical_flux", "Numerical flux user object name");
19 params.addRequiredParam<MooseEnum>("rdg_slope_reconstruction",
20 "Slope reconstruction type for rDG");
21 return params;
22}
static InputParameters validParams()
Definition FlowModel.C:19
void addRequiredParam(const std::string &name, const std::string &doc_string)

Referenced by FlowModelGasMix::validParams(), and FlowModelSinglePhase::validParams().

Member Data Documentation

◆ _comp_name

const std::string FlowModel::_comp_name
protectedinherited

◆ _derivative_vars

std::vector<VariableName> FlowModel::_derivative_vars
protectedinherited

Definition at line 79 of file FlowModel.h.

Referenced by FlowModel::addCommonMooseObjects(), and addVariables().

◆ _factory

Factory& FlowModel::_factory
protectedinherited

The Factory associated with the MooseApp.

Definition at line 56 of file FlowModel.h.

Referenced by FlowModel::addCommonInitialConditions(), FlowModel::addCommonMooseObjects(), addDensityAux(), FlowModelGasMix::addDensityIC(), FlowModelSinglePhase::addDensityIC(), addEnergyGravityKernel(), FlowModelGasMix::addFluidPropertiesMaterials(), FlowModelSinglePhase::addFluidPropertiesMaterials(), addFunctionIC(), addHeatConductionDGKernel(), FlowModelGasMix::addMassDiffusionEnergyDGKernel(), FlowModelGasMix::addMassDiffusionSpeciesDGKernel(), FlowModelGasMix::addMassFractionAux(), addMomentumAreaGradientKernel(), addMomentumFrictionKernel(), addMomentumGravityKernel(), FlowModelGasMix::addNumericalFluxUserObject(), FlowModelSinglePhase::addNumericalFluxUserObject(), FlowModelSinglePhase::addPassiveTransportIC(), FlowModelGasMix::addPressureAux(), FlowModelSinglePhase::addPressureAux(), FlowModelGasMix::addRDGAdvectionDGKernels(), FlowModelSinglePhase::addRDGAdvectionDGKernels(), addRhoAIC(), FlowModelGasMix::addRhoEAIC(), FlowModelSinglePhase::addRhoEAIC(), addRhoUAIC(), FlowModelGasMix::addSlopeReconstructionMaterial(), FlowModelSinglePhase::addSlopeReconstructionMaterial(), addSpecificInternalEnergyAux(), addSpecificInternalEnergyIC(), addSpecificTotalEnthalpyAux(), addSpecificTotalEnthalpyIC(), addSpecificVolumeAux(), addSpecificVolumeIC(), FlowModelGasMix::addTemperatureAux(), FlowModelSinglePhase::addTemperatureAux(), addTimeDerivativeKernelIfTransient(), addVelocityAux(), addVelocityIC(), and FlowModelGasMix::addXiRhoAIC().

◆ _fe_type

const libMesh::FEType& FlowModel::_fe_type
protectedinherited

The type of FE used for flow.

Definition at line 62 of file FlowModel.h.

Referenced by FlowModel::addCommonVariables(), addVariables(), FlowModelGasMix::addVariables(), and FlowModelSinglePhase::addVariables().

◆ _flow_channel

FlowChannelBase& FlowModel::_flow_channel
protectedinherited

The flow channel component that built this class.

Definition at line 59 of file FlowModel.h.

Referenced by FlowModel::addCommonInitialConditions(), FlowModel::addCommonMooseObjects(), FlowModel::addCommonVariables(), addDensityAux(), FlowModelGasMix::addDensityIC(), FlowModelSinglePhase::addDensityIC(), addDGKernels(), addEnergyGravityKernel(), FlowModelGasMix::addFluidPropertiesMaterials(), FlowModelSinglePhase::addFluidPropertiesMaterials(), addFunctionIC(), addHeatConductionDGKernel(), addInitialConditions(), FlowModelGasMix::addInitialConditions(), FlowModelSinglePhase::addInitialConditions(), FlowModelGasMix::addMassDiffusionEnergyDGKernel(), FlowModelGasMix::addMassDiffusionSpeciesDGKernel(), FlowModelGasMix::addMassFractionAux(), addMomentumAreaGradientKernel(), addMomentumFrictionKernel(), addMomentumGravityKernel(), FlowModelSinglePhase::addPassiveTransportIC(), FlowModelGasMix::addPressureAux(), FlowModelSinglePhase::addPressureAux(), FlowModelGasMix::addRDGAdvectionDGKernels(), FlowModelSinglePhase::addRDGAdvectionDGKernels(), addRhoAIC(), FlowModelGasMix::addRhoEAIC(), FlowModelSinglePhase::addRhoEAIC(), addRhoUAIC(), FlowModelGasMix::addSlopeReconstructionMaterial(), FlowModelSinglePhase::addSlopeReconstructionMaterial(), addSpecificInternalEnergyAux(), addSpecificInternalEnergyIC(), addSpecificTotalEnthalpyAux(), addSpecificTotalEnthalpyIC(), addSpecificVolumeAux(), addSpecificVolumeIC(), FlowModelGasMix::addTemperatureAux(), FlowModelSinglePhase::addTemperatureAux(), addTimeDerivativeKernelIfTransient(), addVariables(), FlowModelGasMix::addVariables(), FlowModelSinglePhase::addVariables(), addVelocityAux(), addVelocityIC(), FlowModelGasMix::addXiRhoAIC(), FlowModelSinglePhase::FlowModelSinglePhase(), FlowModel::getVariableFn(), and ICParametersAreValid().

◆ _fp_name

const UserObjectName FlowModel::_fp_name
protectedinherited

◆ _gravity_magnitude

const Real FlowModel::_gravity_magnitude
protectedinherited

Gravitational acceleration magnitude.

Definition at line 73 of file FlowModel.h.

◆ _gravity_vector

const RealVectorValue& FlowModel::_gravity_vector
protectedinherited

Gravitational acceleration vector.

Definition at line 71 of file FlowModel.h.

Referenced by addEnergyGravityKernel(), and addMomentumGravityKernel().

◆ _numerical_flux_name

const UserObjectName FlowModel1PhaseBase::_numerical_flux_name
protected

◆ _output_vector_velocity

const bool& FlowModel::_output_vector_velocity
protectedinherited

True if we output velocity as a vector-value field, false for outputting velocity as a scalar.

Definition at line 82 of file FlowModel.h.

Referenced by addVariables(), addVelocityAux(), and addVelocityIC().

◆ _rdg_slope_reconstruction

const MooseEnum FlowModel1PhaseBase::_rdg_slope_reconstruction
protected

Slope reconstruction type for rDG.

Definition at line 95 of file FlowModel1PhaseBase.h.

Referenced by FlowModelGasMix::addSlopeReconstructionMaterial(), and FlowModelSinglePhase::addSlopeReconstructionMaterial().

◆ _sim

THMProblem& FlowModel::_sim
protectedinherited

Definition at line 53 of file FlowModel.h.

Referenced by FlowModel::addCommonInitialConditions(), FlowModel::addCommonMooseObjects(), FlowModel::addCommonVariables(), addDensityAux(), FlowModelGasMix::addDensityIC(), FlowModelSinglePhase::addDensityIC(), addEnergyGravityKernel(), FlowModelGasMix::addFluidPropertiesMaterials(), FlowModelSinglePhase::addFluidPropertiesMaterials(), addFunctionIC(), addHeatConductionDGKernel(), FlowModelGasMix::addMassDiffusionEnergyDGKernel(), FlowModelGasMix::addMassDiffusionSpeciesDGKernel(), FlowModelGasMix::addMassFractionAux(), addMomentumAreaGradientKernel(), addMomentumFrictionKernel(), addMomentumGravityKernel(), FlowModelGasMix::addNumericalFluxUserObject(), FlowModelSinglePhase::addNumericalFluxUserObject(), FlowModelSinglePhase::addPassiveTransportIC(), FlowModelGasMix::addPressureAux(), FlowModelSinglePhase::addPressureAux(), FlowModelGasMix::addRDGAdvectionDGKernels(), FlowModelSinglePhase::addRDGAdvectionDGKernels(), addRhoAIC(), FlowModelGasMix::addRhoEAIC(), FlowModelSinglePhase::addRhoEAIC(), addRhoUAIC(), FlowModelGasMix::addSlopeReconstructionMaterial(), FlowModelSinglePhase::addSlopeReconstructionMaterial(), addSpecificInternalEnergyAux(), addSpecificInternalEnergyIC(), addSpecificTotalEnthalpyAux(), addSpecificTotalEnthalpyIC(), addSpecificVolumeAux(), addSpecificVolumeIC(), FlowModelGasMix::addTemperatureAux(), FlowModelSinglePhase::addTemperatureAux(), addTimeDerivativeKernelIfTransient(), addVariables(), FlowModelGasMix::addVariables(), FlowModelSinglePhase::addVariables(), addVelocityAux(), addVelocityIC(), FlowModelGasMix::addXiRhoAIC(), and FlowModel::getVariableFn().

◆ _solution_vars

std::vector<VariableName> FlowModel::_solution_vars
protectedinherited

Definition at line 76 of file FlowModel.h.

Referenced by addVariables().

◆ AREA

const std::string FlowModel::AREA = THM::AREA
staticinherited

◆ AREA_LINEAR

const std::string FlowModel::AREA_LINEAR = THM::AREA_LINEAR
staticinherited

◆ DIRECTION

const std::string FlowModel::DIRECTION = THM::DIRECTION
staticinherited

Definition at line 110 of file FlowModel.h.

Referenced by FlowModelSinglePhase::addSlopeReconstructionMaterial().

◆ HEAT_FLUX_PERIMETER

const std::string FlowModel::HEAT_FLUX_PERIMETER = THM::HEAT_FLUX_PERIMETER
staticinherited

◆ HEAT_FLUX_WALL

const std::string FlowModel::HEAT_FLUX_WALL = THM::HEAT_FLUX_WALL
staticinherited

◆ NUSSELT_NUMBER

const std::string FlowModel::NUSSELT_NUMBER = THM::NUSSELT_NUMBER
staticinherited

Definition at line 106 of file FlowModel.h.

◆ SURFACE_TENSION

const std::string FlowModel::SURFACE_TENSION
staticinherited

Definition at line 107 of file FlowModel.h.

◆ TEMPERATURE_WALL

const std::string FlowModel::TEMPERATURE_WALL = THM::TEMPERATURE_WALL
staticinherited

◆ UNITY

const std::string FlowModel::UNITY = THM::UNITY
staticinherited

Definition at line 109 of file FlowModel.h.

Referenced by FlowModel::addCommonMooseObjects().


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