https://mooseframework.inl.gov
WallFrictionModels.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 "WallFrictionModels.h"
11 #include "Numerics.h"
12 #include "ADReal.h"
13 
14 namespace WallFriction
15 {
16 
17 Real
18 DarcyFrictionFactor(const Real & f_F)
19 {
20  return 4 * f_F;
21 }
22 
23 ADReal
25 {
26  return 4 * f_F;
27 }
28 
29 Real
30 FanningFrictionFactorChurchill(Real Re, Real roughness, Real Dh)
31 {
32  Real Re_limit = std::max(Re, 10.0);
33 
34  Real a =
35  std::pow(2.457 * std::log(1.0 / (std::pow(7.0 / Re_limit, 0.9) + 0.27 * roughness / Dh)), 16);
36  Real b = std::pow(3.753e4 / Re_limit, 16);
37  return 2.0 * std::pow(std::pow(8.0 / Re_limit, 12) + 1.0 / std::pow(a + b, 1.5), 1.0 / 12.0);
38 }
39 
40 ADReal
42 {
43  ADReal Re_limit = std::max(Re, 10.0);
44 
45  ADReal a =
46  std::pow(2.457 * std::log(1.0 / (std::pow(7.0 / Re_limit, 0.9) + 0.27 * roughness / Dh)), 16);
47  ADReal b = std::pow(3.753e4 / Re_limit, 16);
48  return 2.0 * std::pow(std::pow(8.0 / Re_limit, 12) + 1.0 / std::pow(a + b, 1.5), 1.0 / 12.0);
49 }
50 }
DualNumber< Real, DNDerivativeType, true > ADReal
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.
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
MooseUnits pow(const MooseUnits &, int)