https://mooseframework.inl.gov
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 
15 using namespace libMesh;
16 
17 namespace WallFriction
18 {
19 
25 Real DarcyFrictionFactor(const Real & f_F);
26 ADReal DarcyFrictionFactor(const ADReal & f_F);
27 
37 
49 template <typename T1, typename T2, typename T3, typename T4, typename T5, typename T6>
50 auto
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 }
The following methods are specializations for using the Parallel::packed_range_* routines for a vecto...
ADReal FanningFrictionFactorChurchill(ADReal Re, ADReal roughness, ADReal D_h)
auto max(const L &left, const R &right)
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.
ADReal DarcyFrictionFactor(const ADReal &f_F)
ExpressionBuilder::EBTerm pow(const ExpressionBuilder::EBTerm &left, T exponent)
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
MooseUnits pow(const MooseUnits &, int)