
To learn how the convective terms are constructed, see AMReX-Hydro

# Time Step – MOL

In the predictor

• Define $$U^{MAC,n}$$, the face-centered (staggered) MAC velocity which is used for advection, using $$U^n$$

• Define an approximation to the new-time state, $$(\rho U)^{\ast}$$ by setting

$\begin{split}(\rho U)^{\ast} &= (\rho U)^n - \Delta t \left( \nabla \cdot (\rho U^{MAC} U) + \nabla {p}^{n-1/2} \right) \\ &+ \Delta t \left( \nabla \cdot \tau^n + \sum_p \beta_p (V_p - {U}^{\ast}) + \rho g \right)\end{split}$
• Project $$U^{\ast}$$ by solving

$\nabla \cdot \frac{1}{\rho} \nabla \phi = \nabla \cdot \left( \frac{1}{\Delta t} U^{\ast}+ \frac{1}{\rho} \nabla {p}^{n-1/2} \right)$

then defining

$U^{\ast \ast} = U^{\ast} - \frac{\Delta t}{\rho} \nabla \phi$

and

${p}^{n+1/2, \ast} = \phi$

In the corrector

• Define $$U^{MAC,\ast \ast}$$ at the “new” time using $$U^{\ast \ast}$$

• Define a new approximation to the new-time state, $$(\rho U)^{\ast \ast \ast}$$ by setting

$\begin{split}(\rho U)^{\ast \ast \ast} &= (\rho U)^n - \frac{\Delta t}{2} \left( \nabla \cdot (\rho U^{MAC} U)^n + \nabla \cdot (\rho U^{MAC} U)^{\ast \ast}\right) + \\ &+ \frac{\Delta t}{2} \left( \nabla \cdot \tau^n + \nabla \cdot \tau^{\ast \ast \ast} \right) + \Delta t \left( - \nabla {p}^{n+1/2,\ast} + \sum_p \beta_p (V_p - {U}^{\ast \ast \ast}) + \rho g \right)\end{split}$
• Project $$U^{\ast \ast \ast}$$ by solving

$\nabla \cdot \frac{1}{\rho} \nabla \phi = \nabla \cdot \left( \frac{1}{\Delta t} U^{\ast \ast \ast} + \frac{1}{\rho} \nabla {p}^{n+1/2,\ast} \right)$

then defining

$U^{n+1} = U^{\ast \ast \ast} - \frac{\Delta t}{\rho} \nabla \phi$

and

${p}^{n+1/2} = \phi$

# Time Step – Godunov

When we use the time-centered Godunov advection, we no longer need the predictor and corrector steps.

• Define the time-centered face-centered (staggered) MAC velocity which is used for advection: $$U^{MAC,n+1/2}$$

• Define the new-time density, $$\rho^{n+1} = \rho^n - \Delta t (\rho^{n+1/2,pred} U^{MAC,n+1/2})$$ by setting

• Define an approximation to the new-time state, $$(\rho U)^{\ast}$$ by setting

$\begin{split}(\rho^{n+1} U^{\ast}) &= (\rho^n U^n) - \Delta t \nabla \cdot (\rho U^{MAC} U) + \Delta t \nabla {p}^{n-1/2} \\ &+ \frac{\Delta t}{2} (\nabla \cdot \tau^n + \nabla \cdot \tau^\ast) + \Delta t \rho g\end{split}$

(for implicit diffusion, which is the current default)

• Project $$U^{\ast}$$ by solving

$\nabla \cdot \frac{1}{\rho} \nabla \phi = \nabla \cdot \left( \frac{1}{\Delta t} U^{\ast}+ \frac{1}{\rho} \nabla {p}^{n-1/2} \right)$

then defining

$U^{n+1} = U^{\ast} - \frac{\Delta t}{\rho} \nabla \phi$

and

${p}^{n+1/2} = \phi$

The algorithm is further described in the following paper (and references therein):

# Time Step – BDS

When we use the Bell-Dawson-Shubin (BDS) algorithm, we advance the solution in time using a three step procedure described below. In the notation, $$s$$ is a scalar field of the form $$s=s(x,y,z,t)$$ and $${\bf u}=(u,v,w)$$ represents a known velocity field. $$s^n_{ijk}$$ represents the average value of $$s$$ over the cell with index $$(ijk)$$ at time $$t^n$$. At each face the normal velocity (e.g., $$u_{i+1/2,j,k}$$) is assumed constant over the time step.

• Step 1: Construct a limited piecewise trilinear (bilinear in 2D) representation of the solution in each grid cell of the form,

$\begin{split}\begin{eqnarray} s_{ijk}(x,y,z) &=& s_{ijk} + s_{x,ijk}\cdot(x-x_i) + s_{y,ijk}\cdot(y-y_j) + s_{z,ijk}\cdot(z-z_k) \nonumber \\ && + s_{xy,ijk}\cdot(x-x_i)(y-y_j) + s_{xz,ijk}\cdot(x-x_i)(z-z_k) \nonumber \\ && + s_{yz,ijk}\cdot(y-y_j)(z-z_k) + s_{xyz,ijk}\cdot(x-x_i)(y-y_j)(z-z_k). \end{eqnarray}\end{split}$
• Step 2: Construct edge states $$s_{i+1/2,j,k}$$, etc. by integrating limited piecewise trilinear (bilinear in 2D) profiles over the space-time region determined by the characteristic domain of dependence on the face.

• Step 3: Advance the solution in time using the conservative update equation,

$\begin{split}\begin{eqnarray} s_{ijk}^{n+1} = s_{ijk}^n && - \frac{\dt}{\Delta x}(u_{i+\half,j,k}s_{i+\half,j,k} - u_{i-\half,j,k}s_{i-\half,j,k}) \nonumber \\ && - \frac{\dt}{\Delta y}(v_{i,j+\half,k}s_{i,j+\half,k} - v_{i,j-\half,k}s_{i,j-\half,k}) \nonumber \\ && - \frac{\dt}{\Delta z}(w_{i,j,k+\half}s_{i,j,k+\half} - w_{i,j,k-\half}s_{i,j,k-\half}). \end{eqnarray}\end{split}$

Addition details are located in the BDS section of the AMReX-Hydro docs and in the following paper: