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.declareControllable("T_wall");
20  params.addClassDescription(
21  "Heat transfer connection from a fixed temperature function for 1-phase flow");
22  return params;
23 }
24 
26  const InputParameters & parameters)
27  : HeatTransferFromTemperature1Phase(parameters), _T_wall_fn_name(getParam<FunctionName>("T_wall"))
28 {
29 }
30 
31 void
33 {
35 
36  if (!_app.isRestarting())
38 
40 }
41 
42 void
44 {
46 
47  {
48  const std::string class_name = "FunctionAux";
49  InputParameters params = _factory.getValidParams(class_name);
50  params.set<AuxVariableName>("variable") = _T_wall_name;
51  params.set<std::vector<SubdomainName>>("block") = _flow_channel_subdomains;
52  params.set<FunctionName>("function") = _T_wall_fn_name;
53 
55  execute_on = {EXEC_INITIAL, EXEC_LINEAR};
56  params.set<ExecFlagEnum>("execute_on") = execute_on;
57 
58  getTHMProblem().addAuxKernel(class_name, genName(name(), "T_wall_auxkernel"), params);
59  }
60 
62 }
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)
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
bool isRestarting() const
virtual const std::string & name() 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()
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:446
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.
void declareControllable(const std::string &name, std::set< ExecFlagType > execute_flags={})
const ExecFlagType EXEC_INITIAL