www.mooseframework.org
DimensionlessFlowNumbers.C
Go to the documentation of this file.
1 //* This file is part of the MOOSE framework
2 //* https://www.mooseframework.org
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 
12 #include "DualRealOps.h"
13 
14 namespace fp
15 {
16 
17 Real
18 reynolds(Real rho, Real vel, Real L, Real mu)
19 {
20  return rho * std::fabs(vel) * L / mu;
21 }
22 
25 {
26  return rho * std::fabs(vel) * L / mu;
27 }
28 
29 Real
30 prandtl(Real cp, Real mu, Real k)
31 {
32  return cp * mu / k;
33 }
34 
37 {
38  return cp * mu / k;
39 }
40 
41 Real
42 grashof(Real beta, Real T_s, Real T_bulk, Real L, Real rho, Real mu, Real gravity_magnitude)
43 {
44  return gravity_magnitude * beta * std::abs(T_s - T_bulk) * std::pow(L, 3) * (rho * rho) /
45  (mu * mu);
46 }
47 
50  DualReal T_s,
51  DualReal T_bulk,
52  DualReal L,
53  DualReal rho,
54  DualReal mu,
55  DualReal gravity_magnitude)
56 {
57  return gravity_magnitude * beta * std::abs(T_s - T_bulk) * std::pow(L, 3) * (rho * rho) /
58  (mu * mu);
59 }
60 
61 Real
62 laplace(Real sigma, Real rho, Real L, Real mu)
63 {
64  return sigma * rho * L / (mu * mu);
65 }
66 
69 {
70  return sigma * rho * L / (mu * mu);
71 }
72 
73 Real
74 thermalDiffusivity(Real k, Real rho, Real cp)
75 {
76  return k / (rho * cp);
77 }
78 
81 {
82  return k / (rho * cp);
83 }
84 
85 Real
86 peclet(Real vel, Real L, Real diffusivity)
87 {
88  return std::fabs(vel) * L / diffusivity;
89 }
90 
92 peclet(DualReal vel, DualReal L, DualReal diffusivity)
93 {
94  return std::fabs(vel) * L / diffusivity;
95 }
96 
97 } // namespace fp
Real thermalDiffusivity(Real k, Real rho, Real cp)
Compute thermal diffusivity.
DualNumber< Real, DNDerivativeType, true > DualReal
Real peclet(Real vel, Real L, Real diffusivity)
Compute Peclet number.
ADRealEigenVector< T, D, asd > abs(const ADRealEigenVector< T, D, asd > &)
static const std::string cp
Definition: NS.h:120
static const std::string mu
Definition: NS.h:122
Real reynolds(Real rho, Real vel, Real L, Real mu)
Compute Reynolds number.
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:124