https://mooseframework.inl.gov
Loading...
Searching...
No Matches
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
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
29
30void
41
42void
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
68bool
registerMooseObject("ThermalHydraulicsApp", HeatTransferFromExternalAppHeatFlux1Phase)
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 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 computed by external application going into 1-phase flow channel...
HeatTransferFromExternalAppHeatFlux1Phase(const InputParameters &parameters)
virtual bool isTemperatureType() const override
Returns whether this heat transfer is specified by temperature, rather than heat flux.
void addClassDescription(const std::string &doc_string)
T & set(const std::string &name, bool quiet_mode=false)
bool isRestarting() const
MooseApp & _app
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 addConstantIC(const VariableName &var_name, Real value, const std::vector< SubdomainName > &block_names)
Definition Simulation.C:509
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.