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

#include <advectionDiffusionForces.h>

+ Inheritance diagram for olb::AdvDiffRotatingForce3D< T, DESCRIPTOR, ADLattice >:
+ Collaboration diagram for olb::AdvDiffRotatingForce3D< T, DESCRIPTOR, ADLattice >:

Public Member Functions

 AdvDiffRotatingForce3D (SuperGeometry< T, 3 > &superGeometry_, const UnitConverter< T, DESCRIPTOR > &converter_, std::vector< T > axisPoint_, std::vector< T > axisDirection_, T w_, T *frac_, bool centrifugeForceOn_=true, bool coriolisForceOn_=true)
 
 AdvDiffRotatingForce3D (UnitConverter< T, DESCRIPTOR > const &converter_, T pRadius_, T pRho_)
 
virtual ~AdvDiffRotatingForce3D ()
 
void applyForce (T force[], Cell< T, DESCRIPTOR > *nsCell, Cell< T, ADLattice > *adCell, T vel[], int latticeR[])
 
- Public Member Functions inherited from olb::AdvectionDiffusionForce3D< T, DESCRIPTOR, ADLattice >
 AdvectionDiffusionForce3D ()
 
virtual ~AdvectionDiffusionForce3D ()
 
int getInitArg ()
 

Protected Attributes

SuperGeometry< T, 3 > & sg
 
std::vector< T > axisPoint
 
std::vector< T > axisDirection
 
invMassLessForce
 
w
 
T * frac
 
bool centrifugeForceOn
 
bool coriolisForceOn
 

Detailed Description

template<typename T, typename DESCRIPTOR, typename ADLattice = descriptors::D3Q7<descriptors::VELOCITY,descriptors::VELOCITY2>>
class olb::AdvDiffRotatingForce3D< T, DESCRIPTOR, ADLattice >

Definition at line 93 of file advectionDiffusionForces.h.

Constructor & Destructor Documentation

◆ AdvDiffRotatingForce3D() [1/2]

template<typename T , typename DESCRIPTOR , typename ADLattice >
olb::AdvDiffRotatingForce3D< T, DESCRIPTOR, ADLattice >::AdvDiffRotatingForce3D ( SuperGeometry< T, 3 > & superGeometry_,
const UnitConverter< T, DESCRIPTOR > & converter_,
std::vector< T > axisPoint_,
std::vector< T > axisDirection_,
T w_,
T * frac_,
bool centrifugeForceOn_ = true,
bool coriolisForceOn_ = true )

Definition at line 103 of file advectionDiffusionForces.hh.

105 :
106 sg(superGeometry_), axisPoint(axisPoint_), axisDirection(axisDirection_),
107 w(w_), frac(frac_), centrifugeForceOn(centrifugeForceOn_), coriolisForceOn(coriolisForceOn_)
108{
109 invMassLessForce = converter_.getConversionFactorTime() * converter_.getConversionFactorTime() / converter_.getConversionFactorLength();
110}

References olb::UnitConverter< T, DESCRIPTOR >::getConversionFactorLength(), olb::UnitConverter< T, DESCRIPTOR >::getConversionFactorTime(), and olb::AdvDiffRotatingForce3D< T, DESCRIPTOR, ADLattice >::invMassLessForce.

+ Here is the call graph for this function:

◆ AdvDiffRotatingForce3D() [2/2]

template<typename T , typename DESCRIPTOR , typename ADLattice = descriptors::D3Q7<descriptors::VELOCITY,descriptors::VELOCITY2>>
olb::AdvDiffRotatingForce3D< T, DESCRIPTOR, ADLattice >::AdvDiffRotatingForce3D ( UnitConverter< T, DESCRIPTOR > const & converter_,
T pRadius_,
T pRho_ )

◆ ~AdvDiffRotatingForce3D()

template<typename T , typename DESCRIPTOR , typename ADLattice = descriptors::D3Q7<descriptors::VELOCITY,descriptors::VELOCITY2>>
virtual olb::AdvDiffRotatingForce3D< T, DESCRIPTOR, ADLattice >::~AdvDiffRotatingForce3D ( )
inlinevirtual

Definition at line 103 of file advectionDiffusionForces.h.

103{};

Member Function Documentation

◆ applyForce()

template<typename T , typename DESCRIPTOR , typename ADLattice >
void olb::AdvDiffRotatingForce3D< T, DESCRIPTOR, ADLattice >::applyForce ( T force[],
Cell< T, DESCRIPTOR > * nsCell,
Cell< T, ADLattice > * adCell,
T vel[],
int latticeR[] )
virtual

Implements olb::AdvectionDiffusionForce3D< T, DESCRIPTOR, ADLattice >.

Definition at line 114 of file advectionDiffusionForces.hh.

115{
116 std::vector<T> F_centri(3,0);
117 std::vector<T> F_coriolis(3,0);
118 T wf = w*(*frac);
119// if ( this->_sLattice.getLoadBalancer().rank(latticeR[0]) == singleton::mpi().getRank() ) {
120 // local coords are given, fetch local cell and compute value(s)
121 std::vector<T> physR(3,T());
122 this->sg.getCuboidGeometry().getPhysR(&(physR[0]),&(latticeR[0]));
123
124 T scalar = (physR[0]-axisPoint[0])*axisDirection[0]
125 +(physR[1]-axisPoint[1])*axisDirection[1]
126 +(physR[2]-axisPoint[2])*axisDirection[2];
127
128 if (centrifugeForceOn) {
129 F_centri[0] = wf*wf*(physR[0]-axisPoint[0]-scalar*axisDirection[0]);
130 F_centri[1] = wf*wf*(physR[1]-axisPoint[1]-scalar*axisDirection[1]);
131 F_centri[2] = wf*wf*(physR[2]-axisPoint[2]-scalar*axisDirection[2]);
132 }
133 if (coriolisForceOn) {
134 F_coriolis[0] = -2*wf*(axisDirection[1]*vel[2]-axisDirection[2]*vel[1]);
135 F_coriolis[1] = -2*wf*(axisDirection[2]*vel[0]-axisDirection[0]*vel[2]);
136 F_coriolis[2] = -2*wf*(axisDirection[0]*vel[1]-axisDirection[1]*vel[0]);
137 }
138 force[0] += (F_coriolis[0]+F_centri[0])*invMassLessForce;
139 force[1] += (F_coriolis[1]+F_centri[1])*invMassLessForce;
140 force[2] += (F_coriolis[2]+F_centri[2])*invMassLessForce;
141// }
142}
CuboidGeometry< T, D > & getCuboidGeometry()
Read and write access to cuboid geometry.

Member Data Documentation

◆ axisDirection

template<typename T , typename DESCRIPTOR , typename ADLattice = descriptors::D3Q7<descriptors::VELOCITY,descriptors::VELOCITY2>>
std::vector<T> olb::AdvDiffRotatingForce3D< T, DESCRIPTOR, ADLattice >::axisDirection
protected

Definition at line 109 of file advectionDiffusionForces.h.

◆ axisPoint

template<typename T , typename DESCRIPTOR , typename ADLattice = descriptors::D3Q7<descriptors::VELOCITY,descriptors::VELOCITY2>>
std::vector<T> olb::AdvDiffRotatingForce3D< T, DESCRIPTOR, ADLattice >::axisPoint
protected

Definition at line 108 of file advectionDiffusionForces.h.

◆ centrifugeForceOn

template<typename T , typename DESCRIPTOR , typename ADLattice = descriptors::D3Q7<descriptors::VELOCITY,descriptors::VELOCITY2>>
bool olb::AdvDiffRotatingForce3D< T, DESCRIPTOR, ADLattice >::centrifugeForceOn
protected

Definition at line 113 of file advectionDiffusionForces.h.

◆ coriolisForceOn

template<typename T , typename DESCRIPTOR , typename ADLattice = descriptors::D3Q7<descriptors::VELOCITY,descriptors::VELOCITY2>>
bool olb::AdvDiffRotatingForce3D< T, DESCRIPTOR, ADLattice >::coriolisForceOn
protected

Definition at line 114 of file advectionDiffusionForces.h.

◆ frac

template<typename T , typename DESCRIPTOR , typename ADLattice = descriptors::D3Q7<descriptors::VELOCITY,descriptors::VELOCITY2>>
T* olb::AdvDiffRotatingForce3D< T, DESCRIPTOR, ADLattice >::frac
protected

Definition at line 112 of file advectionDiffusionForces.h.

◆ invMassLessForce

template<typename T , typename DESCRIPTOR , typename ADLattice = descriptors::D3Q7<descriptors::VELOCITY,descriptors::VELOCITY2>>
T olb::AdvDiffRotatingForce3D< T, DESCRIPTOR, ADLattice >::invMassLessForce
protected

Definition at line 110 of file advectionDiffusionForces.h.

◆ sg

template<typename T , typename DESCRIPTOR , typename ADLattice = descriptors::D3Q7<descriptors::VELOCITY,descriptors::VELOCITY2>>
SuperGeometry<T,3>& olb::AdvDiffRotatingForce3D< T, DESCRIPTOR, ADLattice >::sg
protected

Definition at line 107 of file advectionDiffusionForces.h.

◆ w

template<typename T , typename DESCRIPTOR , typename ADLattice = descriptors::D3Q7<descriptors::VELOCITY,descriptors::VELOCITY2>>
T olb::AdvDiffRotatingForce3D< T, DESCRIPTOR, ADLattice >::w
protected

Definition at line 111 of file advectionDiffusionForces.h.


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