https://mooseframework.inl.gov
Loading...
Searching...
No Matches
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
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
33const libMesh::FEType &
38
39void
46
47void
52
53void
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
69bool
const std::string name
Definition Setup.h:21
THMProblem & getTHMProblem() const
Gets the THM problem.
Definition Component.C:135
Factory & _factory
The Factory associated with the MooseApp.
Definition Component.h:497
virtual void addVariables()
Definition Component.h:113
virtual void addKernel(const std::string &kernel_name, const std::string &name, InputParameters &parameters)
InputParameters getValidParams(const std::string &name) const
static const std::string TEMPERATURE
static const std::string RHOEA
Base class for heat transfer connections to 1-phase flow channels.
static InputParameters validParams()
MaterialPropertyName _Hw_1phase_name
1-phase wall heat transfer coefficient name
virtual void addMooseObjects() override
VariableName _P_hf_name
heated perimeter name
VariableName _T_wall_name
wall temperature name
std::vector< SubdomainName > _flow_channel_subdomains
Subdomains corresponding to the connected flow channel.
virtual bool isTemperatureType() const override
Returns whether this heat transfer is specified by temperature, rather than heat flux.
libMesh::FEType _fe_type
The type of the wall temperature variable.
HeatTransferFromTemperature1Phase(const InputParameters &parameters)
virtual const libMesh::FEType & getFEType()
Get the FE type for wall temperature variable.
void addHeatTransferKernels()
Adds 1-phase heat transfer kernels.
void addParam(const std::string &name, const std::initializer_list< typename T::value_type > &value, const std::string &doc_string)
void addClassDescription(const std::string &doc_string)
T & set(const std::string &name, bool quiet_mode=false)
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.
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
The following methods are specializations for using the Parallel::packed_range_* routines for a vecto...