https://mooseframework.inl.gov
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 
12 #include "FlowModelSinglePhase.h"
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");
32  params.addClassDescription(
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 
52 void
54 {
55  ADReal Pr = THM::Prandtl(_cp[_qp], _mu[_qp], _k[_qp]);
56  ADReal Re = std::max(1.0, THM::Reynolds(1., _rho[_qp], _vel[_qp], _D_h[_qp], _mu[_qp]));
57  ADReal n = (_T[_qp] < _T_wall[_qp]) ? 0.4 : 0.3;
58  ADReal Nu = 0.023 * std::pow(Re, 4. / 5.) * std::pow(Pr, n);
59 
61 }
void addParam(const std::string &name, const std::initializer_list< typename T::value_type > &value, const std::string &doc_string)
registerMooseObject("ThermalHydraulicsApp", ADWallHeatTransferCoefficient3EqnDittusBoelterMaterial)
auto Prandtl(const T1 &cp, const T2 &mu, const T3 &k)
Compute Prandtl number.
Definition: Numerics.h:133
Computes wall heat transfer coefficient using Dittus-Boelter equation.
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
static const std::string HEAT_TRANSFER_COEFFICIENT_WALL
void addRequiredParam(const std::string &name, const std::string &doc_string)
unsigned int _qp
static InputParameters validParams()
auto wallHeatTransferCoefficient(const T1 &Nu, const T2 &k, const T3 &D_h)
Compute wall heat transfer coefficient.
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
void addClassDescription(const std::string &doc_string)
MooseUnits pow(const MooseUnits &, int)