sandbox/ggennari/phase_change/test_cases/constant_2D.c

    2D bubble with constant mass transfer rate

    We model a 2D dissolving bubble with constant mass transfer rate. A similar test can be found in Section 4.2 of Gennari et al.,2022.

    The analytical solution for the radius reads: \displaystyle R(t) = R(0) + \frac{\dot{m}}{\rho_d}

    This is the 2D version of the axisymmetric problem constant_axi.c.

    #define F_ERR 1e-10
    #define MASS_TRANSFER_RATE (-1e-3)
    
    #include "grid/quadtree.h"
    #define PHASE_CHANGE 1
    #include "../navier-stokes/centered.h"
    #include "../two-phase.h"
    #include "tension.h"
    #include "../diffusion.h"
    #include "../phase_change_pure_species.h"
    #include "../../adapt_wavelet_leave_interface.h"
    
    
    #define RHOR 1000.
    #define MUR 100.
    
    #define WIDTH 10
    #define TEND 1.
    
    int LEVEL = 9;

    We add the transport of a soluble tracer. But this is not relevant in this case, since the mass transfer rate is fixed.

    scalar a_c[];
    scalar * species = {a_c};
    scalar m_a[];
    scalar * m_list = {m_a};
    
    int main()
    {
      size (WIDTH);
      origin (-L0/2., -L0/2.);
      init_grid (64);
    
      rho1 = 1.;
      rho2 = rho1/RHOR;
      mu1 = 1.;
      mu2 = mu1/MUR;
    
      f.tracers = species;
      f.sigma = 1.;
      
      a_c.inverse = false;
      a_c.mol_mass = 1./RHOR; //molar mass
      a_c.diff = false; //we turn off diffusion of the tracer
      
      tt = 0.;
    
      TOLERANCE = 1e-4;
      DT = 1e-3;
      run();
    }

    We need outflow boundary conditions to let the liquid enter the domain as the bubble dissolves.

    //Bcs
    u.n[left] = neumann(0.);
    p[left] = dirichlet(0.);
    pf[left] = dirichlet(0.);
    
    u.n[right] = neumann(0.);
    p[right] = dirichlet(0.);
    pf[right] = dirichlet(0.);
    
    u.n[bottom] = neumann(0.);
    p[bottom] = dirichlet(0.);
    pf[bottom] = dirichlet(0.);
    
    u.n[top] = neumann(0.);
    p[top] = dirichlet(0.);
    pf[top] = dirichlet(0.);
    
    event init (t = 0) {
      refine (sq(x) + sq(y) < sq(4) && level < LEVEL);
      fraction (f, sq(x) + sq(y) - sq(1.));
    }

    We log the volume of the bubble

    event log_simulation (i++) {
      double vol = 0.;
      foreach(reduction(+:vol))
        vol += (1. - f[])*dv();
    
      fprintf (stderr, "%g %g\n", t, vol);
      fflush (stderr);
    }
    
    event adapt (i++)
    {
      double uemax = 1e-2;
      adapt_wavelet_leave_interface ({u.x,u.y}, {f}, (double[]){uemax,uemax,1e-3}, LEVEL, 5, 1);
    }
    
    event stop_simulation (t = TEND) {
      return 1;
    }

    References

    [gennari2022]

    Gabriele Gennari, Richard Jefferson-Loveday, and Stephen J. Pickering. A phase-change model for diffusion-driven mass transfer problems in incompressible two-phase flows. Chemical Engineering Science, 259:117791, 2022. [ DOI | http ]