Set External Force and Torque on Particles

Particles can have external forces and torques calculated by the external CFD solver applied to them before EDEM executes a simulation-step. This is achieved using the setForceAndTorque method provided by the interface class, IEDEMCoupling.

Separate arrays exist for both force and torque. The arrays are both created as serialized 3D vectors that match the order of the particle data. Because of this, it is important that up-to-date particle data is obtained and any force or torque is applied to the particles during one simulation-step, before EDEM is allowed to simulate again.

The following diagram represents the particle data array for force or torque.


For a particle type 0 of a multi-particle type simulation, the array for either force or torque should be constructed in the manner shown above. The index for the force applied to particle n starts at position(3n) and finishes at position (3n+2) of the array. Therefore, the correct index for the force applied to particle 0 starts at 0 and finishes at 2. Additional particle types in the simulation are ordered after the first particle type, in the same manner as in the example for particle data.