https://mooseframework.inl.gov
DimensionlessFlowNumbers.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 
11 #include "MooseError.h"
12 
13 namespace fp
14 {
15 
16 void
18 {
19  mooseDoOnce(mooseDeprecated("This function has been moved a different file and namespace. "
20  "Please replace inclusion of DimensionlessFlowNumbers.h "
21  "with inclusion of HeatTransferUtils.h and then replace 'fp::' with "
22  "'HeatTransferUtils::'."));
23 }
24 
25 Real
26 reynolds(Real rho, Real vel, Real L, Real mu)
27 {
29  return rho * std::fabs(vel) * L / mu;
30 }
31 
32 ADReal
33 reynolds(const ADReal & rho, const ADReal & vel, const ADReal & L, const ADReal & mu)
34 {
36  using std::fabs;
37  return rho * fabs(vel) * L / mu;
38 }
39 
40 Real
41 prandtl(Real cp, Real mu, Real k)
42 {
44  return cp * mu / k;
45 }
46 
47 ADReal
48 prandtl(const ADReal & cp, const ADReal & mu, const ADReal & k)
49 {
51  return cp * mu / k;
52 }
53 
54 Real
55 grashof(Real beta, Real T_s, Real T_bulk, Real L, Real rho, Real mu, Real gravity_magnitude)
56 {
58  return gravity_magnitude * beta * std::abs(T_s - T_bulk) * std::pow(L, 3) * (rho * rho) /
59  (mu * mu);
60 }
61 
62 ADReal
63 grashof(const ADReal & beta,
64  const ADReal & T_s,
65  const ADReal & T_bulk,
66  const ADReal & L,
67  const ADReal & rho,
68  const ADReal & mu,
69  const ADReal & gravity_magnitude)
70 {
72  using std::abs, std::pow;
73  return gravity_magnitude * beta * abs(T_s - T_bulk) * pow(L, 3) * (rho * rho) / (mu * mu);
74 }
75 
76 Real
77 laplace(Real sigma, Real rho, Real L, Real mu)
78 {
80  return sigma * rho * L / (mu * mu);
81 }
82 
83 ADReal
84 laplace(const ADReal & sigma, const ADReal & rho, const ADReal & L, const ADReal & mu)
85 {
87  return sigma * rho * L / (mu * mu);
88 }
89 
90 Real
91 thermalDiffusivity(Real k, Real rho, Real cp)
92 {
94  return k / (rho * cp);
95 }
96 
97 ADReal
98 thermalDiffusivity(const ADReal & k, const ADReal & rho, const ADReal & cp)
99 {
101  return k / (rho * cp);
102 }
103 
104 Real
105 peclet(Real vel, Real L, Real diffusivity)
106 {
108  return std::fabs(vel) * L / diffusivity;
109 }
110 
111 ADReal
112 peclet(const ADReal & vel, const ADReal & L, const ADReal & diffusivity)
113 {
115  using std::fabs;
116  return fabs(vel) * L / diffusivity;
117 }
118 
119 } // namespace fp
MetaPhysicL::DualNumber< V, D, asd > abs(const MetaPhysicL::DualNumber< V, D, asd > &a)
Real thermalDiffusivity(Real k, Real rho, Real cp)
Compute thermal diffusivity.
DualNumber< Real, DNDerivativeType, true > ADReal
Real peclet(Real vel, Real L, Real diffusivity)
Compute Peclet number.
static const std::string cp
Definition: NS.h:121
static const std::string mu
Definition: NS.h:123
void mooseDeprecated(Args &&... args)
Real reynolds(Real rho, Real vel, Real L, Real mu)
Compute Reynolds number.
void deprecatedMessage()
ExpressionBuilder::EBTerm pow(const ExpressionBuilder::EBTerm &left, T exponent)
Real laplace(Real sigma, Real rho, Real L, Real mu)
Compute Laplace number.
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
Real grashof(Real beta, Real T_s, Real T_bulk, Real L, Real rho, Real mu, Real gravity_magnitude)
Compute Grashof number.
Real prandtl(Real cp, Real mu, Real k)
Compute Prandtl number.
MooseUnits pow(const MooseUnits &, int)
static const std::string k
Definition: NS.h:130