OpenLB 1.8.1
Loading...
Searching...
No Matches
olb::particles::apply_external_acceleration_single_cuboid< T, PARTICLETYPE > Struct Template Reference

Apply external acceleration (e.g. for apply gravity) More...

#include <particleTasks.h>

+ Collaboration diagram for olb::particles::apply_external_acceleration_single_cuboid< T, PARTICLETYPE >:

Static Public Member Functions

static auto execute (ParticleSystem< T, PARTICLETYPE > &ParticleSystem, Particle< T, PARTICLETYPE > &particle, Vector< T, PARTICLETYPE::d > externalAcceleration, T timeStepSize, int globiC=0)
 

Static Public Attributes

static constexpr bool latticeCoupling = false
 
static constexpr bool particleLoop = true
 

Detailed Description

template<typename T, typename PARTICLETYPE>
struct olb::particles::apply_external_acceleration_single_cuboid< T, PARTICLETYPE >

Apply external acceleration (e.g. for apply gravity)

Definition at line 65 of file particleTasks.h.

Member Function Documentation

◆ execute()

template<typename T , typename PARTICLETYPE >
static auto olb::particles::apply_external_acceleration_single_cuboid< T, PARTICLETYPE >::execute ( ParticleSystem< T, PARTICLETYPE > & ParticleSystem,
Particle< T, PARTICLETYPE > & particle,
Vector< T, PARTICLETYPE::d > externalAcceleration,
T timeStepSize,
int globiC = 0 )
inlinestatic

Definition at line 66 of file particleTasks.h.

71 {
72 using namespace descriptors;
73 //Apply acceleration
74 Vector<T,PARTICLETYPE::d> force = access::getForce(particle);
75 const T mass = access::getMass(particle);
76 force += externalAcceleration * mass;
77 particle.template setField<FORCING,FORCE>( force );
78 }
Vector< T, PARTICLETYPE::d > getForce(Particle< T, PARTICLETYPE > particle)
T getMass(Particle< T, PARTICLETYPE > particle, T shapeFactor=T{1})

References olb::particles::access::getForce(), and olb::particles::access::getMass().

+ Here is the call graph for this function:

Member Data Documentation

◆ latticeCoupling

template<typename T , typename PARTICLETYPE >
bool olb::particles::apply_external_acceleration_single_cuboid< T, PARTICLETYPE >::latticeCoupling = false
staticconstexpr

Definition at line 79 of file particleTasks.h.

◆ particleLoop

template<typename T , typename PARTICLETYPE >
bool olb::particles::apply_external_acceleration_single_cuboid< T, PARTICLETYPE >::particleLoop = true
staticconstexpr

Definition at line 80 of file particleTasks.h.


The documentation for this struct was generated from the following file: