https://mooseframework.inl.gov
DimensionlessFlowNumbersTest.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"
12 
13 TEST(DimensionlessFlowNumbersTest, reynolds)
14 {
15  EXPECT_EQ(fp::reynolds(1000., -1., 1., 1.), 1000.);
16  EXPECT_NEAR(fp::reynolds(998., 2.5, 1e-4, 8.9e-4), 280.3370786516856, 1e-12);
17 }
18 
19 TEST(DimensionlessFlowNumbersTest, prandtl)
20 {
21  EXPECT_EQ(fp::prandtl(10., 10., 100.), 1.);
22  EXPECT_NEAR(fp::prandtl(4184., 8.9e-4, 1.0020), 3.71632734530938, 1e-12);
23 }
24 
25 TEST(DimensionlessFlowNumbersTest, grashof)
26 {
27  EXPECT_EQ(fp::grashof(1., 1., 2., 1., 1., 1., 1.), 1.);
28  EXPECT_NEAR(fp::grashof(0.000214, 2.5, 0, 2.234, 998., 8.9e-4, 9.81), 73578912563.777863, 1e-12);
29 }
30 
31 TEST(DimensionlessFlowNumbersTest, laplace)
32 {
33  EXPECT_EQ(fp::laplace(1., 1., 1., 1.), 1.);
34  EXPECT_NEAR(fp::laplace(72.8e-3, 998., 2.234, 8.9e-4), 204910907.20868585, 1e-12);
35 }
36 
37 TEST(DimensionlessFlowNumbersTest, thermal_diffusivity)
38 {
39  EXPECT_EQ(fp::thermalDiffusivity(1., 1., 1.), 1.);
40  EXPECT_NEAR(fp::thermalDiffusivity(1.5, 0.15, 2416.0), 0.0041390728476821195, 1e-12);
41 }
42 
43 TEST(DimensionlessFlowNumbersTest, peclet)
44 {
45  EXPECT_EQ(fp::peclet(1., 1., 1.), 1.);
46  EXPECT_NEAR(fp::peclet(10., 0.014, 1.5), 0.09333333333333334, 1e-12);
47 }
Real thermalDiffusivity(Real k, Real rho, Real cp)
Compute thermal diffusivity.
Real peclet(Real vel, Real L, Real diffusivity)
Compute Peclet number.
TEST(DimensionlessFlowNumbersTest, reynolds)
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.
static const std::string thermal_diffusivity
Definition: NS.h:133
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.