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

#include <haiderLevenspielDragForce3D.h>

+ Inheritance diagram for olb::HaiderLevenspielDragForce3D< T, PARTICLETYPE, DESCRIPTOR >:
+ Collaboration diagram for olb::HaiderLevenspielDragForce3D< T, PARTICLETYPE, DESCRIPTOR >:

Public Member Functions

 HaiderLevenspielDragForce3D (SuperLatticeInterpPhysVelocity3D< T, DESCRIPTOR > &getVel, T dynVisc, T physDensity, UnitConverter< T, DESCRIPTOR > converter)
 
 ~HaiderLevenspielDragForce3D () override
 
void applyForce (typename std::deque< PARTICLETYPE< T > >::iterator p, int pInt, ParticleSystem3D< T, PARTICLETYPE > &psSys) override
 
- Public Member Functions inherited from olb::Force3D< T, PARTICLETYPE >
 Force3D ()
 
 Force3D (Force3D< T, PARTICLETYPE > &)
 
 Force3D (const Force3D< T, PARTICLETYPE > &)
 
virtual ~Force3D ()
 

Additional Inherited Members

- Protected Attributes inherited from olb::Force3D< T, PARTICLETYPE >
OstreamManager clout
 

Detailed Description

template<typename T, template< typename U > class PARTICLETYPE, typename DESCRIPTOR>
class olb::HaiderLevenspielDragForce3D< T, PARTICLETYPE, DESCRIPTOR >

Definition at line 39 of file haiderLevenspielDragForce3D.h.

Constructor & Destructor Documentation

◆ HaiderLevenspielDragForce3D()

template<typename T , template< typename U > class PARTICLETYPE, typename DESCRIPTOR >
olb::HaiderLevenspielDragForce3D< T, PARTICLETYPE, DESCRIPTOR >::HaiderLevenspielDragForce3D ( SuperLatticeInterpPhysVelocity3D< T, DESCRIPTOR > & getVel,
T dynVisc,
T physDensity,
UnitConverter< T, DESCRIPTOR > converter )

Definition at line 38 of file haiderLevenspielDragForce3D.hh.

38 :
39 Force3D<T, PARTICLETYPE>(), _getVel(getVel), _dynVisc(dynVisc), _physDensity(physDensity), _converter(converter)
40{
41// this->_name = "HaiderLevenspielDragForce3D";
42}

◆ ~HaiderLevenspielDragForce3D()

template<typename T , template< typename U > class PARTICLETYPE, typename DESCRIPTOR >
olb::HaiderLevenspielDragForce3D< T, PARTICLETYPE, DESCRIPTOR >::~HaiderLevenspielDragForce3D ( )
inlineoverride

Definition at line 45 of file haiderLevenspielDragForce3D.h.

45{};

Member Function Documentation

◆ applyForce()

template<typename T , template< typename U > class PARTICLETYPE, typename DESCRIPTOR >
void olb::HaiderLevenspielDragForce3D< T, PARTICLETYPE, DESCRIPTOR >::applyForce ( typename std::deque< PARTICLETYPE< T > >::iterator p,
int pInt,
ParticleSystem3D< T, PARTICLETYPE > & psSys )
overridevirtual

Implements olb::Force3D< T, PARTICLETYPE >.

Definition at line 45 of file haiderLevenspielDragForce3D.hh.

48{
49
50 Vector<T, 3> force = {T(0), T(0), T(0)} ;
51 std::cout << _converter.getConversionFactorForce() << std::endl;
52 T fluidVel[3] = {0., 0., 0.};
53 std::cout << _physDensity << "phys density" <<std::endl;//je fyzikalni
54 std::cout << _dynVisc << "phys density" <<std::endl;//je fyzikalni
55 _getVel(fluidVel, &p->getPos()[0], p->getCuboid());
56 std::cout << "Fluidvel: " << fluidVel[0] << " " << fluidVel[1] << " " << fluidVel[2] << std::endl;
57 T rel_velo = util::sqrt(util::pow(p->getVel()[0]-fluidVel[0], 2.) + util::pow(p->getVel()[1]-fluidVel[1], 2.) + util::pow(p->getVel()[2]-fluidVel[2], 2.));
58 std::cout << "rel_velo " << rel_velo << std::endl;
59 //T fluidVelAbs = util::sqrt(std::pow(fluidVel[0], 2.) + util::pow(fluidVel[1], 2.) + util::pow(fluidVel[2], 2.));
60 //T partVelAbs = util::sqrt(std::pow(p->getVel()[0], 2.) + util::pow(p->getVel()[1], 2.) + util::pow(p->getVel()[2], 2.));
61 T particleRe = 2. * p->getRad() * rel_velo * _physDensity / _dynVisc;
62std::cout << "radius " << p->getRad() << std::endl;
63 std::cout << "particleRe" << particleRe << std::endl;
64 T coeffCD;
65 if(particleRe < 0.000001){
66 coeffCD= 0;
67 } else {
68 coeffCD = 24./particleRe*(1. + p->getA()*util::pow(particleRe, p->getB()))+ p->getC()/(1.+p->getD()/particleRe);
69 }
70 std::cout << "coeffCD " << coeffCD << std::endl;
71
72
73 for (int i = 0; i < 3; i++) {
74
75 force[i] = -1. * 0.5* coeffCD * M_PI * p->getRad()*p->getRad()*_physDensity*rel_velo*(p->getVel()[i]-fluidVel[i]);
76 std::cout <<"force " << i << " " << force[i] << std::endl;
77 p->getForce()[i] += force[i] ;
78
79 }
80std::cout << "apply force finished " << std::endl;
81}
#define M_PI
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 M_PI, 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: