Loading [MathJax]/extensions/tex2jax.js
https://mooseframework.inl.gov
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends
HeatTransferFromExternalAppHeatFlux1Phase.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.addClassDescription("Heat transfer specified by heat flux provided by an external "
20  "application going into 1-phase flow channel.");
21  return params;
22 }
23 
25  const InputParameters & parameters)
26  : HeatTransfer1PhaseBase(parameters)
27 {
28 }
29 
30 void
32 {
34 
37 
38  if (!_app.isRestarting())
40 }
41 
42 void
44 {
46 
47  {
48  const std::string class_name = "ADCoupledVariableValueMaterial";
49  InputParameters params = _factory.getValidParams(class_name);
50  params.set<std::vector<SubdomainName>>("block") = _flow_channel_subdomains;
51  params.set<MaterialPropertyName>("prop_name") = _q_wall_name;
52  params.set<std::vector<VariableName>>("coupled_variable") = {_q_wall_name};
53  getTHMProblem().addMaterial(class_name, genName(name(), "q_wall_material"), params);
54  }
55 
56  // wall heat transfer kernel
57  {
58  const std::string class_name = "ADOneDEnergyWallHeatFlux";
59  InputParameters params = _factory.getValidParams(class_name);
60  params.set<NonlinearVariableName>("variable") = FlowModelSinglePhase::RHOEA;
61  params.set<std::vector<SubdomainName>>("block") = _flow_channel_subdomains;
62  params.set<MaterialPropertyName>("q_wall") = _q_wall_name;
63  params.set<std::vector<VariableName>>("P_hf") = {_P_hf_name};
64  getTHMProblem().addKernel(class_name, genName(name(), "wall_heat"), params);
65  }
66 }
67 
68 bool
70 {
71  return false;
72 }
Heat transfer specified by heat flux computed by external application going into 1-phase flow channel...
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.
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)
bool isRestarting() const
virtual const std::string & name() const
registerMooseObject("ThermalHydraulicsApp", HeatTransferFromExternalAppHeatFlux1Phase)
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
static InputParameters validParams()
virtual bool isTemperatureType() const override
Returns whether this heat transfer is specified by temperature, rather than heat flux.
MONOMIAL
HeatTransferFromExternalAppHeatFlux1Phase(const InputParameters &parameters)
MooseApp & _app
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)
virtual void addVariables() override
static const std::string RHOEA
void addConstantIC(const VariableName &var_name, Real value, const std::vector< SubdomainName > &block_names)
Definition: Simulation.C:512
std::vector< SubdomainName > _flow_channel_subdomains
Subdomains corresponding to the connected flow channel.