https://mooseframework.inl.gov
Loading...
Searching...
No Matches
WallFrictionModels.h
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#pragma once
11
12#include "libmesh/libmesh_common.h"
13#include "ADReal.h"
14
15using namespace libMesh;
16
17namespace WallFriction
18{
19
25Real DarcyFrictionFactor(const Real & f_F);
27
37
49template <typename T1, typename T2, typename T3, typename T4, typename T5, typename T6>
50auto
52 const T1 & Re, const T2 & a, const T3 & b, const T4 & c, const T5 & n, const T6 & PoD)
53{
54 using std::pow, std::max;
55 return (a + b * (PoD - 1) + c * pow(PoD - 1, 2)) / pow(max(Re, 10.0), n);
56}
57}
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.
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.
The following methods are specializations for using the Parallel::packed_range_* routines for a vecto...
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real