https://mooseframework.inl.gov
Loading...
Searching...
No Matches
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
14namespace WallFriction
15{
16
17Real
18DarcyFrictionFactor(const Real & f_F)
19{
20 return 4 * f_F;
21}
22
25{
26 return 4 * f_F;
27}
28
29Real
30FanningFrictionFactorChurchill(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
42{
43 using std::max, std::pow, std::log;
44
45 ADReal Re_limit = max(Re, 10.0);
46
47 ADReal a = pow(2.457 * log(1.0 / (pow(7.0 / Re_limit, 0.9) + 0.27 * roughness / Dh)), 16);
48 ADReal b = pow(3.753e4 / Re_limit, 16);
49 return 2.0 * pow(pow(8.0 / Re_limit, 12) + 1.0 / pow(a + b, 1.5), 1.0 / 12.0);
50}
51}
DualNumber< Real, DNDerivativeType, true > ADReal
ExpressionBuilder::EBTerm pow(const ExpressionBuilder::EBTerm &left, T exponent)
const double Re
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