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

#include <advectionDiffusionForces.h>

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

Public Member Functions

 AdvDiffMagneticWireForce3D (SuperGeometry< T, 3 > &superGeometry_, UnitConverter< T, DESCRIPTOR > const &converter_, T pMass, AnalyticalF< 3, T, T > &getMagForce)
 
 ~AdvDiffMagneticWireForce3D () override
 
void applyForce (T force[], Cell< T, DESCRIPTOR > *nsCell, Cell< T, ADLattice > *adCell, T vel[], int latticeR[]) override
 
- Public Member Functions inherited from olb::AdvectionDiffusionForce3D< T, DESCRIPTOR, ADLattice >
 AdvectionDiffusionForce3D ()
 
virtual ~AdvectionDiffusionForce3D ()
 
int getInitArg ()
 

Detailed Description

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

Definition at line 120 of file advectionDiffusionForces.h.

Constructor & Destructor Documentation

◆ AdvDiffMagneticWireForce3D()

template<typename T , typename DESCRIPTOR , typename ADLattice >
olb::AdvDiffMagneticWireForce3D< T, DESCRIPTOR, ADLattice >::AdvDiffMagneticWireForce3D ( SuperGeometry< T, 3 > & superGeometry_,
UnitConverter< T, DESCRIPTOR > const & converter_,
T pMass,
AnalyticalF< 3, T, T > & getMagForce )

Definition at line 146 of file advectionDiffusionForces.hh.

146 : sg(superGeometry_), _getMagForce(getMagForce)
147{
148 initArg = 8;
149 _pMass = converter_.getConversionFactorTime() / pMass;
150 _conversionVelocity = converter_.getConversionFactorVelocity();
151}

References olb::UnitConverter< T, DESCRIPTOR >::getConversionFactorTime(), and olb::UnitConverter< T, DESCRIPTOR >::getConversionFactorVelocity().

+ Here is the call graph for this function:

◆ ~AdvDiffMagneticWireForce3D()

template<typename T , typename DESCRIPTOR , typename ADLattice = descriptors::D3Q7<descriptors::VELOCITY,descriptors::VELOCITY2>>
olb::AdvDiffMagneticWireForce3D< T, DESCRIPTOR, ADLattice >::~AdvDiffMagneticWireForce3D ( )
inlineoverride

Definition at line 123 of file advectionDiffusionForces.h.

123{};

Member Function Documentation

◆ applyForce()

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

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

Definition at line 155 of file advectionDiffusionForces.hh.

156{
157 std::vector<T> physR(3,T());
158 this->sg.getCuboidGeometry().getPhysR(&(physR[0]),&(latticeR[0]));
159 T pos[3] = { T(), T(), T() };
160 pos[0] = physR[0];
161 pos[1] = physR[1];
162 pos[2] = physR[2];
163 T forceHelp[3] = { T(), T(), T() };
164 _getMagForce(forceHelp, pos);
165 for (int i=0; i < DESCRIPTOR::d; i++) {
166 force[i] += forceHelp[i] * _pMass / _conversionVelocity;
167// std::cout << "----->>>>> force " << forceHelp[i] << std::endl;
168 }
169}
CuboidGeometry< T, D > & getCuboidGeometry()
Read and write access to cuboid geometry.

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