Calculating acceleration for particles

particlesInCone example uses gravity acceleration to calculate particle-to-particle interaction.

[code=“cpp”]
particle->set_a (particle->get_a() + (gravity+force) * particle->get_invRho() );


As I can understand I can obtain current particle velocity in lattice units by multiplying its velocity in physical units by coefficient vLat / vPhys, e.g.:
[code="cpp"]
u *= vLat / vPhys;

where vLat is desirable velocity in lattice units (Palabos’ examples use 0.01…0.02),
vPhys is corresponding velocity in physical units.

And here’s question No 1:
What coefficient should I use to get particle acceleration in lattice units to use with set_a function?

[code=“cpp”]
Array<double, 3> gravity(0, 0, -9.8); //gravity in physical units
gravity *= coeff; //???
particle->set_a (gravity);



Question No 2:
Is it possible to use particles with different masses?

Is it possible to use more than one particle injection areas? I’ve managed to create several particle absorption areas but when I try to create second particle injection area an exception occurs.
Can anyone tell me how to create several injection zones which inject particle with different masses?

Hi MrKat,

Yes, it is possible to define more than one particle injection areas. The way I did it (I’m not sure if it the best way) is to define one “MultiParticleField3D” for each injection area.
Then, you have to call the “integrateProcessingFunctional” and “executeInternalProcessors” for each of your particle fields, as well as to define a particle template for each particle field.

Concerning you two first questions :

  1. If you define the gravity with physical units, then you just have to non-dimensionalize it in lattice units in this way:
    gravity_LB = gravity * (pow(dt,2.0)/dx);
  2. Yes it is possible, again by defining different “MultiParticleField3D”.

Hope it helps,
Best,

Mat

Mat_fr
Domo arigato!