https://mooseframework.inl.gov
HeatTransferFromExternalAppTemperature1Phase.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.addParam<FunctionName>("initial_T_wall", "Initial condition for wall temperature [K]");
19  params.addParam<VariableName>("T_ext", "Name of the wall temperature variable");
20  params.addClassDescription("Heat transfer into 1-phase flow channel from temperature provided by "
21  "an external application");
22  return params;
23 }
24 
26  const InputParameters & parameters)
28 {
29 }
30 
31 void
33 {
35 
36  if (isParamValid("T_ext"))
37  _T_wall_name = getParam<VariableName>("T_ext");
38 }
39 
40 void
42 {
44 
45  if (!isParamValid("T_ext"))
46  if (!isParamValid("initial_T_wall") && !_app.isRestarting())
47  logError("Missing initial condition for wall temperature.");
48 }
49 
50 void
52 {
54 
55  if (!isParamValid("T_ext"))
56  if (isParamValid("initial_T_wall"))
58  _T_wall_name, getParam<FunctionName>("initial_T_wall"), _flow_channel_subdomains);
59 }
60 
61 void
63 {
65 
67 }
VariableName _T_wall_name
wall temperature name
void addParam(const std::string &name, const std::initializer_list< typename T::value_type > &value, const std::string &doc_string)
THMProblem & getTHMProblem() const
Gets the THM problem.
Definition: Component.C:135
bool isRestarting() const
void addFunctionIC(const VariableName &var_name, const std::string &func_name, const std::vector< SubdomainName > &block_names)
Definition: Simulation.C:532
void logError(Args &&... args) const
Logs an error.
Definition: Component.h:215
bool isParamValid(const std::string &name) const
virtual void check() const override
Check the component integrity.
void addHeatTransferKernels()
Adds 1-phase heat transfer kernels.
virtual void initSecondary() override
Perform secondary initialization, which relies on init() being called for all components.
virtual void check() const override
Check the component integrity.
Base class for heat transfer connections from temperature for 1-phase flow.
MooseApp & _app
registerMooseObject("ThermalHydraulicsApp", HeatTransferFromExternalAppTemperature1Phase)
Heat transfer into 1-phase flow channel from temperature provided by an external application.
void addClassDescription(const std::string &doc_string)
std::vector< SubdomainName > _flow_channel_subdomains
Subdomains corresponding to the connected flow channel.
virtual void initSecondary() override
Perform secondary initialization, which relies on init() being called for all components.