https://mooseframework.inl.gov
Loading...
Searching...
No Matches
ADWallHeatTransferCoefficient3EqnDittusBoelterMaterial.C
Go to the documentation of this file.
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
13#include "Numerics.h"
14
16
19{
21 params.addParam<MaterialPropertyName>("Hw",
23 "Heat transfer coefficient material property");
24 params.addRequiredParam<MaterialPropertyName>("rho", "Density of the liquid");
25 params.addRequiredParam<MaterialPropertyName>("vel", "x-component of the liquid velocity");
26 params.addRequiredParam<MaterialPropertyName>("D_h", "Hydraulic diameter");
27 params.addRequiredParam<MaterialPropertyName>("cp", "Specific heat of the fluid");
28 params.addRequiredParam<MaterialPropertyName>("mu", "Dynamic viscosity of the fluid");
29 params.addRequiredParam<MaterialPropertyName>("k", "Heat conductivity of the fluid");
30 params.addRequiredParam<MaterialPropertyName>("T", "Fluid temperature");
31 params.addRequiredParam<MaterialPropertyName>("T_wall", "Wall temperature");
33 "Computes wall heat transfer coefficient using Dittus-Boelter equation");
34 return params;
35}
36
39 : Material(parameters),
40 _Hw(declareADProperty<Real>("Hw")),
41 _rho(getADMaterialProperty<Real>("rho")),
42 _vel(getADMaterialProperty<Real>("vel")),
43 _D_h(getADMaterialProperty<Real>("D_h")),
44 _k(getADMaterialProperty<Real>("k")),
45 _mu(getADMaterialProperty<Real>("mu")),
46 _cp(getADMaterialProperty<Real>("cp")),
47 _T(getADMaterialProperty<Real>("T")),
48 _T_wall(getADMaterialProperty<Real>("T_wall"))
49{
50}
51
52void
54{
55 using std::max, std::pow;
56
58 ADReal Re = max(1.0, THM::Reynolds(1., _rho[_qp], _vel[_qp], _D_h[_qp], _mu[_qp]));
59 ADReal n = (_T[_qp] < _T_wall[_qp]) ? 0.4 : 0.3;
60 ADReal Nu = 0.023 * pow(Re, 4. / 5.) * pow(Pr, n);
61
62 _Hw[_qp] = THM::wallHeatTransferCoefficient(Nu, _k[_qp], _D_h[_qp]);
63}
DualNumber< Real, DNDerivativeType, true > ADReal
registerMooseObject("ThermalHydraulicsApp", ADWallHeatTransferCoefficient3EqnDittusBoelterMaterial)
ExpressionBuilder::EBTerm pow(const ExpressionBuilder::EBTerm &left, T exponent)
const double Re
Computes wall heat transfer coefficient using Dittus-Boelter equation.
static const std::string HEAT_TRANSFER_COEFFICIENT_WALL
void addRequiredParam(const std::string &name, const std::string &doc_string)
void addParam(const std::string &name, const std::initializer_list< typename T::value_type > &value, const std::string &doc_string)
void addClassDescription(const std::string &doc_string)
unsigned int _qp
static InputParameters validParams()
auto Prandtl(const T1 &cp, const T2 &mu, const T3 &k)
Compute Prandtl number.
Definition Numerics.h:133
auto Reynolds(const T1 &volume_fraction, const T2 &rho, const T3 &vel, const T4 &D_h, const T5 &mu)
Compute Reynolds number.
Definition Numerics.h:118