Skip to content

Reply To: How to set the degrees of freedom of the particle in HLBM

OpenLB – Open Source Lattice Boltzmann Code Forums on OpenLB General Topics How to set the degrees of freedom of the particle in HLBM Reply To: How to set the degrees of freedom of the particle in HLBM

#6477
Nicolas
Participant

Dear Evan,

please always refer to the version of OpenLB you are using, as there are major changes especially in the particle framework.

Assuming, you are using the current one (v 1.5) though, you can do the following with respect to the implementation in settlingCube3D:

The particle motions is taken care of by the

VerletParticleDynamics<T,PARTICLETYPE>

(located in dynamics/particleDynamicsBase.h). This Dynamics-Class is applied to every particle in the example file. Inside, the

velocityVerletIntegration<T,PARTICLETYPE>

(located in functions/particleMotionFunctions.h) is called, which is responsible for modelling Newton’s motion in all cartesion directions.

In order to restrict this calculation to e.g. the z-axis only, just limit the respective position update here to e.g the third vector component (here associated with the z-direction).

You can then incorporate those changes into a new Dynamics Object (similar to the VerletParticleDynamics) and apply this one to your particles in the example file instead.

Best,
Nicolas