All Functions with Hard-coded Discretizations

Heat and Mass Transfer Equations

  • solve_T
    • Using 2nd order central differences, with linear extrapolation for ghost fluid cells across the level set interface.
    • Manually constructs sparse matrix, then solves it.
    • Uses a 2nd-order discretization with linear extrapolation as defined in (Gibou and Fedkiw, 2005), section 2
    • All the possible stencils for this discretization were generated in a Jupyter notebook, visible in this code's GitHub repo at /docs/gfm_extrap.ipynb. If links don't break, that can be viewed online here.
  • solve_p
    • Since the mass conductivity in the equation for $p$ may itself depend on $p$, this function guesses values of $b$, solves for $p$, then iterates a few more times.
  • solve_p_given_b
    • This does the actual linear solve for solve_p. Like solve_T, it uses a 2nd-order discretization as in (Gibou and Fedkiw, 2005), section 2. This becomes slightly more complicated though because the mass conductivity $b$ is not spatially constant.
    • All the possible stencils for this discretization were generated in a Jupyter notebook, visible in this code's GitHub repo at /docs/gfm_extrap_vark.ipynb. If links don't break, that can be viewed online here.

Velocity Calculations

  • compute_frontvel_heat
    • Computes heat flux on Stefan interface
    • Uses 2nd-order finite difference with quadratic ghost cell extrapolation across Stefan interface to compute heat flux
    • Adapted from techniques explained in (Gibou and Fedkiw, 2005)
    • Generates a velocity field for level set advection, defined only on dry-layer side of interface; follow with extrap_v_fastmarch to extrapolate throughout domain
  • compute_frontvel_mass
    • Computes heat flux on Stefan interface
    • Uses 2nd-order finite difference with quadratic ghost cell extrapolation across Stefan interface to compute heat flux
    • Adapted from techniques explained in (Gibou and Fedkiw, 2005)
    • Generates a velocity field for level set advection, defined only on dry-layer side of interface; follow with extrap_v_fastmarch to extrapolate throughout domain
  • compute_frontvel_fixedspeed
    • Used for generating arbitrary velocity fields–meant only for debugging
    • Intended for use with velocity extrapolation; not currently implemented anywhere.
    • 1st order finite difference from interface cell into dried domain

Velocity Extrapolation

  • extrap_v_fastmarch!
    • Uses 2nd-order upwind differences (towards the interface) in a fast-marching technique (which makes a single pass over all grid cells in sorted order) to extrapolate velocity away from the interface.
    • Follows (Sethian, 1999), section 5.1

Reinitialization

WENO Derivatives