https://mooseframework.inl.gov
Loading...
Searching...
No Matches
HeatTransferFromHeatFlux1Phase.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
14
17{
19 params.addRequiredParam<FunctionName>("q_wall", "Specified wall heat flux [W/m^2]");
21 "Heat transfer specified by heat flux going into 1-phase flow channel.");
22 return params;
23}
24
26 : HeatTransfer1PhaseBase(parameters), _q_wall_fn_name(getParam<FunctionName>("q_wall"))
27{
28}
29
30void
32{
34
35 {
36 const std::string class_name = "ADGenericFunctionMaterial";
37 InputParameters params = _factory.getValidParams(class_name);
38 params.set<std::vector<SubdomainName>>("block") = _flow_channel_subdomains;
39 params.set<std::vector<std::string>>("prop_names") = {_q_wall_name};
40 params.set<std::vector<FunctionName>>("prop_values") = {_q_wall_fn_name};
41 getTHMProblem().addMaterial(class_name, genName(name(), "q_wall_material"), params);
42 }
43
44 // wall heat transfer kernel
45 {
46 const std::string class_name = "ADOneDEnergyWallHeatFlux";
47 InputParameters params = _factory.getValidParams(class_name);
48 params.set<NonlinearVariableName>("variable") = FlowModelSinglePhase::RHOEA;
49 params.set<std::vector<SubdomainName>>("block") = _flow_channel_subdomains;
50 params.set<MaterialPropertyName>("q_wall") = _q_wall_name;
51 params.set<std::vector<VariableName>>("P_hf") = {_P_hf_name};
52 getTHMProblem().addKernel(class_name, genName(name(), "wall_heat"), params);
53 }
54}
55
56bool
registerMooseObject("ThermalHydraulicsApp", HeatTransferFromHeatFlux1Phase)
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 addMaterial(const std::string &material_name, const std::string &name, InputParameters &parameters)
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 RHOEA
Base class for heat transfer connections to 1-phase flow channels.
static InputParameters validParams()
virtual void addMooseObjects() override
MaterialPropertyName _q_wall_name
wall heat flux name
VariableName _P_hf_name
heated perimeter name
std::vector< SubdomainName > _flow_channel_subdomains
Subdomains corresponding to the connected flow channel.
Heat transfer specified by heat flux going into 1-phase flow channel.
virtual bool isTemperatureType() const override
Returns whether this heat transfer is specified by temperature, rather than heat flux.
HeatTransferFromHeatFlux1Phase(const InputParameters &parameters)
const FunctionName _q_wall_fn_name
wall heat flux function name
void addRequiredParam(const std::string &name, 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.