Line data Source code
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 : 10 : #include "HeatTransferFromHeatFlux1Phase.h" 11 : #include "FlowModelSinglePhase.h" 12 : 13 : registerMooseObject("ThermalHydraulicsApp", HeatTransferFromHeatFlux1Phase); 14 : 15 : InputParameters 16 120 : HeatTransferFromHeatFlux1Phase::validParams() 17 : { 18 120 : InputParameters params = HeatTransfer1PhaseBase::validParams(); 19 240 : params.addRequiredParam<FunctionName>("q_wall", "Specified wall heat flux [W/m^2]"); 20 120 : params.addClassDescription( 21 : "Heat transfer specified by heat flux going into 1-phase flow channel."); 22 120 : return params; 23 0 : } 24 : 25 60 : HeatTransferFromHeatFlux1Phase::HeatTransferFromHeatFlux1Phase(const InputParameters & parameters) 26 60 : : HeatTransfer1PhaseBase(parameters), _q_wall_fn_name(getParam<FunctionName>("q_wall")) 27 : { 28 60 : } 29 : 30 : void 31 58 : HeatTransferFromHeatFlux1Phase::addMooseObjects() 32 : { 33 58 : HeatTransfer1PhaseBase::addMooseObjects(); 34 : 35 : { 36 58 : const std::string class_name = "ADGenericFunctionMaterial"; 37 58 : InputParameters params = _factory.getValidParams(class_name); 38 58 : params.set<std::vector<SubdomainName>>("block") = _flow_channel_subdomains; 39 174 : params.set<std::vector<std::string>>("prop_names") = {_q_wall_name}; 40 174 : params.set<std::vector<FunctionName>>("prop_values") = {_q_wall_fn_name}; 41 116 : getTHMProblem().addMaterial(class_name, genName(name(), "q_wall_material"), params); 42 58 : } 43 : 44 : // wall heat transfer kernel 45 : { 46 58 : const std::string class_name = "ADOneDEnergyWallHeatFlux"; 47 58 : InputParameters params = _factory.getValidParams(class_name); 48 116 : params.set<NonlinearVariableName>("variable") = FlowModelSinglePhase::RHOEA; 49 58 : params.set<std::vector<SubdomainName>>("block") = _flow_channel_subdomains; 50 116 : params.set<MaterialPropertyName>("q_wall") = _q_wall_name; 51 174 : params.set<std::vector<VariableName>>("P_hf") = {_P_hf_name}; 52 116 : getTHMProblem().addKernel(class_name, genName(name(), "wall_heat"), params); 53 58 : } 54 116 : } 55 : 56 : bool 57 62 : HeatTransferFromHeatFlux1Phase::isTemperatureType() const 58 : { 59 62 : return false; 60 : }