OpenLB 1.7
Loading...
Searching...
No Matches
Public Member Functions | List of all members
olb::MorsiDragModel< T, Lattice, Particle > Class Template Reference

Class to compute the standard drag coefficient as in Morsi and Alexander (1972). More...

#include <dragModels3D.h>

+ Inheritance diagram for olb::MorsiDragModel< T, Lattice, Particle >:
+ Collaboration diagram for olb::MorsiDragModel< T, Lattice, Particle >:

Public Member Functions

 MorsiDragModel (UnitConverter< T, Lattice > &converter)
 Constructor.
 
virtual T operator() (Particle< T > *p, T latticeVelF[], T latticeVelP[], int globicFull[], T continuousPhaseFraction=1.) override
 Returns the scalar drag coefficient. globicFull = { globic, latticeRoundedP[0, ..., 2] }.
 
std::string name () override
 
- Public Member Functions inherited from olb::DragModelBase< T, Lattice, Particle >
 DragModelBase (UnitConverter< T, Lattice > &converter)
 Constructor.
 

Additional Inherited Members

- Protected Attributes inherited from olb::DragModelBase< T, Lattice, Particle >
UnitConverter< T, Lattice > & _converter
 Returns the scalar drag coefficient to overload.
 
- Protected Attributes inherited from olb::DragModel< T, Particle >
std::shared_ptr< ParticleReynoldsNumber< T, Particle > > _reP
 Functional to compute particle Reynolds number.
 

Detailed Description

template<typename T, typename Lattice, template< typename V > class Particle>
class olb::MorsiDragModel< T, Lattice, Particle >

Class to compute the standard drag coefficient as in Morsi and Alexander (1972).

Definition at line 81 of file dragModels3D.h.

Constructor & Destructor Documentation

◆ MorsiDragModel()

template<typename T , typename Lattice , template< typename V > class Particle>
olb::MorsiDragModel< T, Lattice, Particle >::MorsiDragModel ( UnitConverter< T, Lattice > & converter)

Constructor.

Definition at line 60 of file dragModels3D.hh.

61 : DragModelBase<T,Lattice,Particle>(converter)
62{
63 this->_reP = std::make_shared<NewtonianParticleReynoldsNumber<T,Lattice,Particle> > (this->_converter);
64}
UnitConverter< T, Lattice > & _converter
Returns the scalar drag coefficient to overload.
std::shared_ptr< ParticleReynoldsNumber< T, Particle > > _reP
Functional to compute particle Reynolds number.

References olb::DragModelBase< T, Lattice, Particle >::_converter, and olb::DragModel< T, Particle >::_reP.

Member Function Documentation

◆ name()

template<typename T , typename Lattice , template< typename V > class Particle>
std::string olb::MorsiDragModel< T, Lattice, Particle >::name ( )
inlineoverridevirtual

Implements olb::DragModel< T, Particle >.

Reimplemented in olb::PowerLawMorsiDragModel< T, Lattice, Particle >.

Definition at line 87 of file dragModels3D.h.

87{return "MorsiDragModel";}

◆ operator()()

template<typename T , typename Lattice , template< typename V > class Particle>
T olb::MorsiDragModel< T, Lattice, Particle >::operator() ( Particle< T > * p,
T latticeVelF[],
T latticeVelP[],
int globicFull[],
T continuousPhaseFraction = 1. )
overridevirtual

Returns the scalar drag coefficient. globicFull = { globic, latticeRoundedP[0, ..., 2] }.

Implements olb::DragModel< T, Particle >.

Definition at line 67 of file dragModels3D.hh.

69{
70 T physVelRelative = this->_converter.getPhysVelocity (
71 util::sqrt( util::pow(latticeVelF[0] - latticeVelP[0],2) +
72 util::pow(latticeVelF[1] - latticeVelP[1],2) +
73 util::pow(latticeVelF[2] - latticeVelP[2],2) ) );
74
75 T ReP = continuousPhaseFraction * this->_reP->operator() (p, physVelRelative, globicFull);
76
77 T a[3] = {T(), T(), T()};
78 if (ReP < 0.1) {
79 a[0] = 0.0;
80 a[1] = 24.0;
81 a[2] = 0.0;
82 }
83 else if (ReP < 1.0) {
84 a[0] = 3.69;
85 a[1] = 22.73;
86 a[2] = 0.0903;
87 }
88 else if (ReP < 10.0) {
89 a[0] = 1.222;
90 a[1] = 29.16667;
91 a[2] =-3.8889;
92 }
93 else if (ReP < 100.0) {
94 a[0] = 0.6167;
95 a[1] = 46.5;
96 a[2] =-116.67;
97 }
98 else if (ReP < 1000.0) {
99 a[0] = 0.3644;
100 a[1] = 98.33;
101 a[2] =-2778;
102 }
103 else if (ReP < 5000.0) {
104 a[0] = 0.357;
105 a[1] = 148.62;
106 a[2] =-4.75e4;
107 }
108 else if (ReP < 10000.0) {
109 a[0] = 0.46;
110 a[1] =-490.546;
111 a[2] = 57.87e4;
112 }
113 else {
114 a[0] = 0.5191;
115 a[1] =-1662.5;
116 a[2] = 5.4167e6;
117 }
118
119 return ( a[0] + a[1]/ReP + a[2]/(ReP*ReP) );
120}
constexpr T getPhysVelocity(T latticeVelocity) const
conversion from lattice to physical velocity
cpu::simd::Pack< T > sqrt(cpu::simd::Pack< T > value)
Definition pack.h:100
cpu::simd::Pack< T > pow(cpu::simd::Pack< T > base, cpu::simd::Pack< T > exp)
Definition pack.h:112

References olb::util::pow(), and olb::util::sqrt().

+ Here is the call graph for this function:

The documentation for this class was generated from the following files: