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 "ADWallHeatTransferCoefficientMikityukMaterial.h" 11 : #include "SinglePhaseFluidProperties.h" 12 : #include "FlowModelSinglePhase.h" 13 : #include "Numerics.h" 14 : 15 : registerMooseObject("ThermalHydraulicsApp", ADWallHeatTransferCoefficientMikityukMaterial); 16 : 17 : InputParameters 18 192 : ADWallHeatTransferCoefficientMikityukMaterial::validParams() 19 : { 20 192 : InputParameters params = Material::validParams(); 21 384 : params.addParam<MaterialPropertyName>("Hw", 22 : FlowModelSinglePhase::HEAT_TRANSFER_COEFFICIENT_WALL, 23 : "Heat transfer coefficient material property"); 24 384 : params.addParam<MaterialPropertyName>( 25 : "rho", FlowModelSinglePhase::DENSITY, "Density of the fluid"); 26 384 : params.addParam<MaterialPropertyName>("vel", FlowModelSinglePhase::VELOCITY, "Fluid velocity"); 27 384 : params.addParam<MaterialPropertyName>( 28 : "D_h", FlowModelSinglePhase::HYDRAULIC_DIAMETER, "Hydraulic diameter"); 29 384 : params.addParam<MaterialPropertyName>( 30 : "cp", FlowModelSinglePhase::SPECIFIC_HEAT_CONSTANT_PRESSURE, "Specific heat of the fluid"); 31 384 : params.addParam<MaterialPropertyName>( 32 : "mu", FlowModelSinglePhase::DYNAMIC_VISCOSITY, "Dynamic viscosity of the fluid"); 33 384 : params.addParam<MaterialPropertyName>( 34 : "k", FlowModelSinglePhase::THERMAL_CONDUCTIVITY, "Heat conductivity of the fluid"); 35 384 : params.addParam<MaterialPropertyName>( 36 : "T", FlowModelSinglePhase::TEMPERATURE, "Fluid temperature"); 37 384 : params.addParam<MaterialPropertyName>("T_wall", FlowModel::TEMPERATURE_WALL, "Wall temperature"); 38 384 : params.addRequiredParam<Real>( 39 : "PoD", "The Pitch-to-diameter ratio value being assigned into the property"); 40 192 : params.addClassDescription( 41 : "Computes wall heat transfer coefficient for liquid sodium using Mikityuk correlation"); 42 192 : return params; 43 0 : } 44 : 45 150 : ADWallHeatTransferCoefficientMikityukMaterial::ADWallHeatTransferCoefficientMikityukMaterial( 46 150 : const InputParameters & parameters) 47 : : Material(parameters), 48 150 : _Hw(declareADProperty<Real>("Hw")), 49 300 : _rho(getADMaterialProperty<Real>("rho")), 50 300 : _vel(getADMaterialProperty<Real>("vel")), 51 300 : _D_h(getADMaterialProperty<Real>("D_h")), 52 300 : _k(getADMaterialProperty<Real>("k")), 53 300 : _mu(getADMaterialProperty<Real>("mu")), 54 300 : _cp(getADMaterialProperty<Real>("cp")), 55 300 : _T(getADMaterialProperty<Real>("T")), 56 300 : _T_wall(getADMaterialProperty<Real>("T_wall")), 57 450 : _PoD(getParam<Real>("PoD")) 58 : { 59 150 : } 60 : 61 : void 62 4293 : ADWallHeatTransferCoefficientMikityukMaterial::computeQpProperties() 63 : { 64 4293 : ADReal Pe = std::max(1.0, THM::Peclet(1., _cp[_qp], _rho[_qp], _vel[_qp], _D_h[_qp], _k[_qp])); 65 : 66 4293 : if (_PoD > 1.5 || _PoD < 1.1 || Pe > 5000 || Pe < 30) 67 : { 68 4 : mooseDoOnce(mooseWarning( 69 : "Mikityuk's correlation is valid when Pe is between 30 and 5000, and P/D is between 1.1 " 70 : "and 1.5. Be aware that using values out of this range may lead to " 71 : "significant errors in your results!")); 72 : } 73 : 74 12867 : ADReal Nu = 0.047 * (1 - std::exp(-3.8 * (_PoD - 1))) * (std::pow(Pe, 0.77) + 250); 75 4289 : _Hw[_qp] = THM::wallHeatTransferCoefficient(Nu, _k[_qp], _D_h[_qp]); 76 4289 : }