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 "WallHeatTransferCoefficient3EqnDittusBoelterMaterial.h" 11 : #include "SinglePhaseFluidProperties.h" 12 : #include "FlowModelSinglePhase.h" 13 : #include "Numerics.h" 14 : 15 : registerMooseObject("ThermalHydraulicsApp", WallHeatTransferCoefficient3EqnDittusBoelterMaterial); 16 : 17 : InputParameters 18 170 : WallHeatTransferCoefficient3EqnDittusBoelterMaterial::validParams() 19 : { 20 170 : InputParameters params = Material::validParams(); 21 340 : params.addParam<MaterialPropertyName>("Hw", 22 : FlowModelSinglePhase::HEAT_TRANSFER_COEFFICIENT_WALL, 23 : "Heat transfer coefficient material property"); 24 340 : params.addRequiredParam<MaterialPropertyName>("rho", "Density of the liquid"); 25 340 : params.addRequiredParam<MaterialPropertyName>("vel", "x-component of the liquid velocity"); 26 340 : params.addRequiredParam<MaterialPropertyName>("D_h", "Hydraulic diameter"); 27 340 : params.addRequiredParam<MaterialPropertyName>("cp", "Specific heat of the fluid"); 28 340 : params.addRequiredParam<MaterialPropertyName>("mu", "Dynamic viscosity of the fluid"); 29 340 : params.addRequiredParam<MaterialPropertyName>("k", "Heat conductivity of the fluid"); 30 340 : params.addRequiredParam<MaterialPropertyName>("T", "Fluid temperature"); 31 340 : params.addRequiredParam<MaterialPropertyName>("T_wall", "Wall temperature"); 32 170 : params.addClassDescription( 33 : "Computes wall heat transfer coefficient using Dittus-Boelter equation"); 34 170 : return params; 35 0 : } 36 : 37 132 : WallHeatTransferCoefficient3EqnDittusBoelterMaterial:: 38 132 : WallHeatTransferCoefficient3EqnDittusBoelterMaterial(const InputParameters & parameters) 39 : : Material(parameters), 40 132 : _Hw(declareProperty<Real>("Hw")), 41 264 : _rho(getMaterialProperty<Real>("rho")), 42 264 : _vel(getMaterialProperty<Real>("vel")), 43 264 : _D_h(getMaterialProperty<Real>("D_h")), 44 264 : _k(getMaterialProperty<Real>("k")), 45 264 : _mu(getMaterialProperty<Real>("mu")), 46 264 : _cp(getMaterialProperty<Real>("cp")), 47 264 : _T(getMaterialProperty<Real>("T")), 48 396 : _T_wall(getMaterialProperty<Real>("T_wall")) 49 : { 50 132 : } 51 : 52 : void 53 108 : WallHeatTransferCoefficient3EqnDittusBoelterMaterial::computeQpProperties() 54 : { 55 108 : Real Pr = THM::Prandtl(_cp[_qp], _mu[_qp], _k[_qp]); 56 108 : Real Re = THM::Reynolds(1., _rho[_qp], _vel[_qp], _D_h[_qp], _mu[_qp]); 57 108 : Real n = (_T[_qp] < _T_wall[_qp]) ? 0.4 : 0.3; 58 108 : Real Nu = 0.023 * std::pow(Re, 4. / 5.) * std::pow(Pr, n); 59 : 60 108 : _Hw[_qp] = THM::wallHeatTransferCoefficient(Nu, _k[_qp], _D_h[_qp]); 61 108 : }