https://mooseframework.inl.gov
Loading...
Searching...
No Matches
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
13namespace fp
14{
15
16void
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
25Real
26reynolds(Real rho, Real vel, Real L, Real mu)
27{
29 return rho * std::fabs(vel) * L / mu;
30}
31
33reynolds(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
40Real
41prandtl(Real cp, Real mu, Real k)
42{
44 return cp * mu / k;
45}
46
48prandtl(const ADReal & cp, const ADReal & mu, const ADReal & k)
49{
51 return cp * mu / k;
52}
53
54Real
55grashof(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
63grashof(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
76Real
77laplace(Real sigma, Real rho, Real L, Real mu)
78{
80 return sigma * rho * L / (mu * mu);
81}
82
84laplace(const ADReal & sigma, const ADReal & rho, const ADReal & L, const ADReal & mu)
85{
87 return sigma * rho * L / (mu * mu);
88}
89
90Real
91thermalDiffusivity(Real k, Real rho, Real cp)
92{
94 return k / (rho * cp);
95}
96
98thermalDiffusivity(const ADReal & k, const ADReal & rho, const ADReal & cp)
99{
101 return k / (rho * cp);
102}
103
104Real
105peclet(Real vel, Real L, Real diffusivity)
106{
108 return std::fabs(vel) * L / diffusivity;
109}
110
111ADReal
112peclet(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
DualNumber< Real, DNDerivativeType, true > ADReal
ExpressionBuilder::EBTerm pow(const ExpressionBuilder::EBTerm &left, T exponent)
const double mu
const double rho
void mooseDeprecated(Args &&... args)
Real prandtl(Real cp, Real mu, Real k)
Compute Prandtl number.
Real thermalDiffusivity(Real k, Real rho, Real cp)
Compute thermal diffusivity.
Real laplace(Real sigma, Real rho, Real L, Real mu)
Compute Laplace number.
void deprecatedMessage()
Real peclet(Real vel, Real L, Real diffusivity)
Compute Peclet number.
Real reynolds(Real rho, Real vel, Real L, Real mu)
Compute Reynolds number.
Real grashof(Real beta, Real T_s, Real T_bulk, Real L, Real rho, Real mu, Real gravity_magnitude)
Compute Grashof number.