Saturday, June 14, 2014

Towards a multiphysics Energy2D

 Figure 1: Particle motions driven by convective flow.
Up to yesterday, our Energy2D software has been a program for simulating, mostly, fluid and heat flows. But there are also objects in the world that are not fluids. To simulate that part of the world, we have to incorporate some other physics. A simple addition is to couple particles with fluids. This technique is commonly known as discrete phase modeling in the CFD community. It is used to model things such as suspension particles in fluids.

 Figure 2: Heat traces of fireballs.
The latest version of Energy2D has a particle solver and a particle editor. Particles in Energy2D observe collision dynamics among themselves and interact with fluid and heat flows: particles can not only be moved by the fluid but also exert reaction force and transfer heat to the fluid. Figure 1 shows the motion of two types of particles driven by a convective flow. Depending on its density (relative to the fluid density), a particle may be buoyant enough to flow with the fluid or so heavy that it must sink to the bottom. This is shown in Figure 1: The black particles are the heavy ones and the white ones are the light ones; the convective force is not strong enough to move the black ones.

Particles can also transfer physical properties such as energy and momentum to the fluid while they are moving. Figure 2 shows the heat traces left by fireballs of different sizes.

 Figure 3: Thermophoresis (Soret's effect)
With this new capacity, we can simulate phenomena such as thermophoresis, in which the different particle types in a mixture respond to a temperature gradient differently and thereby can be separated by just heating them up.

If you are enticed enough to want to see these simulations at work, click the links below the figures.

These new features represent an overdue step towards making Energy2D a versatile multiphysics simulation system. For engineering simulations, multiphysics is essential as real-world problems are often complicated by more than one mechanisms, each driven by its own physics.

The particle dynamics shown here is very simple (just a weekend's work). In the long run, I expect that a generic contact dynamics engine such as that of Box2D will be implemented in Energy2D. Coupling the Eulerian and Lagrangian reference frames, this integration will make Energy2D more interesting and useful. That would be a critical step towards our goal for Energy2D to simulate as many energy-related natural phenomena as possible.