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

THM 1-phase closures. More...

#include <Closures1PhaseTHM.h>

Inheritance diagram for Closures1PhaseTHM:
[legend]

Public Types

enum  WallHTCClosureType {
  WallHTCClosureType::DITTUS_BOELTER, WallHTCClosureType::KAZIMI_CARELLI, WallHTCClosureType::LYON, WallHTCClosureType::MIKITYUK,
  WallHTCClosureType::SCHAD, WallHTCClosureType::WEISMAN, WallHTCClosureType::WOLF_MCCARTHY, WallHTCClosureType::GNIELINSKI
}
 Fluid heat transfer coefficient closure type. More...
 
enum  WallFFClosureType { WallFFClosureType::CHENG_TODREAS, WallFFClosureType::CHURCHILL }
 Fluid friction factor closure type. More...
 
typedef DataFileName DataFileParameterType
 

Public Member Functions

 Closures1PhaseTHM (const InputParameters &params)
 
virtual void checkFlowChannel (const FlowChannelBase &flow_channel) const override
 Checks for errors associated with a flow channel component. More...
 
virtual void checkHeatTransfer (const HeatTransferBase &heat_transfer, const FlowChannelBase &flow_channel) const override
 Checks for errors associated with a heat transfer component. More...
 
virtual void addMooseObjectsFlowChannel (const FlowChannelBase &flow_channel) override
 Adds MOOSE objects associated with a flow channel component. More...
 
virtual void addMooseObjectsHeatTransfer (const HeatTransferBase &, const FlowChannelBase &) override
 Adds MOOSE objects associated with a heat transfer component. More...
 
virtual bool enabled () const
 
std::shared_ptr< MooseObjectgetSharedPtr ()
 
std::shared_ptr< const MooseObjectgetSharedPtr () const
 
MooseAppgetMooseApp () const
 
const std::string & type () const
 
virtual const std::string & name () const
 
std::string typeAndName () const
 
std::string errorPrefix (const std::string &error_type) const
 
void callMooseError (std::string msg, const bool with_prefix) const
 
MooseObjectParameterName uniqueParameterName (const std::string &parameter_name) const
 
const InputParametersparameters () const
 
MooseObjectName uniqueName () const
 
const T & getParam (const std::string &name) const
 
std::vector< std::pair< T1, T2 > > getParam (const std::string &param1, const std::string &param2) const
 
const T * queryParam (const std::string &name) const
 
const T & getRenamedParam (const std::string &old_name, const std::string &new_name) const
 
getCheckedPointerParam (const std::string &name, const std::string &error_string="") const
 
bool isParamValid (const std::string &name) const
 
bool isParamSetByUser (const std::string &nm) const
 
void paramError (const std::string &param, Args... args) const
 
void paramWarning (const std::string &param, Args... args) const
 
void paramInfo (const std::string &param, Args... args) const
 
void connectControllableParams (const std::string &parameter, const std::string &object_type, const std::string &object_name, const std::string &object_parameter) const
 
void mooseError (Args &&... args) const
 
void mooseErrorNonPrefixed (Args &&... args) const
 
void mooseDocumentedError (const std::string &repo_name, const unsigned int issue_num, Args &&... args) const
 
void mooseWarning (Args &&... args) const
 
void mooseWarningNonPrefixed (Args &&... args) const
 
void mooseDeprecated (Args &&... args) const
 
void mooseInfo (Args &&... args) const
 
std::string getDataFileName (const std::string &param) const
 
std::string getDataFileNameByName (const std::string &relative_path) const
 
std::string getDataFilePath (const std::string &relative_path) const
 
const Parallel::Communicator & comm () const
 
processor_id_type n_processors () const
 
processor_id_type processor_id () const
 
template<typename... Args>
void logError (Args &&... args) const
 Logs an error. More...
 
template<typename... Args>
void logComponentError (const std::string &component_name, Args &&... args) const
 Logs an error for a component. More...
 
template<typename... Args>
void logWarning (Args &&... args) const
 Logs a warning. More...
 
template<typename... Args>
void logComponentWarning (const std::string &component_name, Args &&... args) const
 Logs a warning for a component. More...
 
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. More...
 
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. More...
 
std::string genName (const std::string &prefix, const std::string &name, unsigned int i) const
 Build a name from 2 strings and a number. More...
 
std::string genName (const std::string &prefix, const std::string &middle, const std::string &suffix="") const
 Build a name from strings. More...
 
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. More...
 

Static Public Member Functions

static InputParameters validParams ()
 

Public Attributes

const ConsoleStream _console
 

Protected Member Functions

void addWallFFMaterial (const FlowChannel1Phase &flow_channel) const
 Adds material that computes wall friction factor. More...
 
void addWallHTCMaterial (const FlowChannel1Phase &flow_channel, unsigned int i) const
 Adds wall heat transfer coefficient material. More...
 
void addTemperatureWallFromHeatFluxMaterial (const FlowChannel1Phase &flow_channel, unsigned int i) const
 Adds computation of wall temperature when heat flux is specified. More...
 
void addWallFrictionFunctionMaterial (const FlowChannel1Phase &flow_channel) const
 Adds material that computes wall friction factor from a specified function. More...
 
void addAverageWallTemperatureMaterial (const FlowChannel1Phase &flow_channel) const
 Adds average wall temperature material. More...
 
void addZeroMaterial (const FlowChannelBase &flow_channel, const std::string &property_name) const
 Adds an arbitrary zero-value material. More...
 
void addWeightedAverageMaterial (const FlowChannelBase &flow_channel, const std::vector< MaterialPropertyName > &values, const std::vector< VariableName > &weights, const MaterialPropertyName &property_name) const
 Adds a weighted average material. More...
 
void addWallTemperatureFromAuxMaterial (const FlowChannelBase &flow_channel, unsigned int i=0) const
 Adds a material for wall temperature from an aux variable. More...
 

Protected Attributes

const WallHTCClosureType _wall_htc_closure
 Wall heat transfer coefficient closure. More...
 
const WallFFClosureType _wall_ff_closure
 Wall friction factor closure. More...
 
THMProblem_sim
 Simulation. More...
 
Factory_factory
 Factory associated with the MooseApp. More...
 
const bool & _enabled
 
MooseApp_app
 
const std::string _type
 
const std::string _name
 
const InputParameters_pars
 
ActionFactory_action_factory
 
const Parallel::Communicator & _communicator
 
Logger_log
 

Detailed Description

THM 1-phase closures.

Definition at line 17 of file Closures1PhaseTHM.h.

Member Enumeration Documentation

◆ WallFFClosureType

Fluid friction factor closure type.

Enumerator
CHENG_TODREAS 
CHURCHILL 

Definition at line 36 of file Closures1PhaseTHM.h.

37  {
38  CHENG_TODREAS,
39  CHURCHILL
40  };

◆ WallHTCClosureType

Fluid heat transfer coefficient closure type.

Enumerator
DITTUS_BOELTER 
KAZIMI_CARELLI 
LYON 
MIKITYUK 
SCHAD 
WEISMAN 
WOLF_MCCARTHY 
GNIELINSKI 

Definition at line 23 of file Closures1PhaseTHM.h.

24  {
25  DITTUS_BOELTER,
26  KAZIMI_CARELLI,
27  LYON,
28  MIKITYUK,
29  SCHAD,
30  WEISMAN,
31  WOLF_MCCARTHY,
32  GNIELINSKI
33  };

Constructor & Destructor Documentation

◆ Closures1PhaseTHM()

Closures1PhaseTHM::Closures1PhaseTHM ( const InputParameters params)

Definition at line 33 of file Closures1PhaseTHM.C.

34  : Closures1PhaseBase(params),
35  _wall_htc_closure(getParam<MooseEnum>("wall_htc_closure").getEnum<WallHTCClosureType>()),
36  _wall_ff_closure(getParam<MooseEnum>("wall_ff_closure").getEnum<WallFFClosureType>())
37 {
38 }
const WallFFClosureType _wall_ff_closure
Wall friction factor closure.
Closures1PhaseBase(const InputParameters &params)
const WallHTCClosureType _wall_htc_closure
Wall heat transfer coefficient closure.

Member Function Documentation

◆ addAverageWallTemperatureMaterial()

void Closures1PhaseBase::addAverageWallTemperatureMaterial ( const FlowChannel1Phase flow_channel) const
protectedinherited

Adds average wall temperature material.

Parameters
[in]flow_channelFlow channel component

Definition at line 38 of file Closures1PhaseBase.C.

Referenced by Closures1PhaseSimple::addMooseObjectsFlowChannel(), Closures1PhaseNone::addMooseObjectsFlowChannel(), and WallTemperature1PhaseClosures::addMooseObjectsFlowChannel().

39 {
40  const std::string class_name = "ADAverageWallTemperature3EqnMaterial";
41  InputParameters params = _factory.getValidParams(class_name);
42  params.set<std::vector<SubdomainName>>("block") = flow_channel.getSubdomainNames();
43  params.set<std::vector<VariableName>>("T_wall_sources") = flow_channel.getWallTemperatureNames();
44  params.set<std::vector<MaterialPropertyName>>("Hw_sources") =
45  flow_channel.getWallHTCNames1Phase();
46  params.set<std::vector<VariableName>>("P_hf_sources") = flow_channel.getHeatedPerimeterNames();
47  params.set<std::vector<VariableName>>("P_hf_total") = {FlowModel::HEAT_FLUX_PERIMETER};
48  params.set<std::vector<VariableName>>("T_fluid") = {FlowModelSinglePhase::TEMPERATURE};
49  _sim.addMaterial(class_name, genName(flow_channel.name(), "avg_T_wall_3eqn_mat"), params);
50 }
THMProblem & _sim
Simulation.
Definition: ClosuresBase.h:100
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::vector< VariableName > getHeatedPerimeterNames() const
Gets heated perimeter names for connected heat transfers.
static const std::string TEMPERATURE
virtual void addMaterial(const std::string &material_name, const std::string &name, InputParameters &parameters)
T & set(const std::string &name, bool quiet_mode=false)
InputParameters getValidParams(const std::string &name) const
std::vector< VariableName > getWallTemperatureNames() const
Gets wall temperature names for connected heat transfers.
virtual const std::string & name() const
std::vector< MaterialPropertyName > getWallHTCNames1Phase() const
Gets 1-phase wall heat transfer coefficient names for connected heat transfers.
Factory & _factory
Factory associated with the MooseApp.
Definition: ClosuresBase.h:103
static const std::string HEAT_FLUX_PERIMETER
Definition: FlowModel.h:105
virtual const std::vector< SubdomainName > & getSubdomainNames() const
Gets the subdomain names for this component.
Definition: Component.C:307

◆ addMooseObjectsFlowChannel()

void Closures1PhaseTHM::addMooseObjectsFlowChannel ( const FlowChannelBase flow_channel)
overridevirtual

Adds MOOSE objects associated with a flow channel component.

Parameters
[in]flow_channelFlow channel component

Implements ClosuresBase.

Definition at line 52 of file Closures1PhaseTHM.C.

53 {
54  const FlowChannel1Phase & flow_channel_1phase =
55  dynamic_cast<const FlowChannel1Phase &>(flow_channel);
56 
57  // wall friction material
58  if (flow_channel.isParamValid("f"))
59  addWallFrictionFunctionMaterial(flow_channel_1phase);
60  else
61  addWallFFMaterial(flow_channel_1phase);
62 
63  const unsigned int n_ht_connections = flow_channel_1phase.getNumberOfHeatTransferConnections();
64  if (n_ht_connections > 0)
65  {
66 
67  for (unsigned int i = 0; i < n_ht_connections; i++)
68  {
69  // wall heat transfer coefficient material
70  addWallHTCMaterial(flow_channel_1phase, i);
71 
72  // wall temperature material
73  if (flow_channel.getTemperatureMode())
74  addWallTemperatureFromAuxMaterial(flow_channel_1phase, i);
75  else
76  addTemperatureWallFromHeatFluxMaterial(flow_channel_1phase, i);
77  }
78  }
79 }
void addWallHTCMaterial(const FlowChannel1Phase &flow_channel, unsigned int i) const
Adds wall heat transfer coefficient material.
void addWallFFMaterial(const FlowChannel1Phase &flow_channel) const
Adds material that computes wall friction factor.
unsigned int getNumberOfHeatTransferConnections() const
Gets the number of heat transfer connections.
bool isParamValid(const std::string &name) const
void addWallTemperatureFromAuxMaterial(const FlowChannelBase &flow_channel, unsigned int i=0) const
Adds a material for wall temperature from an aux variable.
Definition: ClosuresBase.C:64
Single-component, single-phase flow channel.
void addTemperatureWallFromHeatFluxMaterial(const FlowChannel1Phase &flow_channel, unsigned int i) const
Adds computation of wall temperature when heat flux is specified.
void addWallFrictionFunctionMaterial(const FlowChannel1Phase &flow_channel) const
Adds material that computes wall friction factor from a specified function.
bool getTemperatureMode() const
Gets temperature mode flag.

◆ addMooseObjectsHeatTransfer()

virtual void Closures1PhaseTHM::addMooseObjectsHeatTransfer ( const HeatTransferBase heat_transfer,
const FlowChannelBase flow_channel 
)
inlineoverridevirtual

Adds MOOSE objects associated with a heat transfer component.

Parameters
[in]heat_transferHeat transfer component
[in]flow_channelFlow channel component

Implements ClosuresBase.

Definition at line 46 of file Closures1PhaseTHM.h.

47  {};

◆ addTemperatureWallFromHeatFluxMaterial()

void Closures1PhaseTHM::addTemperatureWallFromHeatFluxMaterial ( const FlowChannel1Phase flow_channel,
unsigned int  i 
) const
protected

Adds computation of wall temperature when heat flux is specified.

Parameters
[in]flow_channelFlow channel component
[in]iHeat transfer index

Definition at line 308 of file Closures1PhaseTHM.C.

Referenced by addMooseObjectsFlowChannel().

310 {
311  const std::string class_name = "TemperatureWallFromHeatFlux3EqnTHMMaterial";
312  InputParameters params = _factory.getValidParams(class_name);
313  params.set<std::vector<SubdomainName>>("block") = flow_channel.getSubdomainNames();
314  params.set<MaterialPropertyName>("T_wall") = flow_channel.getWallTemperatureNames()[i];
315  params.set<MaterialPropertyName>("D_h") = FlowModelSinglePhase::HYDRAULIC_DIAMETER;
316  params.set<MaterialPropertyName>("rho") = FlowModelSinglePhase::DENSITY;
317  params.set<MaterialPropertyName>("vel") = FlowModelSinglePhase::VELOCITY;
318  params.set<MaterialPropertyName>("T") = FlowModelSinglePhase::TEMPERATURE;
319  params.set<MaterialPropertyName>("k") = FlowModelSinglePhase::THERMAL_CONDUCTIVITY;
320  params.set<MaterialPropertyName>("mu") = FlowModelSinglePhase::DYNAMIC_VISCOSITY;
321  params.set<MaterialPropertyName>("cp") = FlowModelSinglePhase::SPECIFIC_HEAT_CONSTANT_PRESSURE;
322  params.set<MaterialPropertyName>("q_wall") = flow_channel.getWallHeatFluxNames()[i];
323  _sim.addMaterial(class_name, genName(flow_channel.name(), "T_from_q_wall_mat", i), params);
324 }
THMProblem & _sim
Simulation.
Definition: ClosuresBase.h:100
static const std::string SPECIFIC_HEAT_CONSTANT_PRESSURE
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.
static const std::string DYNAMIC_VISCOSITY
static const std::string TEMPERATURE
static const std::string VELOCITY
virtual void addMaterial(const std::string &material_name, const std::string &name, InputParameters &parameters)
T & set(const std::string &name, bool quiet_mode=false)
InputParameters getValidParams(const std::string &name) const
static const std::string THERMAL_CONDUCTIVITY
static const std::string DENSITY
std::vector< VariableName > getWallTemperatureNames() const
Gets wall temperature names for connected heat transfers.
std::vector< MaterialPropertyName > getWallHeatFluxNames() const
Gets wall heat flux names for connected heat transfers.
virtual const std::string & name() const
Factory & _factory
Factory associated with the MooseApp.
Definition: ClosuresBase.h:103
static const std::string HYDRAULIC_DIAMETER
virtual const std::vector< SubdomainName > & getSubdomainNames() const
Gets the subdomain names for this component.
Definition: Component.C:307

◆ addWallFFMaterial()

void Closures1PhaseTHM::addWallFFMaterial ( const FlowChannel1Phase flow_channel) const
protected

Adds material that computes wall friction factor.

Parameters
[in]flow_channelFlow channel component

Definition at line 81 of file Closures1PhaseTHM.C.

Referenced by addMooseObjectsFlowChannel().

82 {
83  switch (_wall_ff_closure)
84  {
86  {
87  const std::string class_name = "ADWallFrictionChurchillMaterial";
88  InputParameters params = _factory.getValidParams(class_name);
89  params.set<std::vector<SubdomainName>>("block") = flow_channel.getSubdomainNames();
90  params.set<MaterialPropertyName>("rho") = FlowModelSinglePhase::DENSITY;
91  params.set<MaterialPropertyName>("vel") = FlowModelSinglePhase::VELOCITY;
92  params.set<MaterialPropertyName>("D_h") = FlowModelSinglePhase::HYDRAULIC_DIAMETER;
93  params.set<MaterialPropertyName>("f_D") = FlowModelSinglePhase::FRICTION_FACTOR_DARCY;
94  params.set<MaterialPropertyName>("mu") = FlowModelSinglePhase::DYNAMIC_VISCOSITY;
95  params.set<Real>("roughness") = flow_channel.getParam<Real>("roughness");
96  const std::string obj_name = genName(flow_channel.name(), "wall_friction_mat");
97  _sim.addMaterial(class_name, obj_name, params);
98  flow_channel.connectObject(params, obj_name, "roughness");
99  break;
100  }
102  {
103  const std::string class_name = "ADWallFrictionChengMaterial";
104  InputParameters params = _factory.getValidParams(class_name);
105  params.set<std::vector<SubdomainName>>("block") = flow_channel.getSubdomainNames();
106  params.set<MaterialPropertyName>("f_D") = FlowModelSinglePhase::FRICTION_FACTOR_DARCY;
107  params.set<Real>("PoD") = flow_channel.getParam<Real>("PoD");
108  if (flow_channel.getParam<Real>("PoD") == 1.0)
109  {
110  mooseDoOnce(mooseWarning(
111  "You are using a rod bundle correlation with the default Pitch-to-Diameter "
112  "ratio value, P/D=1.0. It can be set using the PoD parameter in the corresponding "
113  "FlowChannel1Phase component"));
114  }
115  if (flow_channel.getHeatTransferGeometry() == FlowChannelBase::EConvHeatTransGeom::PIPE)
116  {
117  mooseError("The Cheng-Todreas correlation was made to be used in rod bundles, your "
118  "geometry type is "
119  "PIPE, please change heat_transfer_geom to ROD_BUNDLE or HEX_ROD_BUNDLE, or "
120  "choose a correlation valid for PIPES");
121  }
122  else if (flow_channel.getHeatTransferGeometry() ==
123  FlowChannelBase::EConvHeatTransGeom::ROD_BUNDLE)
124  {
125  params.set<MooseEnum>("bundle_array") = "SQUARE";
126  }
127  else if (flow_channel.getHeatTransferGeometry() ==
128  FlowChannelBase::EConvHeatTransGeom::HEX_ROD_BUNDLE)
129  {
130  params.set<MooseEnum>("bundle_array") = "HEXAGONAL";
131  }
132  if (flow_channel.getPipeLocation() == FlowChannelBase::EPipeLocation::INTERIOR)
133  {
134  params.set<MooseEnum>("subchannel_type") = "INTERIOR";
135  }
136  else if (flow_channel.getPipeLocation() == FlowChannelBase::EPipeLocation::EDGE)
137  {
138  params.set<MooseEnum>("subchannel_type") = "EDGE";
139  }
140  else if (flow_channel.getPipeLocation() == FlowChannelBase::EPipeLocation::CORNER)
141  {
142  params.set<MooseEnum>("subchannel_type") = "CORNER";
143  }
144  const std::string obj_name = genName(flow_channel.name(), "wall_friction_mat");
145  _sim.addMaterial(class_name, obj_name, params);
146  break;
147  }
148  default:
149  mooseError("Invalid WallFFClosureType");
150  }
151 }
THMProblem & _sim
Simulation.
Definition: ClosuresBase.h:100
const WallFFClosureType _wall_ff_closure
Wall friction factor closure.
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.
static const std::string DYNAMIC_VISCOSITY
EConvHeatTransGeom getHeatTransferGeometry() const
Gets heat transfer geometry.
static const std::string VELOCITY
virtual void addMaterial(const std::string &material_name, const std::string &name, InputParameters &parameters)
T & set(const std::string &name, bool quiet_mode=false)
InputParameters getValidParams(const std::string &name) const
static MooseEnum getPipeLocation(const std::string &name)
Gets a MooseEnum for pipe location.
static const std::string DENSITY
virtual const std::string & name() const
void mooseWarning(Args &&... args) const
const T & getParam(const std::string &name) const
static const std::string FRICTION_FACTOR_DARCY
Factory & _factory
Factory associated with the MooseApp.
Definition: ClosuresBase.h:103
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
void connectObject(const InputParameters &params, const std::string &mooseName, const std::string &name) const
Connect with control logic.
Definition: Component.C:98
static const std::string HYDRAULIC_DIAMETER
void mooseError(Args &&... args) const
virtual const std::vector< SubdomainName > & getSubdomainNames() const
Gets the subdomain names for this component.
Definition: Component.C:307

◆ addWallFrictionFunctionMaterial()

void Closures1PhaseBase::addWallFrictionFunctionMaterial ( const FlowChannel1Phase flow_channel) const
protectedinherited

Adds material that computes wall friction factor from a specified function.

This function assumes that the flow channel component has the parameter 'f' as a valid parameter, so this function should be guarded appropriately.

Parameters
[in]flow_channelFlow channel component

Definition at line 24 of file Closures1PhaseBase.C.

Referenced by Closures1PhaseSimple::addMooseObjectsFlowChannel(), and addMooseObjectsFlowChannel().

25 {
26  const FunctionName & f_D_fn_name = flow_channel.getParam<FunctionName>("f");
27  flow_channel.makeFunctionControllableIfConstant(f_D_fn_name, "f");
28 
29  const std::string class_name = "ADWallFrictionFunctionMaterial";
30  InputParameters params = _factory.getValidParams(class_name);
31  params.set<std::vector<SubdomainName>>("block") = flow_channel.getSubdomainNames();
32  params.set<MaterialPropertyName>("f_D") = FlowModelSinglePhase::FRICTION_FACTOR_DARCY;
33  params.set<FunctionName>("function") = f_D_fn_name;
34  _sim.addMaterial(class_name, genName(flow_channel.name(), "f_wall_fn_mat"), params);
35 }
THMProblem & _sim
Simulation.
Definition: ClosuresBase.h:100
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.
virtual void addMaterial(const std::string &material_name, const std::string &name, InputParameters &parameters)
T & set(const std::string &name, bool quiet_mode=false)
InputParameters getValidParams(const std::string &name) const
void makeFunctionControllableIfConstant(const FunctionName &fn_name, const std::string &control_name, const std::string &param="value") const
Makes a function controllable if it is constant.
Definition: Component.C:141
virtual const std::string & name() const
const T & getParam(const std::string &name) const
static const std::string FRICTION_FACTOR_DARCY
Factory & _factory
Factory associated with the MooseApp.
Definition: ClosuresBase.h:103
virtual const std::vector< SubdomainName > & getSubdomainNames() const
Gets the subdomain names for this component.
Definition: Component.C:307

◆ addWallHTCMaterial()

void Closures1PhaseTHM::addWallHTCMaterial ( const FlowChannel1Phase flow_channel,
unsigned int  i 
) const
protected

Adds wall heat transfer coefficient material.

Parameters
[in]flow_channelFlow channel component
[in]iHeat transfer index

Definition at line 154 of file Closures1PhaseTHM.C.

Referenced by addMooseObjectsFlowChannel().

155 {
156 
157  switch (_wall_htc_closure)
158  {
160  {
161  const std::string class_name = "ADWallHeatTransferCoefficient3EqnDittusBoelterMaterial";
162  InputParameters params = _factory.getValidParams(class_name);
163  params.set<MaterialPropertyName>("Hw") = flow_channel.getWallHTCNames1Phase()[i];
164  params.set<MaterialPropertyName>("D_h") = FlowModelSinglePhase::HYDRAULIC_DIAMETER;
165  params.set<MaterialPropertyName>("rho") = FlowModelSinglePhase::DENSITY;
166  params.set<MaterialPropertyName>("vel") = FlowModelSinglePhase::VELOCITY;
167  params.set<MaterialPropertyName>("T") = FlowModelSinglePhase::TEMPERATURE;
168  params.set<MaterialPropertyName>("k") = FlowModelSinglePhase::THERMAL_CONDUCTIVITY;
169  params.set<MaterialPropertyName>("mu") = FlowModelSinglePhase::DYNAMIC_VISCOSITY;
170  params.set<MaterialPropertyName>("cp") =
172  params.set<MaterialPropertyName>("T_wall") = flow_channel.getWallTemperatureNames()[i];
173  params.set<std::vector<SubdomainName>>("block") = flow_channel.getSubdomainNames();
174  _sim.addMaterial(class_name, genName(flow_channel.name(), "whtc_mat", i), params);
175 
176  break;
177  }
179  {
180  const std::string class_name = "ADWallHeatTransferCoefficientWolfMcCarthyMaterial";
181  InputParameters params = _factory.getValidParams(class_name);
182  params.set<MaterialPropertyName>("Hw") = flow_channel.getWallHTCNames1Phase()[i];
183  params.set<MaterialPropertyName>("T_wall") = flow_channel.getWallTemperatureNames()[i];
184  params.set<std::vector<SubdomainName>>("block") = flow_channel.getSubdomainNames();
185  _sim.addMaterial(class_name, genName(flow_channel.name(), "whtc_mat", i), params);
186 
187  break;
188  }
190  {
191 
192  const std::string class_name = "ADWallHeatTransferCoefficientWeismanMaterial";
193  InputParameters params = _factory.getValidParams(class_name);
194  params.set<MaterialPropertyName>("Hw") = flow_channel.getWallHTCNames1Phase()[i];
195  params.set<MaterialPropertyName>("T_wall") = flow_channel.getWallTemperatureNames()[i];
196  params.set<std::vector<SubdomainName>>("block") = flow_channel.getSubdomainNames();
197  params.set<Real>("PoD") = flow_channel.getParam<Real>("PoD");
198  if (flow_channel.getParam<Real>("PoD") == 1.0)
199  {
200  mooseDoOnce(mooseWarning(
201  "You are using a rod bundle correlation with the default Pitch-to-Diameter "
202  "ratio value, P/D=1.0. It can be set using the PoD parameter in the corresponding "
203  "FlowChannel1Phase component"));
204  }
205 
206  if (flow_channel.getHeatTransferGeometry() == FlowChannelBase::EConvHeatTransGeom::PIPE)
207  {
208  mooseError("Weiman's correlation was made to be used in rod bundles, your geometry type is "
209  "PIPE, please change heat_transfer_geom to ROD_BUNDLE or HEX_ROD_BUNDLE, or "
210  "choose a correlation valid for PIPES");
211  }
212  else if (flow_channel.getHeatTransferGeometry() ==
213  FlowChannelBase::EConvHeatTransGeom::ROD_BUNDLE)
214  {
215  params.set<MooseEnum>("bundle_array") = "SQUARE";
216  }
217  else if (flow_channel.getHeatTransferGeometry() ==
218  FlowChannelBase::EConvHeatTransGeom::HEX_ROD_BUNDLE)
219  {
220  params.set<MooseEnum>("bundle_array") = "TRIANGULAR";
221  }
222  _sim.addMaterial(class_name, genName(flow_channel.name(), "whtc_mat", i), params);
223  break;
224  }
226  {
227  const std::string class_name = "ADWallHeatTransferCoefficientLyonMaterial";
228  InputParameters params = _factory.getValidParams(class_name);
229  params.set<MaterialPropertyName>("Hw") = flow_channel.getWallHTCNames1Phase()[i];
230  params.set<MaterialPropertyName>("T_wall") = flow_channel.getWallTemperatureNames()[i];
231  params.set<std::vector<SubdomainName>>("block") = flow_channel.getSubdomainNames();
232  _sim.addMaterial(class_name, genName(flow_channel.name(), "whtc_mat", i), params);
233  break;
234  }
236  {
237 
238  const std::string class_name = "ADWallHeatTransferCoefficientKazimiMaterial";
239  InputParameters params = _factory.getValidParams(class_name);
240  params.set<MaterialPropertyName>("Hw") = flow_channel.getWallHTCNames1Phase()[i];
241  params.set<MaterialPropertyName>("T_wall") = flow_channel.getWallTemperatureNames()[i];
242  params.set<std::vector<SubdomainName>>("block") = flow_channel.getSubdomainNames();
243  params.set<Real>("PoD") = flow_channel.getParam<Real>("PoD");
244  if (flow_channel.getParam<Real>("PoD") == 1.0)
245  {
246  mooseDoOnce(mooseWarning(
247  "You are using a rod bundle correlation with the default Pitch-to-Diameter "
248  "ratio value, P/D=1.0. It can be set using the PoD parameter in the corresponding "
249  "FlowChannel1Phase component"));
250  }
251  _sim.addMaterial(class_name, genName(flow_channel.name(), "whtc_mat", i), params);
252  break;
253  }
255  {
256 
257  const std::string class_name = "ADWallHeatTransferCoefficientMikityukMaterial";
258  InputParameters params = _factory.getValidParams(class_name);
259  params.set<MaterialPropertyName>("Hw") = flow_channel.getWallHTCNames1Phase()[i];
260  params.set<MaterialPropertyName>("T_wall") = flow_channel.getWallTemperatureNames()[i];
261  params.set<std::vector<SubdomainName>>("block") = flow_channel.getSubdomainNames();
262  params.set<Real>("PoD") = flow_channel.getParam<Real>("PoD");
263  if (flow_channel.getParam<Real>("PoD") == 1.0)
264  {
265  mooseDoOnce(mooseWarning(
266  "You are using a rod bundle correlation with the default Pitch-to-Diameter "
267  "ratio value, P/D=1.0. It can be set using the PoD parameter in the corresponding "
268  "FlowChannel1Phase component"));
269  }
270  _sim.addMaterial(class_name, genName(flow_channel.name(), "whtc_mat", i), params);
271  break;
272  }
274  {
275 
276  const std::string class_name = "ADWallHeatTransferCoefficientSchadMaterial";
277  InputParameters params = _factory.getValidParams(class_name);
278  params.set<MaterialPropertyName>("Hw") = flow_channel.getWallHTCNames1Phase()[i];
279  params.set<MaterialPropertyName>("T_wall") = flow_channel.getWallTemperatureNames()[i];
280  params.set<std::vector<SubdomainName>>("block") = flow_channel.getSubdomainNames();
281  params.set<Real>("PoD") = flow_channel.getParam<Real>("PoD");
282  if (flow_channel.getParam<Real>("PoD") == 1.0)
283  {
284  mooseDoOnce(mooseWarning(
285  "You are using a rod bundle correlation with the default Pitch-to-Diameter "
286  "ratio value, P/D=1.0. It can be set using the PoD parameter in the corresponding "
287  "FlowChannel1Phase component"));
288  }
289  _sim.addMaterial(class_name, genName(flow_channel.name(), "whtc_mat", i), params);
290  break;
291  }
293  {
294 
295  const std::string class_name = "ADWallHeatTransferCoefficientGnielinskiMaterial";
296  InputParameters params = _factory.getValidParams(class_name);
297  params.set<MaterialPropertyName>("Hw") = flow_channel.getWallHTCNames1Phase()[i];
298  params.set<MaterialPropertyName>("T_wall") = flow_channel.getWallTemperatureNames()[i];
299  params.set<std::vector<SubdomainName>>("block") = flow_channel.getSubdomainNames();
300  _sim.addMaterial(class_name, genName(flow_channel.name(), "whtc_mat", i), params);
301  break;
302  }
303  default:
304  mooseError("Invalid WallHTCClosureType");
305  }
306 }
THMProblem & _sim
Simulation.
Definition: ClosuresBase.h:100
static const std::string SPECIFIC_HEAT_CONSTANT_PRESSURE
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.
static const std::string DYNAMIC_VISCOSITY
static const std::string TEMPERATURE
EConvHeatTransGeom getHeatTransferGeometry() const
Gets heat transfer geometry.
static const std::string VELOCITY
virtual void addMaterial(const std::string &material_name, const std::string &name, InputParameters &parameters)
T & set(const std::string &name, bool quiet_mode=false)
InputParameters getValidParams(const std::string &name) const
static const std::string THERMAL_CONDUCTIVITY
static const std::string DENSITY
std::vector< VariableName > getWallTemperatureNames() const
Gets wall temperature names for connected heat transfers.
virtual const std::string & name() const
void mooseWarning(Args &&... args) const
const T & getParam(const std::string &name) const
std::vector< MaterialPropertyName > getWallHTCNames1Phase() const
Gets 1-phase wall heat transfer coefficient names for connected heat transfers.
Factory & _factory
Factory associated with the MooseApp.
Definition: ClosuresBase.h:103
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
static const std::string HYDRAULIC_DIAMETER
void mooseError(Args &&... args) const
const WallHTCClosureType _wall_htc_closure
Wall heat transfer coefficient closure.
virtual const std::vector< SubdomainName > & getSubdomainNames() const
Gets the subdomain names for this component.
Definition: Component.C:307

◆ addWallTemperatureFromAuxMaterial()

void ClosuresBase::addWallTemperatureFromAuxMaterial ( const FlowChannelBase flow_channel,
unsigned int  i = 0 
) const
protectedinherited

Adds a material for wall temperature from an aux variable.

Parameters
[in]flow_channelFlow channel component
[in]iindex of the heat transfer

Definition at line 64 of file ClosuresBase.C.

Referenced by Closures1PhaseSimple::addMooseObjectsFlowChannel(), WallTemperature1PhaseClosures::addMooseObjectsFlowChannel(), Closures1PhaseNone::addMooseObjectsFlowChannel(), and addMooseObjectsFlowChannel().

66 {
67  const std::string class_name = "ADCoupledVariableValueMaterial";
68  InputParameters params = _factory.getValidParams(class_name);
69  params.set<std::vector<SubdomainName>>("block") = flow_channel.getSubdomainNames();
70  params.set<MaterialPropertyName>("prop_name") = {flow_channel.getWallTemperatureNames()[i]};
71  params.set<std::vector<VariableName>>("coupled_variable") = {
72  flow_channel.getWallTemperatureNames()[i]};
73  _sim.addMaterial(class_name, genName(flow_channel.name(), "coupled_var_mat", i), params);
74 }
THMProblem & _sim
Simulation.
Definition: ClosuresBase.h:100
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.
virtual void addMaterial(const std::string &material_name, const std::string &name, InputParameters &parameters)
T & set(const std::string &name, bool quiet_mode=false)
InputParameters getValidParams(const std::string &name) const
std::vector< VariableName > getWallTemperatureNames() const
Gets wall temperature names for connected heat transfers.
virtual const std::string & name() const
Factory & _factory
Factory associated with the MooseApp.
Definition: ClosuresBase.h:103
virtual const std::vector< SubdomainName > & getSubdomainNames() const
Gets the subdomain names for this component.
Definition: Component.C:307

◆ addWeightedAverageMaterial()

void ClosuresBase::addWeightedAverageMaterial ( const FlowChannelBase flow_channel,
const std::vector< MaterialPropertyName > &  values,
const std::vector< VariableName > &  weights,
const MaterialPropertyName &  property_name 
) const
protectedinherited

Adds a weighted average material.

Parameters
[in]flow_channelFlow channel component
[in]valuesValues to average
[in]weightsWeights for each value
[in]property_nameName of material property to create

Definition at line 49 of file ClosuresBase.C.

Referenced by Closures1PhaseSimple::addMooseObjectsFlowChannel().

53 {
54  const std::string class_name = "ADWeightedAverageMaterial";
55  InputParameters params = _factory.getValidParams(class_name);
56  params.set<MaterialPropertyName>("prop_name") = property_name;
57  params.set<std::vector<SubdomainName>>("block") = flow_channel.getSubdomainNames();
58  params.set<std::vector<MaterialPropertyName>>("values") = values;
59  params.set<std::vector<VariableName>>("weights") = weights;
60  _sim.addMaterial(class_name, genName(flow_channel.name(), "wavg_mat", property_name), params);
61 }
THMProblem & _sim
Simulation.
Definition: ClosuresBase.h:100
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.
virtual void addMaterial(const std::string &material_name, const std::string &name, InputParameters &parameters)
T & set(const std::string &name, bool quiet_mode=false)
InputParameters getValidParams(const std::string &name) const
virtual const std::string & name() const
Factory & _factory
Factory associated with the MooseApp.
Definition: ClosuresBase.h:103
virtual const std::vector< SubdomainName > & getSubdomainNames() const
Gets the subdomain names for this component.
Definition: Component.C:307

◆ addZeroMaterial()

void ClosuresBase::addZeroMaterial ( const FlowChannelBase flow_channel,
const std::string &  property_name 
) const
protectedinherited

Adds an arbitrary zero-value material.

Parameters
[in]flow_channelFlow channel component
[in]property_nameName of the material property to create

Definition at line 37 of file ClosuresBase.C.

39 {
40  const std::string class_name = "ADConstantMaterial";
41  InputParameters params = _factory.getValidParams(class_name);
42  params.set<std::vector<SubdomainName>>("block") = flow_channel.getSubdomainNames();
43  params.set<std::string>("property_name") = property_name;
44  params.set<Real>("value") = 0;
45  _sim.addMaterial(class_name, genName(flow_channel.name(), "const_mat", property_name), params);
46 }
THMProblem & _sim
Simulation.
Definition: ClosuresBase.h:100
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.
virtual void addMaterial(const std::string &material_name, const std::string &name, InputParameters &parameters)
T & set(const std::string &name, bool quiet_mode=false)
InputParameters getValidParams(const std::string &name) const
virtual const std::string & name() const
Factory & _factory
Factory associated with the MooseApp.
Definition: ClosuresBase.h:103
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
virtual const std::vector< SubdomainName > & getSubdomainNames() const
Gets the subdomain names for this component.
Definition: Component.C:307

◆ checkFlowChannel()

void Closures1PhaseTHM::checkFlowChannel ( const FlowChannelBase ) const
overridevirtual

Checks for errors associated with a flow channel component.

Parameters
[in]flow_channelFlow channel component

Reimplemented from ClosuresBase.

Definition at line 41 of file Closures1PhaseTHM.C.

42 {
43 }

◆ checkHeatTransfer()

void Closures1PhaseTHM::checkHeatTransfer ( const HeatTransferBase ,
const FlowChannelBase  
) const
overridevirtual

Checks for errors associated with a heat transfer component.

Parameters
[in]heat_transferHeat transfer component
[in]flow_channelFlow channel component

Reimplemented from ClosuresBase.

Definition at line 46 of file Closures1PhaseTHM.C.

48 {
49 }

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

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

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

◆ genName() [2/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  }
static const std::complex< double > j(0, 1)
Complex number "j" (also known as "i")

◆ genName() [3/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:20

◆ genName() [4/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  }

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

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

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

◆ logComponentError()

template<typename... Args>
void LoggingInterface::logComponentError ( const std::string &  component_name,
Args &&...  args 
) const
inlineinherited

Logs an error for a component.

Parameters
[in]component_nameName of the component

Definition at line 47 of file LoggingInterface.h.

Referenced by Closures1PhaseSimple::checkFlowChannel(), Closures1PhaseSimple::checkHeatTransfer(), and Component::logError().

48  {
49  _log.add(Logger::ERROR, component_name, ": ", std::forward<Args>(args)...);
50  }
void add(EMessageType type, Args &&... args)
Add a message to the log.
Definition: Logger.h:35

◆ logComponentWarning()

template<typename... Args>
void LoggingInterface::logComponentWarning ( const std::string &  component_name,
Args &&...  args 
) const
inlineinherited

Logs a warning for a component.

Parameters
[in]component_nameName of the component

Definition at line 67 of file LoggingInterface.h.

Referenced by Component::logWarning().

68  {
69  _log.add(Logger::WARNING, component_name, ": ", std::forward<Args>(args)...);
70  }
void add(EMessageType type, Args &&... args)
Add a message to the log.
Definition: Logger.h:35

◆ logError()

template<typename... Args>
void LoggingInterface::logError ( Args &&...  args) const
inlineinherited

Logs an error.

Definition at line 36 of file LoggingInterface.h.

Referenced by Simulation::addClosures(), Simulation::addComponent(), Simulation::controlDataIntegrityCheck(), Simulation::declareControlData(), Simulation::identifyLoops(), and Simulation::integrityCheck().

37  {
38  _log.add(Logger::ERROR, std::forward<Args>(args)...);
39  }
void add(EMessageType type, Args &&... args)
Add a message to the log.
Definition: Logger.h:35

◆ logWarning()

template<typename... Args>
void LoggingInterface::logWarning ( Args &&...  args) const
inlineinherited

Logs a warning.

Definition at line 56 of file LoggingInterface.h.

57  {
58  _log.add(Logger::WARNING, std::forward<Args>(args)...);
59  }
void add(EMessageType type, Args &&... args)
Add a message to the log.
Definition: Logger.h:35

◆ validParams()

InputParameters Closures1PhaseTHM::validParams ( )
static

Definition at line 18 of file Closures1PhaseTHM.C.

19 {
21 
22  MooseEnum wall_htc_closure("dittus_boelter=0 kazimi_carelli=1 lyon=2 mikityuk=3 schad=4 "
23  "weisman=5 wolf_mccarthy=6 gnielinski=7",
24  "dittus_boelter");
25  params.addParam<MooseEnum>(
26  "wall_htc_closure", wall_htc_closure, "Heat transfer coefficient closure");
27  MooseEnum wall_ff_closure("cheng_todreas=0 churchill=1", "churchill");
28  params.addParam<MooseEnum>("wall_ff_closure", wall_ff_closure, "Friction factor closure");
29  params.addClassDescription("Closures for 1-phase flow channels");
30  return params;
31 }
void addParam(const std::string &name, const std::initializer_list< typename T::value_type > &value, const std::string &doc_string)
static InputParameters validParams()
void addClassDescription(const std::string &doc_string)

Member Data Documentation

◆ _factory

Factory& ClosuresBase::_factory
protectedinherited

◆ _log

Logger& LoggingInterface::_log
protectedinherited

◆ _sim

THMProblem& ClosuresBase::_sim
protectedinherited

◆ _wall_ff_closure

const WallFFClosureType Closures1PhaseTHM::_wall_ff_closure
protected

Wall friction factor closure.

Definition at line 77 of file Closures1PhaseTHM.h.

Referenced by addWallFFMaterial().

◆ _wall_htc_closure

const WallHTCClosureType Closures1PhaseTHM::_wall_htc_closure
protected

Wall heat transfer coefficient closure.

Definition at line 74 of file Closures1PhaseTHM.h.

Referenced by addWallHTCMaterial().


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