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