https://mooseframework.inl.gov
HeatTransferFromTemperature1Phase.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 #include "FlowModelSinglePhase.h"
12 
15 {
17  MooseEnum var_type("nodal elemental", "nodal", false);
18  params.addParam<MooseEnum>(
19  "var_type", var_type, "The type of wall temperature variable (nodal, elemental).");
20  params.addClassDescription("Heat transfer specified by a wall temperature provided by an "
21  "external application going into 1-phase flow channel.");
22  return params;
23 }
24 
26  const InputParameters & parameters)
27  : HeatTransfer1PhaseBase(parameters),
28  _fe_type(getParam<MooseEnum>("var_type") == 0 ? libMesh::FEType(FIRST, LAGRANGE)
29  : libMesh::FEType(CONSTANT, MONOMIAL))
30 {
31 }
32 
33 const libMesh::FEType &
35 {
36  return _fe_type;
37 }
38 
39 void
41 {
43 
45 }
46 
47 void
49 {
51 }
52 
53 void
55 {
56  {
57  const std::string class_name = "ADOneDEnergyWallHeating";
58  InputParameters params = _factory.getValidParams(class_name);
59  params.set<NonlinearVariableName>("variable") = FlowModelSinglePhase::RHOEA;
60  params.set<std::vector<SubdomainName>>("block") = _flow_channel_subdomains;
61  params.set<std::vector<VariableName>>("T_wall") = {_T_wall_name};
62  params.set<MaterialPropertyName>("Hw") = _Hw_1phase_name;
63  params.set<std::vector<VariableName>>("P_hf") = {_P_hf_name};
64  params.set<MaterialPropertyName>("T") = FlowModelSinglePhase::TEMPERATURE;
65  getTHMProblem().addKernel(class_name, genName(name(), "wall_heat_transfer"), params);
66  }
67 }
68 
69 bool
71 {
72  return true;
73 }
LAGRANGE
HeatTransferFromTemperature1Phase(const InputParameters &parameters)
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
void addParam(const std::string &name, const std::initializer_list< typename T::value_type > &value, const std::string &doc_string)
static const std::string TEMPERATURE
THMProblem & getTHMProblem() const
Gets the THM problem.
Definition: Component.C:135
FIRST
Base class for heat transfer connections to 1-phase flow channels.
T & set(const std::string &name, bool quiet_mode=false)
InputParameters getValidParams(const std::string &name) const
virtual void addMooseObjects() override
The following methods are specializations for using the Parallel::packed_range_* routines for a vecto...
virtual void addKernel(const std::string &kernel_name, const std::string &name, InputParameters &parameters)
MaterialPropertyName _Hw_1phase_name
1-phase wall heat transfer coefficient name
virtual const std::string & name() const
VariableName _P_hf_name
heated perimeter name
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
CONSTANT
virtual bool isTemperatureType() const override
Returns whether this heat transfer is specified by temperature, rather than heat flux.
void addHeatTransferKernels()
Adds 1-phase heat transfer kernels.
static InputParameters validParams()
MONOMIAL
libMesh::FEType _fe_type
The type of the wall temperature variable.
Factory & _factory
The Factory associated with the MooseApp.
Definition: Component.h:446
void addClassDescription(const std::string &doc_string)
virtual void addVariables() override
static const std::string RHOEA
virtual const libMesh::FEType & getFEType()
Get the FE type for wall temperature variable.
std::vector< SubdomainName > _flow_channel_subdomains
Subdomains corresponding to the connected flow channel.