In this tutorial, the homogeneous and inhomogeneous regimes of a free cooling granular system (2D) are simulated [1]. This model is common in the study of the kinetic theory of granular gases [2-3]. For a 3D version of this code, see Free cooling granular system (3D).
Description:
Granular gasses are particulate systems in which the mean free path of the particles is greater than the typical particle size. Free cooling is the study of how a granular gas behaves when no external forces are applied. Such a free cooling model is characterized by a decay in kinetic energy. This decay of kinetic energy is due to effects such as dissipation during particle collisions, the formation of clusters, anomalous diffusion and characteristic shock waves, to name but a few [3].
Here, a short paraview animation of the free cooling demo is shown.
Simulation set up:
To simulate the free cooling of a granular gas in 2D, particles are inserted into a square box, with periodic boundary conditions in both dimensions. First, a well-defined initial state with random particle positions and velocities is prepared in the following way:
The particles first sit on a regular lattice and get a random velocity with a total momentum of zero.
Then the simulation is started without dissipation and runs for a reasonable number of collisions per particle so that the system becomes homogeneous, "and the velocity distribution approaches
a Maxwellian."
The above state is then used as the initial configuration for the dissipative regimes.
This adds on the hierarchical grid code for 2D problems.
Definition: Mercury2D.h:36
Data members of the class:\n
The FreeCoolingDemo class has, but is not limited to, two (public) data members, namely a pointer to the species and number of particles
The key components of the class are explained in-turn, in the following:
Step 1: Define Walls/Periodic Boundaries
For experimental purposes, particles can be contained by a two dimensional box made up of four infinite walls. If this is required, then see the Free cooling granular system (2D) in walls. Otherwise, the simulation volume is replaced by periodic boundaries.
Step 2: Create Particles
Next, the particle species is defined. The particles in this problem use the linear visco-elastic (normal) contact model (LinearViscoelasticSpecies). The dissipation and stiffness defining the contact model can be set in different ways. In this example these contact model parameters are defined.
The particle properties are set subsequently. The particleHandler is cleared just to be sure it is empty, then the particle to be copied into the container is created and the set species is assigned to it.
A spherical particle is the most simple particle used in MercuryDPM.
Definition: SphericalParticle.h:37
Step 3: Place Particles
After specifying the particle properties, the container is filled with copies of the particle. In this example, particles are placed in a lattice grid pattern, on evenly spaced positions.
Step 4: Centre of mass velocity
Next, the center of mass velocity is subtracted to ensure a reduced random velocity. This results into a center of mass velocity nearly equal to zero.
Actions After TimeStep:
The actionsAfterTimeStep() method specifies all actions that need to be performed in between time steps, i.e. Since, the simulation started with zero dissipation, after a reasonable number of collisions per particle, the system will be homogeneous, and the actionsAfterTimeStep() is used to set the initial configuration for the "next" dissipative regime.
void actionsAfterTimeStep() override{
// Time to switch on dissipation
if (getTime() > 4e5*getTimeStep())
{
FC2D_Species->setDissipation(0.25);
}
}
Main Function
In the main program, the FreeCoolingDemo object is created, after which some of its basic properties are set: like, the number of particles, box dimensions, time step and saving parameters. Lastly, the problem is actually solved by calling its solve() method.