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  return rho * std::fabs(vel) * L / mu;
37 }
38 
39 Real
40 prandtl(Real cp, Real mu, Real k)
41 {
43  return cp * mu / k;
44 }
45 
46 ADReal
47 prandtl(const ADReal & cp, const ADReal & mu, const ADReal & k)
48 {
50  return cp * mu / k;
51 }
52 
53 Real
54 grashof(Real beta, Real T_s, Real T_bulk, Real L, Real rho, Real mu, Real gravity_magnitude)
55 {
57  return gravity_magnitude * beta * std::abs(T_s - T_bulk) * std::pow(L, 3) * (rho * rho) /
58  (mu * mu);
59 }
60 
61 ADReal
62 grashof(const ADReal & beta,
63  const ADReal & T_s,
64  const ADReal & T_bulk,
65  const ADReal & L,
66  const ADReal & rho,
67  const ADReal & mu,
68  const ADReal & gravity_magnitude)
69 {
71  return gravity_magnitude * beta * std::abs(T_s - T_bulk) * std::pow(L, 3) * (rho * rho) /
72  (mu * mu);
73 }
74 
75 Real
76 laplace(Real sigma, Real rho, Real L, Real mu)
77 {
79  return sigma * rho * L / (mu * mu);
80 }
81 
82 ADReal
83 laplace(const ADReal & sigma, const ADReal & rho, const ADReal & L, const ADReal & mu)
84 {
86  return sigma * rho * L / (mu * mu);
87 }
88 
89 Real
90 thermalDiffusivity(Real k, Real rho, Real cp)
91 {
93  return k / (rho * cp);
94 }
95 
96 ADReal
97 thermalDiffusivity(const ADReal & k, const ADReal & rho, const ADReal & cp)
98 {
100  return k / (rho * cp);
101 }
102 
103 Real
104 peclet(Real vel, Real L, Real diffusivity)
105 {
107  return std::fabs(vel) * L / diffusivity;
108 }
109 
110 ADReal
111 peclet(const ADReal & vel, const ADReal & L, const ADReal & diffusivity)
112 {
114  return std::fabs(vel) * L / diffusivity;
115 }
116 
117 } // namespace fp
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()
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