https://mooseframework.inl.gov
HeatTransferUtilsTest.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 
10 #include "gtest/gtest.h"
11 #include "HeatTransferUtils.h"
12 
14 {
15  const Real rho = 998.0;
16  const Real vel = -2.5;
17  const Real L = 1e-4;
18  const Real mu = 8.9e-4;
19  EXPECT_NEAR(HeatTransferUtils::reynolds(rho, vel, L, mu), 280.3370786516856, 1e-12);
20 }
21 
23 {
24  const Real cp = 4184.0;
25  const Real mu = 8.9e-4;
26  const Real k = 1.0020;
27  EXPECT_NEAR(HeatTransferUtils::prandtl(cp, mu, k), 3.71632734530938, 1e-12);
28 }
29 
31 {
32  const Real beta = 0.000214;
33  const Real T_s = 2.5;
34  const Real T_bulk = 0;
35  const Real L = 2.234;
36  const Real rho = 998.0;
37  const Real mu = 8.9e-4;
38  const Real g = 9.81;
39  EXPECT_NEAR(
40  HeatTransferUtils::grashof(beta, T_s, T_bulk, L, rho, mu, g), 73578912563.777863, 1e-12);
41 }
42 
44 {
45  const Real sigma = 72.8e-3;
46  const Real rho = 998.0;
47  const Real L = 2.234;
48  const Real mu = 8.9e-4;
49  EXPECT_NEAR(HeatTransferUtils::laplace(sigma, rho, L, mu), 204910907.20868585, 1e-12);
50 }
51 
53 {
54  const Real k = 1.5;
55  const Real rho = 0.15;
56  const Real cp = 2416.0;
57  EXPECT_NEAR(HeatTransferUtils::thermalDiffusivity(k, rho, cp), 0.0041390728476821195, 1e-12);
58 }
59 
61 {
62  const Real vel = -10.0;
63  const Real L = 0.014;
64  const Real diffusivity = 1.5;
65  EXPECT_NEAR(HeatTransferUtils::peclet(vel, L, diffusivity), 0.09333333333333334, 1e-12);
66 }
auto peclet(const T1 &vel, const T2 &L, const T3 &diffusivity)
Compute Peclet number.
TEST(HeatTransferUtils, reynolds)
Real peclet(Real vel, Real L, Real diffusivity)
Compute Peclet number.
auto thermalDiffusivity(const T1 &k, const T2 &rho, const T3 &cp)
Compute thermal diffusivity.
auto grashof(const T1 &beta, const T2 &T_s, const T3 &T_bulk, const T4 &L, const T5 &rho, const T6 &mu, Real gravity_magnitude)
Compute Grashof number.
static const std::string cp
Definition: NS.h:121
static const std::string mu
Definition: NS.h:123
Real reynolds(Real rho, Real vel, Real L, Real mu)
Compute Reynolds number.
auto reynolds(const T1 &rho, const T2 &vel, const T3 &L, const T4 &mu)
Compute Reynolds number.
auto prandtl(const T1 &cp, const T2 &mu, const T3 &k)
Compute Prandtl number.
Real laplace(Real sigma, Real rho, Real L, Real mu)
Compute Laplace number.
auto laplace(const T1 &sigma, const T2 &rho, const T3 &L, const T4 &mu)
Compute Laplace number.
static const std::string thermal_diffusivity
Definition: NS.h:133
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.
static const std::string k
Definition: NS.h:130