Continuous Particle Size (CPS) and Adaptive Refinement

June 24, 2022
Siddharth Marathe and Andreas Henne

With our recent release of PreonLab 5.2, which was a very special release for us, we introduced our new feature – Continuous Particle Size (CPS), where particles can have any size in a user defined range.
In this article, we shall take a look at the development of adaptive refinement and coarsening in PreonLab and the benefits of CPS along with the challenges and limitations that go with it.

Share:

Need for adaptive refinement

In order to get accurate simulation results with particle-based solvers, the required particle size needs to be selected correctly. This is mostly determined based on the geometry of the regions of interest and the scale of the phenomena which need to be captured by the simulation. Depending on the scope of the simulation and the fluid volume involved, this can lead to a very large number of fluid particles while using a uniform resolution resulting in very high simulation times and computational effort. 

We can observe in figure 1, which depicts a still frame from a water-wading simulation using uniform resolution, that since the particles around the car geometry need a high resolution, the particles away from the car geometry also have a small particle size.
Figure 1: Water-Wading Simulation using uniform resolution.
While particle-based CFD simulations offer many advantages over mesh-based simulations, it was observed that mesh-based simulations made it possible to reduce computational effort by employing adaptive meshing. This is done by using fine cells only where required and using coarse cells away from the regions of interest.
In order to add these benefits to particle-based simulations and further increase their efficiency, a lot of research effort has been made by the Smoothed Particle Hydrodynamics community in recent years towards applying a non-uniform resolution to particle-based solvers.

What are the challenges?

At the core of the challenges for non-uniform resolution SPH, also referred to as adaptive refinement, is the splitting and merging of particles. The splitting step is required for refinement and the merging step for coarsening of particles. While the splitting of particles can be trivial, the coarsening step is challenging.
For example, in 3D Simulations with two fixed particle sizes, one large particle needs to be split up into eight finer particles with 1/8th of the mass of the initial particle. For the coarsening step, eight fine particles need to be in close vicinity to each other to merge into one larger particle with eight times the mass of one fine particle. This is also depicted in figure 2.
Figure 2: Graphic representation of the refinement and coarsening steps required for non-uniform resolution 3D SPH with two fixed particle sizes.

Furthermore, during this step, the finer particles need to have similar velocities compared to each other, in order to conserve momentum upon merging. If these conditions cannot be satisfied, the particles cannot be merged, and we are left with the issue of left-over particles in the simulation.

Apart from this, the splitting and merging of particles introduces sampling and density noise, since the distribution of particles changes. This is one of the biggest challenges for particle-based approaches and needs to be addressed and rectified. This is touched upon in more detail in the article: Adaptive Particle-based Simulation in PreonLab.

Development of Non-Uniform Resolution SPH with PreonLab

The latest PreonLab 5.2 release saw the introduction of a game-changing new feature in the context of adaptive refinement for particle-based CFD applications – Continuous Particle Size or CPS. As is the case with most great achievements, this was the result of constant efforts and steady progress over the past few years. Let us have a quick look at the various stages of this journey:

The ability to have adaptive refinement was first introduced to PreonLab users with PreonLab 4.x, where two levels for particle size were introduced. Along with letting the particles in the regions of interest be as fine as required, the simulation for the rest of the bulk fluid volume could be performed with coarser particles. By doubling the size of the finer particles during coarsening, it was possible to reduce the number of particles in the simulation by up to eight times. Refinement was not carried out only within the region of interest, but rather a buffer zone was needed around it for the splitting and merging of particles.

With PreonLab 5.0, it became possible to include 3 levels of refinement within a simulation. This means that three distinct particle sizes could be defined within a single simulation setup. This can be visualized in figure 3 for the water-wading simulation setup. All particles in the region of interest i.e., close to the car geometry, have a particle size of 5 mm, while the particles away from the region of interest become coarser using three levels of refinement. The middle refinement level between the fine and coarse refinements offered some significant benefits. Most importantly, it allowed for an increase in the size ratio between the coarsest and finest particles, thereby reducing the number of particles in the simulation further, by up to sixty-four times. The resulting speed-up is discussed in the article: Getting the Same Result 12x Faster.

Figure 3: Water-Wading Simulation using non-uniform resolution.
PreonLab 5.1 introduced proximity refinement, which automatically refines particles based on their closeness to geometries for every simulation step in the simulation scene. This made for a leaner workflow, since defining refinement regions for complex geometries became more feasible.
With PreonLab 5.2 and Continuous Particle Size, particles can now have any size in a user defined range. This can also be visualized very well using the Dip-and-Drag Coating Simulation example displayed in figure 4.
Figure 4: Dip-and-Drag Coating Simulation – Varying particle sizes with CPS in PreonLab 5.2.
The coarsest (red) particles have a particle size of 40 mm, while the finest (blue) particles have a particle size of 2.5 mm. Besides these two particle sizes, particles of several other sizes can be observed, such as yellow particles having a particle size of about 31 mm, the green particles having a particle size of about 21.25 mm and the light blue particles with a particle size of about 10 mm.
All these particles are handled by one solver and the post-processing and rendering tools work seamlessly with this feature as well.

What is the benefit?

The new CPS feature means that PreonLab users are no longer limited to just 3 levels of refinement and that the possible ratio between the coarsest and finest particles can be pushed to the limit. Apart from that, the problem of left-over particles, caused when finer particles cannot be merged into a particle from one higher level while using a level approach for refinement, can be solved. The fine particles can instead be absorbed by any other particle in its vicinity completely.
This reduces the number of particles in the simulation drastically and speeds up the simulation time tremendously. It also opens the door to simulate many new challenging scenarios such as our recent Success Story with Gelsenwasser, where a whole plant could be considered within one simulation with the help of a large size ratio with CPS, which would not be feasible with a uniform resolution.
This is depicted in the following video:

Please agree to the transfer of data to third parties as set out in our privacy policy.

In the video, the dark green particles are the coarse particles (32 mm) and the light green particles in the small channels are the fine particles with a high resolution (2 mm). The large size ratio makes simulating the flow through the larger channels as well as the smallest channels efficient.

The benefits of CPS are not only limited to complex flows and geometries, but are also applicable for Thermodynamic applications.
In many cases, strong heat gradients require the solver particle size to be very fine. In such cases, the ability of CPS to aggressively coarsen the particles away from the region of interest proves to be vital towards keeping the computational effort under control.

What are the limitations?

Currently the maximum recommended size ratio between the coarsest and finest particles is 24. This means that for 3D simulations, the coarsest particle can have a diameter which is 16 times larger than the diameter of the fine particles. With this, the number of particles in the simulation can already be reduced by up to 4096 times. However, it is even possible in certain cases to push this ratio to 25. As a result, we would save around 32,000 times the number of particles.
All of this implies that simulations which previously required weeks to run, can now be performed in a matter of days and simulations which previously required several days can be performed within a few hours – a game-changer indeed!

Note: Currently, CPS is not compatible with the snow solver in PreonLab.
RELATED ARTICLES

LEARN MORE ABOUT PreonLab Updates

How to get started with
Preonlab CFD software?
Get in Touch