https://mooseframework.inl.gov
Loading...
Searching...
No Matches
WallFrictionModelsTest.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 "WallFrictionModels.h"
12#include "THMTestUtils.h"
13
14TEST(WallFrictionModelsTest, darcy_friction_factor)
15{
16 ABS_TEST(WallFriction::DarcyFrictionFactor(5.), 20., 1e-13);
17}
18
19TEST(WallFrictionModelsTest, fanning_friction_factor_churchill)
20{
21 // Re < 10
22 ABS_TEST(WallFriction::FanningFrictionFactorChurchill(1, 1e-5, 2e-2), 1.6, 1e-13);
23 // Re > 10
24 ABS_TEST(WallFriction::FanningFrictionFactorChurchill(100, 1e-5, 2e-2), 0.16, 1e-13);
25}
26
27TEST(WallFrictionModelsTest, fanning_friction_factor_cheng)
28{
29 // Laminar interior subchannel of a square array with P/D = 1.1, whose Darcy friction factor
30 // constant from Table 5 of Cheng and Todreas (1986) is 35.55 + 263.7 (0.1) - 190.2 (0.1)^2 =
31 // 60.018
32 const Real Re = 2000;
33 const Real f_F = WallFriction::FanningFrictionFactorCheng(Re, 35.55, 263.7, -190.2, 1.0, 1.1);
34 REL_TEST(WallFriction::DarcyFrictionFactor(f_F), 60.018 / Re, REL_TOL_SAVED_VALUE);
35}
const double Re
TEST(WallFrictionModelsTest, darcy_friction_factor)
Real DarcyFrictionFactor(const Real &f_F)
Computes Darcy friction factor from Fanning friction factor.
Real FanningFrictionFactorChurchill(Real Re, Real roughness, Real D_h)
Computes Fanning friction factor using Churchill correlation.
auto FanningFrictionFactorCheng(const T1 &Re, const T2 &a, const T3 &b, const T4 &c, const T5 &n, const T6 &PoD)
Computes Fanning friction factor using Cheng-Todreas correlation.