Coupled EDEM-CFD Simulation Overview

EDEM integrates fluid drag forces and torques into the particle simulation on an individual particle level.

When EDEM performs a step of the simulation, the external forces act upon the particles in addition to any gravitational or collision forces. The stages of the EDEM simulation loop are shown below along with the point at which it interacts with the CFD solver. For completeness, components of the EDEM Application Programming Interface (API), such as the Particle Factory®, Contact Model, and Particle Body Forces, have also been shown at their interaction stages with the EDEM solver loop.

The following diagram represents the EDEM simulation cycle with CFD simulation included.


The CFD Coupling Simulation Sequence

The sequence of a coupled simulation is shown as follows, with the CFD Coupling Interface relaying information on CFD forces and particle data between the two solvers.

Once a coupling is successfully initialized between EDEM and the CFD solver, EDEM is ready to start simulating (Steps 1-3). Simulation in EDEM will commence when the CFD solver sends fluid forces to apply to the particles in the simulation (Steps 5, 7, 9). If this is the first step of a simulation, and there are no particles to apply forces to, then this can be omitted before starting the EDEM simulation-step.

The following diagram represents the coupled simulation sequence.

After EDEM completes the simulation-step, it is possible to retrieve the new or updated particle data from the simulation. This data is then returned to the CFD solver (Steps 6, 8, 10), in order to update the CFD solver’s variables and simulation. Any custom properties included in the simulation can be updated and retrieved following a similar sequence at the beginning and end of each EDEM simulation-step.

Retrieving Particle Data from EDEM

Particle data can be retrieved from EDEM using the getParticleData method. This method will return the data for all the particles currently in the simulation. The operation is usually performed at the end of the EDEM simulation step, after the position of the particles has been updated.

To retrieve the particle data, you must first allocate an array of CDiscreteElement equal to the size of the total number of particles in the simulation at the current Time Step.

You must delete their array of data when it is no longer required.

The particle data does not represent particles as mono or multi-spherical. Instead, their position is calculated at their centroid and volume is returned as a scalar value. More detailed information about particle shapes can be calculated from the particle sample points. An explanation of their operation can be found in Using Sample Points to Represent Particles.

Particle data in the array is organized in order of particle type. Particle type data is structured in order of particle index. However, particle indices may change between simulation time steps and therefore the index cannot be relied upon as a method for persistent particle tracking. Instead, persistent tracking can be accomplished through the unique integer identifier (ID) found in each particle data set, which persists throughout the entirety of the simulation. If you want to perform operations on all of the particles of one type, independently of the particle ID, then it is more efficient to do so by accessing the array of particle data by index.

For ID-dependent operations, the particle ID must be checked to ensure the correct particle is being manipulated. Particle IDs can be managed between simulation-steps through implementation of a map structure.

The following diagram represents the particle data array.from a simulation with three types (0, 1 and 2).

The data of each type is organized such that particle data is accessible using the index. In this case, particles of Type 0 occupy array indices 0 to (n-1), while Type 1 particles occupy the indices n to (n+m-1) and finally particles of Type 2 occupy indices (n+m) to (n+m+p-1). The number of particle types and particles belonging to each type can be queried at any time using the getNumParticleTypes and getNumParticles methods from the EDEM CFD Coupling Interface.

Using Sample Points to Represent Particles

The sampling point method is not used in the latest version of the EDEM-Fluent coupling, but the corresponding functions and code are still available should you wish to implement this method in your own code. The distribution of particle volumes is currently handled natively within Fluent.

The drag models used to calculate particle drag forces must also take into account the volume of particles found in each cell of the mesh. To achieve this, you may implement your own solution using custom properties or any other method. However, EDEM provides another easy to use representation of particle volume.

The representation of volume provided by the EDEM Coupling Interface is based on multiple sample points, generated using the Monte Carlo method. EDEM takes regular sample points within the bounding box of a particle and keeps the points that lie within the particles bounding surfaces.

The following diagram represents sample points within a particle.

Each point is checked to determine which CFD mesh cell it lies within. The solid volume fraction within a particular mesh cell is, therefore, the percentage of the number of sample points that lie within that mesh cell defined as:

where nc is the number of sample points contained within the mesh cell of particle p, N is the total number of sample points of the particle, and Vp is the volume of the particle.

Sample points are generated for each of the particle types defined in the simulation. Using the position, orientation and scaling of the individual particles, the precise co-ordinates for the points representing each particle can be calculated. Provided no additional particle types are later added to the simulation, sample points need only be collected once, at the start of a simulation. The method used to request sample points from EDEM is collectSamplePoints.

The sample points for a particle type are returned as an array of 3D values (C3dValue objects) of size n. You are responsible for allocating and deleting memory to store the sample points for the simulation.

Setting 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 the example for particle data.

Registering a New Custom Particle Property

You can create custom properties to store new variables that represent particle properties that EDEM does not support natively. Creation of new custom properties allows manipulation both with the CFD Coupling Interface and the custom EDEM API models. In order to register a custom property for use in a new EDEM deck, the following information is required:

  1. A string containing the name – This allows the custom property to be identified in the property manager within EDEM.
  2. The number of property elements – The number of ‘elements’ that make up a property for a particle. For example, a scalar property would have one property element and a 3D vector value would have three.
  3. Unit type – An integer identifying the unit type of the new property. (See the Appendix for a complete list of unit types).
  4. Initial value – The initial value used to initialize the custom property.
  5. The data type – This determines the variable data type used to store the data. Currently the only supported type is double and it is selected using the default value supplied (zero).

When a custom property has been registered, a unique integer custom property index will be returned. When using the get and set methods, this index may be used to identify the property throughout the simulation process. If the property has already been registered it will not be duplicated and the index of the existing property is returned.

Using Custom Particle Properties

Custom particle properties are stored in arrays that match the particle data array. During the simulation, there are two methods available for interaction with the custom properties, the getValueForProperty and the setValueForProperty methods. These methods can be used between simulation-steps to retrieve and update the custom properties. The specific custom properties are accessed using their unique property index. Following the same procedure as for getting particle data, you must allocate an array equal to the total number of particles in the simulation times the number of elements for the property before using getValueForProperty.

You must delete the allocated array when it is no longer required.

When custom property data is returned from EDEM, it is returned in an order that matches the particle data as described in the Retrieving Particle Data from EDEM section. It is important that the particle data and custom property data be retrieved after any new simulation-step and any updates are performed.

Custom properties with more than one element have the elements stored sequentially, in the same manner as the force and torque arrays. Therefore, a two element property for a single particle type simulation would be structured as follows.

The following diagram represents the particle data array for a custom property.

A value for a custom property is set by creating an array following the structure described. It is then possible to update the custom property values in EDEM using the setValueForCustomProp. You must then delete the array that they have created when the update is complete.

(c) 2023 Altair Engineering Inc. All Rights Reserved.

Intellectual Property Rights Notice | Technical Support