Code to simulation the impact of a droplet onto a deep pool of another immiscible fluid using the Basilisk flow solver.
-Uses a standard installation of Basilisk with the extra visualisation packages required to produce video outputs.
-The three-phase method of Chizari is included here to allow independent variation of the droplet, pool and surrounding air fluids including interfacial tensions.
-gfsview can also be installed in order to view the outputed simulation slices.
Currently the code is setup to simulate the impact of a Fluorinert FC-770 droplet onto a pool of variable properties defined by the user surrounded by air at standard conditions. The droplet properties (density and viscosity) can be changed by editing the values on lines 71 and 72 of the main file. (The air properties could also be changed by editing lines 67 and 68, for example to represent a change in air pressure).
// Fixed FC-770 Droplet Properties, would need to change if using a different droplet
#define REAL_DROP_DENSITY 1793 // Real Droplet Density in kg/m^3 (fixed)
#define REAL_DROP_VISCOSITY 1.4e-3 // Real Droplet Dynamic Viscosity in Pa.s (fixed)
The rest of the simulations parameters are provided as inputs to the main function when the code is instantiated. These are (and have to be in this order
- Reynolds number of the impacting droplet based on the droplet diameter. Defined as
$\textrm{Re} = \rho_dDV_0/\mu_d$ . - Weber number of the impacting droplet based on the droplet diameter. Defined as
$\textrm{We} = \rho_dDV_0^2/\sigma_{da}$ . - Froude number of the impacting droplet based on the droplet diameter. Defined as
$\textrm{Fr} = V_0/\sqrt{gD}$ . - The real pool density in
$\textrm{kgm}^{-3}$ (i.e. for water this would be 1000). - The real pool kinematic viscosity in
$\textrm{cSt}$ (centistokes) as this is usually how silicone oils (used in the work here) are described. The conversion to dynamic viscosity to find the viscosity ratio to the droplet is calculated automatically. - The surface tension coefficient between the droplet and the air in
$\textrm{mNm}$ (i.e for water this would be 72). - The surface tension coefficient between the pool and the air in
$\textrm{mNm}$ . - The interfacial tension coefficient between the droplet and the pool in in
$\textrm{mNm}$ . - The maximum resolution level of the simulations (i.e. the maximum resolution corresponds to
$2^{\textrm{MAXLEVEL}}$ grid points per domain size).
If running on multiple cores the number of cores needs to first be defined by
export OMP_NUM_THREADS=6
Then the code needs to be compiled (including links to the graphical libraries if output videos are desired
qcc -O2 -w -fopenmp 3phasedroponpoolexample.c -o 3phasedroponpoolexample -L$BASILISK/gl -lglutils -lfb_glx -lGLU -lGLEW -lGL -lX11 -lm
and then instantiated with the parameters defined above
./3phasedroponpoolexample Re We Fr Real_Pool_Density Real_Pool_Viscosity Real_Drop_Air_ST Real_Pool_Air_ST Real_Drop_Pool_ST MaxLevel
for example
./3phasedroponpoolexample 6660 2020 25.9 934 100 14 20 5 10
An example shell script which automates this process is included.
Upon execution the code automatically creates a folder to save the result into numed according to the simulation parameters. This can be changed by editing lines 184-197 of the main code.
The outputs produced are
-A log file detailing the parameters of the simulation.
-A log file detailing the maxima of the pressure and viscous stress in both the pool and droplet over time.
-A log file detailing various energies (viscous dissipation, kinetic, gravitational potential and surface) in all three phases with time.
-A video showing the individual phases and resolution level.
-A log file detailing various performance related statistics about the simulation (grid points, run time, etc.).
-Gfsview snapshots of the simulation over time.
-Interfaces of each of the three phases over time.