https://mooseframework.inl.gov
HeatTransferFromSpecifiedTemperature1Phase.C
Go to the documentation of this file.
1 //* This file is part of the MOOSE framework
2 //* https://mooseframework.inl.gov
3 //*
4 //* All rights reserved, see COPYRIGHT for full restrictions
5 //* https://github.com/idaholab/moose/blob/master/COPYRIGHT
6 //*
7 //* Licensed under LGPL 2.1, please see LICENSE for details
8 //* https://www.gnu.org/licenses/lgpl-2.1.html
9 
11 
13 
16 {
18  params.addRequiredParam<FunctionName>("T_wall", "Specified wall temperature [K]");
19  params.addClassDescription(
20  "Heat transfer connection from a fixed temperature function for 1-phase flow");
21  return params;
22 }
23 
25  const InputParameters & parameters)
26  : HeatTransferFromTemperature1Phase(parameters), _T_wall_fn_name(getParam<FunctionName>("T_wall"))
27 {
28 }
29 
30 void
32 {
34 
35  if (!_app.isRestarting())
37 }
38 
39 void
41 {
43 
44  {
45  const std::string class_name = "FunctionAux";
46  InputParameters params = _factory.getValidParams(class_name);
47  params.set<AuxVariableName>("variable") = _T_wall_name;
48  params.set<std::vector<SubdomainName>>("block") = _flow_channel_subdomains;
49  params.set<FunctionName>("function") = _T_wall_fn_name;
50 
52  execute_on = {EXEC_INITIAL, EXEC_LINEAR};
53  params.set<ExecFlagEnum>("execute_on") = execute_on;
54 
55  getTHMProblem().addAuxKernel(class_name, genName(name(), "T_wall_auxkernel"), params);
56  }
57 
59 }
registerMooseObject("ThermalHydraulicsApp", HeatTransferFromSpecifiedTemperature1Phase)
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.
VariableName _T_wall_name
wall temperature name
THMProblem & getTHMProblem() const
Gets the THM problem.
Definition: Component.C:135
T & set(const std::string &name, bool quiet_mode=false)
InputParameters getValidParams(const std::string &name) const
virtual void addAuxKernel(const std::string &kernel_name, const std::string &name, InputParameters &parameters)
bool isRestarting() const
void addRequiredParam(const std::string &name, const std::string &doc_string)
void addFunctionIC(const VariableName &var_name, const std::string &func_name, const std::vector< SubdomainName > &block_names)
Definition: Simulation.C:532
ExecFlagEnum getDefaultExecFlagEnum()
const std::string & name() const
void addHeatTransferKernels()
Adds 1-phase heat transfer kernels.
HeatTransferFromSpecifiedTemperature1Phase(const InputParameters &parameters)
const FunctionName _T_wall_fn_name
wall temperature function name
const ExecFlagType EXEC_LINEAR
Base class for heat transfer connections from temperature for 1-phase flow.
MooseApp & _app
Factory & _factory
The Factory associated with the MooseApp.
Definition: Component.h:497
void addClassDescription(const std::string &doc_string)
std::vector< SubdomainName > _flow_channel_subdomains
Subdomains corresponding to the connected flow channel.
Heat transfer connection from a fixed temperature function for 1-phase flow.
const ExecFlagType EXEC_INITIAL