https://mooseframework.inl.gov
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 
11 #include "FlowModelSinglePhase.h"
12 
14 
17 {
19  params.addRequiredParam<FunctionName>("q_wall", "Specified wall heat flux [W/m^2]");
20  params.addClassDescription(
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 
30 void
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 
56 bool
58 {
59  return false;
60 }
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.
registerMooseObject("ThermalHydraulicsApp", HeatTransferFromHeatFlux1Phase)
THMProblem & getTHMProblem() const
Gets the THM problem.
Definition: Component.C:135
virtual void addMaterial(const std::string &material_name, const std::string &name, InputParameters &parameters)
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
virtual void addKernel(const std::string &kernel_name, const std::string &name, InputParameters &parameters)
virtual const std::string & name() const
void addRequiredParam(const std::string &name, const std::string &doc_string)
Heat transfer specified by heat flux going into 1-phase flow channel.
VariableName _P_hf_name
heated perimeter name
static InputParameters validParams()
const FunctionName _q_wall_fn_name
wall heat flux function name
HeatTransferFromHeatFlux1Phase(const InputParameters &parameters)
MaterialPropertyName _q_wall_name
wall heat flux name
Factory & _factory
The Factory associated with the MooseApp.
Definition: Component.h:446
void addClassDescription(const std::string &doc_string)
static const std::string RHOEA
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.