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 "Closures1PhaseBase.h" 11 : #include "FlowModelSinglePhase.h" 12 : #include "FlowChannel1Phase.h" 13 : 14 : InputParameters 15 2749 : Closures1PhaseBase::validParams() 16 : { 17 2749 : InputParameters params = ClosuresBase::validParams(); 18 2749 : return params; 19 : } 20 : 21 1371 : Closures1PhaseBase::Closures1PhaseBase(const InputParameters & params) : ClosuresBase(params) {} 22 : 23 : void 24 1931 : Closures1PhaseBase::addWallFrictionFunctionMaterial(const FlowChannel1Phase & flow_channel) const 25 : { 26 1931 : const FunctionName & f_D_fn_name = flow_channel.getParam<FunctionName>("f"); 27 : 28 1931 : const std::string class_name = "ADWallFrictionFunctionMaterial"; 29 1931 : InputParameters params = _factory.getValidParams(class_name); 30 3862 : params.set<std::vector<SubdomainName>>("block") = flow_channel.getSubdomainNames(); 31 3862 : params.set<MaterialPropertyName>("f_D") = FlowModelSinglePhase::FRICTION_FACTOR_DARCY; 32 1931 : params.set<FunctionName>("function") = f_D_fn_name; 33 3862 : _sim.addMaterial(class_name, genName(flow_channel.name(), "f_wall_fn_mat"), params); 34 3862 : } 35 : 36 : void 37 14 : Closures1PhaseBase::addAverageWallTemperatureMaterial(const FlowChannel1Phase & flow_channel) const 38 : { 39 14 : const std::string class_name = "ADAverageWallTemperature3EqnMaterial"; 40 14 : InputParameters params = _factory.getValidParams(class_name); 41 28 : params.set<std::vector<SubdomainName>>("block") = flow_channel.getSubdomainNames(); 42 28 : params.set<std::vector<VariableName>>("T_wall_sources") = flow_channel.getWallTemperatureNames(); 43 14 : params.set<std::vector<MaterialPropertyName>>("Hw_sources") = 44 14 : flow_channel.getWallHTCNames1Phase(); 45 28 : params.set<std::vector<VariableName>>("P_hf_sources") = flow_channel.getHeatedPerimeterNames(); 46 42 : params.set<std::vector<VariableName>>("P_hf_total") = {FlowModel::HEAT_FLUX_PERIMETER}; 47 42 : params.set<std::vector<VariableName>>("T_fluid") = {FlowModelSinglePhase::TEMPERATURE}; 48 28 : _sim.addMaterial(class_name, genName(flow_channel.name(), "avg_T_wall_3eqn_mat"), params); 49 28 : }