Schematics for the process of a bursting bubble: (a) A gas bubble in bulk. (b) The bubble approaches the free surface forming a liquid film (thickness $\delta$) between itself and the free surface. (c) A bubble cavity forms when the thin liquid film disappears.

## Some typical simulations

Comparision of the initial shape calculated using the Young-Laplace equations. Ofcourse, for this study, we only need: $\mathcal{B}o = 10^{-3}$. In the figure, $a$ is the capillary length, $a = \sqrt{\gamma/(\rho_lg)}$

Since we do not focus on the influence of $\mathcal{B}o$ number in the present study, I am not elaborating on it here. For all the simulations, I use the interfacial shape calculated for $\mathcal{B}o = 10^{-3}$. The resultant data file is available [here](https://raw.githubusercontent.com/VatsalSy/Bursting-Bubble-In-a-Viscoplastic-Medium/main/Bo0.0010.dat). **Note:** The curvature diverges at the cavity-free surface intersection. We fillet this corner to circumvent this singularity, introducing a rim with a finite curvature that connects the bubble to the free surface. We ensured that the curvature of the rim is high enough such that the subsequent dynamics are independent of its finite value. */ event init (t = 0) { if (!restore (file = dumpFile)){ char filename[60]; sprintf(filename,"Bo%5.4f.dat",Bond); FILE * fp = fopen(filename,"rb"); if (fp == NULL){ fprintf(ferr, "There is no file named %s\n", filename); return 1; } coord* InitialShape; InitialShape = input_xy(fp); fclose (fp); scalar d[]; distance (d, InitialShape); while (adapt_wavelet_limited ((scalar *){f, d}, (double[]){1e-8, 1e-8}, refRegion).nf); /** The distance function is defined at the center of each cell, we have to calculate the value of this function at each vertex. */ vertex scalar phi[]; foreach_vertex(){ phi[] = -(d[] + d[-1] + d[0,-1] + d[-1,-1])/4.; } /** We can now initialize the volume fraction of the domain. */ fractions (phi, f); } } /** ## Adaptive Mesh Refinement */ event adapt(i++){ /** We adapt based on curvature, $\kappa$ and vorticity $\omega$. Adaptation based on $\kappa$ ensures a constant grid resolution across the interface. See [this](http://basilisk.fr/sandbox/Antoonvh/rc.c) for further reading. We also adapt based on vorticity in the liquid domain. I have noticed that this refinement helps resolve the fake-yield surface accurately (see the black regions in the videos below). */ scalar KAPPA[], omega[]; curvature(f, KAPPA); vorticity (u, omega); foreach(){ omega[] *= f[]; } boundary ((scalar *){KAPPA, omega}); adapt_wavelet_limited ((scalar *){f, u.x, u.y, KAPPA, omega}, (double[]){fErr, VelErr, VelErr, KErr, OmegaErr}, refRegion); /** ## Alternatively At higher $\mathcal{O}h$ and $\mathcal{J}$ numbers, vorticities in the liquid cease to be interesting. In that case, one might want to adapt based on the norm of deformation tensor, $\mathbf{\mathcal{D}}$. I already calculate $\|\mathbf{\mathcal{D}}\|$ in [two-phaseAxiVP.h](two-phaseAxiVP.h). **Note:** $\mathbf{\mathcal{D}}$ based refinement is way more expensive than $\omega$ based refinement. */ // adapt_wavelet_limited ((scalar *){f, u.x, u.y, KAPPA, D2}, // (double[]){fErr, VelErr, VelErr, KErr, 1e-3}, // refRegion); } /** ## Dumping snapshots */ event writingFiles (t = 0; t += tsnap; t <= tmax) { dump (file = dumpFile); sprintf (nameOut, "intermediate/snapshot-%5.4f", t); dump(file=nameOut); } /** ## Ending Simulation */ event end (t = end) { fprintf(ferr, "Done: Level %d, Oh %2.1e, Tauy %4.3f, Bo %4.3f\n", MAXlevel, Oh, tauy, Bond); } /** ## Log writing */ event logWriting (i+=100) { double ke = 0.; foreach (reduction(+:ke)){ ke += (2*pi*y)*(0.5*(f[])*(sq(u.x[]) + sq(u.y[])))*sq(Delta); } static FILE * fp; if (i == 0) { fprintf (ferr, "i dt t ke\n"); fp = fopen ("log", "w"); fprintf (fp, "i dt t ke\n"); fprintf (fp, "%d %g %g %g\n", i, dt, t, ke); fclose(fp); } else { fp = fopen ("log", "a"); fprintf (fp, "%d %g %g %g\n", i, dt, t, ke); fclose(fp); } fprintf (ferr, "%d %g %g %g\n", i, dt, t, ke); if (ke > 1e3 || ke < 1e-6){ if (i > 1e2){ return 1; } } } /** ## Running the code ~~~bash #!/bin/bash qcc -fopenmp -Wall -O2 burstingBubble.c -o burstingBubble -lm export OMP_NUM_THREADS=8 ./burstingBubble 10 0.25 1e-3 1e-2 5.0 ~~~ # Output and Results The post-processing codes and simulation data are available at: [PostProcess](https://github.com/VatsalSy/Bursting-Bubble-In-a-Viscoplastic-Medium/tree/main/PostProcess) */