https://mooseframework.inl.gov
ADWallHeatTransferCoefficientSchadMaterial.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.addParam<MaterialPropertyName>(
25  "rho", FlowModelSinglePhase::DENSITY, "Density of the fluid");
26  params.addParam<MaterialPropertyName>("vel", FlowModelSinglePhase::VELOCITY, "Fluid velocity");
27  params.addParam<MaterialPropertyName>(
28  "D_h", FlowModelSinglePhase::HYDRAULIC_DIAMETER, "Hydraulic diameter");
29  params.addParam<MaterialPropertyName>(
30  "cp", FlowModelSinglePhase::SPECIFIC_HEAT_CONSTANT_PRESSURE, "Specific heat of the fluid");
31  params.addParam<MaterialPropertyName>(
32  "mu", FlowModelSinglePhase::DYNAMIC_VISCOSITY, "Dynamic viscosity of the fluid");
33  params.addParam<MaterialPropertyName>(
34  "k", FlowModelSinglePhase::THERMAL_CONDUCTIVITY, "Heat conductivity of the fluid");
35  params.addParam<MaterialPropertyName>(
36  "T", FlowModelSinglePhase::TEMPERATURE, "Fluid temperature");
37  params.addParam<MaterialPropertyName>("T_wall", FlowModel::TEMPERATURE_WALL, "Wall temperature");
38  params.addRequiredParam<Real>(
39  "PoD", "The Pitch-to-diameter ratio value being assigned into the property");
40  params.addClassDescription(
41  "Computes wall heat transfer coefficient for liquid sodium using Schad-modified correlation");
42  return params;
43 }
44 
46  const InputParameters & parameters)
47  : Material(parameters),
48  _Hw(declareADProperty<Real>("Hw")),
49  _rho(getADMaterialProperty<Real>("rho")),
50  _vel(getADMaterialProperty<Real>("vel")),
51  _D_h(getADMaterialProperty<Real>("D_h")),
52  _k(getADMaterialProperty<Real>("k")),
53  _mu(getADMaterialProperty<Real>("mu")),
54  _cp(getADMaterialProperty<Real>("cp")),
55  _T(getADMaterialProperty<Real>("T")),
56  _T_wall(getADMaterialProperty<Real>("T_wall")),
57  _PoD(getParam<Real>("PoD"))
58 {
59 }
60 
61 void
63 {
64  ADReal Pe = std::max(1.0, THM::Peclet(1., _cp[_qp], _rho[_qp], _vel[_qp], _D_h[_qp], _k[_qp]));
65 
66  if (_PoD > 1.5 || _PoD < 1.1 || Pe > 1000)
67  {
68  mooseDoOnce(mooseWarning("Schad's correlation is valid when Pe<1000, and P/D is between 1.1 "
69  "and 1.5. Be aware that using values out of this range may lead to "
70  "significant errors in your results!"));
71  }
72 
73  if (Pe < 150)
74  {
75  ADReal Nu = 4.496 * (-16.15 + 24.96 * _PoD - 8.55 * std::pow(_PoD, 2));
77  }
78  else
79  {
80  ADReal Nu = (-16.15 + 24.96 * _PoD - 8.55 * std::pow(_PoD, 2)) * std::pow(Pe, 0.3);
82  }
83 }
registerMooseObject("ThermalHydraulicsApp", ADWallHeatTransferCoefficientSchadMaterial)
const ADMaterialProperty< Real > & _cp
Specific heat capacity.
static const std::string SPECIFIC_HEAT_CONSTANT_PRESSURE
static const std::string DYNAMIC_VISCOSITY
void addParam(const std::string &name, const std::initializer_list< typename T::value_type > &value, const std::string &doc_string)
static const std::string TEMPERATURE
static const std::string VELOCITY
static const std::string THERMAL_CONDUCTIVITY
static const std::string HEAT_TRANSFER_COEFFICIENT_WALL
static const std::string DENSITY
void mooseWarning(Args &&... args) const
void addRequiredParam(const std::string &name, const std::string &doc_string)
unsigned int _qp
const ADMaterialProperty< Real > & _D_h
Hydraulic diameter.
static InputParameters validParams()
static const std::string TEMPERATURE_WALL
Definition: FlowModel.h:108
ADWallHeatTransferCoefficientSchadMaterial(const InputParameters &parameters)
ADMaterialProperty< Real > & _Hw
Wall heat transfer coefficient.
auto Peclet(const T1 &volume_fraction, const T2 &cp, const T3 &rho, const T4 &vel, const T5 &D_h, const T6 &k)
Compute Peclet number.
Definition: Numerics.h:153
auto wallHeatTransferCoefficient(const T1 &Nu, const T2 &k, const T3 &D_h)
Compute wall heat transfer coefficient.
Computes wall heat transfer coefficient for liquid sodium using Schad-modified correlation.
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
static const std::string HYDRAULIC_DIAMETER
void addClassDescription(const std::string &doc_string)
MooseUnits pow(const MooseUnits &, int)
const ADMaterialProperty< Real > & _k
Thermal conductivity.