This paper was converted on www.awesomepapers.org from LaTeX by an anonymous user.
Want to know more? Visit the Converter page.

MAESTRO: An Adaptive Low Mach Number Hydrodynamics Algorithm for Stellar Flows

A. Nonaka11affiliation: Center for Computational Science and Engineering, Lawrence Berkeley National Laboratory, Berkeley, CA 94720 , A. S. Almgren11affiliation: Center for Computational Science and Engineering, Lawrence Berkeley National Laboratory, Berkeley, CA 94720 , J. B. Bell11affiliation: Center for Computational Science and Engineering, Lawrence Berkeley National Laboratory, Berkeley, CA 94720 , M. J. Lijewski11affiliation: Center for Computational Science and Engineering, Lawrence Berkeley National Laboratory, Berkeley, CA 94720 , C. M. Malone22affiliation: Dept. of Physics & Astronomy, Stony Brook University, Stony Brook, NY 11794-3800 , M. Zingale22affiliation: Dept. of Physics & Astronomy, Stony Brook University, Stony Brook, NY 11794-3800
Abstract

Many astrophysical phenomena are highly subsonic, requiring specialized numerical methods suitable for long-time integration. In a series of earlier papers we described the development of MAESTRO, a low Mach number stellar hydrodynamics code that can be used to simulate long-time, low-speed flows that would be prohibitively expensive to model using traditional compressible codes. MAESTRO is based on an equation set derived using low Mach number asymptotics; this equation set does not explicitly track acoustic waves and thus allows a significant increase in the time step. MAESTRO is suitable for two- and three-dimensional local atmospheric flows as well as three-dimensional full-star flows. Here, we continue the development of MAESTRO by incorporating adaptive mesh refinement (AMR). The primary difference between MAESTRO and other structured grid AMR approaches for incompressible and low Mach number flows is the presence of the time-dependent base state, whose evolution is coupled to the evolution of the full solution. We also describe how to incorporate the expansion of the base state for full-star flows, which involves a novel mapping technique between the one-dimensional base state and the Cartesian grid, as well as a number of overall improvements to the algorithm. We examine the efficiency and accuracy of our adaptive code, and demonstrate that it is suitable for further study of our initial scientific application, the convective phase of Type Ia supernovae.

supernovae: general — white dwarfs — hydrodynamics — nuclear reactions, nucleosynthesis, abundances — convection — methods: numerical

1 Introduction

Many astrophysical phenomena of interest occur in the low Mach number regime, where the characteristic fluid velocity is small compared to the speed of sound. Some well-known examples are the convective phase of Type Ia supernovae (SN Ia) (Höflich & Stein, 2002; Kuhlen et al., 2006; Zingale et al., 2009), classical novae (Glasner et al., 2007), convection in stars (Meakin & Arnett, 2007), and Type I X-ray bursts (Lin et al., 2006). Such problems require a numerical approach capable of resolving phenomena over time scales much longer than the characteristic time required for an acoustic wave to propagate across the computational domain. In a series of papers (see Almgren et al. (2006a)—henceforth Paper I, Almgren et al. (2006b)—henceforth Paper II, Almgren et al. (2008)—henceforth Paper III, and Zingale et al. (2009)—henceforth Paper IV), we have described the initial development of MAESTRO, a low Mach number hydrodynamics code for computing stellar flows using a time step constraint based on the fluid velocity rather than the sound speed. MAESTRO is suitable for two- and three-dimensional local atmospheric flows as well as three-dimensional full-star flows. All simulations are performed in a Cartesian grid framework, but rely on the presence of a one-dimensional radial base state that describes the average state of the star or atmosphere. Starting with the development of the low Mach number equation set (see Paper I), we demonstrated how to capture the expansion of the base state in a local atmospheric simulation in response to large-scale heating (Paper II) and incorporate reaction networks (Paper III). In Paper IV, we presented the initial application of MAESTRO, following the last two hours of convection inside a white dwarf leading up to the ignition of a SN Ia using a three-dimensional, full-star simulation with a base state that is constant in time.

In general, astrophysical flows are highly turbulent. In the case of the convective period preceding a SN Ia explosion, the Reynolds number is 𝒪(1014)\mathcal{O}(10^{14}) (Woosley et al., 2004), far larger than can be modeled on today’s supercomputers. Nevertheless, to understand the role of turbulence in these events, we must use increasingly more accurate simulations. In this paper we describe how to incorporate adaptive mesh refinement (AMR), in which we locally refine the Cartesian grid in regions of interest, to allow us to efficiently push to higher spatial resolutions and better capture the turbulent flow in critical regions of the simulation. The primary difference between MAESTRO and other structured grid AMR approaches for incompressible and low Mach number flows is the presence of the time-dependent base state, whose evolution is coupled to the evolution of the full solution. We also describe how to incorporate a time-dependent base state for full-star problems, which involves a novel mapping technique between the one-dimensional base state and the Cartesian grid. This allows us to properly capture the effects of an expanding base state in full-star simulations. We have also made a number of overall improvements to the algorithm, and all together, these enhancements will allow us to compute more efficient and accurate solutions for our target applications, including the convective phase of SNe Ia and Type I X-ray bursts.

This paper is divided into several sections, along with three detailed appendices. In §2, we present the governing equations. In §3, we give an overview of the methodology, referring the reader to the appendices for full details. In §4, we describe the new mapping procedure between one-dimensional and three-dimensional data structures in full-star problems. In §5, we discuss the extension of the algorithm to include AMR. In §6, we describe the results of our test problems. We conclude with §7, which includes future plans for scientific investigation.

2 Governing Equations

Stellar flows are well characterized by the compressible Euler equations (i.e., viscosity effects are negligible). These equations model all compressibility effects in a fluid, and allow for the formation and propagation of shocks. For low speed convective flows in a hydrostatically stratified star or atmosphere, we do not need to explicitly follow the propagation of sound waves. However, we do need to include large-scale compressibility effects such as the expansion/contraction of a fluid element as it changes altitude in the stratified background, and the local changes to the density of the fluid element through heating and compositional changes. By reformulating the equations of hydrodynamics to filter out sound waves but preserve the correct large-scale fluid motions and hydrostatic balance, we can retain the compressibility effects we desire while allowing for much larger time steps than a corresponding compressible code. The full derivation of the low Mach number hydrodynamics equations is given in papers I through III. The resulting equations are:

(ρXk)t\displaystyle\frac{\partial(\rho X_{k})}{\partial t} =\displaystyle= (ρXk𝐔)+ρω˙k,\displaystyle-\nabla\cdot(\rho X_{k}{\bf{U}})+\rho\dot{\omega}_{k}, (1)
𝐔t\displaystyle\frac{\partial{\bf{U}}}{\partial t} =\displaystyle= 𝐔𝐔1ρπρρ0ρg𝐞r,\displaystyle-{\bf{U}}\cdot\nabla{\bf{U}}-\frac{1}{\rho}\nabla\pi-\frac{\rho-\rho_{0}}{\rho}g{\bf{e}}_{r}, (2)
(ρh)t\displaystyle\frac{\partial(\rho h)}{\partial t} =\displaystyle= (ρh𝐔)+Dp0Dt+ρHnuc+ρHext,\displaystyle-\nabla\cdot(\rho h{\bf{U}})+\frac{Dp_{0}}{Dt}+\rho H_{\rm nuc}+\rho H_{\rm ext}, (3)

where ρ\rho, 𝐔{\bf{U}}, and hh are the mass density, velocity and specific enthalpy, respectively, and XkX_{k} are the mass fractions of species kk with associated production rate ω˙k\dot{\omega}_{k}. The species are constrained such that kXk=1\sum_{k}X_{k}=1 giving ρ=k(ρXk)\rho=\sum_{k}(\rho X_{k}) and

ρt=(ρ𝐔).\frac{\partial\rho}{\partial t}=-\nabla\cdot(\rho{\bf{U}}). (4)

The source terms HextH_{\rm ext} and HnucH_{\rm nuc} are the external heating rate and nuclear energy generation rate per unit mass. The pressure is decomposed into a hydrostatic base state pressure, p0=p0(r,t)p_{0}=p_{0}(r,t), and a dynamic pressure, π=π(𝐱,t)\pi=\pi({\bf{x}},t), such that |π|/p0=𝒪(M2)|\pi|/p_{0}=\mathcal{O}(M^{2}) (we use 𝐱{\bf{x}} to represent the Cartesian coordinate directions of the full state and rr to represent the radial coordinate direction for the base state). We also define a base state density, ρ0=ρ0(r,t)\rho_{0}=\rho_{0}(r,t), which is in hydrostatic equilibrium with p0p_{0}, i.e., p0=ρ0g𝐞r\nabla p_{0}=-\rho_{0}g{\bf{e}}_{r}, where g=g(r,t)g=g(r,t) is the magnitude of the gravitational acceleration and 𝐞r{\bf{e}}_{r} is the unit vector in the outward radial direction.

Mathematically, this system must still be closed by the equation of state which we express as a divergence constraint on the velocity field (see Paper III),

(β0𝐔)=β0(S1Γ1¯p0p0t),\nabla\cdot(\beta_{0}{\bf{U}})=\beta_{0}\left(S-\frac{1}{\overline{\Gamma_{1}}p_{0}}\frac{\partial p_{0}}{\partial t}\right), (5)

where β0\beta_{0} is a density-like variable that carries background stratification, defined as

β0(r,t)=ρ0(0,t)exp(0r1Γ1¯p0p0r𝑑r),\beta_{0}(r,t)=\rho_{0}(0,t)\exp\left(\int_{0}^{r}\frac{1}{\overline{\Gamma_{1}}p_{0}}\frac{\partial p_{0}}{\partial r^{\prime}}dr^{\prime}\right), (6)

and Γ1¯\overline{\Gamma_{1}} the lateral average (see §4.1) of Γ1=d(logp)/d(logρ)\Gamma_{1}=d(\log p)/d(\log\rho) at constant entropy. The expansion term, SS, incorporates local compressibility effects due to heat release from reactions, compositional changes, and external sources,

S=σkξkω˙k+1ρpρkpXkω˙k+σHnuc+σHext.S=-\sigma\sum_{k}\xi_{k}\dot{\omega}_{k}+\frac{1}{\rho p_{\rho}}\sum_{k}p_{X_{k}}\dot{\omega}_{k}+\sigma H_{\rm nuc}+\sigma H_{\rm ext}. (7)

where pXkp/Xk|ρ,T,Xj,jkp_{X_{k}}\equiv\left.\partial p/\partial X_{k}\right|_{\rho,T,X_{j,j\neq k}}, ξkh/Xk|p,T,Xj,jk,pρp/ρ|T,Xk\xi_{k}\equiv\left.\partial h/\partial X_{k}\right|_{p,T,X_{j,j\neq k}},p_{\rho}\equiv\left.\partial p/\partial\rho\right|_{T,X_{k}}, and σpT/(ρcppρ)\sigma\equiv p_{T}/(\rho c_{p}p_{\rho}), with pTp/T|ρ,Xkp_{T}\equiv\left.\partial p/\partial T\right|_{\rho,X_{k}} and cph/T|p,Xkc_{p}\equiv\left.\partial h/\partial T\right|_{p,X_{k}} is the specific heat at constant pressure.

It is important to note that if the Mach number of the fluid in a numerical simulation becomes O(1)O(1), through large acceleration due to buoyancy or nuclear energy generation, for example, the solution of these equations would no longer be physically meaningful. The low Mach number equations do not enforce that the Mach number remain small; rather, if the dynamics of the flow are such the Mach number does remain small, then these equations are valid approximations for the evolution of the flow.

As in Papers II and III, we decompose the full velocity field into a base state velocity, w0w_{0}, that governs the base state dynamics, and a local velocity, 𝐔~\widetilde{{\bf{U}}}, that governs the local dynamics, i.e.,

𝐔=w0(r,t)𝐞r+𝐔~(𝐱,t).{\bf{U}}=w_{0}(r,t){\bf{e}}_{r}+\widetilde{{\bf{U}}}({\bf{x}},t). (8)

with (𝐔~𝐞r)¯=0\overline{(\widetilde{{\bf{U}}}\cdot{\bf{e}}_{r})}=0 and w0=(𝐔𝐞r)¯w_{0}=\overline{({\bf{U}}\cdot{\bf{e}}_{r})}. The velocity evolution equations are then

w0t\displaystyle\frac{\partial w_{0}}{\partial t} =\displaystyle= w0w0r1ρ0π0r,\displaystyle-w_{0}\frac{\partial w_{0}}{\partial r}-\frac{1}{\rho_{0}}\frac{\partial\pi_{0}}{\partial r}, (9)
𝐔~t\displaystyle\frac{\partial\widetilde{{\bf{U}}}}{\partial t} =\displaystyle= 𝐔𝐔~(𝐔~𝐞r)w0r𝐞r1ρπ+1ρ0π0r𝐞rρρ0ρg𝐞r.\displaystyle-{\bf{U}}\cdot\nabla\widetilde{{\bf{U}}}-\left(\widetilde{{\bf{U}}}\cdot{\bf{e}}_{r}\right)\frac{\partial w_{0}}{\partial r}{\bf{e}}_{r}-\frac{1}{\rho}\nabla\pi+\frac{1}{\rho_{0}}\frac{\partial\pi_{0}}{\partial r}{\bf{e}}_{r}-\frac{\rho-\rho_{0}}{\rho}g{\bf{e}}_{r}. (10)

where π0\pi_{0} is the base state component of the perturbational pressure. By laterally averaging to equation (5), we obtain a divergence constraint for w0w_{0}:

(β0w0𝐞r)=β0(S¯1Γ1¯p0p0t).\nabla\cdot(\beta_{0}w_{0}{\bf{e}}_{r})=\beta_{0}\left(\overline{S}-\frac{1}{\overline{\Gamma_{1}}p_{0}}\frac{\partial p_{0}}{\partial t}\right). (11)

The divergence constraint for 𝐔~\widetilde{{\bf{U}}} can be found by subtracting (11) into (5), resulting in

(β0𝐔~)=β0(SS¯).\nabla\cdot\left(\beta_{0}\widetilde{{\bf{U}}}\right)=\beta_{0}\left(S-\overline{S}\right). (12)

In the present paper, we revert back to the method introduced in paper II and define a base state enthalpy, (ρh)0(\rho h)_{0}. We use ρ0\rho_{0} and (ρh)0(\rho h)_{0} to define the perturbational quantities ρ=ρρ0\rho^{\prime}=\rho-\rho_{0} and (ρh)=(ρh)(ρh)0(\rho h)^{\prime}=(\rho h)-(\rho h)_{0}, which are predicted to the Cartesian edges to compute fluxes for the conservative updates of ρ0\rho_{0} and (ρh)0(\rho h)_{0}. Experience has shown that by advancing perturbational quantities, the slope limiters are more effective at reducing numerical oscillations since they are being applied to a normalized signal, rather than a signal that spans many orders of magnitude over a small number of cells. This is a departure from paper III where we predicted temperature to the Cartesian edges. Evolution equations for ρ0\rho_{0} and (ρh)0(\rho h)_{0} are designed so that ρ0\rho_{0} and (ρh)0(\rho h)_{0} will remain the average over a layer of constant radius of ρ\rho and (ρh)(\rho h). The fluxes for (ρXk)(\rho X_{k}) are computed by first predicting ρ0,ρ\rho_{0},\rho^{\prime}, and XkX_{k} to time-centered Cartesian edges. The flux for (ρh)(\rho h) is computed by first predicting (ρh)0(\rho h)_{0} and (ρh)(\rho h)^{\prime} to time-centered Cartesian edges.

We now derive the equations used to predict the time-centered Cartesian edge values in the actual algorithm. The species evolution equation is found by combining equations (1) and (4):

Xkt=𝐔Xk+ω˙k.\frac{\partial X_{k}}{\partial t}=-{\bf{U}}\cdot\nabla X_{k}+\dot{\omega}_{k}. (13)

The base state evolution equations for density and enthalpy can be found by averaging (4) and (3) respectively over a layer of constant radius, resulting in

ρ0t\displaystyle\frac{\partial\rho_{0}}{\partial t} =\displaystyle= (ρ0w0𝐞r),\displaystyle-\nabla\cdot(\rho_{0}w_{0}{\bf{e}}_{r}), (14)
(ρh)0t\displaystyle\frac{\partial(\rho h)_{0}}{\partial t} =\displaystyle= [(ρh)0w0𝐞r]+ψ+ρHnuc¯+ρHext¯.\displaystyle-\nabla\cdot\left[(\rho h)_{0}w_{0}{\bf{e}}_{r}\right]+\psi+\overline{\rho H_{\rm nuc}}+\overline{\rho H_{\rm ext}}. (15)

where ψ\psi is the Lagrangian change in the base state pressure defined as ψD0p0/Dtp0/t+w0p0/r\psi\equiv{D_{0}p_{0}}/{Dt}\equiv{\partial p_{0}}/{\partial t}+w_{0}{\partial p_{0}}/{\partial r} and is related to the total pressure by

Dp0Dt=ψ+𝐔~p0.\frac{Dp_{0}}{Dt}=\psi+\widetilde{{\bf{U}}}\cdot\nabla p_{0}. (16)

Subtracting the base state evolution equations from the corresponding full state equations yields

ρt\displaystyle\frac{\partial\rho^{\prime}}{\partial t} =\displaystyle= 𝐔ρρ𝐔(ρ0𝐔~),\displaystyle-{\bf{U}}\cdot\nabla\rho^{\prime}-\rho^{\prime}\nabla\cdot{\bf{U}}-\nabla\cdot\left(\rho_{0}\widetilde{{\bf{U}}}\right), (17)
(ρh)t\displaystyle\frac{\partial(\rho h)^{\prime}}{\partial t} =\displaystyle= 𝐔(ρh)(ρh)𝐔[(ρh)0𝐔~]+𝐔~p0\displaystyle-{\bf{U}}\cdot\nabla(\rho h)^{\prime}-(\rho h)^{\prime}\nabla\cdot{\bf{U}}-\nabla\cdot\left[(\rho h)_{0}\widetilde{{\bf{U}}}\right]+\widetilde{{\bf{U}}}\cdot\nabla p_{0} (18)
+(ρHnucρHnuc¯)+(ρHextρHext¯).\displaystyle+(\rho H_{\rm nuc}-\overline{\rho H_{\rm nuc}})+(\rho H_{\rm ext}-\overline{\rho H_{\rm ext}}).

In our treatment of enthalpy, we split the reactions and external heating from the hydrodynamics, i.e., during the hydrodynamics step, we neglect the ω˙k\dot{\omega}_{k}, HnucH_{\rm nuc}, and HextH_{\rm ext} terms. Also, in our treatment of species, we similarly split the reactions from the hydrodynamics.

While equation (14) properly captures the change in ρ0\rho_{0} due to atmospheric expansion caused by heating, it neglects changes that can occur due to significant convective overturning. We impose the constraint that ρ¯=0\overline{\rho^{\prime}}=0 for all time. In Paper III, we quantified the drift in ρ¯\overline{\rho^{\prime}} by introducing ηρ\eta_{\rho} in the equation

ρ¯t=(ηρ𝐞r).\frac{\partial\overline{\rho^{\prime}}}{\partial t}=-\nabla\cdot(\eta_{\rho}{\bf{e}}_{r}). (19)

However, we incorrectly derived ηρ\eta_{\rho} by assuming (ρw0𝐞r)¯=0\overline{\nabla\cdot(\rho^{\prime}w_{0}{\bf{e}}_{r})}=0, when in general this is not true since ρ\rho^{\prime}, when predicted to time-centered edges, does not in general satisfy ρ¯=0\overline{\rho^{\prime}}=0. Therefore, the correct expression is ηρ=(ρ𝐔𝐞r)¯\eta_{\rho}=\overline{\left(\rho^{\prime}{\bf{U}}\cdot{\bf{e}}_{r}\right)}. In practice, we correct the drift by simply setting ρ0=ρ¯\rho_{0}=\overline{\rho} after the advective update of ρ\rho. However we still need to explicitly compute ηρ\eta_{\rho} since it appears in other equations.

3 Overview of Numerical Methodology

We shall refer to local atmospheric flows in two and three dimensions as problems in “planar” geometry, and full-star flows in three dimensions as problems in “spherical” geometry. The solution in both cases consists of the Cartesian grid solution (𝐔~,ρ,h,Xk,T\widetilde{{\bf{U}}},\rho,h,X_{k},T) and the one-dimensional base state solution (w0,ρ0,(ρh)0,p0w_{0},\rho_{0},(\rho h)_{0},p_{0}), all of which are cell-centered except for w0w_{0}, which is edge-centered. Edge-centered data is denoted by a half-integer subscript. See Figure 1 for a representation of each grid structure. The time step index is denoted as a superscript.

Refer to caption
Refer to caption
Figure 1: (Left) For data on the Cartesian grid (shown here in two dimensions), we use a cell-centered convention with indices i,j,ki,j,k (in three dimensions). Edges are denoted with a half-integer. (Right) The base state lives on a radial array and uses a cell-centered convention with index jj. Edges are denoted with a half-integer.

For planar problems, 𝐞r{\bf{e}}_{r} is in alignment with the Cartesian grid unit vector in the outward radial direction, 𝐞y{\bf{e}}_{y} (in two dimensions) or 𝐞z{\bf{e}}_{z} (in three dimensions). We choose Δr=Δx\Delta r=\Delta x so that there will be a simple, direct mapping between the radial array and the Cartesian grid. For spherical problems, 𝐞r{\bf{e}}_{r} is not in alignment with any Cartesian coordinate direction. Our choice of Δr\Delta r can be independent of Δx\Delta x; as in Paper IV, we use 5Δr=Δx5\Delta r=\Delta x. Note that for spherical problems, we place the center of the star at the center of the computational domain, and therefore the center of the star lies at a corner where 8 Cartesian cells meet. See Figure 2 for an illustration of the relationships between the radial array and the Cartesian grid for spherical and planar geometries.

Refer to caption
Refer to caption
Figure 2: (Left) For problems in spherical geometry, there is no direct alignment between the radial array cell centers and the Cartesian grid cell centers. (Right) For problems in planar geometry, there is a direct alignment between the radial array cell centers and the Cartesian grid cell centers.

The time-advancement algorithm uses a predictor-corrector formalism. In the predictor step, we compute an estimate of the expansion of the base state, then compute a preliminary estimate of the state at the new time level. In the corrector step, we use this preliminary state to compute a new estimate of the expansion of the base state, and then compute the final state at the new time level. We incorporate reactions and external heating using Strang-splitting. As in previous papers, our algorithm is second-order in space and time.

The full details of the algorithm are presented in Appendix A. The main algorithm description in Appendix A.4 is similar to the description in Paper III, but has been significantly updated to show how we incorporate the time-dependent spherical base state. There are numerous other improvements we have made to the algorithm since papers III and IV, which are described in Appendix A.1. Note that these changes have also been incorporated into the main algorithm description. Overall:

  • Appendix A.1 is a summary of algorithmic changes since papers III and IV.

  • Appendix A.2 describes how we compute and discretize gravity.

  • Appendix A.3 is a description of shorthand notation we use in describing the algorithm.

  • Appendix A.4 steps through the algorithm in detail.

  • Appendix A.5 describes special treatment given to low density regions in the simulation.

4 Mapping

At many points in the algorithm, we need to map the full state on the Cartesian grid onto a one-dimensional radial array, and vice-versa. Since Paper IV, we have greatly increased the accuracy of the numerical mapping to and from these data structures for spherical problems, most notably the lateral average routine described below. We refer to the procedure for mapping a cell-centered Cartesian field to a cell-centered radial array as a “lateral average”, and we refer to the procedures for mapping an edge- or cell-centered radial array to an edge- or cell-centered Cartesian grid as a “fill”.

4.1 Lateral Average

For any Cartesian cell-centered field, ϕ\phi, we define ϕ¯=\overline{\phi}=Avg(ϕ)(\phi) as the lateral average over a layer at constant radius rr, ΩH\Omega_{H}, as

ϕ(r)¯=1A(ΩH)ΩHϕ(r,𝐱)𝑑Ω;A(ΩH)=ΩH𝑑Ω.\overline{\phi(r)}=\frac{1}{A(\Omega_{H})}\int_{\Omega_{H}}\phi(r,{\bf{x}})d\Omega;\qquad A(\Omega_{H})=\int_{\Omega_{H}}d\Omega. (20)
planar:

This is a straightforward arithmetic average of cells at a particular height since the radial cell centers are in alignment with the Cartesian grid cell centers.

spherical:

It can be shown that any Cartesian cell center is a radius r^m=Δx3/4+2m\hat{r}_{m}=\Delta x\sqrt{\mathchoice{\kern 0.0pt\raise 2.15277pt\hbox{\sevenrm 3}\kern-1.49994pt/\kern-1.49994pt\lower 1.07639pt\hbox{\sevenrm 4}}{\kern 0.0pt\raise 2.15277pt\hbox{\sevenrm 3}\kern-1.49994pt/\kern-1.49994pt\lower 1.07639pt\hbox{\sevenrm 4}}{\kern 0.0pt\raise 2.15277pt\hbox{\fiverm 3}\kern-1.99997pt/\kern-1.49994pt\lower 1.07639pt\hbox{\fiverm 4}}{3\!/4}+2m} from the center of the star, where m0m\geq 0 is an integer. For example, the Cartesian cell with coordinates (i,j,k)=(1,1,1)(i,j,k)=(1,1,1) relative to the center of the star lies at a distance of Δx3/4+6\Delta x\sqrt{\mathchoice{\kern 0.0pt\raise 2.15277pt\hbox{\sevenrm 3}\kern-1.49994pt/\kern-1.49994pt\lower 1.07639pt\hbox{\sevenrm 4}}{\kern 0.0pt\raise 2.15277pt\hbox{\sevenrm 3}\kern-1.49994pt/\kern-1.49994pt\lower 1.07639pt\hbox{\sevenrm 4}}{\kern 0.0pt\raise 2.15277pt\hbox{\fiverm 3}\kern-1.99997pt/\kern-1.49994pt\lower 1.07639pt\hbox{\fiverm 4}}{3\!/4}+6} from the center of the star, corresponding to m=3m=3. The Cartesian cells with coordinates (i,j,k)=(2,0,0),(0,2,0)(i,j,k)=(2,0,0),(0,2,0), or (0,0,2)(0,0,2) relative to the center of the star also lie at that same distance. For the 3843 resolution examples in this paper, we have verified that a non-zero set of Cartesian cell centers map into each radius r^m\hat{r}_{m} until mm is large enough to correspond to a radius larger than half the width of the computational domain (i.e., the edge of the domain, not the corner of the domain). Figure 3 shows the number of Cartesian cells that map into each radius r^m\hat{r}_{m}, which we refer to as the “hit count”, for a 3843 domain. We use this mapping to help construct the lateral average, using the following steps:

  1. 1.

    Create an itemized list, ϕ^m\hat{\phi}_{m}, where each element is associated with a radius r^m=Δx3/4+2m\hat{r}_{m}=\Delta x\sqrt{\mathchoice{\kern 0.0pt\raise 2.15277pt\hbox{\sevenrm 3}\kern-1.49994pt/\kern-1.49994pt\lower 1.07639pt\hbox{\sevenrm 4}}{\kern 0.0pt\raise 2.15277pt\hbox{\sevenrm 3}\kern-1.49994pt/\kern-1.49994pt\lower 1.07639pt\hbox{\sevenrm 4}}{\kern 0.0pt\raise 2.15277pt\hbox{\fiverm 3}\kern-1.99997pt/\kern-1.49994pt\lower 1.07639pt\hbox{\fiverm 4}}{3\!/4}+2m} from the center of the star.

  2. 2.

    For each ϕ^m\hat{\phi}_{m}, compute the arithmetic average value of the Cartesian cells whose centers lie at the associated radius. As an additional element in the itemized list, include the center of the star (corresponding to a radius of r=0r=0). Compute this additional value of ϕ^\hat{\phi} at this location using quadratic interpolation with ϕ^0\hat{\phi}_{0}, ϕ^1\hat{\phi}_{1}, and a homogeneous Neumann condition at r=0r=0 as the stencil points. Note that for very large values of mm, it is possible that no Cartesian cell centers exist at a radius r^m\hat{r}_{m} (i.e., the hit count is zero). If so, we say that ϕ^m\hat{\phi}_{m} has an undefined/invalid value, and we ignore such values for the rest of this procedure.

  3. 3.

    To compute the lateral average, use quadratic interpolation using the value in the itemized list with the closest associated radius, ϕ^k\hat{\phi}_{k}, and the nearest values above and below, ϕ^k+\hat{\phi}_{k_{+}} and ϕ^k\hat{\phi}_{k_{-}}, using divided differences:

    ϕ(r)¯=ϕ^k+ϕ^kϕ^kr^kr^k(rr^k)+ϕ^k+ϕ^kr^k+r^kϕ^kϕ^kr^kr^kr^k+r^k(rr^k)(rr^k),\overline{\phi(r)}=\hat{\phi}_{k_{-}}+\frac{\hat{\phi}_{k}-\hat{\phi}_{k_{-}}}{\hat{r}_{k}-\hat{r}_{k_{-}}}(r-\hat{r}_{k_{-}})+\frac{\frac{\hat{\phi}_{k_{+}}-\hat{\phi}_{k}}{\hat{r}_{k_{+}}-\hat{r}_{k}}-\frac{\hat{\phi}_{k}-\hat{\phi}_{k_{-}}}{\hat{r}_{k}-\hat{r}_{k_{-}}}}{\hat{r}_{k_{+}}-\hat{r}_{k_{-}}}(r-\hat{r}_{k_{-}})(r-\hat{r}_{k}),

    where r^k\hat{r}_{k_{-}}, r^k\hat{r}_{k}, and r^k+\hat{r}_{k_{+}} are the three radii associated with ϕ^k\hat{\phi}_{k_{-}}, ϕ^k\hat{\phi}_{k}, and ϕ^k+\hat{\phi}_{k_{+}}. Finally, constrain ϕ(r)¯\overline{\phi(r)} to lie within the range of ϕ^k\hat{\phi}_{k_{-}}, ϕ^k\hat{\phi}_{k}, and ϕ^k+\hat{\phi}_{k_{+}} so as to not introduce any new maxima or minima.

In §6.1, we show the improvement of this averaging procedure over the Paper IV procedure.

Refer to caption
Figure 3: The number of Cartesian cells whose centers lie at a radius r^m\hat{r}_{m} (i.e., the “hit count”) for a 3843 domain vs. the itemized list index, mm. Indices m<18,432m<18,432 correspond to locations within half the width of the computational domain. A non-zero set of Cartesian cell centers maps into the radius associated with every m37,912m\leq 37,912, which corresponds to approximately 0.72 times the width of the computational domain. The inset plot is a zoom-in of the innermost 75 values of mm.

4.2 Fill

There are four different mappings from a one-dimensional radial array to the three-dimensional Cartesian grid; below we describe the procedures for planar and spherical geometries separately.

planar:
  1. 1.

    To map a cell-centered radial array onto Cartesian cell centers, we use direct-injection since the radial cell centers are in alignment with the Cartesian cell centers.

  2. 2.

    To map an edge-centered radial array onto Cartesian cell centers, we average the two nearest radial edge-centered values.

  3. 3.

    To map a cell-centered radial array onto Cartesian edges with normal in the radial direction, we use 4th order spatial interpolation. For example, in two dimensions,

    ϕi,j+1/2=712(ϕj+ϕj+1)112(ϕj1+ϕj+2).\phi_{i,j+\mathchoice{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 1}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 1}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\fiverm 1}\kern-1.63885pt/\kern-1.22911pt\lower 0.75346pt\hbox{\fiverm 2}}{1\!/2}}=\frac{7}{12}(\phi_{j}+\phi_{j+1})-\frac{1}{12}(\phi_{j-1}+\phi_{j+2}). (21)

    We constrain ϕi,j+1/2\phi_{i,j+\mathchoice{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 1}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 1}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\fiverm 1}\kern-1.63885pt/\kern-1.22911pt\lower 0.75346pt\hbox{\fiverm 2}}{1\!/2}} to lie between the interpolated values, and lower the order of interpolation near domain boundaries. For the Cartesian edges transverse to the base state direction, we use direct-injection since the radial cell centers are in alignment with these Cartesian edges.

  4. 4.

    To map an edge-centered radial array onto Cartesian edges, we use direct-injection on Cartesian edges normal to the base state direction since the radial edges are in alignment with these Cartesian edges. For the remaining Cartesian edges, we average the two nearest radial edge-centered values.

spherical:
  1. 1.

    To map a cell-centered radial array onto Cartesian cell centers, we use quadratic interpolation from the nearest three radial cell centers (see Figure 4a). This is a departure from Paper IV, in which we used piecewise constant interpolation.

  2. 2.

    To map an edge-centered radial array onto Cartesian cell centers, we use linear interpolation from the nearest two points (see Figure 4b).

  3. 3.

    To map a cell-centered radial array onto Cartesian edges, we first map the radial array onto Cartesian cell centers (see 1.), then average the two neighboring centers to obtain the Cartesian edge values (see Figure 4c).

  4. 4.

    To map an edge-centered radial array onto Cartesian edges, we first map the radial array onto Cartesian cell centers (see 2.), then average the two neighboring centers to obtain the Cartesian edge values (see Figure 4c).

Refer to caption
Refer to caption
Refer to caption
Figure 4: Illustrations of the fill operation for spherical geometry. (a) To fill the Cartesian cell center (fill type 1), represented by the square, from radial cell-centered data, represented by the circles, we use quadratic interpolation from the nearest three points. (b) To fill the Cartesian cell center (fill type 2), represented by the square, from radial edge-centered data, represented by the circles, we use linear interpolation from the nearest two points. (c) To fill a Cartesian edge (fill types 3 and 4), represented by the squares, first fill the Cartesian cell centers, represented by the circles, then average the two neighboring cell centers.

5 Adaptive Mesh Refinement

Our approach to AMR uses a nested hierarchy of logically rectangular grids with successively finer grids at higher levels. This is based on the strategy introduced for gas dynamics by Berger & Colella (1989), extended to the incompressible Navier-Stokes equations by Almgren et al. (1998), and extended to low Mach number reacting flows by Pember et al. (1998) and Day & Bell (2000). We refer the reader to these works for more details. The key difference between our method and these earlier methods stems from the presence of a one-dimensional base state whose time evolution is coupled to that of the full solution. To the best of our knowledge, there are no existing AMR algorithms for astrophysics or any other field, for flows with a time-dependent base state coupled to the full solution. For simplicity, we present a version of the algorithm with no subcycling in time, i.e., the solution at all levels is advanced with the same time step.

We first summarize our AMR approach without the base state, then discuss how the base state is incorporated in both the planar and spherical cases.

5.1 Creating and Managing the Grid Hierarchy

At each time step the state data is defined on a nested hierarchy of grids, ranging from the base level (=1\ell=1), which covers the entire computational domain, to the finest level (=max\ell={\ell}_{\mathrm{max}}). At each level there is a union of non-intersecting rectangular grids with the same spatial resolution. For simplicity, we require that the cells composing the grids be square (Δx=Δy=Δz\Delta x=\Delta y=\Delta z), and that the refinement ratio between levels be 2. The grids in the interior of the computational domain are required to be properly nested, i.e., the union of grids at level +1\ell+1 is completely contained in the union of grids at level \ell. Additionally, in the interior, we require that each grid at level +1\ell+1 be a distance of at least two level \ell cells from the boundary between level \ell and level 1\ell-1 grids; this allows us to always fill “ghost cells” at level +1\ell+1 from the level \ell data (or the physical boundary conditions, if appropriate). We initialize the grid hierarchy and regrid following the procedure outlined in Bell et al. (1994). A user-specified error estimation routine is used to tag cells where more resolution is desired. The tagged cells are grouped into rectangular patches following Berger & Rigoutsos (1991), and subsequently refined to create new grids at next level. Refinement continues until the maximum level is reached.

During Step 0,111The “Step” notation is used in describing the full details of the algorithm in Appendix A.4 grids at all levels are filled directly from the initial data. As the simulation progresses, we periodically check our refinement criteria and regrid as necessary. This regridding takes places during Step 12, before computing the next time step. Newly created grids are filled by using data from previous grids at the same refinement level (if available) or by interpolating from underlying coarser grids.

5.2 Communication between levels

Since we use the same time step to advance the solution at all levels, much of the complication associated with synchronization of data between levels in a subcycling algorithm (see Almgren et al. 1998) is eliminated. The MAC projections in Step 3 and 7 enforce that 𝐔~ADV,\widetilde{{\bf{U}}}^{\mathrm{ADV},\star} and 𝐔~ADV,\widetilde{{\bf{U}}}^{\mathrm{ADV}}, respectively, on any coarse edge underlying fine edges are the average of the values on the fine edges. Similarly, the nodal projection in Step 12 enforces that at any coarse node underlying a fine node, the value of ϕ\phi on the coarse node is identical to the value on the fine node above it. The additional communication of data between levels occurs as follows:

  • Before any explicit operation at level >1,\ell>1, data in ghost cells at that level are filled by interpolating from level 1\ell-1, or imposing physical boundary conditions, as appropriate.

  • Edge-based fluxes at level <max\ell<\ell_{max} that underlie edges at level +1\ell+1 are defined to be the average of the fluxes on level +1\ell+1 at that edge. This enforces conservation.

  • After any update to the solution, data at finer levels is conservatively averaged onto the underlying coarse grid cells, starting at the finest level.

5.3 AMR with a Time-Dependent Base State

Our specific treatment of AMR is guided by our initial scientific applications, including Type I X-ray bursts and the convective phase of SNe Ia, as well as numerical concerns, most notably the presence of the one-dimensional base state. Our treatment of the base state in an AMR framework differs for planar vs. spherical problems.

For planar problems, our approach is to define a radial base state array with variable mesh spacing. A general localized fine Cartesian grid would require either a base state that exists at multiple resolutions at a particular height, or an interpolation algorithm to obtain the base state value at a particular height if ΔrΔx\Delta r\neq\Delta x. Both of these methods pose problems, as they generate oscillations in perturbational quantities (such as ρ,(ρh)\rho^{\prime},(\rho h)^{\prime} and the SS¯S-\overline{S} term on the right hand side of the divergence constraint) since the lateral average routine is only defined when the base state is aligned with the Cartesian grid across the width of the domain. Any attempt at interpolation will cause oscillations in the perturbational quantities directly related to the interpolation error. We have found that such oscillations can be detrimental to the results. With these issues in mind, we choose to only allow fine grids to exist that span the width of the domain. This way, the base state exists as a single seamless entity with multiple resolutions depending on height (see Figure 5). We will take advantage of this type of grid structure in our studies of Type I X-ray bursts.

Refer to caption
Refer to caption
Figure 5: (Left) For multi-level problems in planar geometry, we force a direct alignment between the radial array cell centers and the Cartesian grid cell centers by allowing the radial base state spacing to change with space and time. (Right) For multi-level problems in spherical geometry, since there is no direct alignment between the radial array cell centers and the Cartesian grid cell centers, we choose to fix the radial base state spacing across levels.

Next, we define ghost cell values for the finer base state levels, and fill these values by interpolating coarser data. This makes the algorithm directly compatible with the one-dimensional time-centered edge state calculation used in Advect Base Density 222The boldface notation refers to numerical modules we have described in Appendix A.3. and Advect Base Enthalpy. In particular, the slopes can be used with a consistent stencil at each level, that is not dependent on the data from any other level once the ghost cells are set.

Finally, whenever we regrid the Cartesian grid data, we regrid the base state to match the grid structure of the Cartesian grid. Then, we set ρ0=ρ¯\rho_{0}=\overline{\rho} and compute p0p_{0} using Enforce HSE. To compute ψ\psi and w0w_{0} on the new base state array, we use piecewise linear interpolation of the coarser data to fill any new fine radial cells/edges.

For spherical geometry, we first note that even in the single-level case the radial base state is not aligned with the Cartesian grid. Therefore, we use a base state with a fixed Δr\Delta r for all levels (see Figure 5). As in the single-level algorithm, we choose Δr=Δx/5\Delta r=\Delta x/5, but here, Δx\Delta x corresponds to resolution of the Cartesian grid at the finest level.

Our next consideration is defining the radial average. First, we first create an itemized list associated with each level of refinement using only Cartesian cells that are not covered by cells at a finer level. At this point one option would be to merge the lists and proceed as in the single-level algorithm; this was tested and found to be problematic. Instead, we choose the list from a chosen particular level and define the average using quadratic interpolation with only this list, as in the single-level case. To decide which list to use, we first examine the three points that would be used by quadratic interpolation at each level. The guiding principle is to avoid using interpolation points with low hit counts. Thus, at each level we find the minimum hit count of the three points; the level which has the largest minimum hit count is the level whose list we use for interpolation. We note that this multi-level average works particularly well when the center of the star is fully refined. This is the case since near the center of the star, there are relatively few Cartesian cells that contribute to each radial bin, so by fully refining the center of the star, we ensure that the multi-level averaging procedure retains the accuracy of a single-level spherical average near the center. For our studies of SNe Ia, we will take advantage of this fact by always refining the center of the star, which is our region of interest (see Figure 12 in §6.6, as an example). In §6.1, we present numerical tests of the new multi-level averaging procedure for spherical geometry.

For both planar and spherical problems, after regridding the Cartesian grid, we make the state thermodynamically consistent by computing T=T(ρ,h,Xk)T=T(\rho,h,X_{k}) (for planar problems) or T=T(ρ,p0,Xk)T=T(\rho,p_{0},X_{k}) (for spherical problems). Then, we recompute Γ1¯\overline{\Gamma_{1}} and β0\beta_{0} as described in Steps 10 and 11.

5.4 Parallel Implementation

We parallelize the algorithm by distributing the grids on each level across processors. Each grid carries a perimeter of ghost cells that are filled from neighboring grids at the same level or interpolated from coarser grids as needed. This allows the data on each grid to be updated independently of the other grids. A typical grid is large enough (e.g., 32332^{3} cells) that for explicit operations the cost of computation within each grid greatly exceeds the cost of communication between grids. The linear solves necessary for the MAC projection and approximation nodal projection have higher communication costs, but we still obtain good parallel efficiency for the overall algorithm. A scaling study for MAESTRO can be found in Almgren et al. (2007).

Since the one-dimensional base state arrays are so much smaller than the three-dimensional arrays holding the full solution, each processor owns a copy of the entire one-dimensional base state arrays. Operations such as averaging to define base state quantities require a collection operation among grids, followed by a distribution of the average state to each processor.

6 Test Problems

We have developed a suite of test problems in order to test various aspects of our code.

  • In §6.1, we show that our new mapping procedure from §4 is much more accurate than the mapping procedure from Paper IV.

  • In §6.2, we show that we are able to properly capture the expansion of the base state in a three-dimensional full star simulation due to heating at the center of the star.

  • In §6.3, we show that our multi-level algorithm is second-order accurate in space and time by tracking a hot bubble rising in a white-dwarf environment.

  • In §6.4, we show that an adaptive algorithm in three-dimensional planar geometry can properly track a hot bubble rising in a white-dwarf environment.

  • In §6.5, we demonstrate that a multi-level, two-dimensional planar simulation will properly capture the expansion of the base state due to a heating layer, and also that a multi-level simulation is able to capture the same fine-scale structure as a single-level simulation at the same effective resolution over a short time.

  • In §6.6, we demonstrate that a full-star simulation with AMR can be used to study the dynamics of convection in white dwarfs.

For test problems §6.26.6, we compute flows in which the density spans at least four orders of magnitude. The large drop in density in the upper atmosphere results in high velocities due to conservation of momentum. This region should not affect the dynamics below the surface in the convecting regions of the star. However, because the time step in the low Mach number code is limited by the highest velocity in the computational domain, the efficiency gains of the low Mach number algorithm are reduced if those velocities persist. We employ a sponging technique to damp such velocities. Damping techniques are commonly used in modeling atmospheric convection (see, for example Durran (1990)). In Paper IV, for full-star convection, we explored the effects of sponging the velocity beginning at two different heights to demonstrate that the dynamics in the upper atmosphere do not affect the convecting regions of the star.

Full details for the sponge implementation can be found in papers III and IV, but in summary, we add a forcing term to the velocity update before the final projection. We use the parameters rsp,rmdr_{\rm sp},r_{\rm md}, and κ\kappa to describe the sponge. The sponge forcing turns on at radius rspr_{\rm sp} and reaches half of its peak strength at radius rmdr_{\rm md}. We can control the strength of the forcing with the parameter, κ\kappa. For full-star problems, we also use an outer sponge which prevents the velocities near the domain boundaries from becoming too large.

For all of these tests, we use a publicly available, general stellar equation of state (Fryxell et al., 2000; Timmes & Swesty, 2000), with contributions from ions, radiation, and degenerate/relativistic electrons.

6.1 Mapping

To test the new spherical fill and lateral average routines from §4, we first create a unit cube with 3843384^{3} resolution and no refinement. We create a radial array with Δr=Δx/5\Delta r=\Delta x/5, and initialize the radial array cell centers with the Gaussian profile ϕexact(r)=e10r2\phi_{\rm exact}(r)=e^{-10r^{2}}. We map ϕexact\phi_{\rm exact} to Cartesian cell centers with the fill operation, then compute the lateral average of this Cartesian field, 𝐀𝐯𝐠(ϕ){\bf Avg}(\phi). We repeat this process by choosing the grid with two levels of refinement used in the full-star simulation test in §6.6, shown in Figure 12.

Figure 6 (left) shows the relative error between ϕexact\phi_{\rm exact} and 𝐀𝐯𝐠(ϕ{\bf Avg}(\phi) for the new mapping procedures and the mapping procedures from Paper IV for the single-level test. The new mapping procedure greatly decreases the relative error. Figure 6 (right) is a zoom-in of the relative error for the new mapping. For the single-level grid, the relative error is 𝒪(108)\mathcal{O}(10^{-8}) for r[0,0.036]r\in[0,0.036] and is 𝒪(1013)\mathcal{O}(10^{-13}) for r[0.036,0.7]r\in[0.036,0.7]. For the test with two levels of refinement, the relative error is 𝒪(108)\mathcal{O}(10^{-8}) for r[0,0.7]r\in[0,0.7], which is still a vast improvement when compared to the Paper IV mapping applied to a single-level simulation.

Refer to caption
Figure 6: (Left) Relative error between ϕexact\phi_{\rm exact} and 𝐀𝐯𝐠(ϕ{\bf Avg}(\phi) from averaging a mapped Gaussian profile centered on a unit cube with 3843 resolution and no refinement for the current mapping (solid line) and the mapping from Paper IV (dashed line). The new mapping procedure greatly decreases the relative error. (Right) A zoom-in of the relative error for the new mapping. The red markers correspond to the test with no refinement. The relative error is 𝒪(108)\mathcal{O}(10^{-8}) for r[0,0.036]r\in[0,0.036] and is 𝒪(1013)\mathcal{O}(10^{-13}) for r[0.036,0.7]r\in[0.036,0.7]. The green dots shows the relative error for a test with two levels of refinement using the grid structure shown in Figure 12. The relative error is 𝒪(108)\mathcal{O}(10^{-8}) for r[0,0.7]r\in[0,0.7], which is still a vast improvement when compared to the Paper IV mapping applied to a single-level simulation.

6.2 Spherical Base State

To test the base state expansion for spherical geometry, we perform a series of tests similar to those in Paper II which tested the base state expansion in planar problems. We run the same test using three codes— a one-dimensional version of the compressible code, CASTRO (Almgren et al., 2010), in spherical coordinates; a one-dimensional version of MAESTRO in spherical coordinates, and a full three-dimensional spherical star in MAESTRO.

Our initial model is generated by specifying a core density (2.6×109gcm32.6\times 10^{9}~\mathrm{g~cm^{-3}}), temperature (6×1086\times 10^{8} K), and a uniform composition (X(12C)=0.3X(^{12}\mathrm{C})=0.3, X(16O)=0.7X(^{16}\mathrm{O})=0.7) and integrating the equation of hydrostatic equilibrium outward while constraining the specific entropy, ss, to be constant. In discrete form, we solve:

p0,j+1\displaystyle p_{0,j+1} =\displaystyle= p0,j+12Δr(ρ0,j+ρ0,j+1)gj+1/2.\displaystyle p_{0,j}+\frac{1}{2}\Delta r(\rho_{0,j}+\rho_{0,j+1})g_{j+\mathchoice{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 1}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 1}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\fiverm 1}\kern-1.63885pt/\kern-1.22911pt\lower 0.75346pt\hbox{\fiverm 2}}{1\!/2}}. (22)
s0,j+1\displaystyle s_{0,j+1} =\displaystyle= s0,j\displaystyle s_{0,j} (23)

We begin with a guess of ρ0,j+1\rho_{0,j+1} and T0,j+1T_{0,j+1} and use the equation of state and Newton-Raphson iterations to find the values that satisfy our system. Since this is a spherical, self-gravitating star, the gravitation acceleration, gj+1/2g_{j+\mathchoice{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 1}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 1}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\fiverm 1}\kern-1.63885pt/\kern-1.22911pt\lower 0.75346pt\hbox{\fiverm 2}}{1\!/2}}, is updated each iteration based on the current value of the density. Once the temperature falls below 10710^{7} K, we keep the temperature constant, and continue determining the density via hydrostatic equilibrium. This uniquely determines the initial model.

For the one-dimensional simulations, we map the inner 5×1085\times 10^{8} cm of the model onto a one-dimensional array with 1280 elements with Δr=3.90625×105\Delta r=3.90625\times 10^{5} cm. For the full-star three-dimensional simulation, we map the model onto a 5×1085\times 10^{8} cm3 domain with 2563 Cartesian grid cells with Δx=5Δr=19.53125×105\Delta x=5\Delta r=19.53125\times 10^{5} cm. For the one and three-dimensional MAESTRO calculations, we use cutoff densities (see Appendix A.5) of ρcutoff=105gcm3\rho_{\rm cutoff}=10^{5}~\mathrm{g~cm^{-3}} and ρanelastic=106gcm3\rho_{\rm anelastic}=10^{6}~\mathrm{g~cm^{-3}}, corresponding to radii of approximately 1.8×1081.8\times 10^{8} cm and 1.9×1081.9\times 10^{8} cm, so the star easily fits within the computational domain for each problem. For the full-star three-dimensional simulation, we use an inner sponge with rspr_{\rm sp} equal to the radius where ρ0=107gcm3\rho_{0}=10^{7}~\mathrm{g~cm^{-3}}, rmdr_{\rm md} equal to the radius where ρ0=3×106gcm3\rho_{0}=3\times 10^{6}~\mathrm{g~cm^{-3}}, and κ=10\kappa=10 s-1. We use the same outer sponge as in Paper IV. All boundary conditions are outflow, except for the center of the one-dimensional simulations, which uses a symmetry boundary condition. We run each simulation using a CFL number of 0.5.

We heat the center of the star for 0.5 seconds and look at the solution at 2.0 seconds (after the compressible solution has had time to re-equilibrate). We use Hext=H0e(r/107cm)2H_{\rm ext}=H_{0}e^{-(r/10^{7}~\mathrm{cm})^{2}}, with H0=1016ergg1s1H_{0}=10^{16}~\mathrm{erg~g^{-1}~s^{-1}} chosen to be much larger than the nuclear energy generation rate during the convective phase of SN Ia, in order to see a measurable effect over a few seconds. A comparison of ρ0,p0\rho_{0},p_{0}, and T¯\overline{T} at t=0t=0 and t=2t=2 s for each code is shown in Figure 7. There is excellent agreement between each of the simulations.

Refer to caption
Refer to caption
Refer to caption
Refer to caption
Refer to caption
Refer to caption
Figure 7: Plots of ρ0\rho_{0} (Top), p0p_{0} (Middle), and T¯\overline{T} (Bottom) vs. radius for a white dwarf star subject to heating. The initial profiles are on the left. Close-up views of the initial profiles and final solutions are on the right. We use three test codes: a one-dimensional version of MAESTRO in spherical coordinates, a one-dimensional version of the compressible code, CASTRO, in spherical coordinates, and a full-star three-dimensional version of MAESTRO.

6.3 Convergence Test

In Paper III, we demonstrated that our single-level algorithm is second-order in space and time by tracking a hot bubble rising in a white-dwarf environment using two-dimensional planar geometry. Here, we perform the same test to show that our algorithm, with a level of refinement, is second-order in space and time.

We choose a domain size of 7.2×1077.2\times 10^{7} cm by 2.88×1082.88\times 10^{8} cm and generate a high resolution initial model with Δr=7.03125×104\Delta r=7.03125\times 10^{4} cm (which is equal to Δx\Delta x for our highest resolution, “exact” solution) using the method described in Appendix C with rbase=0r_{\mathrm{base}}=0. For each of the remaining, lower resolution simulations for this test, we generate an initial model using Δr\Delta r equal to the effective Δx\Delta x of each simulation by linearly interpolating values from the high resolution model. Next, we add a temperature perturbation of the form:

Tij=T0,j+0.3[1+tanh(2dijσ)],T_{ij}=T_{0,j}+0.3\left[1+\tanh\left(2-\frac{d_{ij}}{\sigma}\right)\right], (24)

where σ=2.5×106\sigma=2.5\times 10^{6}~cm and dijd_{ij} is the physical distance between the cell center corresponding to cell (i,j)(i,j) and the location (3.6×107(3.6\times 10^{7}~cm,3.2×107,3.2\times 10^{7}~cm). Then, we call the equation of state to compute a consistent ρ,h=ρ,h(p0,T,Xk)\rho,h=\rho,h(p_{0},T,X_{k}) everywhere. We use the reaction network described in § 4.2 in Paper III. We use cutoff densities of ρcutoff=ρanelastic=3×106gcm3\rho_{\rm cutoff}=\rho_{\rm anelastic}=3\times 10^{6}~\mathrm{g~cm^{-3}}, and a sponge with rspr_{\rm sp} equal to the radius where ρ0=10ρcutoff\rho_{0}=10\rho_{\rm cutoff}, rmdr_{\rm md} equal to the radius where ρ0=ρcutoff\rho_{0}=\rho_{\rm cutoff}, and κ=10\kappa=10 s-1. We specify periodic boundary conditions on the side walls, outflow at the top, and a solid wall at the bottom of the domain.

Since we do not have an exact analytical solution, we consider a single-level simulation run with 1024×40961024\times 4096 cells and Δt=3.125×103\Delta t=3.125\times 10^{-3} s to be the exact solution. We perform three single-level simulations using resolutions of 64×256,128×51264\times 256,128\times 512, and 256×1024256\times 1024 grid cells using fixed time steps of Δt=0.05\Delta t=0.05 s, 0.0250.025 s, and 0.01250.0125 s, respectively. We also perform two simulations with a single level of refinement with effective resolutions of 128×512128\times 512 and 256×1024256\times 1024 grid cells with fixed time steps of Δt=0.025\Delta t=0.025 s and 0.01250.0125 s, respectively. These fixed time steps correspond to a CFL of 0.9. We refine all cells in the range r[1.8×107,5.4×107]r\in[1.8\times 10^{7},5.4\times 10^{7}] cm, so effectively we have refined 1/8th of the domain, making sure the hot spot is contained within the refined region. We run each simulation to t=1t=1 s. For this test, whenever we call Enforce HSE to compute p0p_{0} from ρ0\rho_{0}, we use r=1.8×107r=1.8\times 10^{7} cm as the starting point for integration rather than the location of the cutoff density to ensure that numerical errors due to integrating the equation of hydrostatic equilibrium across simulations with different resolutions are minimized.

In order to compute the L1L_{1} error norm for each simulation, we average the data from the exact solution onto a grid with corresponding resolution. We measure the L1L_{1} error norm in the physical space corresponding to the refined region using

L1=1ncelli,j|ϕijϕij,exact|,L_{1}=\frac{1}{n_{\rm cell}}\sum_{i,j}|\phi_{ij}-\phi_{ij,{\rm exact}}|, (25)

where ncelln_{\rm cell} is the number of cells we sum over. This form of the L1L_{1} error norm gives us the average error per cell. We compute the convergence rate, pp, between a coarser and finer simulation using

p=log2(L1,coarserL1,finer).p=\log_{2}\left(\frac{L_{1,{\rm coarser}}}{L_{1,{\rm finer}}}\right). (26)

Tables 1 and 2 show the L1L_{1} error norms and convergence rates for the single-level and multi-level solutions, respectively. The convergence rates correspond to the two columns on either side of the reported value. We note second order convergence in each variable. Additionally, the magnitude of the L1L_{1} error norms for the multi-level simulations is comparable to the corresponding resolution error norms for the single-level simulations. This means that the multi-level simulations are accurately capturing the finer-scale features, as compared to the single-level simulations, i.e., the presence of coarse grid data and/or coarse-fine interfaces is not harming the solution in the refined region.

Table 1: L1L_{1} error norms and convergence rates for the single-level simulations.
64×25664\times 256 Error Rate, pp 128×512128\times 512 Error Rate, pp 256×1024256\times 1024 Error
ρ\rho 2.23×1042.23\times 10^{4} 2.02 5.51×1035.51\times 10^{3} 2.30 1.12×1031.12\times 10^{3}
uu 1.40×1041.40\times 10^{4} 2.02 3.44×1033.44\times 10^{3} 2.13 7.90×1027.90\times 10^{2}
vv 1.82×1041.82\times 10^{4} 2.03 4.45×1034.45\times 10^{3} 2.24 9.40×1029.40\times 10^{2}
hh 3.14×10133.14\times 10^{13} 1.97 8.03×10128.03\times 10^{12} 2.09 1.89×10121.89\times 10^{12}
X(24Mg)X(^{24}\mathrm{Mg}) 5.06×1095.06\times 10^{-9} 2.14 1.15×1091.15\times 10^{-9} 2.01 2.86×10102.86\times 10^{-10}
TT 1.38×1061.38\times 10^{6} 1.94 3.59×1053.59\times 10^{5} 2.04 8.72×1048.72\times 10^{4}
Table 2: L1L_{1} error norms and convergence rates for the multi-level simulations.
128×512128\times 512 Error Rate, pp 256×1024256\times 1024 Error
ρ\rho 5.83×1035.83\times 10^{3} 2.25 1.23×1031.23\times 10^{3}
uu 4.30×1034.30\times 10^{3} 2.09 1.01×1031.01\times 10^{3}
vv 4.99×1034.99\times 10^{3} 2.20 1.09×1031.09\times 10^{3}
hh 8.20×10128.20\times 10^{12} 2.08 1.94×10121.94\times 10^{12}
X(24Mg)X(^{24}\mathrm{Mg}) 1.15×1091.15\times 10^{-9} 2.01 2.86×10102.86\times 10^{-10}
TT 3.66×1053.66\times 10^{5} 2.04 8.03×1048.03\times 10^{4}

6.4 Adaptive Bubble Rise

To test the ability for an adaptive, three-dimensional planar simulation to track a localized feature, we examine a hot bubble rising in a white-dwarf environment. The problem setup is exactly the same as in §6.3, except that we now compute in three dimensions and allow the grid structure to change with time. We choose a domain size of 7.2×1077.2\times 10^{7} cm by 7.2×1077.2\times 10^{7} cm 2.88×1082.88\times 10^{8} cm and for each simulation, we generate an initial model with Δr=5.625×105\Delta r=5.625\times 10^{5} cm (which is equal to the effective Δx\Delta x for both of the simulations in this test) using the method described in Appendix C with rbase=0r_{\mathrm{base}}=0. We add a temperature perturbation of the form given in equation (24), but in three dimensions with the hot spot centered at location (3.6×107(3.6\times 10^{7}~cm,3.6×107,3.6\times 10^{7}~cm,3.2×107,3.2\times 10^{7}~cm). We will show that the adaptive simulation captures the same dynamics as the single-level simulation in a more computationally efficient manner.

We compute a single-level simulation with 128×128×512128\times 128\times 512 grid cells, and an adaptive simulation with two levels of refinement at the same effective resolution. For each cell, if the TT¯>3×107T-\overline{T}>3\times 10^{7} K, we tag all cells at that height to ensure they are computed at the finest refinement level. We run each simulation to t=2.5t=2.5 s using a CFL number of 0.9.

Figure 8 shows the initial profile of TT¯T-\overline{T} and the initial grid structure of the multi-level run. The single-level simulation has 8,388,608 grid cells and takes approximately 32 seconds per time step. The adaptive simulation initially has 131,072 grid cells at the coarsest level, 114,688 cells at the first level of refinement, and 688,128 cells at the finest level of refinement (the number of grid cells at the finer levels changes slightly with time as the grid structure changes to track the bubble) and takes approximately 12 seconds per time step, for a factor of 2.7 speedup. Both computations were performed using 32 processors on the Franklin XT4 machine at NERSC. Figure 9 shows a series of planar slices of the simulations at 0.5 second intervals in order to show that the adaptive simulation captures the same dynamics as the single-level simulation. The vertical distance shown is from z=0z=0 to 9.2×1079.2\times 10^{7} cm.

Refer to caption
Refer to caption
Figure 8: Profile of TT¯T-\overline{T} for a hot bubble in a white dwarf environment. The black and red lines represent grids of increasing refinement. The vertical distance shown is from z=0z=0 to 9.2×1079.2\times 10^{7} cm.
Refer to caption
Refer to caption
Refer to caption
Refer to caption
Refer to caption
Refer to caption
Refer to caption
Refer to caption
Refer to caption
Refer to caption
Refer to caption
Refer to caption
Figure 9: Time-lapse cross section of Figure 8 at t=0,0.5,1.0,1.5,2.0t=0,0.5,1.0,1.5,2.0, and 2.52.5 s for a single-level simulation (above) an adaptive simulation with two levels of refinement at the same effective resolution (below).

6.5 Forced Convection

To test the expansion of the base state in a multi-level, two-dimensional planar simulation, we simulate a white-dwarf environment with an external heating layer. We also show that the multi-level simulation captures the same fine-scale structure as a single-level simulation at the same effective resolution for a short time. We performed a similar test in Paper III, but without refinement.

We choose a domain size of 2.5×1082.5\times 10^{8} cm by 4×1084\times 10^{8} cm and for each simulation, we generate an initial model with Δr\Delta r equal to the effective Δx\Delta x for that simulation using the method described in Appendix C with rbase=5×107r_{\mathrm{base}}=5\times 10^{7} cm. The low entropy layer beneath our model atmosphere prevents the convective flow from reaching our lower boundary.

We apply an external heating layer of the form

Hext,ij=H0e(rjrlayer)2[1+m=13bmsin(kmπxiLx+Ψm)]H_{{\rm ext},ij}=H_{0}e^{(r_{j}-r_{\rm layer})^{2}}\left[1+\sum_{m=1}^{3}b_{m}\sin\left(\frac{k_{m}\pi x_{i}}{L_{x}}+\Psi_{m}\right)\right] (27)

with rlayer=1.25×108r_{\rm layer}=1.25\times 10^{8} cm, H0=2.5×1016H_{0}=2.5\times 10^{16} erg g-1 s-1, Lx=2.5×108L_{x}=2.5\times 10^{8} cm, and rjr_{j} and xix_{i} being the radial and horizontal physical coordinates of cell (i,j)(i,j). The perturbation parameters are b=(0.00625,0.01875,0.0125),k=(2,6,8)b=(0.00625,0.01875,0.0125),k=(2,6,8), and Ψ=(0,π/3,π/5)\Psi=(0,\pi/3,\pi/5). We disable reactions for this test, since the heating layer was chosen to expand the base state over a very short time period, rather than accurately model reactions.

We use cutoff densities of ρcutoff=ρanelastic=3×106gcm3\rho_{\rm cutoff}=\rho_{\rm anelastic}=3\times 10^{6}~\mathrm{g~cm^{-3}} and a sponge with rspr_{\rm sp} equal to the radius where ρ0=108gcm3\rho_{0}=10^{8}~\mathrm{g~cm^{-3}}, rmdr_{\rm md} equal to the radius where ρ0=ρcutoff\rho_{0}=\rho_{\rm cutoff}, and κ=100\kappa=100 s-1. We specify periodic boundary conditions on the side walls, outflow at the top, and a solid wall at the bottom of the domain.

In this test, we use a CFL number of 0.9. We perform two single-level simulations using 80×12880\times 128 and 320×512320\times 512 cells, and a simulation with two levels of refinement and an effective resolution of 320×512320\times 512 cells. For the multi-level simulation, we fix the refined grids, ensuring that r[9.375×107,1.5626×108]r\in[9.375\times 10^{7},1.5626\times 10^{8}] cm (which contains the external heating layer) is at the finest level of refinement. We run each simulation to t=30t=30 s.

Figure 10 shows ρ0,p0\rho_{0},p_{0}, and T¯\overline{T} after 30 seconds of convection for the single-level fine grid simulation and the multi-level simulation. There is an excellent agreement between these two simulations, except in the temperature profiles at the top of the domain. However, this corresponds to a region with density below the cutoff densities where the temperature is extremely sensitive to small density perturbations, and furthermore, is not fully refined in this test, so this is an acceptable difference. Both simulations were performed using 4 processors; the single-level fine grid run required approximately 1.9 seconds per time step and the multi-level run required approximately 0.6 seconds per time step, for a factor of 3 speedup.

Refer to caption
Refer to caption
Refer to caption
Figure 10: Comparison between ρ0\rho_{0} (Top), p0p_{0} (Middle), and T¯\overline{T} (Bottom) at t=0t=0, and t=30t=30 s in a white dwarf environment with a heating layer for the single-level fine grid and multi-level simulations. The multi-level simulation captures the same expansion of the base state as the single-level simulation.

Figure 11 shows the temperature profile after 3 and 4 seconds for each of the three simulations. The vertical distance shown is from z=5×107z=5\times 10^{7} cm to 2.2×1082.2\times 10^{8} cm. At t=3t=3 s, the multi-level simulation is able to capture the finer-scale structure visible in the single-level fine grid simulation, which is not captured in the single-level coarse grid simulation. At t=4t=4 s, a finer-scale structure is still visible in the multi-level simulation, but the solution begins to drift from the single-level fine grid simulation, which is expected since we are deliberately refining only a part of the convective region.

Refer to caption
Refer to caption
Refer to caption
Refer to caption
Refer to caption
Refer to caption
Refer to caption
Figure 11: Temperature plots at t=3t=3 s (above) and t=4t=4 s (below) of a white dwarf environment with a heating layer. The single-level coarse grid solution is on the left, the multi-level solution is in the center, and the single-level fine grid solution as on the right. The colored boxes indicate the grid structure at each level of refinement. The vertical distance shown is from z=5×107z=5\times 10^{7} cm to 2.2×1082.2\times 10^{8} cm. At t=3t=3 s, the multi-level simulation is able to capture the finer-scale structure visible in the single-level fine grid simulation, which is not captured as well in the single-level coarse grid simulation. At t=4t=4 s, a finer-scale structure is still visible in the multi-level simulation, but the solution begins to drift from the single-level fine grid simulation, which is expected since we are deliberately refining only a part of the convective region.

6.6 Full-Star AMR

We now compute three-dimensional, full-star calculations of convection in a white dwarf. This problem models the convection and energetics of a white dwarf that is a few hours from reaching ignition. We performed similar simulations using an earlier version of the algorithm in Paper IV.

We begin with the one-dimensional white dwarf model described in §2.4 in Paper IV. We map this one-dimensional model into the center of a computational domain of 5×1085\times 10^{8} cm on a side. The first simulation is a single-level simulation with 3843 cells. The second simulation is adaptive with two levels of refinement and an effective resolution of 3843 cells. We use the reaction network strategy from Chamulak et al. (2008) to compute the energetics from the carbon burning. This modified network differs from the one used in paper IV in the ash composition (we now burn to an ash with A=18A=18 and Z=8.8Z=8.8) and the energy release (we use a quadratic fit to the qq-values tabulated on page 164 of Chamulak et al. 2008). Finally instead of destroying two carbon nuclei for each reaction, we use the M12M_{12} value of 2.93 describe in that paper. We initialize the simulation with a velocity perturbation described exactly as in §2.4 in Paper IV. We use the same cutoff densities, sponge parameters, and boundary conditions as in §6.2.

Figure 12 shows the initial grid structure of the adaptive simulation. Based on our work in Paper IV, we choose to fully refine all cells where ρ>108gcm3\rho>10^{8}~\mathrm{g~cm^{-3}}, since at early times, the dynamics of the star are driven by the reactions and convection in this inner region. We wish to examine whether the adaptive simulation can give the same result as the single-level simulation, and the computational efficiency of each simulation.

Refer to caption
Figure 12: Initial grid structure for a full white dwarf star simulation with 2 levels of refinement. The colored boxes indicated the grid structure at each level of refinement, each grid containing up to 323 cells. The finest grids have effective resolution of 3843. The shaded sphere indicates where the density is 10g5cm3{}^{5}~\mathrm{g~cm^{-3}} or greater. In this simulation, we have chosen to include all points where ρ>105gcm3\rho>10^{5}~\mathrm{g~cm^{-3}} at the first level of refinement and all points were where ρ>108gcm3\rho>10^{8}~\mathrm{g~cm^{-3}} at the second level of refinement. There are 216 black grids at the coarse level, 125 red grids at the next level, and 212 blue grids at the finest level.

We use a CFL number of 0.7 and compute to t=900t=900 s. We choose two diagnostics used in Paper IV to compare the simulations. Peak temperature is a useful diagnostic since the reaction rates are extremely sensitive to temperature, and thus peak temperature serves as a good guide for observing the progression toward ignition. Peak radial velocity is another useful diagnostic as it is a simple measure of the strength of the convection within the star. Since the solution of our equation is highly non-linear, and the reaction rates scale with temperature as T23\sim T^{23} (Woosley et al., 2004), we expect that errors from the coarse grid will perturb the solution at the finest level, eventually causing significant differences in the exact flow field. However, as shown in Paper IV, when we run our simulation to the point of ignition, we require upwards of hundreds of thousands of time steps. Therefore, in the comparison diagnostics in this test, it is sufficient to compare the overall qualitative solution. An exact quantitative comparison is impossible over long times.

Figure 13 shows the evolution of the peak temperature and peak radial velocity over the first 900 s for both simulations. The adaptive simulation gives the same qualitative result as the single-level simulation. As mentioned before, the curves do not match up more closely because the equations are highly non-linear, and slight differences in the solution caused by solver tolerance and discretization error change details of the results, but not the overall qualitative results. The single-level simulation has 56,623,760 grid cells and takes approximately 36 seconds per time step. The adaptive simulation initially has 884,736 grid cells at the coarsest level, 3,511,808 cells at the first level of refinement, and 4,282,048 cells at the finest level of refinement (the number of grid cells at the finer levels changes slightly with time) and takes approximately 18 seconds per time step, for a factor of 2 speedup. Also note that the overall memory requirements are significantly less for the adaptive simulation, as can be seen by the reduced total cell count. Each simulation was run using the Franklin XT4 machine at NERSC with 216 processors.

Refer to caption
Figure 13: Peak temperature (Top) and peak radial velocity (Bottom) as a function of time for a single-level and adaptive simulation, each with an effective 3843 resolution.

We note that in the future, when we perform longer calculations up to the point of ignition, we may have to refine a greater portion of the star in order to properly capture the overall dynamics as the convective region expands. In a forthcoming paper, we plan on performing higher resolution studies, where AMR will save us both time and computational resources.

7 Conclusions and Future Work

We have developed a low Mach number hydrodynamics algorithm suitable for full star flows and local atmospheric regions with a time-evolving base state within an AMR framework. In forthcoming papers, we will use MAESTRO to further our scientific investigation of the convective phase of SNe Ia. Our previous simulations in Paper IV were at modest resolution and assumed a constant base state. We are now performing simulations at higher effective resolutions with the use of AMR along with a time-varying base state. As part of this study, we are examining the tagging conditions necessary to model a full-star up to the point of ignition. We are also studying Type I X-ray bursts (Strohmayer & Bildsten, 2006; Lin et al., 2006), which are believed to be caused by the thermonuclear explosive burning of hydrogen and/or helium gas accreted into a thin shell on the surface of neutron stars. We pose this problem in planar geometry, model a small patch of the star, and refine near the base of the accreted layer.

We thank Frank Timmes for making his equation of state routines publicly available, and for useful discussions regarding thermodynamics. The work at LBNL was supported by the SciDAC Program of the DOE Office of Mathematics, Information, and Computational Sciences under the U.S. Department of Energy under contract No. DE-AC02-05CH11231. The work at Stony Brook was supported by a DOE/Office of Nuclear Physics Outstanding Junior Investigator award, grant No. DE-FG02-06ER41448, to Stony Brook. This research used resources of the National Energy Research Scientific Computing Center (NERSC), which is supported by the Office of Science of the U.S. Department of Energy under Contract No. DE-AC02-05CH11231.

Appendix A Time Advancement Algorithm

A.1 Single-Level Algorithm Changes From Papers III and IV

The single-level algorithm has gone through numerous changes since Papers III and IV. The current single-level algorithm is presented in §A.2A.5; we summarize here the changes since Papers III and IV:

  • We have extended the base state evolution to spherical problems by defining Advect Base Density SphericalA.3.2), Advect Base Enthalpy SphericalA.3.4), and Compute 𝒘𝟎w_{0} SphericalA.3.5). We have also defined spherical discretizations for ψ\psi and ηρ\eta_{\rho} (Steps 4C, 4F, 8C and 8F in §A.4).

  • For spherical problems, we have improved the accuracy of the mapping of data between the one-dimensional radial array and the three-dimensional Cartesian grid (§4).

  • We have upgraded our unsplit piecewise-linear Godunov method for time-centered edge state prediction for the base state and Cartesian grid data to use the unsplit piecewise-parabolic method (PPM) (Colella & Woodward, 1984) with full corner coupling in three dimensions (Miller & Colella, 2002; Saltzman, 1994). We shall refer to this procedure as “computing the time-centered edge states” (§A.3.2, §A.3.4, and Steps 3, 4, 7, 8, and 11 in §A.4).

  • As introduced in Paper IV, we update TT after the call to React StateA.3.1).

  • Rather than evolve p0p_{0} using an evolution equation, we simply update p0p_{0} using the hydrostatic equilibrium equation (§A.3.3). These two methods are analytically equivalent, but in our experience, the numerical drift associated with evolving p0p_{0} using an evolution equation causes the entire solution to drift from thermodynamic equilibrium over time.

  • As explained in §2, in the advection step, we predict (ρh)(\rho h)^{\prime} to edges instead of TT (Steps 4Hi and 8Hi in §A.4). Thus, a base state enthalpy, (ρh)0(\rho h)_{0} is required in order to construct the enthalpy fluxes for the conservative update. Unlike ρ0\rho_{0}, we do not need to carry the complete evolution of (ρh)0(\rho h)_{0}. In practice, we set (ρh)0(\rho h)_{0} equal to the lateral average of the full state enthalpy after the first call to React State, i.e., (ρh)0n=(ρh)(1)¯(\rho h)_{0}^{n}=\overline{(\rho h)^{(1)}}. We then advect (ρh)0(\rho h)_{0} without reactions or heating to mirror the treatment of (ρh)(\rho h) in the advection step (Steps 4G and 8G in §A.4).

  • In the advection step, rather than simultaneously updating each of the base state quantities, followed by an update of all the full state quantities, we have interwoven these updates in order to obtain better accuracy. In order: we advect ρ0\rho_{0}, advect ρ\rho, correct ρ0\rho_{0}, advance p0p_{0}, advect (ρh)0(\rho h)_{0}, and advect (ρh)(\rho h) (Steps 4 and 8 in §A.4). This enables us to use a time-centered ψ\psi rather than a time-lagged ψ\psi for the enthalpy update.

  • Rather than compute ηρ\nabla\cdot\eta_{\rho} and use it to adjust ρ0\rho_{0} to account for convecting overturning, as was done in Correct Base in Paper III, we simply use the lateral average operator to enforce ρ0=ρ¯\rho_{0}=\overline{\rho}, which is simpler and analytically equivalent (Steps 4D and 8D in §A.4). We use the improved averaging procedure described in §4.1, which greatly improves the accuracy of this mapping for spherical problems.

  • We have moved the first reaction step (formerly Step 3 in §A.4) to occur before Steps 1 and 2 in §A.4. This is a non-functional change; it was only made so that Steps 2-5 mirror Steps 6-9 in the overall predictor-corrector scheme.

  • For planar problems, we evolve the enthalpy for the sole purpose of updating the temperature, which is subsequently fed into the reaction network and used in computing thermodynamic derivatives. For spherical problems, as described in Paper IV, we instead define TT from ρ\rho,p0p_{0}, and XkX_{k}. This completely decouples the enthalpy from the rest of the solution. Our experience has shown that, with spherical geometry, the discretization errors are minimized by using the hydrostatic, radial base state pressure to define temperature. We still evolve the enthalpy, but we use it as a diagnostic to examine to what extent our numerical method keeps the solution in thermodynamic equilibrium.

A.2 Gravity

For planar problems, we treat gravity as constant in space and time. For spherical problems, gravity is computed directly from ρ0\rho_{0} in the following manner. First, we define the enclosed mass at radial edges and cell centers:

mencl,j1/2=k=1j43π(rk1/23rk3/23)ρ0,k1;mencl,j=mencl,j1/2+43π(rj3rj1/23)ρ0,j.m_{{\rm encl},j-\mathchoice{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 1}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 1}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\fiverm 1}\kern-1.63885pt/\kern-1.22911pt\lower 0.75346pt\hbox{\fiverm 2}}{1\!/2}}=\sum_{k=1}^{j}\frac{4}{3}\pi\left(r_{k-\mathchoice{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 1}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 1}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\fiverm 1}\kern-1.63885pt/\kern-1.22911pt\lower 0.75346pt\hbox{\fiverm 2}}{1\!/2}}^{3}-r_{k-\mathchoice{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 3}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 3}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\fiverm 3}\kern-1.63885pt/\kern-1.22911pt\lower 0.75346pt\hbox{\fiverm 2}}{3\!/2}}^{3}\right)\rho_{0,k-1};\quad m_{{\rm encl},j}=m_{{\rm encl},j-\mathchoice{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 1}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 1}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\fiverm 1}\kern-1.63885pt/\kern-1.22911pt\lower 0.75346pt\hbox{\fiverm 2}}{1\!/2}}+\frac{4}{3}\pi\left(r_{j}^{3}-r_{j-\mathchoice{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 1}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 1}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\fiverm 1}\kern-1.63885pt/\kern-1.22911pt\lower 0.75346pt\hbox{\fiverm 2}}{1\!/2}}^{3}\right)\rho_{0,j}. (A1)

In practice, we compute (rk1/23rk3/23)(r_{k-\mathchoice{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 1}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 1}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\fiverm 1}\kern-1.63885pt/\kern-1.22911pt\lower 0.75346pt\hbox{\fiverm 2}}{1\!/2}}^{3}-r_{k-\mathchoice{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 3}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 3}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\fiverm 3}\kern-1.63885pt/\kern-1.22911pt\lower 0.75346pt\hbox{\fiverm 2}}{3\!/2}}^{3}) as Δr(rk1/22+rk1/2rk3/2+rk3/22)\Delta r(r^{2}_{k-\mathchoice{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 1}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 1}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\fiverm 1}\kern-1.63885pt/\kern-1.22911pt\lower 0.75346pt\hbox{\fiverm 2}}{1\!/2}}+r_{k-\mathchoice{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 1}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 1}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\fiverm 1}\kern-1.63885pt/\kern-1.22911pt\lower 0.75346pt\hbox{\fiverm 2}}{1\!/2}}r_{k-\mathchoice{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 3}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 3}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\fiverm 3}\kern-1.63885pt/\kern-1.22911pt\lower 0.75346pt\hbox{\fiverm 2}}{3\!/2}}+r^{2}_{k-\mathchoice{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 3}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 3}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\fiverm 3}\kern-1.63885pt/\kern-1.22911pt\lower 0.75346pt\hbox{\fiverm 2}}{3\!/2}}), in order to minimize roundoff error at large radii and use a similar formula for the radial difference term in the equation for mencl,jm_{{\rm encl},j}. Next, we define the gravity at both radial edges and cell centers:

gj1/2=Gmencl,j1/2rj1/22;gj=Gmencl,jrj2.g_{j-\mathchoice{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 1}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 1}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\fiverm 1}\kern-1.63885pt/\kern-1.22911pt\lower 0.75346pt\hbox{\fiverm 2}}{1\!/2}}=\frac{Gm_{{\rm encl},j-\mathchoice{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 1}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 1}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\fiverm 1}\kern-1.63885pt/\kern-1.22911pt\lower 0.75346pt\hbox{\fiverm 2}}{1\!/2}}}{r_{j-\mathchoice{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 1}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 1}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\fiverm 1}\kern-1.63885pt/\kern-1.22911pt\lower 0.75346pt\hbox{\fiverm 2}}{1\!/2}}^{2}};\qquad g_{j}=\frac{Gm_{{\rm encl},j}}{r_{j}^{2}}. (A2)

We indicate which base state density is used to compute gravity by using a shorthand notation with superscripts on gg, e.g., gng(ρ0n)g^{n}\equiv g(\rho_{0}^{n}).

A.3 Main Algorithm Notation

We make use of the following shorthand notations in outlining the algorithm:

A.3.1 Reactions

React State[ρin,(ρh)in,Xkin,Tin,(ρHext)in,p0in][ρout,(ρh)out,Xkout,Tout,(ρω˙k)out,(ρHnuc)out][\rho^{\mathrm{in}},(\rho h)^{\mathrm{in}},X_{k}^{\mathrm{in}},T^{\mathrm{in}},(\rho H_{\rm ext})^{\mathrm{in}},p_{0}^{\mathrm{in}}]\rightarrow[\rho^{\mathrm{out}},(\rho h)^{\mathrm{out}},X_{k}^{\mathrm{out}},T^{\mathrm{out}},(\rho\dot{\omega}_{k})^{\mathrm{out}},(\rho H_{\rm nuc})^{\mathrm{out}}] evolves the species and enthalpy due to reactions through Δt/2\Delta t/2 according to:

dXkdt=ω˙k(ρ,Xk,T);dTdt=1cp(kξkω˙k+Hnuc).\frac{dX_{k}}{dt}=\dot{\omega}_{k}(\rho,X_{k},T);\qquad\frac{dT}{dt}=\frac{1}{c_{p}}\left(-\sum_{k}\xi_{k}\dot{\omega}_{k}+H_{\rm nuc}\right). (A3)

Full details of the solution procedure can be found in Paper III. We then define:

(ρω˙k)out\displaystyle(\rho\dot{\omega}_{k})^{\mathrm{out}} =\displaystyle= ρout(XkoutXkin)Δt/2,\displaystyle\frac{\rho^{\mathrm{out}}(X_{k}^{\mathrm{out}}-X_{k}^{\mathrm{in}})}{\Delta t/2}, (A4)
(ρh)out\displaystyle(\rho h)^{\mathrm{out}} =\displaystyle= (ρh)in+Δt2(ρHnuc)out+Δt2(ρHext)in.\displaystyle(\rho h)^{\mathrm{in}}+\frac{\Delta t}{2}(\rho H_{\rm nuc})^{\mathrm{out}}+\frac{\Delta t}{2}(\rho H_{\rm ext})^{\mathrm{in}}. (A5)

where the enthalpy update includes external heat sources (ρHext)in(\rho H_{\rm ext})^{\mathrm{in}}. As introduced in Paper IV, we update the temperature using Tout=T(ρout,hout,Xkout)T^{\mathrm{out}}=T(\rho^{\mathrm{out}},h^{\mathrm{out}},X_{k}^{\mathrm{out}}) for planar geometry or Tout=T(ρout,p0in,Xkout)T^{\mathrm{out}}=T(\rho^{\mathrm{out}},p_{0}^{\mathrm{in}},X_{k}^{\mathrm{out}}) for spherical geometry. Note that the density remains unchanged within React State, i.e., ρout=ρin\rho^{\mathrm{out}}=\rho^{\mathrm{in}}.

A.3.2 ρ0\rho_{0} Advection

Advect Base Density[ρ0in,w0in][ρ0out,ρ0out,n+1/2][\rho_{0}^{\mathrm{in}},w_{0}^{\mathrm{in}}]\rightarrow[\rho_{0}^{\mathrm{out}},\rho_{0}^{\mathrm{out},{n+\mathchoice{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 1}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 1}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\fiverm 1}\kern-1.63885pt/\kern-1.22911pt\lower 0.75346pt\hbox{\fiverm 2}}{1\!/2}}}] is the process by which we update the base state density through Δt\Delta t in time. We keep the time-centered edge states, ρ0out,n+1/2\rho_{0}^{\mathrm{out},{n+\mathchoice{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 1}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 1}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\fiverm 1}\kern-1.63885pt/\kern-1.22911pt\lower 0.75346pt\hbox{\fiverm 2}}{1\!/2}}}, since they are used later in discretization of ηρ\eta_{\rho} for planar problems.

planar:

We discretize equation (14) to compute the new base state density,

ρ0,jout=ρ0,jinΔtΔr[(ρ0out,n+1/2w0in)j+1/2(ρ0out,n+1/2w0in)j1/2].\rho_{0,j}^{\mathrm{out}}=\rho_{0,j}^{\mathrm{in}}-\frac{\Delta t}{\Delta r}\left[\left(\rho_{0}^{\mathrm{out},{n+\mathchoice{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 1}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 1}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\fiverm 1}\kern-1.63885pt/\kern-1.22911pt\lower 0.75346pt\hbox{\fiverm 2}}{1\!/2}}}w_{0}^{\mathrm{in}}\right)_{j+\mathchoice{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 1}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 1}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\fiverm 1}\kern-1.63885pt/\kern-1.22911pt\lower 0.75346pt\hbox{\fiverm 2}}{1\!/2}}-\left(\rho_{0}^{\mathrm{out},{n+\mathchoice{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 1}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 1}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\fiverm 1}\kern-1.63885pt/\kern-1.22911pt\lower 0.75346pt\hbox{\fiverm 2}}{1\!/2}}}w_{0}^{\mathrm{in}}\right)_{j-\mathchoice{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 1}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 1}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\fiverm 1}\kern-1.63885pt/\kern-1.22911pt\lower 0.75346pt\hbox{\fiverm 2}}{1\!/2}}\right]. (A6)

We compute the time-centered edge states, ρ0out,n+1/2\rho_{0}^{\mathrm{out},{n+\mathchoice{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 1}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 1}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\fiverm 1}\kern-1.63885pt/\kern-1.22911pt\lower 0.75346pt\hbox{\fiverm 2}}{1\!/2}}}, by discretizing an expanded form of equation (14):

ρ0t+w0ρ0r=ρ0w0r,\frac{\partial\rho_{0}}{\partial t}+w_{0}\frac{\partial\rho_{0}}{\partial r}=-\rho_{0}\frac{\partial w_{0}}{\partial r}, (A7)

where the right hand side is used as the force term.

spherical:

The base state density update now includes the area factors in the divergences:

ρ0,jout=ρ0,jin1rj2ΔtΔr[(r2ρ0out,n+1/2w0in)j+1/2(r2ρ0out,n+1/2w0in)j1/2].\rho_{0,j}^{\mathrm{out}}=\rho_{0,j}^{\mathrm{in}}-\frac{1}{r_{j}^{2}}\frac{\Delta t}{\Delta r}\left[\left(r^{2}\rho_{0}^{\mathrm{out},{n+\mathchoice{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 1}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 1}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\fiverm 1}\kern-1.63885pt/\kern-1.22911pt\lower 0.75346pt\hbox{\fiverm 2}}{1\!/2}}}w_{0}^{\mathrm{in}}\right)_{j+\mathchoice{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 1}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 1}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\fiverm 1}\kern-1.63885pt/\kern-1.22911pt\lower 0.75346pt\hbox{\fiverm 2}}{1\!/2}}-\left(r^{2}\rho_{0}^{\mathrm{out},{n+\mathchoice{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 1}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 1}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\fiverm 1}\kern-1.63885pt/\kern-1.22911pt\lower 0.75346pt\hbox{\fiverm 2}}{1\!/2}}}w_{0}^{\mathrm{in}}\right)_{j-\mathchoice{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 1}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 1}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\fiverm 1}\kern-1.63885pt/\kern-1.22911pt\lower 0.75346pt\hbox{\fiverm 2}}{1\!/2}}\right]. (A8)

In order to compute the time-centered edge states, an additional geometric term is added to the forcing, due to the spherical discretization of (14):

ρ0t+w0ρ0r=ρ0w0r2ρ0w0r.\frac{\partial\rho_{0}}{\partial t}+w_{0}\frac{\partial\rho_{0}}{\partial r}=-\rho_{0}\frac{\partial w_{0}}{\partial r}-\frac{2\rho_{0}w_{0}}{r}. (A9)

A.3.3 p0p_{0} Update

Enforce HSE[p0in,ρ0in][p0out][p_{0}^{\mathrm{in}},\rho_{0}^{\mathrm{in}}]\rightarrow[p_{0}^{\mathrm{out}}] has replaced Advect Base Pressure from Paper III as the process by which we update the base state pressure. Rather than discretizing the evolution equation for p0p_{0}, we enforce hydrostatic equilibrium directly, which is numerically simpler and analytically equivalent. We first set p0,j=0out=p0,j=0inp_{0,j=0}^{\mathrm{out}}=p_{0,j=0}^{\mathrm{in}} and then update p0outp_{0}^{\mathrm{out}} using:

p0,j+1out=p0,jout+Δrgj+1/2(ρ0,j+1in+ρ0,jin)2,p_{0,j+1}^{\mathrm{out}}=p_{0,j}^{\mathrm{out}}+\Delta rg_{j+\mathchoice{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 1}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 1}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\fiverm 1}\kern-1.63885pt/\kern-1.22911pt\lower 0.75346pt\hbox{\fiverm 2}}{1\!/2}}\frac{\left(\rho_{0,j+1}^{\mathrm{in}}+\rho_{0,j}^{\mathrm{in}}\right)}{2}, (A10)

where g=g(ρ0in)g=g(\rho_{0}^{\mathrm{in}}). As soon as ρ0,jin<ρcutoff\rho_{0,j}^{\mathrm{in}}<\rho_{\rm cutoff}, we set p0,j+1out=p0,joutp_{0,j+1}^{\mathrm{out}}=p_{0,j}^{\mathrm{out}} for all remaining values of jj. Then we compare p0,jmaxoutp_{0,j_{\rm max}}^{\mathrm{out}} with p0,jmaxinp_{0,j_{\rm max}}^{\mathrm{in}} and offset every element in p0outp_{0}^{\mathrm{out}} so that p0,jmaxout=p0,jmaxinp_{0,j_{\rm max}}^{\mathrm{out}}=p_{0,j_{\rm max}}^{\mathrm{in}}. We are effectively using the location where the ρ0in\rho_{0}^{\mathrm{in}} drops below ρcutoff\rho_{\rm cutoff} as the starting point for integration.

A.3.4 (ρh)0(\rho h)_{0} Advection

Advect Base Enthalpy[(ρh)0in,w0in,ψin][(ρh)0out][(\rho h)_{0}^{\mathrm{in}},w_{0}^{\mathrm{in}},\psi^{\mathrm{in}}]\rightarrow[(\rho h)_{0}^{\mathrm{out}}] is the process by which we update the base state enthalpy through Δt\Delta t in time.

planar:

We discretize equation (15), neglecting reaction source terms, to compute the new base state enthalpy,

(ρh)0,jout=(ρh)0,jinΔtΔr{[(ρh)0n+1/2w0in]j+1/2[(ρh)0n+1/2w0in]j1/2}+Δtψjin.(\rho h)_{0,j}^{\mathrm{out}}=(\rho h)_{0,j}^{\mathrm{in}}-\frac{\Delta t}{\Delta r}\left\{\left[(\rho h)_{0}^{{n+\mathchoice{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 1}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 1}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\fiverm 1}\kern-1.63885pt/\kern-1.22911pt\lower 0.75346pt\hbox{\fiverm 2}}{1\!/2}}}w_{0}^{\mathrm{in}}\right]_{j+\mathchoice{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 1}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 1}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\fiverm 1}\kern-1.63885pt/\kern-1.22911pt\lower 0.75346pt\hbox{\fiverm 2}}{1\!/2}}-\left[(\rho h)_{0}^{{n+\mathchoice{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 1}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 1}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\fiverm 1}\kern-1.63885pt/\kern-1.22911pt\lower 0.75346pt\hbox{\fiverm 2}}{1\!/2}}}w_{0}^{\mathrm{in}}\right]_{j-\mathchoice{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 1}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 1}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\fiverm 1}\kern-1.63885pt/\kern-1.22911pt\lower 0.75346pt\hbox{\fiverm 2}}{1\!/2}}\right\}+\Delta t\psi_{j}^{\mathrm{in}}. (A11)

We compute the time-centered edge states, (ρh)0n+1/2(\rho h)_{0}^{{n+\mathchoice{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 1}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 1}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\fiverm 1}\kern-1.63885pt/\kern-1.22911pt\lower 0.75346pt\hbox{\fiverm 2}}{1\!/2}}}, by discretizing an expanded form of equation (15):

(ρh)0t+w0(ρh)0r=(ρh)0w0r+ψ.\frac{\partial(\rho h)_{0}}{\partial t}+w_{0}\frac{\partial(\rho h)_{0}}{\partial r}=-(\rho h)_{0}\frac{\partial w_{0}}{\partial r}+\psi. (A12)
spherical:

The base state enthalpy update now includes the area factors in the divergences:

(ρh)0,jout\displaystyle(\rho h)_{0,j}^{\mathrm{out}} =\displaystyle= (ρh)0,jin\displaystyle(\rho h)_{0,j}^{\mathrm{in}}
1rj2ΔtΔr{[r2(ρh)0n+1/2w0in]j+1/2[r2(ρh)0n+1/2w0in]j1/2}+Δtψin,n+1/2.\displaystyle-\frac{1}{r_{j}^{2}}\frac{\Delta t}{\Delta r}\left\{\left[r^{2}(\rho h)_{0}^{{n+\mathchoice{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 1}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 1}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\fiverm 1}\kern-1.63885pt/\kern-1.22911pt\lower 0.75346pt\hbox{\fiverm 2}}{1\!/2}}}w_{0}^{\mathrm{in}}\right]_{j+\mathchoice{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 1}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 1}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\fiverm 1}\kern-1.63885pt/\kern-1.22911pt\lower 0.75346pt\hbox{\fiverm 2}}{1\!/2}}-\left[r^{2}(\rho h)_{0}^{{n+\mathchoice{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 1}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 1}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\fiverm 1}\kern-1.63885pt/\kern-1.22911pt\lower 0.75346pt\hbox{\fiverm 2}}{1\!/2}}}w_{0}^{\mathrm{in}}\right]_{j-\mathchoice{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 1}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 1}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\fiverm 1}\kern-1.63885pt/\kern-1.22911pt\lower 0.75346pt\hbox{\fiverm 2}}{1\!/2}}\right\}+\Delta t\psi^{\mathrm{in},{n+\mathchoice{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 1}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 1}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\fiverm 1}\kern-1.63885pt/\kern-1.22911pt\lower 0.75346pt\hbox{\fiverm 2}}{1\!/2}}}.

In order to compute the time-centered edge states, an additional geometric term is added to the forcing, due to the spherical discretization of (15):

(ρh)0t+w0(ρh)0r=(ρh)0w0r2(ρh)0w0r+ψ.\frac{\partial(\rho h)_{0}}{\partial t}+w_{0}\frac{\partial(\rho h)_{0}}{\partial r}=-(\rho h)_{0}\frac{\partial w_{0}}{\partial r}-\frac{2(\rho h)_{0}w_{0}}{r}+\psi. (A14)

A.3.5 Computing w0w_{0}

Here we describe the process by which we compute w0w_{0}. The arguments are different for planar and spherical geometries.

Compute 𝒘𝟎w_{0} Planar [S¯in,Γ1¯in,p0in,ψin][w0out][\overline{S}^{\mathrm{in}},\overline{\Gamma_{1}}^{\mathrm{in}},p_{0}^{\mathrm{in}},\psi^{\mathrm{in}}]\rightarrow[w_{0}^{\mathrm{out}}]:

In Paper III, we showed that ψ=ηρg\psi=\eta_{\rho}g for planar geometries, and derived an alternate expression for equation (11). We compute w0w_{0} using equation (35) in Paper III using the following discretization:

w0,j+1/2outw0,j1/2outΔr=(S¯in1Γ1¯inp0inψin)j,\frac{w_{0,j+\mathchoice{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 1}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 1}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\fiverm 1}\kern-1.63885pt/\kern-1.22911pt\lower 0.75346pt\hbox{\fiverm 2}}{1\!/2}}^{\mathrm{out}}-w_{0,j-\mathchoice{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 1}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 1}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\fiverm 1}\kern-1.63885pt/\kern-1.22911pt\lower 0.75346pt\hbox{\fiverm 2}}{1\!/2}}^{\mathrm{out}}}{\Delta r}=\left(\overline{S}^{\mathrm{in}}-\frac{1}{\overline{\Gamma_{1}}^{\mathrm{in}}p_{0}^{\mathrm{in}}}\psi^{\mathrm{in}}\right)_{j}, (A15)

with w0,1/2=0w_{0,-\mathchoice{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 1}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 1}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\fiverm 1}\kern-1.63885pt/\kern-1.22911pt\lower 0.75346pt\hbox{\fiverm 2}}{1\!/2}}=0.

Compute 𝒘𝟎w_{0} Spherical [S¯in,Γ1¯in,ρ0in,p0in,ηρin][w0out][\overline{S}^{\mathrm{in}},\overline{\Gamma_{1}}^{\mathrm{in}},\rho_{0}^{\mathrm{in}},p_{0}^{\mathrm{in}},\eta_{\rho}^{\mathrm{in}}]\rightarrow[w_{0}^{\mathrm{out}}]:

We begin with equation (11) written in spherical coordinates:

1r2r(r2β0w0)=β0(S¯1Γ1¯p0p0t).\frac{1}{r^{2}}\frac{\partial}{\partial r}\left(r^{2}\beta_{0}w_{0}\right)=\beta_{0}\left(\overline{S}-\frac{1}{\overline{\Gamma_{1}}p_{0}}\frac{\partial p_{0}}{\partial t}\right). (A16)

We expand the spatial derivative and recall from Paper I that

1Γ1¯p0p0r=1β0β0r,\frac{1}{\overline{\Gamma_{1}}p_{0}}\frac{\partial p_{0}}{\partial r}=\frac{1}{\beta_{0}}\frac{\partial\beta_{0}}{\partial r}, (A17)

giving:

1r2r(r2w0)=S¯1Γ1¯p0(p0t+w0p0r)ψ.\frac{1}{r^{2}}\frac{\partial}{\partial r}\left(r^{2}w_{0}\right)=\overline{S}-\frac{1}{\overline{\Gamma_{1}}p_{0}}\underbrace{\left(\frac{\partial p_{0}}{\partial t}+w_{0}\frac{\partial p_{0}}{\partial r}\right)}_{\psi}. (A18)

We solve this equation for w0w_{0} as described in Appendix B.

A.4 Main Algorithm Description

We now describe the main algorithm, making frequent use of the shorthand developed above. In summary, in the predictor step (Steps 2-5) we use an estimate of the expansion term, SS, to compute a preliminary solution at the new time level, denoted with an “n+1,n+1,\star” superscript. In the corrector step (Steps 6-9), we use the results from the predictor step to compute a more accurate expansion term, and compute the final solution at the new time level, denoted with an “n+1n+1” superscript. We use Strang-splitting to achieve second-order accuracy in time. See Figure 14 for a flow chart of the algorithm, including the notation used as we advance the solution by Δt.\Delta t. Figure 15 is a flow chart of the advection steps (Steps 4 and 8), which includes the notation we use as we advect the solution through a time interval of Δt\Delta t.

The discussion that follows mirrors closely that in Paper III, but has been updated to reflect all the changes throughout the algorithm. The advance of the state through a single time step appears as:

Step 0.

Initialization

This step remains unchanged from Paper III. The initialization step only occurs at the beginning of the simulation. The initial values for 𝐔0,ρ0,(ρh)0,Xk0,T0,ρ00,p00{\bf{U}}^{0},\rho^{0},(\rho h)^{0},X_{k}^{0},T^{0},\rho_{0}^{0},p_{0}^{0}, and Γ10¯\overline{\Gamma_{1}^{0}} are specified from the problem-dependent initial conditions. The initial time step, Δt0\Delta t^{0}, is computed as in Paper III. Finally, initial values for w01/2,ηρ1/2,ψ1/2,π1/2,S0w_{0}^{-\mathchoice{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 1}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 1}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\fiverm 1}\kern-1.63885pt/\kern-1.22911pt\lower 0.75346pt\hbox{\fiverm 2}}{1\!/2}},\eta_{\rho}^{-\mathchoice{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 1}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 1}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\fiverm 1}\kern-1.63885pt/\kern-1.22911pt\lower 0.75346pt\hbox{\fiverm 2}}{1\!/2}},\psi^{-\mathchoice{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 1}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 1}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\fiverm 1}\kern-1.63885pt/\kern-1.22911pt\lower 0.75346pt\hbox{\fiverm 2}}{1\!/2}},\pi^{-\mathchoice{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 1}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 1}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\fiverm 1}\kern-1.63885pt/\kern-1.22911pt\lower 0.75346pt\hbox{\fiverm 2}}{1\!/2}},S^{0}, and S1S^{1} come from a preliminary pass through the algorithm.

Step 1.

React the full state through the first time interval of Δt/2.\Delta t/2.

Call React State[ρn,(ρh)n,Xkn,Tn,(ρHext)n,p0n][\rho^{n},(\rho h)^{n},X_{k}^{n},T^{n},(\rho H_{\rm ext})^{n},p_{0}^{n}]
[ρ(1),(ρh)(1),Xk(1),T(1),(ρω˙k)(1),(ρHnuc)(1)]\rightarrow[\rho^{(1)},(\rho h)^{(1)},X_{k}^{(1)},T^{(1)},(\rho\dot{\omega}_{k})^{(1)},(\rho H_{\rm nuc})^{(1)}].

Step 2.

Compute the provisional time-centered expansion, Sn+1/2,S^{{n+\mathchoice{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 1}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 1}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\fiverm 1}\kern-1.63885pt/\kern-1.22911pt\lower 0.75346pt\hbox{\fiverm 2}}{1\!/2}},\star\star}, provisional base state velocity, w0n+1/2,w_{0}^{{n+\mathchoice{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 1}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 1}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\fiverm 1}\kern-1.63885pt/\kern-1.22911pt\lower 0.75346pt\hbox{\fiverm 2}}{1\!/2}},\star}, and provisional base state velocity forcing.

  1. A.

    Compute Sn+1/2,S^{{n+\mathchoice{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 1}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 1}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\fiverm 1}\kern-1.63885pt/\kern-1.22911pt\lower 0.75346pt\hbox{\fiverm 2}}{1\!/2}},\star\star}. We compute an estimate for the time-centered expansion term in the velocity divergence constraint (eq. [12]). For the first time step (n=0n=0), we set

    Sn+1/2,=S0+S12,S^{n+\mathchoice{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 1}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 1}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\fiverm 1}\kern-1.63885pt/\kern-1.22911pt\lower 0.75346pt\hbox{\fiverm 2}}{1\!/2},\star\star}=\frac{S^{0}+S^{1}}{2}, (A19)

    where S1S^{1} is found during initialization. For other time steps (n0)(n\neq 0), following Bell et al. (2004), we extrapolate to the half-time using SS at the previous and current time levels

    Sn+1/2,=Sn+Δtn2SnSn1Δtn1.S^{{n+\mathchoice{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 1}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 1}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\fiverm 1}\kern-1.63885pt/\kern-1.22911pt\lower 0.75346pt\hbox{\fiverm 2}}{1\!/2}},\star\star}=S^{n}+\frac{\Delta t^{n}}{2}\frac{S^{n}-S^{n-1}}{\Delta t^{n-1}}. (A20)

    Next, compute

    Sn+1/2,¯=𝐀𝐯𝐠(Sn+1/2,).\overline{S^{{n+\mathchoice{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 1}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 1}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\fiverm 1}\kern-1.63885pt/\kern-1.22911pt\lower 0.75346pt\hbox{\fiverm 2}}{1\!/2}},\star\star}}={\mathrm{\bf Avg}}\left(S^{{n+\mathchoice{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 1}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 1}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\fiverm 1}\kern-1.63885pt/\kern-1.22911pt\lower 0.75346pt\hbox{\fiverm 2}}{1\!/2}},\star\star}\right). (A21)
  2. B.

    Compute w0n+1/2,w_{0}^{{n+\mathchoice{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 1}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 1}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\fiverm 1}\kern-1.63885pt/\kern-1.22911pt\lower 0.75346pt\hbox{\fiverm 2}}{1\!/2}},\star}.

    For planar geometry, call
    Compute 𝒘𝟎w_{0} Planar[Sn+1/2,¯,Γ1n¯,p0n,ψn1/2][w0n+1/2,][\overline{S^{{n+\mathchoice{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 1}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 1}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\fiverm 1}\kern-1.63885pt/\kern-1.22911pt\lower 0.75346pt\hbox{\fiverm 2}}{1\!/2}},\star\star}},\overline{\Gamma_{1}^{n}},p_{0}^{n},\psi^{n-\mathchoice{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 1}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 1}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\fiverm 1}\kern-1.63885pt/\kern-1.22911pt\lower 0.75346pt\hbox{\fiverm 2}}{1\!/2}}]\rightarrow[w_{0}^{{n+\mathchoice{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 1}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 1}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\fiverm 1}\kern-1.63885pt/\kern-1.22911pt\lower 0.75346pt\hbox{\fiverm 2}}{1\!/2}},\star}].

    For spherical geometry, call
    Compute 𝒘𝟎w_{0} Spherical[Sn+1/2,¯,Γ1n¯,ρ0n,p0n,ηρn1/2][w0n+1/2,][\overline{S^{{n+\mathchoice{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 1}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 1}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\fiverm 1}\kern-1.63885pt/\kern-1.22911pt\lower 0.75346pt\hbox{\fiverm 2}}{1\!/2}},\star\star}},\overline{\Gamma_{1}^{n}},\rho_{0}^{n},p_{0}^{n},\eta_{\rho}^{n-\mathchoice{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 1}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 1}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\fiverm 1}\kern-1.63885pt/\kern-1.22911pt\lower 0.75346pt\hbox{\fiverm 2}}{1\!/2}}]\rightarrow[w_{0}^{{n+\mathchoice{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 1}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 1}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\fiverm 1}\kern-1.63885pt/\kern-1.22911pt\lower 0.75346pt\hbox{\fiverm 2}}{1\!/2}},\star}].

  3. C.

    Compute the provisional base state velocity forcing. Rearrange equation (9),

    1ρ0π0r=w0t+w0w0r,-\frac{1}{\rho_{0}}\frac{\partial\pi_{0}}{\partial r}=\frac{\partial w_{0}}{\partial t}+w_{0}\frac{\partial w_{0}}{\partial r}, (A22)

    with the following discretization:

    (1ρ0π0r)n,=w0n+1/2,w0n1/2(Δtn+Δtn1)/2w0n,(w0r)n,,\left(\frac{1}{\rho_{0}}\frac{\partial\pi_{0}}{\partial r}\right)^{n,\star}=-\frac{w_{0}^{{n+\mathchoice{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 1}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 1}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\fiverm 1}\kern-1.63885pt/\kern-1.22911pt\lower 0.75346pt\hbox{\fiverm 2}}{1\!/2}},\star}-w_{0}^{n-\mathchoice{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 1}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 1}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\fiverm 1}\kern-1.63885pt/\kern-1.22911pt\lower 0.75346pt\hbox{\fiverm 2}}{1\!/2}}}{(\Delta t^{n}+\Delta t^{n-1})/2}-w_{0}^{n,\star}\left(\frac{\partial w_{0}}{\partial r}\right)^{n,\star}, (A23)

    where w0n,w_{0}^{n,\star} and (w0/r)n,(\partial w_{0}/\partial r)^{n,\star} are defined as

    w0n,\displaystyle w_{0}^{n,\star} =\displaystyle= Δtnw0n1/2+Δtn1w0n+1/2,Δtn+Δtn1,\displaystyle\frac{\Delta t^{n}w_{0}^{{n-\mathchoice{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 1}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 1}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\fiverm 1}\kern-1.63885pt/\kern-1.22911pt\lower 0.75346pt\hbox{\fiverm 2}}{1\!/2}}}+\Delta t^{n-1}w_{0}^{{n+\mathchoice{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 1}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 1}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\fiverm 1}\kern-1.63885pt/\kern-1.22911pt\lower 0.75346pt\hbox{\fiverm 2}}{1\!/2}},\star}}{\Delta t^{n}+\Delta t^{n-1}}, (A24)
    (w0r)n,\displaystyle\left(\frac{\partial w_{0}}{\partial r}\right)^{n,\star} =\displaystyle= 1Δtn+Δtn1[Δtn(w0r)n1/2+Δtn1(w0r)n+1/2,].\displaystyle\frac{1}{\Delta t^{n}+\Delta t^{n-1}}\left[\Delta t^{n}\left(\frac{\partial w_{0}}{\partial r}\right)^{{n-\mathchoice{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 1}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 1}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\fiverm 1}\kern-1.63885pt/\kern-1.22911pt\lower 0.75346pt\hbox{\fiverm 2}}{1\!/2}}}+\Delta t^{n-1}\left(\frac{\partial w_{0}}{\partial r}\right)^{{n+\mathchoice{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 1}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 1}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\fiverm 1}\kern-1.63885pt/\kern-1.22911pt\lower 0.75346pt\hbox{\fiverm 2}}{1\!/2}},\star}\right].

    If n=0n=0, we use Δt1=Δt0\Delta t^{-1}=\Delta t^{0}.

Step 3.

Construct the provisional time-centered advective velocity on edges, 𝐔~ADV,\widetilde{{\bf{U}}}^{\mathrm{ADV},\star}.

Using equation (10), we compute time-centered edge velocities, 𝐔~ADV,,\widetilde{{\bf{U}}}^{\mathrm{ADV},\dagger,\star}, using 𝐔=𝐔~n+w0n+1/2,{\bf{U}}=\widetilde{{\bf{U}}}^{n}+w_{0}^{{n+\mathchoice{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 1}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 1}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\fiverm 1}\kern-1.63885pt/\kern-1.22911pt\lower 0.75346pt\hbox{\fiverm 2}}{1\!/2}},\star}. The \dagger superscript refers to the fact that the predicted velocity field does not satisfy the divergence constraint. We then construct 𝐔~ADV,\widetilde{{\bf{U}}}^{\mathrm{ADV},\star} from 𝐔~ADV,,\widetilde{{\bf{U}}}^{\mathrm{ADV},\dagger,\star} using a MAC projection, as described in detail in Appendix B of Paper III. We note that 𝐔~ADV,\widetilde{{\bf{U}}}^{\mathrm{ADV},\star} satisfies the discrete version of (𝐔~ADV,𝐞r)¯=0\overline{(\widetilde{{\bf{U}}}^{\mathrm{ADV},\star}\cdot{\bf{e}}_{r})}=0 as well as

(β0n𝐔~ADV,)\displaystyle\nabla\cdot\left(\beta_{0}^{n}\widetilde{{\bf{U}}}^{\mathrm{ADV},\star}\right) =\displaystyle= β0n(Sn+1/2,Sn+1/2,¯),\displaystyle\beta_{0}^{n}\left(S^{{n+\mathchoice{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 1}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 1}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\fiverm 1}\kern-1.63885pt/\kern-1.22911pt\lower 0.75346pt\hbox{\fiverm 2}}{1\!/2}},\star\star}-\overline{S^{{n+\mathchoice{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 1}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 1}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\fiverm 1}\kern-1.63885pt/\kern-1.22911pt\lower 0.75346pt\hbox{\fiverm 2}}{1\!/2}},\star\star}}\right), (A26)
β0n\displaystyle\beta_{0}^{n} =\displaystyle= β0(ρ0n,p0n,Γ1n¯),\displaystyle\beta_{0}\left(\rho_{0}^{n},p_{0}^{n},\overline{\Gamma_{1}^{n}}\right), (A27)

where β0\beta_{0} is computed as described in Appendix C of Paper III.

Step 4.

Advect the base state and full state through a time interval of Δt.\Delta t.

  1. A.

    Update ρ0\rho_{0}, saving the time-centered density at radial edges by calling

    Advect Base Density[ρ0n,w0n+1/2,][ρ0(2a),,ρ0n+1/2,,pred][\rho_{0}^{n},w_{0}^{{n+\mathchoice{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 1}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 1}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\fiverm 1}\kern-1.63885pt/\kern-1.22911pt\lower 0.75346pt\hbox{\fiverm 2}}{1\!/2}},\star}]\rightarrow[\rho_{0}^{(2a),\star},\rho_{0}^{{n+\mathchoice{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 1}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 1}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\fiverm 1}\kern-1.63885pt/\kern-1.22911pt\lower 0.75346pt\hbox{\fiverm 2}}{1\!/2}},\star,{\rm pred}}].

  2. B.

    Update (ρXk)(\rho X_{k}) using a discretized version of equation (1) omitting the reaction terms, which were already accounted for in React State. The update consists of two steps:

    1. i.

      Compute the time-centered species edge states, (ρXk)n+1/2,,pred(\rho X_{k})^{{n+\mathchoice{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 1}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 1}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\fiverm 1}\kern-1.63885pt/\kern-1.22911pt\lower 0.75346pt\hbox{\fiverm 2}}{1\!/2}},\star,{\rm pred}}, for the conservative update of (ρXk)(1)(\rho X_{k})^{(1)}. We use equations (17) and (13) to predict ρ(1)=ρ(1)ρ0n\rho^{{}^{\prime}(1)}=\rho^{(1)}-\rho_{0}^{n} and Xk(1)=(ρXk)(1)/ρ(1)X_{k}^{(1)}=(\rho X_{k})^{(1)}/\rho^{(1)} to time-centered edges using 𝐔=𝐔~ADV,+w0n+1/2,𝐞r{\bf{U}}=\widetilde{{\bf{U}}}^{\mathrm{ADV},\star}+w_{0}^{{n+\mathchoice{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 1}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 1}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\fiverm 1}\kern-1.63885pt/\kern-1.22911pt\lower 0.75346pt\hbox{\fiverm 2}}{1\!/2}},\star}{\bf{e}}_{r}, yielding ρn+1/2,,pred\rho^{{}^{\prime}{n+\mathchoice{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 1}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 1}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\fiverm 1}\kern-1.63885pt/\kern-1.22911pt\lower 0.75346pt\hbox{\fiverm 2}}{1\!/2}},\star,{\rm pred}} and Xkn+1/2,,predX_{k}^{{n+\mathchoice{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 1}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 1}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\fiverm 1}\kern-1.63885pt/\kern-1.22911pt\lower 0.75346pt\hbox{\fiverm 2}}{1\!/2}},\star,{\rm pred}}. We convert the perturbational density full state density using

      ρn+1/2,,pred=ρn+1/2,,pred+ρ0n+ρ0(2a),2,\rho^{{n+\mathchoice{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 1}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 1}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\fiverm 1}\kern-1.63885pt/\kern-1.22911pt\lower 0.75346pt\hbox{\fiverm 2}}{1\!/2}},\star,{\rm pred}}=\rho^{{}^{\prime}{n+\mathchoice{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 1}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 1}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\fiverm 1}\kern-1.63885pt/\kern-1.22911pt\lower 0.75346pt\hbox{\fiverm 2}}{1\!/2}},\star,{\rm pred}}+\frac{\rho_{0}^{n}+\rho_{0}^{(2a),\star}}{2}, (A28)

      where the base state density terms are mapped to Cartesian edges. Then,
      (ρXk)n+1/2,,pred=(ρn+1/2,,predXkn+1/2,,pred)(\rho X_{k})^{{n+\mathchoice{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 1}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 1}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\fiverm 1}\kern-1.63885pt/\kern-1.22911pt\lower 0.75346pt\hbox{\fiverm 2}}{1\!/2}},\star,{\rm pred}}=(\rho^{{n+\mathchoice{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 1}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 1}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\fiverm 1}\kern-1.63885pt/\kern-1.22911pt\lower 0.75346pt\hbox{\fiverm 2}}{1\!/2}},\star,{\rm pred}}X_{k}^{{n+\mathchoice{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 1}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 1}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\fiverm 1}\kern-1.63885pt/\kern-1.22911pt\lower 0.75346pt\hbox{\fiverm 2}}{1\!/2}},\star,{\rm pred}}).

    2. ii.

      Evolve (ρXk)(1)(ρXk)(2),(\rho X_{k})^{(1)}\rightarrow(\rho X_{k})^{(2),\star} using

      (ρXk)(2),\displaystyle(\rho X_{k})^{(2),\star} =\displaystyle= (ρXk)(1)\displaystyle(\rho X_{k})^{(1)}
      Δt{[(𝐔~ADV,+w0n+1/2,𝐞r)(ρXk)n+1/2,,pred]},\displaystyle-\Delta t\left\{\nabla\cdot\left[\left(\widetilde{{\bf{U}}}^{\mathrm{ADV},\star}+w_{0}^{{n+\mathchoice{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 1}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 1}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\fiverm 1}\kern-1.63885pt/\kern-1.22911pt\lower 0.75346pt\hbox{\fiverm 2}}{1\!/2}},\star}{\bf{e}}_{r}\right)(\rho X_{k})^{{n+\mathchoice{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 1}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 1}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\fiverm 1}\kern-1.63885pt/\kern-1.22911pt\lower 0.75346pt\hbox{\fiverm 2}}{1\!/2}},\star,{\rm pred}}\right]\right\},
      ρ(2),=k(ρXk)(2),,Xk(2),=(ρXk)(2),/ρ(2),.\rho^{(2),\star}=\sum_{k}(\rho X_{k})^{(2),\star},\qquad X_{k}^{(2),\star}=(\rho X_{k})^{(2),\star}/\rho^{(2),\star}. (A30)
  3. C.

    Define a radial edge-centered ηρn+1/2,\eta_{\rho}^{{n+\mathchoice{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 1}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 1}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\fiverm 1}\kern-1.63885pt/\kern-1.22911pt\lower 0.75346pt\hbox{\fiverm 2}}{1\!/2}},\star}.

    For planar geometry, since ηρ=ρ(𝐔𝐞r)¯=ρ(𝐔𝐞r)¯ρ0(𝐔𝐞r¯)=ρ(𝐔𝐞r)¯ρ0w0\eta_{\rho}=\overline{\rho^{\prime}({\bf{U}}\cdot{\bf{e}}_{r})}=\overline{\rho({\bf{U}}\cdot{\bf{e}}_{r})}-\overline{\rho_{0}({\bf{U}}\cdot{\bf{e}}_{r}})=\overline{\rho({\bf{U}}\cdot{\bf{e}}_{r})}-\rho_{0}w_{0},

    ηρn+1/2,\displaystyle\eta_{\rho}^{{n+\mathchoice{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 1}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 1}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\fiverm 1}\kern-1.63885pt/\kern-1.22911pt\lower 0.75346pt\hbox{\fiverm 2}}{1\!/2}},\star} =\displaystyle= 𝐀𝐯𝐠k[(𝐔~ADV,𝐞r+w0n+1/2,)(ρXk)n+1/2,,pred]\displaystyle{\rm{\bf Avg}}\sum_{k}\left[\left(\widetilde{{\bf{U}}}^{\mathrm{ADV},\star}\cdot{\bf{e}}_{r}+w_{0}^{{n+\mathchoice{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 1}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 1}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\fiverm 1}\kern-1.63885pt/\kern-1.22911pt\lower 0.75346pt\hbox{\fiverm 2}}{1\!/2}},\star}\right)(\rho X_{k})^{{n+\mathchoice{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 1}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 1}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\fiverm 1}\kern-1.63885pt/\kern-1.22911pt\lower 0.75346pt\hbox{\fiverm 2}}{1\!/2}},\star,{\rm pred}}\right] (A31)
    w0n+1/2,ρ0n+1/2,,pred,\displaystyle-w_{0}^{{n+\mathchoice{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 1}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 1}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\fiverm 1}\kern-1.63885pt/\kern-1.22911pt\lower 0.75346pt\hbox{\fiverm 2}}{1\!/2}},\star}\rho_{0}^{{n+\mathchoice{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 1}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 1}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\fiverm 1}\kern-1.63885pt/\kern-1.22911pt\lower 0.75346pt\hbox{\fiverm 2}}{1\!/2}},\star,{\rm pred}},

    For spherical geometry, first construct ηρcart,n+1/2,=[ρ(𝐔𝐞r)]n+1/2,\eta_{\rho}^{{\rm cart},{n+\mathchoice{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 1}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 1}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\fiverm 1}\kern-1.63885pt/\kern-1.22911pt\lower 0.75346pt\hbox{\fiverm 2}}{1\!/2}},\star}=[\rho^{\prime}({\bf{U}}\cdot{\bf{e}}_{r})]^{{n+\mathchoice{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 1}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 1}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\fiverm 1}\kern-1.63885pt/\kern-1.22911pt\lower 0.75346pt\hbox{\fiverm 2}}{1\!/2}},\star} on Cartesian cell centers using:

    ηρcart,n+1/2,\displaystyle\eta_{\rho}^{{\rm cart},{n+\mathchoice{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 1}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 1}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\fiverm 1}\kern-1.63885pt/\kern-1.22911pt\lower 0.75346pt\hbox{\fiverm 2}}{1\!/2}},\star} =\displaystyle= [(ρ(1)+ρ(2),2)(ρ0n+ρ0(2a),2)]\displaystyle\left[\left(\frac{\rho^{(1)}+\rho^{(2),\star}}{2}\right)-\left(\frac{\rho_{0}^{n}+\rho_{0}^{(2a),\star}}{2}\right)\right] (A32)
    (𝐔~ADV,𝐞r+w0n+1/2,).\displaystyle\cdot\left(\widetilde{{\bf{U}}}^{\mathrm{ADV},\star}\cdot{\bf{e}}_{r}+w_{0}^{{n+\mathchoice{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 1}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 1}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\fiverm 1}\kern-1.63885pt/\kern-1.22911pt\lower 0.75346pt\hbox{\fiverm 2}}{1\!/2}},\star}\right).

    Then,

    ηρn+1/2,=𝐀𝐯𝐠(ηρcart,n+1/2,).\eta_{\rho}^{{n+\mathchoice{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 1}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 1}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\fiverm 1}\kern-1.63885pt/\kern-1.22911pt\lower 0.75346pt\hbox{\fiverm 2}}{1\!/2}},\star}={\rm{\bf Avg}}\left(\eta_{\rho}^{{\rm cart},{n+\mathchoice{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 1}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 1}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\fiverm 1}\kern-1.63885pt/\kern-1.22911pt\lower 0.75346pt\hbox{\fiverm 2}}{1\!/2}},\star}\right). (A33)

    This gives a radial cell-centered ηρn+1/2,\eta_{\rho}^{{n+\mathchoice{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 1}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 1}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\fiverm 1}\kern-1.63885pt/\kern-1.22911pt\lower 0.75346pt\hbox{\fiverm 2}}{1\!/2}},\star}. To get ηρn+1/2,\eta_{\rho}^{{n+\mathchoice{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 1}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 1}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\fiverm 1}\kern-1.63885pt/\kern-1.22911pt\lower 0.75346pt\hbox{\fiverm 2}}{1\!/2}},\star} at radial edges, average the two neighboring radial cell-centered values.

  4. D.

    Correct ρ0\rho_{0} by setting ρ0n+1,=\rho_{0}^{n+1,\star}= Avg(ρ(2),)(\rho^{(2),\star}).

  5. E.

    Update p0p_{0} by calling Enforce HSE[p0n,ρ0n+1,][p0n+1,][p_{0}^{n},\rho_{0}^{n+1,\star}]\rightarrow[p_{0}^{n+1,\star}].

  6. F.

    Compute ψn+1/2,\psi^{{n+\mathchoice{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 1}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 1}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\fiverm 1}\kern-1.63885pt/\kern-1.22911pt\lower 0.75346pt\hbox{\fiverm 2}}{1\!/2}},\star}.

    For planar geometry,

    ψjn+1/2,=12(ηρ,j1/2n+1/2,+ηρ,j+1/2n+1/2,)g.\psi_{j}^{{n+\mathchoice{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 1}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 1}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\fiverm 1}\kern-1.63885pt/\kern-1.22911pt\lower 0.75346pt\hbox{\fiverm 2}}{1\!/2}},\star}=\frac{1}{2}\left(\eta_{\rho,j-\mathchoice{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 1}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 1}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\fiverm 1}\kern-1.63885pt/\kern-1.22911pt\lower 0.75346pt\hbox{\fiverm 2}}{1\!/2}}^{{n+\mathchoice{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 1}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 1}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\fiverm 1}\kern-1.63885pt/\kern-1.22911pt\lower 0.75346pt\hbox{\fiverm 2}}{1\!/2}},\star}+\eta_{\rho,j+\mathchoice{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 1}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 1}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\fiverm 1}\kern-1.63885pt/\kern-1.22911pt\lower 0.75346pt\hbox{\fiverm 2}}{1\!/2}}^{{n+\mathchoice{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 1}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 1}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\fiverm 1}\kern-1.63885pt/\kern-1.22911pt\lower 0.75346pt\hbox{\fiverm 2}}{1\!/2}},\star}\right)g. (A34)

    For spherical geometry, first compute:

    Γ1(1)¯\displaystyle\overline{\Gamma_{1}^{(1)}} =\displaystyle= 𝐀𝐯𝐠[Γ1(ρ(1),p0n,Xk(1))],\displaystyle{\rm{\bf Avg}}\left[\Gamma_{1}\left(\rho^{(1)},p_{0}^{n},X_{k}^{(1)}\right)\right], (A35)
    Γ1(2),¯\displaystyle\overline{\Gamma_{1}^{(2),\star}} =\displaystyle= 𝐀𝐯𝐠[Γ1(ρ(2),,p0n+1,,Xk(2),)].\displaystyle{\rm{\bf Avg}}\left[\Gamma_{1}\left(\rho^{(2),\star},p_{0}^{n+1,\star},X_{k}^{(2),\star}\right)\right]. (A36)

    Then, define ψn+1/2,\psi^{{n+\mathchoice{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 1}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 1}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\fiverm 1}\kern-1.63885pt/\kern-1.22911pt\lower 0.75346pt\hbox{\fiverm 2}}{1\!/2}},\star} using equation (A18)

    ψjn+1/2,\displaystyle\psi_{j}^{{n+\mathchoice{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 1}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 1}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\fiverm 1}\kern-1.63885pt/\kern-1.22911pt\lower 0.75346pt\hbox{\fiverm 2}}{1\!/2}},\star} =\displaystyle= (Γ1(1)¯+Γ1(2),¯2)j(p0n+p0n+1,2)j\displaystyle\left(\frac{\overline{\Gamma_{1}^{(1)}}+\overline{\Gamma_{1}^{(2),\star}}}{2}\right)_{j}\left(\frac{p_{0}^{n}+p_{0}^{n+1,\star}}{2}\right)_{j}
    {Sjn+1/2,¯1rj2[(r2w0n+1/2,)j+1/2(r2w0n+1/2,)j1/2]}.\displaystyle\left\{\overline{S_{j}^{{n+\mathchoice{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 1}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 1}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\fiverm 1}\kern-1.63885pt/\kern-1.22911pt\lower 0.75346pt\hbox{\fiverm 2}}{1\!/2}},\star}}-\frac{1}{r_{j}^{2}}\left[\left(r^{2}w_{0}^{{n+\mathchoice{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 1}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 1}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\fiverm 1}\kern-1.63885pt/\kern-1.22911pt\lower 0.75346pt\hbox{\fiverm 2}}{1\!/2}},\star}\right)_{j+\mathchoice{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 1}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 1}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\fiverm 1}\kern-1.63885pt/\kern-1.22911pt\lower 0.75346pt\hbox{\fiverm 2}}{1\!/2}}-\left(r^{2}w_{0}^{{n+\mathchoice{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 1}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 1}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\fiverm 1}\kern-1.63885pt/\kern-1.22911pt\lower 0.75346pt\hbox{\fiverm 2}}{1\!/2}},\star}\right)_{j-\mathchoice{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 1}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 1}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\fiverm 1}\kern-1.63885pt/\kern-1.22911pt\lower 0.75346pt\hbox{\fiverm 2}}{1\!/2}}\right]\right\}.
  7. G.

    Update (ρh)0(\rho h)_{0}. First, compute (ρh)0n=(\rho h)_{0}^{n}= Avg[(ρh)(1)][(\rho h)^{(1)}]. Then, call
    Advect Base Enthalpy[(ρh)0n,w0n+1/2,,ψn+1/2,][(ρh)0n+1,][(\rho h)_{0}^{n},w_{0}^{{n+\mathchoice{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 1}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 1}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\fiverm 1}\kern-1.63885pt/\kern-1.22911pt\lower 0.75346pt\hbox{\fiverm 2}}{1\!/2}},\star},\psi^{{n+\mathchoice{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 1}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 1}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\fiverm 1}\kern-1.63885pt/\kern-1.22911pt\lower 0.75346pt\hbox{\fiverm 2}}{1\!/2}},\star}]\rightarrow[(\rho h)_{0}^{n+1,\star}].

  8. H.

    Update the enthalpy using a discretized version of equation (3), again omitting the reaction and heating terms since we already accounted for them in React State. This equation takes the form:

    (ρh)t=(𝐔ρh)+ψ+(𝐔~𝐞r)p0r.\frac{\partial(\rho h)}{\partial t}=-\nabla\cdot({\bf{U}}\rho h)+\psi+(\widetilde{{\bf{U}}}\cdot{\bf{e}}_{r})\frac{\partial p_{0}}{\partial r}. (A38)

    For spherical geometry, we solve the analytically equivalent form,

    (ρh)t=(𝐔ρh)+ψ+(𝐔~p0)p0𝐔~,\frac{\partial(\rho h)}{\partial t}=-\nabla\cdot({\bf{U}}\rho h)+\psi+\nabla\cdot(\widetilde{{\bf{U}}}p_{0})-p_{0}\nabla\cdot\widetilde{{\bf{U}}}, (A39)

    which experience has shown to minimize the drift from thermodynamic equilibrium. The update consists of two steps:

    1. i.

      Compute the time-centered enthalpy edge state, (ρh)n+1/2,,pred,(\rho h)^{{n+\mathchoice{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 1}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 1}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\fiverm 1}\kern-1.63885pt/\kern-1.22911pt\lower 0.75346pt\hbox{\fiverm 2}}{1\!/2}},\star,{\rm pred}}, for the conservative update of (ρh)(1)(\rho h)^{(1)}. We use equation (18) to predict (ρh)=(ρh)(1)(ρh)0n(\rho h)^{\prime}=(\rho h)^{(1)}-(\rho h)_{0}^{n} to time-centered edges, using 𝐔=𝐔~ADV,+w0n+1/2,𝐞r{\bf{U}}=\widetilde{{\bf{U}}}^{\mathrm{ADV},\star}+w_{0}^{{n+\mathchoice{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 1}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 1}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\fiverm 1}\kern-1.63885pt/\kern-1.22911pt\lower 0.75346pt\hbox{\fiverm 2}}{1\!/2}},\star}{\bf{e}}_{r}, yielding (ρh)n+1/2,,pred(\rho h)^{{}^{\prime}{n+\mathchoice{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 1}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 1}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\fiverm 1}\kern-1.63885pt/\kern-1.22911pt\lower 0.75346pt\hbox{\fiverm 2}}{1\!/2}},\star,{\rm pred}}. We convert the perturbational enthalpy to a full state enthalpy using

      (ρh)n+1/2,,pred=(ρh)n+1/2,,pred+(ρh)0n+(ρh)0n+1,2.(\rho h)^{{n+\mathchoice{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 1}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 1}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\fiverm 1}\kern-1.63885pt/\kern-1.22911pt\lower 0.75346pt\hbox{\fiverm 2}}{1\!/2}},\star,{\rm pred}}=(\rho h)^{{}^{\prime}{n+\mathchoice{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 1}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 1}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\fiverm 1}\kern-1.63885pt/\kern-1.22911pt\lower 0.75346pt\hbox{\fiverm 2}}{1\!/2}},\star,{\rm pred}}+\frac{(\rho h)_{0}^{n}+(\rho h)_{0}^{n+1,\star}}{2}. (A40)

      For planar geometry, we map (ρh)0(\rho h)_{0} directly to Cartesian edges. In spherical geometry, our experience has shown that a slightly different approach leads to reduced discretization errors. We first map h0(ρh)0/ρ0h_{0}\equiv(\rho h)_{0}/\rho_{0} and ρ0\rho_{0} to Cartesian edges separately, and then multiply these terms to get (ρh)0(\rho h)_{0}.

    2. ii.

      Evolve (ρh)(1)(ρh)(2),(\rho h)^{(1)}\rightarrow(\rho h)^{(2),\star}.

      For planar geometry,

      (ρh)(2),\displaystyle(\rho h)^{(2),\star} =\displaystyle= (ρh)(1)\displaystyle(\rho h)^{(1)} (A41)
      Δt{[(𝐔~ADV,+w0n+1/2,𝐞r)(ρh)n+1/2,,pred]}\displaystyle-\Delta t\left\{\nabla\cdot\left[\left(\widetilde{{\bf{U}}}^{\mathrm{ADV},\star}+w_{0}^{{n+\mathchoice{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 1}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 1}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\fiverm 1}\kern-1.63885pt/\kern-1.22911pt\lower 0.75346pt\hbox{\fiverm 2}}{1\!/2}},\star}{\bf{e}}_{r}\right)(\rho h)^{{n+\mathchoice{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 1}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 1}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\fiverm 1}\kern-1.63885pt/\kern-1.22911pt\lower 0.75346pt\hbox{\fiverm 2}}{1\!/2}},\star,{\rm pred}}\right]\right\}
      +Δt(𝐔~ADV,𝐞r)(p0r)n+Δtψn+1/2,,\displaystyle+\Delta t\left(\widetilde{{\bf{U}}}^{\mathrm{ADV},\star}\cdot{\bf{e}}_{r}\right)\left(\frac{\partial p_{0}}{\partial r}\right)^{n}+\Delta t\psi^{{n+\mathchoice{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 1}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 1}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\fiverm 1}\kern-1.63885pt/\kern-1.22911pt\lower 0.75346pt\hbox{\fiverm 2}}{1\!/2}},\star},

      For spherical geometry,

      (ρh)(2),\displaystyle(\rho h)^{(2),\star} =\displaystyle= (ρh)(1)\displaystyle(\rho h)^{(1)} (A42)
      Δt{[(𝐔~ADV,+w0n+1/2,𝐞r)(ρh)n+1/2,,pred]}\displaystyle-\Delta t\left\{\nabla\cdot\left[\left(\widetilde{{\bf{U}}}^{\mathrm{ADV},\star}+w_{0}^{{n+\mathchoice{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 1}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 1}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\fiverm 1}\kern-1.63885pt/\kern-1.22911pt\lower 0.75346pt\hbox{\fiverm 2}}{1\!/2}},\star}{\bf{e}}_{r}\right)(\rho h)^{{n+\mathchoice{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 1}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 1}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\fiverm 1}\kern-1.63885pt/\kern-1.22911pt\lower 0.75346pt\hbox{\fiverm 2}}{1\!/2}},\star,{\rm pred}}\right]\right\}
      +Δt{(𝐔~ADV,p0n)p0n𝐔~ADV,}\displaystyle+\Delta t\left\{\nabla\cdot\left(\widetilde{{\bf{U}}}^{\mathrm{ADV},\star}p_{0}^{n}\right)-p_{0}^{n}\nabla\cdot\widetilde{{\bf{U}}}^{\mathrm{ADV},\star}\right\}
      +Δtψn+1/2,,\displaystyle+\Delta t\psi^{{n+\mathchoice{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 1}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 1}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\fiverm 1}\kern-1.63885pt/\kern-1.22911pt\lower 0.75346pt\hbox{\fiverm 2}}{1\!/2}},\star},

    Then, for each Cartesian cell where ρ(2),<ρcutoff\rho^{(2),\star}<\rho_{\mathrm{cutoff}}, we recompute enthalpy using

    (ρh)(2),=ρ(2),h(ρ(2),,p0n+1,,Xk(2),).(\rho h)^{(2),\star}=\rho^{(2),\star}h\left(\rho^{(2),\star},p_{0}^{n+1,\star},X_{k}^{(2),\star}\right). (A43)
  9. I.

    Update the temperature using the equation of state: T(2),=T(ρ(2),,h(2),,Xk(2),)T^{(2),\star}=T(\rho^{(2),\star},h^{(2),\star},X_{k}^{(2),\star}) (planar geometry) or T(2),=T(ρ(2),,p0n+1,,Xk(2),)T^{(2),\star}=T(\rho^{(2),\star},p_{0}^{n+1,\star},X_{k}^{(2),\star}) (spherical geometry).

Step 5.

React the full state through a second time interval of Δt/2.\Delta t/2.

Call React State[ρ(2),,(ρh)(2),,Xk(2),,T(2),,(ρHext)(2),,p0n+1,][\rho^{(2),\star},(\rho h)^{(2),\star},X_{k}^{(2),\star},T^{(2),\star},(\rho H_{\rm ext})^{(2),\star},p_{0}^{n+1,\star}]
[ρn+1,,(ρh)n+1,,Xkn+1,,Tn+1,,(ρω˙k)(2),,(ρHnuc)(2),].\rightarrow[\rho^{n+1,\star},(\rho h)^{n+1,\star},X_{k}^{n+1,\star},T^{n+1,\star},(\rho\dot{\omega}_{k})^{(2),\star},(\rho H_{\rm nuc})^{(2),\star}].

Step 6.

Compute the time-centered expansion, Sn+1/2,S^{{n+\mathchoice{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 1}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 1}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\fiverm 1}\kern-1.63885pt/\kern-1.22911pt\lower 0.75346pt\hbox{\fiverm 2}}{1\!/2}},\star}, base state velocity, w0n+1/2w_{0}^{{n+\mathchoice{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 1}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 1}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\fiverm 1}\kern-1.63885pt/\kern-1.22911pt\lower 0.75346pt\hbox{\fiverm 2}}{1\!/2}}}, and base state velocity forcing.

  1. A.

    Compute Sn+1/2,S^{{n+\mathchoice{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 1}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 1}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\fiverm 1}\kern-1.63885pt/\kern-1.22911pt\lower 0.75346pt\hbox{\fiverm 2}}{1\!/2}},\star}. First, compute Sn+1,S^{n+1,\star} with

    Sn+1,=σkξk(ω˙k)(2),+1ρn+1,pρkpXk(ω˙k)(2),+σHnuc(2),+σHext(2),,S^{n+1,\star}=-\sigma\sum_{k}\xi_{k}(\dot{\omega}_{k})^{(2),\star}+\frac{1}{\rho^{n+1,\star}p_{\rho}}\sum_{k}p_{X_{k}}({\dot{\omega}}_{k})^{(2),\star}+\sigma H_{\rm nuc}^{(2),\star}+\sigma H_{\rm ext}^{(2),\star}, (A44)

    where (ω˙k)(2),=(ρω˙k)(2),/ρ(2),(\dot{\omega}_{k})^{(2),\star}=(\rho\dot{\omega}_{k})^{(2),\star}/\rho^{(2),\star} and the thermodynamic quantities are defined using ρn+1,,Xkn+1,,\rho^{n+1,\star},X_{k}^{n+1,\star}, and Tn+1,T^{n+1,\star} as inputs to the equation of state. Then, define

    Sn+1/2,¯=𝐀𝐯𝐠(Sn+1/2,),Sn+1/2.=Sn+Sn+1,2,\overline{S^{{n+\mathchoice{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 1}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 1}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\fiverm 1}\kern-1.63885pt/\kern-1.22911pt\lower 0.75346pt\hbox{\fiverm 2}}{1\!/2}},\star}}={\mathrm{\bf Avg}}(S^{{n+\mathchoice{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 1}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 1}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\fiverm 1}\kern-1.63885pt/\kern-1.22911pt\lower 0.75346pt\hbox{\fiverm 2}}{1\!/2}},\star}),\qquad S^{{n+\mathchoice{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 1}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 1}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\fiverm 1}\kern-1.63885pt/\kern-1.22911pt\lower 0.75346pt\hbox{\fiverm 2}}{1\!/2}}.\star}=\frac{S^{n}+S^{n+1,\star}}{2}, (A45)
  2. B.

    Compute w0n+1/2w_{0}^{{n+\mathchoice{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 1}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 1}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\fiverm 1}\kern-1.63885pt/\kern-1.22911pt\lower 0.75346pt\hbox{\fiverm 2}}{1\!/2}}}. First, define

    Γ1n+1/2,¯=Γ1n¯+Γ1n+1,¯2,ρ0n+1/2,=ρ0n+ρ0n+1,2,p0n+1/2,=p0n+p0n+1,2,\overline{\Gamma_{1}^{{n+\mathchoice{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 1}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 1}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\fiverm 1}\kern-1.63885pt/\kern-1.22911pt\lower 0.75346pt\hbox{\fiverm 2}}{1\!/2}},\star}}=\frac{\overline{\Gamma_{1}^{n}}+\overline{\Gamma_{1}^{n+1,\star}}}{2},\quad\rho_{0}^{{n+\mathchoice{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 1}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 1}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\fiverm 1}\kern-1.63885pt/\kern-1.22911pt\lower 0.75346pt\hbox{\fiverm 2}}{1\!/2}},\star}=\frac{\rho_{0}^{n}+\rho_{0}^{n+1,\star}}{2},\quad p_{0}^{{n+\mathchoice{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 1}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 1}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\fiverm 1}\kern-1.63885pt/\kern-1.22911pt\lower 0.75346pt\hbox{\fiverm 2}}{1\!/2}},\star}=\frac{p_{0}^{n}+p_{0}^{n+1,\star}}{2}, (A46)

    with

    Γ1n+1,¯=𝐀𝐯𝐠[Γ1(ρn+1,,p0n+1,,Xkn+1,)].\overline{\Gamma_{1}^{n+1,\star}}={\rm{\bf Avg}}\left[\Gamma_{1}\left(\rho^{n+1,\star},p_{0}^{n+1,\star},X_{k}^{n+1,\star}\right)\right]. (A47)

    For planar geometry, call
    Compute 𝒘𝟎w_{0} Planar[Sn+1/2,¯,Γ1n+1/2,¯,p0n+1/2,,ψn+1/2,][w0n+1/2][\overline{S^{{n+\mathchoice{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 1}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 1}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\fiverm 1}\kern-1.63885pt/\kern-1.22911pt\lower 0.75346pt\hbox{\fiverm 2}}{1\!/2}},\star}},\overline{\Gamma_{1}^{{n+\mathchoice{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 1}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 1}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\fiverm 1}\kern-1.63885pt/\kern-1.22911pt\lower 0.75346pt\hbox{\fiverm 2}}{1\!/2}},\star}},p_{0}^{{n+\mathchoice{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 1}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 1}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\fiverm 1}\kern-1.63885pt/\kern-1.22911pt\lower 0.75346pt\hbox{\fiverm 2}}{1\!/2}},\star},\psi^{{n+\mathchoice{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 1}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 1}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\fiverm 1}\kern-1.63885pt/\kern-1.22911pt\lower 0.75346pt\hbox{\fiverm 2}}{1\!/2}},\star}]\rightarrow[w_{0}^{{n+\mathchoice{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 1}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 1}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\fiverm 1}\kern-1.63885pt/\kern-1.22911pt\lower 0.75346pt\hbox{\fiverm 2}}{1\!/2}}}].

    For spherical geometry, call
    Compute 𝒘𝟎w_{0} Spherical[Sn+1/2,¯,Γ1n+1/2,¯,ρ0n+1/2,,p0n+1/2,,ηρn+1/2,][\overline{S^{{n+\mathchoice{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 1}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 1}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\fiverm 1}\kern-1.63885pt/\kern-1.22911pt\lower 0.75346pt\hbox{\fiverm 2}}{1\!/2}},\star}},\overline{\Gamma_{1}^{{n+\mathchoice{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 1}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 1}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\fiverm 1}\kern-1.63885pt/\kern-1.22911pt\lower 0.75346pt\hbox{\fiverm 2}}{1\!/2}},\star}},\rho_{0}^{{n+\mathchoice{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 1}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 1}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\fiverm 1}\kern-1.63885pt/\kern-1.22911pt\lower 0.75346pt\hbox{\fiverm 2}}{1\!/2}},\star},p_{0}^{{n+\mathchoice{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 1}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 1}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\fiverm 1}\kern-1.63885pt/\kern-1.22911pt\lower 0.75346pt\hbox{\fiverm 2}}{1\!/2}},\star},\eta_{\rho}^{{n+\mathchoice{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 1}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 1}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\fiverm 1}\kern-1.63885pt/\kern-1.22911pt\lower 0.75346pt\hbox{\fiverm 2}}{1\!/2}},\star}]
    [w0n+1/2]\rightarrow[w_{0}^{{n+\mathchoice{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 1}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 1}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\fiverm 1}\kern-1.63885pt/\kern-1.22911pt\lower 0.75346pt\hbox{\fiverm 2}}{1\!/2}}}].

  3. C.

    Compute the base state velocity forcing. Rearrange equation (A22),

    (1ρ0π0r)n=w0n+1/2w0n1/21/2(Δtn+Δtn1)w0n(w0r)n,\left(\frac{1}{\rho_{0}}\frac{\partial\pi_{0}}{\partial r}\right)^{n}=-\frac{w_{0}^{{n+\mathchoice{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 1}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 1}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\fiverm 1}\kern-1.63885pt/\kern-1.22911pt\lower 0.75346pt\hbox{\fiverm 2}}{1\!/2}}}-w_{0}^{n-\mathchoice{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 1}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 1}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\fiverm 1}\kern-1.63885pt/\kern-1.22911pt\lower 0.75346pt\hbox{\fiverm 2}}{1\!/2}}}{\mathchoice{\kern 0.0pt\raise 2.15277pt\hbox{\sevenrm 1}\kern-1.49994pt/\kern-1.49994pt\lower 1.07639pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 2.15277pt\hbox{\sevenrm 1}\kern-1.49994pt/\kern-1.49994pt\lower 1.07639pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 2.15277pt\hbox{\fiverm 1}\kern-1.99997pt/\kern-1.49994pt\lower 1.07639pt\hbox{\fiverm 2}}{1\!/2}(\Delta t^{n}+\Delta t^{n-1})}-w_{0}^{n}\left(\frac{\partial w_{0}}{\partial r}\right)^{n}, (A48)

    where w0nw_{0}^{n} and (w0/r)n(\partial w_{0}/\partial r)^{n} are defined as

    w0n\displaystyle w_{0}^{n} =\displaystyle= Δtnw0n1/2+Δtn1w0n+1/2Δtn+Δtn1,\displaystyle\frac{\Delta t^{n}w_{0}^{{n-\mathchoice{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 1}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 1}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\fiverm 1}\kern-1.63885pt/\kern-1.22911pt\lower 0.75346pt\hbox{\fiverm 2}}{1\!/2}}}+\Delta t^{n-1}w_{0}^{{n+\mathchoice{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 1}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 1}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\fiverm 1}\kern-1.63885pt/\kern-1.22911pt\lower 0.75346pt\hbox{\fiverm 2}}{1\!/2}}}}{\Delta t^{n}+\Delta t^{n-1}}, (A49)
    (w0r)n\displaystyle\left(\frac{\partial w_{0}}{\partial r}\right)^{n} =\displaystyle= 1Δtn+Δtn1[Δtn(w0r)n1/2+Δtn1(w0r)n+1/2].\displaystyle\frac{1}{\Delta t^{n}+\Delta t^{n-1}}\left[\Delta t^{n}\left(\frac{\partial w_{0}}{\partial r}\right)^{{n-\mathchoice{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 1}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 1}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\fiverm 1}\kern-1.63885pt/\kern-1.22911pt\lower 0.75346pt\hbox{\fiverm 2}}{1\!/2}}}+\Delta t^{n-1}\left(\frac{\partial w_{0}}{\partial r}\right)^{{n+\mathchoice{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 1}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 1}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\fiverm 1}\kern-1.63885pt/\kern-1.22911pt\lower 0.75346pt\hbox{\fiverm 2}}{1\!/2}}}\right].

    If n=0n=0, we use Δt1=Δt0\Delta t^{-1}=\Delta t^{0}.

Step 7.

Construct the time-centered advective velocity on edges, 𝐔~ADV\widetilde{{\bf{U}}}^{\mathrm{ADV}}.

The procedure to construct 𝐔~ADV,\widetilde{{\bf{U}}}^{\mathrm{ADV},\dagger} is identical to the procedure for computing 𝐔~ADV,,\widetilde{{\bf{U}}}^{\mathrm{ADV},\dagger,\star} in Step 3, but uses the updated values w0n+1/2w_{0}^{{n+\mathchoice{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 1}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 1}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\fiverm 1}\kern-1.63885pt/\kern-1.22911pt\lower 0.75346pt\hbox{\fiverm 2}}{1\!/2}}} and π0n\pi_{0}^{n} rather than w0n+1/2,w_{0}^{{n+\mathchoice{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 1}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 1}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\fiverm 1}\kern-1.63885pt/\kern-1.22911pt\lower 0.75346pt\hbox{\fiverm 2}}{1\!/2}},\star} and π0n,\pi_{0}^{n,\star}. We note that 𝐔~ADV\widetilde{{\bf{U}}}^{\mathrm{ADV}} satisfies the discrete version of (𝐔~ADV𝐞r)¯=0\overline{(\widetilde{{\bf{U}}}^{\mathrm{ADV}}\cdot{\bf{e}}_{r})}=0 as well as

(β0n+1/2,𝐔~ADV)=β0n+1/2,(Sn+1/2,Sn+1/2,¯),\nabla\cdot\left(\beta_{0}^{{n+\mathchoice{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 1}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 1}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\fiverm 1}\kern-1.63885pt/\kern-1.22911pt\lower 0.75346pt\hbox{\fiverm 2}}{1\!/2}},\star}\widetilde{{\bf{U}}}^{\mathrm{ADV}}\right)=\beta_{0}^{{n+\mathchoice{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 1}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 1}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\fiverm 1}\kern-1.63885pt/\kern-1.22911pt\lower 0.75346pt\hbox{\fiverm 2}}{1\!/2}},\star}\left(S^{{n+\mathchoice{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 1}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 1}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\fiverm 1}\kern-1.63885pt/\kern-1.22911pt\lower 0.75346pt\hbox{\fiverm 2}}{1\!/2}},\star}-\overline{S^{{n+\mathchoice{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 1}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 1}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\fiverm 1}\kern-1.63885pt/\kern-1.22911pt\lower 0.75346pt\hbox{\fiverm 2}}{1\!/2}},\star}}\right), (A51)
β0n+1/2,=β0n+β0n+1,2;β0n+1,=β0(ρ0n+1,,p0n+1,,Γ1n+1,¯).\beta_{0}^{{n+\mathchoice{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 1}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 1}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\fiverm 1}\kern-1.63885pt/\kern-1.22911pt\lower 0.75346pt\hbox{\fiverm 2}}{1\!/2}},\star}=\frac{\beta_{0}^{n}+\beta_{0}^{n+1,\star}}{2};\qquad\beta_{0}^{n+1,\star}=\beta_{0}\left(\rho_{0}^{n+1,\star},p_{0}^{n+1,\star},\overline{\Gamma_{1}^{n+1,\star}}\right). (A52)
Step 8.

Advect the base state and full state through a time interval of Δt.\Delta t.

  1. A.

    Update ρ0\rho_{0}, saving the time-centered density at radial edges by calling

    Advect Base Density[ρ0n,w0n+1/2][ρ0(2a),ρ0n+1/2,pred][\rho_{0}^{n},w_{0}^{{n+\mathchoice{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 1}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 1}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\fiverm 1}\kern-1.63885pt/\kern-1.22911pt\lower 0.75346pt\hbox{\fiverm 2}}{1\!/2}}}]\rightarrow[\rho_{0}^{(2a)},\rho_{0}^{{n+\mathchoice{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 1}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 1}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\fiverm 1}\kern-1.63885pt/\kern-1.22911pt\lower 0.75346pt\hbox{\fiverm 2}}{1\!/2}},{\rm pred}}].

  2. B.

    Update (ρXk)(\rho X_{k}). This step is identical to Step 4B except we use the updated values w0n+1/2,𝐔~ADVw_{0}^{{n+\mathchoice{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 1}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 1}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\fiverm 1}\kern-1.63885pt/\kern-1.22911pt\lower 0.75346pt\hbox{\fiverm 2}}{1\!/2}}},\widetilde{{\bf{U}}}^{\mathrm{ADV}}, and ρ0(2a)\rho_{0}^{(2a)} rather than w0n+1/2,,𝐔~ADV,w_{0}^{{n+\mathchoice{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 1}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 1}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\fiverm 1}\kern-1.63885pt/\kern-1.22911pt\lower 0.75346pt\hbox{\fiverm 2}}{1\!/2}},\star},\widetilde{{\bf{U}}}^{\mathrm{ADV},\star}, and ρ0(2a),\rho_{0}^{(2a),\star}. In particular:

    1. i.

      Compute the time-centered species edge states, (ρXk)n+1/2,pred(\rho X_{k})^{{n+\mathchoice{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 1}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 1}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\fiverm 1}\kern-1.63885pt/\kern-1.22911pt\lower 0.75346pt\hbox{\fiverm 2}}{1\!/2}},{\rm pred}}, for the conservative update of (ρXk)(1)(\rho X_{k})^{(1)}. We use equations (17) and (13) to predict ρ(1)=ρ(1)ρ0n\rho^{{}^{\prime}(1)}=\rho^{(1)}-\rho_{0}^{n} and Xk(1)=(ρXk)(1)/ρ(1)X_{k}^{(1)}=(\rho X_{k})^{(1)}/\rho^{(1)} to time-centered edges with 𝐔=𝐔~ADV+w0n+1/2𝐞r{\bf{U}}=\widetilde{{\bf{U}}}^{\mathrm{ADV}}+w_{0}^{{n+\mathchoice{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 1}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 1}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\fiverm 1}\kern-1.63885pt/\kern-1.22911pt\lower 0.75346pt\hbox{\fiverm 2}}{1\!/2}}}{\bf{e}}_{r}, yielding ρn+1/2,pred\rho^{{}^{\prime}{n+\mathchoice{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 1}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 1}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\fiverm 1}\kern-1.63885pt/\kern-1.22911pt\lower 0.75346pt\hbox{\fiverm 2}}{1\!/2}},{\rm pred}} and Xkn+1/2,predX_{k}^{{n+\mathchoice{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 1}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 1}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\fiverm 1}\kern-1.63885pt/\kern-1.22911pt\lower 0.75346pt\hbox{\fiverm 2}}{1\!/2}},{\rm pred}}. We convert the perturbational density to a full state density using

      ρn+1/2,pred=ρn+1/2,pred+ρ0n+ρ0(2a)2.\rho^{{n+\mathchoice{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 1}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 1}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\fiverm 1}\kern-1.63885pt/\kern-1.22911pt\lower 0.75346pt\hbox{\fiverm 2}}{1\!/2}},{\rm pred}}=\rho^{{}^{\prime}{n+\mathchoice{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 1}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 1}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\fiverm 1}\kern-1.63885pt/\kern-1.22911pt\lower 0.75346pt\hbox{\fiverm 2}}{1\!/2}},{\rm pred}}+\frac{\rho_{0}^{n}+\rho_{0}^{(2a)}}{2}. (A53)

      Then, (ρXk)n+1/2,pred=(ρn+1/2,predXkn+1/2,pred)(\rho X_{k})^{{n+\mathchoice{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 1}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 1}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\fiverm 1}\kern-1.63885pt/\kern-1.22911pt\lower 0.75346pt\hbox{\fiverm 2}}{1\!/2}},{\rm pred}}=(\rho^{{n+\mathchoice{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 1}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 1}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\fiverm 1}\kern-1.63885pt/\kern-1.22911pt\lower 0.75346pt\hbox{\fiverm 2}}{1\!/2}},{\rm pred}}X_{k}^{{n+\mathchoice{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 1}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 1}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\fiverm 1}\kern-1.63885pt/\kern-1.22911pt\lower 0.75346pt\hbox{\fiverm 2}}{1\!/2}},{\rm pred}}).

    2. ii.

      Evolve (ρXk)(1)(ρXk)(2)(\rho X_{k})^{(1)}\rightarrow(\rho X_{k})^{(2)} using

      (ρXk)(2)=(ρXk)(1)Δt{[(𝐔~ADV+w0n+1/2𝐞r)(ρXk)n+1/2,pred]},(\rho X_{k})^{(2)}=(\rho X_{k})^{(1)}-\Delta t\left\{\nabla\cdot\left[\left(\widetilde{{\bf{U}}}^{\mathrm{ADV}}+w_{0}^{{n+\mathchoice{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 1}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 1}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\fiverm 1}\kern-1.63885pt/\kern-1.22911pt\lower 0.75346pt\hbox{\fiverm 2}}{1\!/2}}}{\bf{e}}_{r}\right)(\rho X_{k})^{{n+\mathchoice{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 1}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 1}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\fiverm 1}\kern-1.63885pt/\kern-1.22911pt\lower 0.75346pt\hbox{\fiverm 2}}{1\!/2}},{\rm pred}}\right]\right\}, (A54)
      ρ(2)=k(ρXk)(2),Xk(2)=(ρXk)(2)/ρ(2).\rho^{(2)}=\sum_{k}(\rho X_{k})^{(2)},\qquad X_{k}^{(2)}=(\rho X_{k})^{(2)}/\rho^{(2)}. (A55)
  3. C.

    Define a radial edge-centered ηρn+1/2\eta_{\rho}^{{n+\mathchoice{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 1}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 1}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\fiverm 1}\kern-1.63885pt/\kern-1.22911pt\lower 0.75346pt\hbox{\fiverm 2}}{1\!/2}}}.

    For planar geometry,

    ηρn+1/2\displaystyle\eta_{\rho}^{{n+\mathchoice{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 1}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 1}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\fiverm 1}\kern-1.63885pt/\kern-1.22911pt\lower 0.75346pt\hbox{\fiverm 2}}{1\!/2}}} =\displaystyle= 𝐀𝐯𝐠k[(𝐔~ADV𝐞r+w0n+1/2)(ρXk)n+1/2,pred]\displaystyle{\rm{\bf Avg}}\sum_{k}\left[\left(\widetilde{{\bf{U}}}^{\mathrm{ADV}}\cdot{\bf{e}}_{r}+w_{0}^{{n+\mathchoice{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 1}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 1}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\fiverm 1}\kern-1.63885pt/\kern-1.22911pt\lower 0.75346pt\hbox{\fiverm 2}}{1\!/2}}}\right)(\rho X_{k})^{{n+\mathchoice{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 1}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 1}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\fiverm 1}\kern-1.63885pt/\kern-1.22911pt\lower 0.75346pt\hbox{\fiverm 2}}{1\!/2}},{\rm pred}}\right] (A56)
    w0n+1/2ρ0n+1/2,pred,\displaystyle-w_{0}^{{n+\mathchoice{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 1}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 1}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\fiverm 1}\kern-1.63885pt/\kern-1.22911pt\lower 0.75346pt\hbox{\fiverm 2}}{1\!/2}}}\rho_{0}^{{n+\mathchoice{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 1}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 1}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\fiverm 1}\kern-1.63885pt/\kern-1.22911pt\lower 0.75346pt\hbox{\fiverm 2}}{1\!/2}},{\rm pred}},

    For spherical geometry, first construct ηρcart,n+1/2=[ρ(𝐔𝐞r)]n+1/2\eta_{\rho}^{{\rm cart},{n+\mathchoice{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 1}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 1}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\fiverm 1}\kern-1.63885pt/\kern-1.22911pt\lower 0.75346pt\hbox{\fiverm 2}}{1\!/2}}}=[\rho^{\prime}({\bf{U}}\cdot{\bf{e}}_{r})]^{{n+\mathchoice{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 1}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 1}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\fiverm 1}\kern-1.63885pt/\kern-1.22911pt\lower 0.75346pt\hbox{\fiverm 2}}{1\!/2}}} on Cartesian cell centers using:

    ηρcart,n+1/2=[(ρ(1)+ρ(2)2)(ρ0n+ρ0(2a)2)](𝐔~ADV𝐞r+w0n+1/2).\eta_{\rho}^{{\rm cart},{n+\mathchoice{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 1}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 1}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\fiverm 1}\kern-1.63885pt/\kern-1.22911pt\lower 0.75346pt\hbox{\fiverm 2}}{1\!/2}}}=\left[\left(\frac{\rho^{(1)}+\rho^{(2)}}{2}\right)-\left(\frac{\rho_{0}^{n}+\rho_{0}^{(2a)}}{2}\right)\right]\left(\widetilde{{\bf{U}}}^{\mathrm{ADV}}\cdot{\bf{e}}_{r}+w_{0}^{{n+\mathchoice{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 1}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 1}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\fiverm 1}\kern-1.63885pt/\kern-1.22911pt\lower 0.75346pt\hbox{\fiverm 2}}{1\!/2}}}\right). (A57)

    Then,

    ηρn+1/2=𝐀𝐯𝐠(ηρcart,n+1/2).\eta_{\rho}^{{n+\mathchoice{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 1}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 1}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\fiverm 1}\kern-1.63885pt/\kern-1.22911pt\lower 0.75346pt\hbox{\fiverm 2}}{1\!/2}}}={\rm{\bf Avg}}\left(\eta_{\rho}^{{\rm cart},{n+\mathchoice{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 1}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 1}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\fiverm 1}\kern-1.63885pt/\kern-1.22911pt\lower 0.75346pt\hbox{\fiverm 2}}{1\!/2}}}\right). (A58)

    This gives a radial cell-centered ηρn+1/2\eta_{\rho}^{{n+\mathchoice{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 1}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 1}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\fiverm 1}\kern-1.63885pt/\kern-1.22911pt\lower 0.75346pt\hbox{\fiverm 2}}{1\!/2}}}. To get ηρn+1/2\eta_{\rho}^{{n+\mathchoice{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 1}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 1}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\fiverm 1}\kern-1.63885pt/\kern-1.22911pt\lower 0.75346pt\hbox{\fiverm 2}}{1\!/2}}} at radial edges, average the two neighboring cell-centered values.

  4. D.

    Correct ρ0\rho_{0} by setting ρ0n+1=\rho_{0}^{n+1}= Avg(ρ(2))(\rho^{(2)}).

  5. E.

    Update p0p_{0} by calling Enforce HSE[p0n,ρ0n+1][p0n+1][p_{0}^{n},\rho_{0}^{n+1}]\rightarrow[p_{0}^{n+1}].

  6. F.

    Compute ψn+1/2\psi^{{n+\mathchoice{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 1}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 1}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\fiverm 1}\kern-1.63885pt/\kern-1.22911pt\lower 0.75346pt\hbox{\fiverm 2}}{1\!/2}}}.

    For planar geometry,

    ψjn+1/2=12(ηρ,j1/2n+1/2+ηρ,j+1/2n+1/2)g.\psi_{j}^{{n+\mathchoice{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 1}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 1}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\fiverm 1}\kern-1.63885pt/\kern-1.22911pt\lower 0.75346pt\hbox{\fiverm 2}}{1\!/2}}}=\frac{1}{2}\left(\eta_{\rho,j-\mathchoice{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 1}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 1}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\fiverm 1}\kern-1.63885pt/\kern-1.22911pt\lower 0.75346pt\hbox{\fiverm 2}}{1\!/2}}^{{n+\mathchoice{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 1}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 1}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\fiverm 1}\kern-1.63885pt/\kern-1.22911pt\lower 0.75346pt\hbox{\fiverm 2}}{1\!/2}}}+\eta_{\rho,j+\mathchoice{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 1}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 1}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\fiverm 1}\kern-1.63885pt/\kern-1.22911pt\lower 0.75346pt\hbox{\fiverm 2}}{1\!/2}}^{{n+\mathchoice{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 1}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 1}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\fiverm 1}\kern-1.63885pt/\kern-1.22911pt\lower 0.75346pt\hbox{\fiverm 2}}{1\!/2}}}\right)g. (A59)

    For spherical geometry, first compute:

    Γ1(2)¯=𝐀𝐯𝐠[Γ1(ρ(2),p0n+1,Xk(2))].\overline{\Gamma_{1}^{(2)}}={\rm{\bf Avg}}\left[\Gamma_{1}\left(\rho^{(2)},p_{0}^{n+1},X_{k}^{(2)}\right)\right]. (A60)

    Then, define ψn+1/2\psi^{{n+\mathchoice{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 1}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 1}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\fiverm 1}\kern-1.63885pt/\kern-1.22911pt\lower 0.75346pt\hbox{\fiverm 2}}{1\!/2}}} using equation (A18):

    ψjn+1/2\displaystyle\psi_{j}^{{n+\mathchoice{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 1}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 1}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\fiverm 1}\kern-1.63885pt/\kern-1.22911pt\lower 0.75346pt\hbox{\fiverm 2}}{1\!/2}}} =\displaystyle= (Γ1(1)¯+Γ1(2)¯2)j(p0n+p0n+12)j\displaystyle\left(\frac{\overline{\Gamma_{1}^{(1)}}+\overline{\Gamma_{1}^{(2)}}}{2}\right)_{j}\left(\frac{p_{0}^{n}+p_{0}^{n+1}}{2}\right)_{j} (A61)
    {Sjn+1/2¯1rj2[(r2w0n+1/2)j+1/2(r2w0n+1/2)j1/2]}.\displaystyle\left\{\overline{S_{j}^{{n+\mathchoice{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 1}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 1}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\fiverm 1}\kern-1.63885pt/\kern-1.22911pt\lower 0.75346pt\hbox{\fiverm 2}}{1\!/2}}}}-\frac{1}{r_{j}^{2}}\left[\left(r^{2}w_{0}^{{n+\mathchoice{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 1}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 1}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\fiverm 1}\kern-1.63885pt/\kern-1.22911pt\lower 0.75346pt\hbox{\fiverm 2}}{1\!/2}}}\right)_{j+\mathchoice{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 1}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 1}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\fiverm 1}\kern-1.63885pt/\kern-1.22911pt\lower 0.75346pt\hbox{\fiverm 2}}{1\!/2}}-\left(r^{2}w_{0}^{{n+\mathchoice{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 1}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 1}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\fiverm 1}\kern-1.63885pt/\kern-1.22911pt\lower 0.75346pt\hbox{\fiverm 2}}{1\!/2}}}\right)_{j-\mathchoice{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 1}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 1}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\fiverm 1}\kern-1.63885pt/\kern-1.22911pt\lower 0.75346pt\hbox{\fiverm 2}}{1\!/2}}\right]\right\}.
  7. G.

    Update (ρh)0(\rho h)_{0} by calling Advect Base Enthalpy[(ρh)0n,w0n+1/2,ψn+1/2][(ρh)0n+1][(\rho h)_{0}^{n},w_{0}^{{n+\mathchoice{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 1}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 1}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\fiverm 1}\kern-1.63885pt/\kern-1.22911pt\lower 0.75346pt\hbox{\fiverm 2}}{1\!/2}}},\psi^{{n+\mathchoice{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 1}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 1}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\fiverm 1}\kern-1.63885pt/\kern-1.22911pt\lower 0.75346pt\hbox{\fiverm 2}}{1\!/2}}}]\rightarrow[(\rho h)_{0}^{n+1}].

  8. H.

    Update the enthalpy. This step is identical to Step 4H except we use the updated values w0n+1/2,𝐔~ADV,ρ0n+1,(ρh)0n+1,p0n+1/2w_{0}^{{n+\mathchoice{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 1}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 1}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\fiverm 1}\kern-1.63885pt/\kern-1.22911pt\lower 0.75346pt\hbox{\fiverm 2}}{1\!/2}}},\widetilde{{\bf{U}}}^{\mathrm{ADV}},\rho_{0}^{n+1},(\rho h)_{0}^{n+1},p_{0}^{n+\mathchoice{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 1}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 1}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\fiverm 1}\kern-1.63885pt/\kern-1.22911pt\lower 0.75346pt\hbox{\fiverm 2}}{1\!/2}}, and ψn+1/2\psi^{n+\mathchoice{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 1}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 1}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\fiverm 1}\kern-1.63885pt/\kern-1.22911pt\lower 0.75346pt\hbox{\fiverm 2}}{1\!/2}} rather than
    w0n+1/2,,𝐔~ADV,,ρ0n+1,,(ρh)0n+1,,p0nw_{0}^{{n+\mathchoice{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 1}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 1}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\fiverm 1}\kern-1.63885pt/\kern-1.22911pt\lower 0.75346pt\hbox{\fiverm 2}}{1\!/2}},\star},\widetilde{{\bf{U}}}^{\mathrm{ADV},\star},\rho_{0}^{n+1,\star},(\rho h)_{0}^{n+1,\star},p_{0}^{n}, and ψn+1/2,\psi^{n+\mathchoice{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 1}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 1}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\fiverm 1}\kern-1.63885pt/\kern-1.22911pt\lower 0.75346pt\hbox{\fiverm 2}}{1\!/2},\star}. In particular:

    1. i.

      Compute the time-centered enthalpy edge state, (ρh)n+1/2,pred,(\rho h)^{{n+\mathchoice{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 1}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 1}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\fiverm 1}\kern-1.63885pt/\kern-1.22911pt\lower 0.75346pt\hbox{\fiverm 2}}{1\!/2}},{\rm pred}}, for the conservative update of (ρh)(1)(\rho h)^{(1)}. We use equation (18) to predict (ρh)=(ρh)(1)(ρh)0n(\rho h)^{\prime}=(\rho h)^{(1)}-(\rho h)_{0}^{n} to time-centered edges with 𝐔=𝐔~ADV+w0n+1/2𝐞r{\bf{U}}=\widetilde{{\bf{U}}}^{\mathrm{ADV}}+w_{0}^{{n+\mathchoice{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 1}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 1}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\fiverm 1}\kern-1.63885pt/\kern-1.22911pt\lower 0.75346pt\hbox{\fiverm 2}}{1\!/2}}}{\bf{e}}_{r}, yielding (ρh)n+1/2,pred(\rho h)^{{}^{\prime}{n+\mathchoice{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 1}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 1}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\fiverm 1}\kern-1.63885pt/\kern-1.22911pt\lower 0.75346pt\hbox{\fiverm 2}}{1\!/2}},{\rm pred}}. We convert the perturbational enthalpy to a full state enthalpy using

      (ρh)n+1/2,pred=(ρh)n+1/2,pred+(ρh)0n+(ρh)0n+12.(\rho h)^{{n+\mathchoice{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 1}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 1}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\fiverm 1}\kern-1.63885pt/\kern-1.22911pt\lower 0.75346pt\hbox{\fiverm 2}}{1\!/2}},{\rm pred}}=(\rho h)^{{}^{\prime}{n+\mathchoice{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 1}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 1}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\fiverm 1}\kern-1.63885pt/\kern-1.22911pt\lower 0.75346pt\hbox{\fiverm 2}}{1\!/2}},{\rm pred}}+\frac{(\rho h)_{0}^{n}+(\rho h)_{0}^{n+1}}{2}. (A62)
    2. ii.

      Evolve (ρh)(1)(ρh)(2)(\rho h)^{(1)}\rightarrow(\rho h)^{(2)}.

      For planar geometry,

      (ρh)(2)\displaystyle(\rho h)^{(2)} =\displaystyle= (ρh)(1)Δt{[(𝐔~ADV+w0n+1/2𝐞r)(ρh)n+1/2,pred]}\displaystyle(\rho h)^{(1)}-\Delta t\left\{\nabla\cdot\left[\left(\widetilde{{\bf{U}}}^{\mathrm{ADV}}+w_{0}^{{n+\mathchoice{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 1}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 1}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\fiverm 1}\kern-1.63885pt/\kern-1.22911pt\lower 0.75346pt\hbox{\fiverm 2}}{1\!/2}}}{\bf{e}}_{r}\right)(\rho h)^{{n+\mathchoice{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 1}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 1}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\fiverm 1}\kern-1.63885pt/\kern-1.22911pt\lower 0.75346pt\hbox{\fiverm 2}}{1\!/2}},{\rm pred}}\right]\right\} (A63)
      +Δt(𝐔~ADV𝐞r)(p0r)n+1/2+Δtψn+1/2,\displaystyle+\Delta t\left(\widetilde{{\bf{U}}}^{\mathrm{ADV}}\cdot{\bf{e}}_{r}\right)\left(\frac{\partial p_{0}}{\partial r}\right)^{n+\mathchoice{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 1}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 1}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\fiverm 1}\kern-1.63885pt/\kern-1.22911pt\lower 0.75346pt\hbox{\fiverm 2}}{1\!/2}}+\Delta t\psi^{{n+\mathchoice{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 1}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 1}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\fiverm 1}\kern-1.63885pt/\kern-1.22911pt\lower 0.75346pt\hbox{\fiverm 2}}{1\!/2}}},

      For spherical geometry,

      (ρh)(2)\displaystyle(\rho h)^{(2)} =\displaystyle= (ρh)(1)Δt{[(𝐔~ADV+w0n+1/2𝐞r)(ρh)n+1/2,pred]}\displaystyle(\rho h)^{(1)}-\Delta t\left\{\nabla\cdot\left[\left(\widetilde{{\bf{U}}}^{\mathrm{ADV}}+w_{0}^{{n+\mathchoice{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 1}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 1}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\fiverm 1}\kern-1.63885pt/\kern-1.22911pt\lower 0.75346pt\hbox{\fiverm 2}}{1\!/2}}}{\bf{e}}_{r}\right)(\rho h)^{{n+\mathchoice{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 1}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 1}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\fiverm 1}\kern-1.63885pt/\kern-1.22911pt\lower 0.75346pt\hbox{\fiverm 2}}{1\!/2}},{\rm pred}}\right]\right\}
      +Δt[(𝐔~ADVp0n+1/2)p0n+1/2𝐔~ADV]+Δtψn+1/2,\displaystyle+\Delta t\left[\nabla\cdot\left(\widetilde{{\bf{U}}}^{\mathrm{ADV}}p_{0}^{{n+\mathchoice{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 1}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 1}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\fiverm 1}\kern-1.63885pt/\kern-1.22911pt\lower 0.75346pt\hbox{\fiverm 2}}{1\!/2}}}\right)-p_{0}^{{n+\mathchoice{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 1}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 1}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\fiverm 1}\kern-1.63885pt/\kern-1.22911pt\lower 0.75346pt\hbox{\fiverm 2}}{1\!/2}}}\nabla\cdot\widetilde{{\bf{U}}}^{\mathrm{ADV}}\right]+\Delta t\psi^{{n+\mathchoice{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 1}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 1}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\fiverm 1}\kern-1.63885pt/\kern-1.22911pt\lower 0.75346pt\hbox{\fiverm 2}}{1\!/2}}},

      where p0n+1/2p_{0}^{n+\mathchoice{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 1}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 1}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\fiverm 1}\kern-1.63885pt/\kern-1.22911pt\lower 0.75346pt\hbox{\fiverm 2}}{1\!/2}} is defined as p0n+1/2=(p0n+p0n+1)/2p_{0}^{n+\mathchoice{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 1}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 1}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\fiverm 1}\kern-1.63885pt/\kern-1.22911pt\lower 0.75346pt\hbox{\fiverm 2}}{1\!/2}}=(p_{0}^{n}+p_{0}^{n+1})/2.

    Then, for each Cartesian cell where ρ(2)<ρcutoff\rho^{(2)}<\rho_{\mathrm{cutoff}}, we recompute enthalpy using

    (ρh)(2)=ρ(2)h(ρ(2),p0n+1,Xk(2)).(\rho h)^{(2)}=\rho^{(2)}h\left(\rho^{(2)},p_{0}^{n+1},X_{k}^{(2)}\right). (A65)
  9. I.

    Update the temperature using the equation of state: T(2)=T(ρ(2),h(2),Xk(2))T^{(2)}=T(\rho^{(2)},h^{(2)},X_{k}^{(2)}) (planar geometry) or T(2)=T(ρ(2),p0n+1,Xk(2))T^{(2)}=T(\rho^{(2)},p_{0}^{n+1},X_{k}^{(2)}) (spherical geometry).

Step 9.

React the full state through a second time interval of Δt/2.\Delta t/2.

Call React State[ρ(2),(ρh)(2),Xk(2),T(2),(ρHext)(2),p0n+1][\rho^{(2)},(\rho h)^{(2)},X_{k}^{(2)},T^{(2)},(\rho H_{\rm ext})^{(2)},p_{0}^{n+1}]
[ρn+1,(ρh)n+1,Xkn+1,Tn+1,(ρω˙k)(2),(ρHnuc)(2)].\rightarrow[\rho^{n+1},(\rho h)^{n+1},X_{k}^{n+1},T^{n+1},(\rho\dot{\omega}_{k})^{(2)},(\rho H_{\rm nuc})^{(2)}].

Step 10.

Define the new time expansion, Sn+1S^{n+1}, and Γ1n+1¯\overline{\Gamma_{1}^{n+1}}.

  1. A.

    Define

    Sn+1=σkξk(ω˙k)(2)+σHnuc(2)+1ρn+1pρkpXk(ω˙k)(2)+σHext(2),S^{n+1}=-\sigma\sum_{k}\xi_{k}(\dot{\omega}_{k})^{(2)}+\sigma H_{\rm nuc}^{(2)}+\frac{1}{\rho^{n+1}p_{\rho}}\sum_{k}p_{X_{k}}({\dot{\omega}}_{k})^{(2)}+\sigma H_{\rm ext}^{(2)}, (A66)

    where (ω˙k)(2)=(ρω˙k)(2)/ρ(2)(\dot{\omega}_{k})^{(2)}=(\rho\dot{\omega}_{k})^{(2)}/\rho^{(2)} and the thermodynamic quantities are defined using ρn+1\rho^{n+1}, Xkn+1X_{k}^{n+1}, and Tn+1T^{n+1} as inputs to the equation of state. Then, compute

    Sn+1¯=𝐀𝐯𝐠(Sn+1).\overline{S^{n+1}}={\mathrm{\bf Avg}}(S^{n+1}). (A67)
  2. B.

    Define

    Γ1n+1¯=𝐀𝐯𝐠[Γ1(ρn+1,p0n+1,Xkn+1)].\overline{\Gamma_{1}^{n+1}}={\rm{\bf Avg}}\left[\Gamma_{1}\left(\rho^{n+1},p_{0}^{n+1},X_{k}^{n+1}\right)\right]. (A68)
Step 11.

Update the velocity.

First, we compute the time-centered edge velocities, 𝐔~n+1/2,pred\widetilde{{\bf{U}}}^{{n+\mathchoice{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 1}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 1}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\fiverm 1}\kern-1.63885pt/\kern-1.22911pt\lower 0.75346pt\hbox{\fiverm 2}}{1\!/2}},{\rm pred}}. Then, we define

ρn+1/2=ρn+ρn+12,ρ0n+1/2=ρ0n+ρ0n+12.\rho^{n+\mathchoice{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 1}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 1}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\fiverm 1}\kern-1.63885pt/\kern-1.22911pt\lower 0.75346pt\hbox{\fiverm 2}}{1\!/2}}=\frac{\rho^{n}+\rho^{n+1}}{2},\qquad\rho_{0}^{n+\mathchoice{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 1}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 1}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\fiverm 1}\kern-1.63885pt/\kern-1.22911pt\lower 0.75346pt\hbox{\fiverm 2}}{1\!/2}}=\frac{\rho_{0}^{n}+\rho_{0}^{n+1}}{2}. (A69)

We update the velocity field 𝐔~n\widetilde{{\bf{U}}}^{n} to 𝐔~n+1,\widetilde{{\bf{U}}}^{n+1,\dagger} by discretizing equation (10) as

𝐔~n+1,\displaystyle\widetilde{{\bf{U}}}^{n+1,\dagger} =\displaystyle= 𝐔~nΔt[(𝐔~ADV+w0n+1/2𝐞r)𝐔~n+1/2,pred]\displaystyle\widetilde{{\bf{U}}}^{n}-\Delta t\left[\left(\widetilde{{\bf{U}}}^{\mathrm{ADV}}+w_{0}^{{n+\mathchoice{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 1}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 1}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\fiverm 1}\kern-1.63885pt/\kern-1.22911pt\lower 0.75346pt\hbox{\fiverm 2}}{1\!/2}}}{\bf{e}}_{r}\right)\cdot\nabla\widetilde{{\bf{U}}}^{{n+\mathchoice{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 1}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 1}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\fiverm 1}\kern-1.63885pt/\kern-1.22911pt\lower 0.75346pt\hbox{\fiverm 2}}{1\!/2}},{\rm pred}}\right]
Δt(𝐔~ADV𝐞r)(w0r)n+1/2𝐞r\displaystyle-\Delta t\left(\widetilde{{\bf{U}}}^{\mathrm{ADV}}\cdot{\bf{e}}_{r}\right)\left(\frac{\partial w_{0}}{\partial r}\right)^{n+\mathchoice{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 1}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 1}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\fiverm 1}\kern-1.63885pt/\kern-1.22911pt\lower 0.75346pt\hbox{\fiverm 2}}{1\!/2}}{\bf{e}}_{r}
+Δt[1ρn+1/2𝐆πn1/2+(1ρ0π0r)n𝐞r(ρn+1/2ρ0n+1/2)ρn+1/2gn+1/2𝐞r],\displaystyle+\Delta t\left[-\frac{1}{\rho^{n+\mathchoice{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 1}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 1}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\fiverm 1}\kern-1.63885pt/\kern-1.22911pt\lower 0.75346pt\hbox{\fiverm 2}}{1\!/2}}}\mathbf{G}\pi^{n-\mathchoice{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 1}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 1}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\fiverm 1}\kern-1.63885pt/\kern-1.22911pt\lower 0.75346pt\hbox{\fiverm 2}}{1\!/2}}+\left(\frac{1}{\rho_{0}}\frac{\partial\pi_{0}}{\partial r}\right)^{n}{\bf{e}}_{r}-\frac{\left(\rho^{n+\mathchoice{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 1}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 1}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\fiverm 1}\kern-1.63885pt/\kern-1.22911pt\lower 0.75346pt\hbox{\fiverm 2}}{1\!/2}}-\rho_{0}^{n+\mathchoice{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 1}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 1}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\fiverm 1}\kern-1.63885pt/\kern-1.22911pt\lower 0.75346pt\hbox{\fiverm 2}}{1\!/2}}\right)}{\rho^{n+\mathchoice{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 1}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 1}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\fiverm 1}\kern-1.63885pt/\kern-1.22911pt\lower 0.75346pt\hbox{\fiverm 2}}{1\!/2}}}g^{{n+\mathchoice{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 1}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 1}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\fiverm 1}\kern-1.63885pt/\kern-1.22911pt\lower 0.75346pt\hbox{\fiverm 2}}{1\!/2}}}{\bf{e}}_{r}\right],

where 𝐆\mathbf{G} approximates a cell-centered gradient from nodal data. Again, the \dagger superscript refers to the fact that the updated velocity does not satisfy the divergence constraint.

Finally, we use an approximate nodal projection to define 𝐔~n+1\widetilde{{\bf{U}}}^{n+1} from 𝐔~n+1,,\widetilde{{\bf{U}}}^{n+1,\dagger}, such that 𝐔~n+1\widetilde{{\bf{U}}}^{n+1} approximately satisfies

(β0n+1/2𝐔~n+1)=β0n+1/2(Sn+1Sn+1¯),\nabla\cdot\left(\beta_{0}^{{n+\mathchoice{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 1}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 1}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\fiverm 1}\kern-1.63885pt/\kern-1.22911pt\lower 0.75346pt\hbox{\fiverm 2}}{1\!/2}}}\widetilde{{\bf{U}}}^{n+1}\right)=\beta_{0}^{{n+\mathchoice{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 1}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 1}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\fiverm 1}\kern-1.63885pt/\kern-1.22911pt\lower 0.75346pt\hbox{\fiverm 2}}{1\!/2}}}\left(S^{n+1}-\overline{S^{n+1}}\right), (A71)

where β0n+1/2\beta_{0}^{{n+\mathchoice{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 1}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 1}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\fiverm 1}\kern-1.63885pt/\kern-1.22911pt\lower 0.75346pt\hbox{\fiverm 2}}{1\!/2}}} is defined as

β0n+1/2=β0n+β0n+12;β0n+1=β(ρ0n+1,p0n+1,Γ1n+1¯,gn+1).\beta_{0}^{{n+\mathchoice{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 1}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 1}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\fiverm 1}\kern-1.63885pt/\kern-1.22911pt\lower 0.75346pt\hbox{\fiverm 2}}{1\!/2}}}=\frac{\beta_{0}^{n}+\beta_{0}^{n+1}}{2};\qquad\beta_{0}^{n+1}=\beta\left(\rho_{0}^{n+1},p_{0}^{n+1},\overline{\Gamma_{1}^{n+1}},g^{n+1}\right). (A72)

As part of the projection we also define the new-time perturbational pressure, πn+1/2.\pi^{n+\mathchoice{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 1}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 1}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\fiverm 1}\kern-1.63885pt/\kern-1.22911pt\lower 0.75346pt\hbox{\fiverm 2}}{1\!/2}}. This projection necessarily differs from the MAC projection used in Step 3 and Step 7 because the velocities in those steps are defined on edges and 𝐔~n+1\widetilde{{\bf{U}}}^{n+1} is defined at cell centers, requiring different divergence and gradient operators. Details of the approximate projection are given in Paper III.

Step 12.

Compute a new Δt.\Delta t.

Compute Δt\Delta t for the next time step with the procedure described in §3.4 of Paper III using w0w_{0} as computed in Step 6 and 𝐔~n+1\widetilde{{\bf{U}}}^{n+1} as computed in Step 11.

This completes one step of the algorithm.

Figure 14 is a flow chart summarizing the 12 step algorithm, including the notation used as we advance the solution by Δt.\Delta t. Figure 15 is a flow chart of the advection steps (Steps 4 and 8), which includes the notation we use as we advect the solution through a time interval of Δt\Delta t.

Refer to caption
Figure 14: A flowchart of the algorithm. The thermodynamic state variables, base state variables, and local velocity are indicated in each step. Red text indicates that quantity was updated during that step. The predictor-corrector steps are outlined by the dotted box. The blue text indicates state variables that are the same in Step 6 as they are in Step 2, i.e., they are unchanged by the predictor steps.
Refer to caption
Figure 15: A flowchart for Steps 4 and 8. The thermodynamic state variables and base state variables are indicated in each step. Red text indicates that quantity was updated during that step. Note, for Step 4, the updated quantities should also have a \star superscript, e.g., Step 8I defines T(2)T^{(2)} while Step 4I defines T(2),T^{(2),\star} .

A.5 Numerical Cutoffs

As discussed in Paper IV, in order to prevent the velocity from becoming too large in low density regions far from the center of the star, we impose a cutoff at a moderately small density, ρcutoff\rho_{\rm cutoff}, and hold the density at this constant value outside of the star. The cutoff affects the evolution in the following ways:

  • After advancing enthalpy in the advection step (Steps 4Hii and 8Hii in §A.4), we recompute the enthalpy using the equation of state if ρρcutoff\rho\leq\rho_{\rm cutoff}.

  • When computing gravity (§A.2) we only add ρ0\rho_{0} to menclm_{\rm encl} if ρ0>ρcutoff\rho_{0}>\rho_{\rm cutoff} in order to prevent an unphysical amount of mass from contributing to the calculation.

  • When computing p0p_{0} in Enforce HSEA.3.3), we hold p0p_{0} constant once ρ0ρcutoff\rho_{0}\leq\rho_{\rm cutoff}.

  • In React StateA.3.1), we set ω˙k=0\dot{\omega}_{k}=0 and ρHnuc=0\rho H_{\rm nuc}=0 if ρρcutoff\rho\leq\rho_{\rm cutoff}.

  • When computing ψ\psi, (Steps 4F and 8F in §A.4) we set ψ=0\psi=0 if ρ0ρcutoff\rho_{0}\leq\rho_{\rm cutoff}.

  • When we compute the velocity forcing in Steps 3, 7, 11, and 12, we set the buoyancy term (the term proportional to ρρ0\rho-\rho_{0}) to zero if ρ<5ρcutoff\rho<5\rho_{\rm cutoff}.

Additionally, we use an anelastic cutoff density, ρanelastic\rho_{\rm anelastic}, in the computation of β0\beta_{0} (Steps 3, 7, and 11 in §A.4). When ρ0,jρanelastic\rho_{0,j}\leq\rho_{\rm anelastic}, we set β0,j=(ρ0,j/ρ0,j1)β0,j1\beta_{0,j}=(\rho_{0,j}/\rho_{0,j-1})\beta_{0,j-1}.

Appendix B Computing w0w_{0} for spherical problems

Recall that we want to solve

1r2r(r2w0)=S¯1Γ1¯p0(p0t+w0p0r)ψ.\frac{1}{r^{2}}\frac{\partial}{\partial r}\left(r^{2}w_{0}\right)=\overline{S}-\frac{1}{\overline{\Gamma_{1}}p_{0}}\underbrace{\left(\frac{\partial p_{0}}{\partial t}+w_{0}\frac{\partial p_{0}}{\partial r}\right)}_{\psi}. (B1)

for the base state velocity, w0.w_{0}. We first decompose w0w_{0} by setting w0=w0¯+δw0w_{0}=\overline{w_{0}}+\delta w_{0}, where the w0¯\overline{w_{0}} term is the contribution to w0w_{0} due to the expansion term:

1r2r(r2w0¯)=S¯in.\frac{1}{r^{2}}\frac{\partial}{\partial r}\left(r^{2}\overline{w_{0}}\right)=\overline{S}^{\mathrm{in}}. (B2)

Then we can write an equation for the remaining term, δw0\delta w_{0}:

1r2r(r2δw0)=1Γ1¯p0[p0t+(w0¯+δw0)p0r].\frac{1}{r^{2}}\frac{\partial}{\partial r}\left(r^{2}\delta w_{0}\right)=-\frac{1}{\overline{\Gamma_{1}}p_{0}}\left[\frac{\partial p_{0}}{\partial t}+(\overline{w_{0}}+\delta w_{0})\frac{\partial p_{0}}{\partial r}\right]. (B3)

Multiplying equation (B3) through by Γ1¯p0\overline{\Gamma_{1}}p_{0}, taking another derivative with respect to rr, and switching the order of temporal and spatial derivatives, we get:

r[Γ1¯p0r2r(r2δw0)]=tp0rr[(w0¯+δw0)p0r].\frac{\partial}{\partial r}\left[\frac{\overline{\Gamma_{1}}p_{0}}{r^{2}}\frac{\partial}{\partial r}(r^{2}\delta w_{0})\right]=-\frac{\partial}{\partial t}\frac{\partial p_{0}}{\partial r}-\frac{\partial}{\partial r}\left[(\overline{w_{0}}+\delta w_{0})\frac{\partial p_{0}}{\partial r}\right]. (B4)

To solve for δw0\delta w_{0} we will need to substitute for the derivatives of p0.p_{0}. To do so we start with the hydrostatic equilibrium equation,

p0r=ρ0g;g=Gmenclr2,\frac{\partial p_{0}}{\partial r}=-\rho_{0}g;\qquad g=\frac{Gm_{\mathrm{e}ncl}}{r^{2}}, (B5)

where mencl(r)m_{\mathrm{e}ncl}(r) is the mass enclosed at radius rr and GG is the gravitational constant. Using this, we can then write equation (B4) as:

r[Γ1¯p0r2r(r2δw0)]\displaystyle\frac{\partial}{\partial r}\left[\frac{\overline{\Gamma_{1}}p_{0}}{r^{2}}\frac{\partial}{\partial r}(r^{2}\delta w_{0})\right] =\displaystyle= t(ρ0g)+r(w0ρ0g)\displaystyle\frac{\partial}{\partial t}\left(\rho_{0}g\right)+\frac{\partial}{\partial r}\left(w_{0}\rho_{0}g\right) (B6)
=\displaystyle= g[ρ0t+r(w0ρ0)]+ρ0(gt+w0gr).\displaystyle g\left[\frac{\partial\rho_{0}}{\partial t}+\frac{\partial}{\partial r}(w_{0}\rho_{0})\right]+\rho_{0}\left(\frac{\partial g}{\partial t}+w_{0}\frac{\partial g}{\partial r}\right).

The mass enclosed inside any radius, rr, is mencl(r)=4π0rρ0(s)s2𝑑sm_{\mathrm{e}ncl}(r)=4\pi\int_{0}^{r}\rho_{0}(s)s^{2}ds, or alternately, mencl/r=4πr2ρ0\partial m_{\mathrm{e}ncl}/\partial r=4\pi r^{2}\rho_{0}. The Lagrangian derivative of the enclosed mass is then:

D0menclDt\displaystyle\frac{D_{0}m_{\mathrm{e}ncl}}{Dt} =\displaystyle= menclt+w0menclr\displaystyle\frac{\partial m_{\mathrm{e}ncl}}{\partial t}+w_{0}\frac{\partial m_{\mathrm{e}ncl}}{\partial r} (B7)
=\displaystyle= 4π(t0rρ0(s)s2𝑑s+w0r2ρ0)=4π(0rρ0ts2𝑑s+w0r2ρ0)\displaystyle 4\pi\left(\frac{\partial}{\partial t}\int_{0}^{r}\rho_{0}(s)s^{2}ds+w_{0}r^{2}\rho_{0}\right)=4\pi\left(\int_{0}^{r}\frac{\partial\rho_{0}}{\partial t}s^{2}ds+w_{0}r^{2}\rho_{0}\right)
=\displaystyle= 4π{0r[1s2(s2ρ0w0)s+1s2(s2ηρ)s]s2𝑑s+w0r2ρ0}\displaystyle 4\pi\left\{-\int_{0}^{r}\left[\frac{1}{s^{2}}\frac{\partial(s^{2}\rho_{0}w_{0})}{\partial s}+\frac{1}{s^{2}}\frac{\partial(s^{2}\eta_{\rho})}{\partial s}\right]s^{2}ds+w_{0}r^{2}\rho_{0}\right\}
=\displaystyle= 4π(s2ρ0w0|0rs2ηρ|0r+w0r2ρ0)=4πr2ηρ,\displaystyle\left.4\pi\left(-s^{2}\rho_{0}w_{0}\right|_{0}^{r}-\left.s^{2}\eta_{\rho}\right|_{0}^{r}+w_{0}r^{2}\rho_{0}\right)=-4\pi r^{2}\eta_{\rho},

where we used the spherical form of equation (29) in Paper III,

ρ0t+1r2(r2ρ0w0)r+1r2(r2ηρ)r=0,\frac{\partial\rho_{0}}{\partial t}+\frac{1}{r^{2}}\frac{\partial(r^{2}\rho_{0}w_{0})}{\partial r}+\frac{1}{r^{2}}\frac{\partial(r^{2}\eta_{\rho})}{\partial r}=0, (B8)

to eliminate ρ0/t\partial\rho_{0}/\partial t. We note that in the absence of any mixing, ηρ=0\eta_{\rho}=0, and D0mencl/Dt=0D_{0}m_{\mathrm{e}ncl}/Dt=0. Equation (B7) allows us to write the Lagrangian change in the gravitational acceleration as:

D0gDt=gt+w0gr\displaystyle\frac{D_{0}g}{Dt}=\frac{\partial g}{\partial t}+w_{0}\frac{\partial g}{\partial r} =\displaystyle= D0Dt(Gmenclr2)=GmenclD0Dt(1r2)+Gr2D0menclDt\displaystyle\frac{D_{0}}{Dt}\left(\frac{Gm_{\mathrm{e}ncl}}{r^{2}}\right)=Gm_{\mathrm{e}ncl}\frac{D_{0}}{Dt}\left(\frac{1}{r^{2}}\right)+\frac{G}{r^{2}}\frac{D_{0}m_{\mathrm{e}ncl}}{Dt} (B9)
=\displaystyle= 2w0Gmenclr34πGηρ=2w0gr4πGηρ.\displaystyle-\frac{2w_{0}Gm_{\mathrm{e}ncl}}{r^{3}}-4\pi G\eta_{\rho}=-\frac{2w_{0}g}{r}-4\pi G\eta_{\rho}.

Putting it all together, equation (B6) becomes:

r[Γ1¯p0r2r(r2δw0)]=g[ρ0t+r(w0ρ0)]+ρ0(2w0gr4πGηρ).\frac{\partial}{\partial r}\left[\frac{\overline{\Gamma_{1}}p_{0}}{r^{2}}\frac{\partial}{\partial r}(r^{2}\delta w_{0})\right]=g\left[\frac{\partial\rho_{0}}{\partial t}+\frac{\partial}{\partial r}(w_{0}\rho_{0})\right]+\rho_{0}\left(\frac{-2w_{0}g}{r}-4\pi G\eta_{\rho}\right). (B10)

Finally, we can use equation (B8) to write equation (B10) as:

r[Γ1¯p0r2r(r2δw0)]\displaystyle\frac{\partial}{\partial r}\left[\frac{\overline{\Gamma_{1}}p_{0}}{r^{2}}\frac{\partial}{\partial r}(r^{2}\delta w_{0})\right] =\displaystyle= g[1r2r(r2w0ρ0)1r2r(r2ηρ)+r(w0ρ0)]\displaystyle g\left[-\frac{1}{r^{2}}\frac{\partial}{\partial r}(r^{2}w_{0}\rho_{0})-\frac{1}{r^{2}}\frac{\partial}{\partial r}(r^{2}\eta_{\rho})+\frac{\partial}{\partial r}(w_{0}\rho_{0})\right] (B11)
+ρ0(2w0gr4πGηρ)\displaystyle+\rho_{0}\left(\frac{-2w_{0}g}{r}-4\pi G\eta_{\rho}\right)
=\displaystyle= gr2(r2ηρ)r4(w0¯+δw0)ρ0gr4πGρ0ηρ.\displaystyle-\frac{g}{r^{2}}\frac{\partial(r^{2}\eta_{\rho})}{\partial r}-\frac{4(\overline{w_{0}}+\delta w_{0})\rho_{0}g}{r}-4\pi G\rho_{0}\eta_{\rho}.

We discretize this elliptic equation in the radial dimension as:

1Δr{[Γ1¯p0r2(r2δw0)r]j[Γ1¯p0r2(r2δw0)r]j1}+[4(r2δw0)ρ0gr3]j1/2\displaystyle\frac{1}{\Delta r}\left\{\left[\frac{\overline{\Gamma_{1}}p_{0}}{r^{2}}\frac{\partial(r^{2}\delta w_{0})}{\partial r}\right]_{j}-\left[\frac{\overline{\Gamma_{1}}p_{0}}{r^{2}}\frac{\partial(r^{2}\delta w_{0})}{\partial r}\right]_{j-1}\right\}+\left[\frac{4(r^{2}\delta w_{0})\rho_{0}g}{r^{3}}\right]_{j-\mathchoice{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 1}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 1}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\fiverm 1}\kern-1.63885pt/\kern-1.22911pt\lower 0.75346pt\hbox{\fiverm 2}}{1\!/2}} (B12)
=\displaystyle= gj1/2rj1/22Δr[(r2ηρ)j(r2ηρ)j1](4w0¯ρ0gr)j1/2(4πGρ0ηρ)j1/2,\displaystyle-\frac{g_{j-\mathchoice{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 1}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 1}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\fiverm 1}\kern-1.63885pt/\kern-1.22911pt\lower 0.75346pt\hbox{\fiverm 2}}{1\!/2}}}{r_{j-\mathchoice{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 1}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 1}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\fiverm 1}\kern-1.63885pt/\kern-1.22911pt\lower 0.75346pt\hbox{\fiverm 2}}{1\!/2}}^{2}\Delta r}\left[\left(r^{2}\eta_{\rho}\right)_{j}-\left(r^{2}\eta_{\rho}\right)_{j-1}\right]-\left(\frac{4\overline{w_{0}}\rho_{0}g}{r}\right)_{j-\mathchoice{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 1}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 1}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\fiverm 1}\kern-1.63885pt/\kern-1.22911pt\lower 0.75346pt\hbox{\fiverm 2}}{1\!/2}}-\left(4\pi G\rho_{0}\eta_{\rho}\right)_{j-\mathchoice{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 1}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 1}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\fiverm 1}\kern-1.63885pt/\kern-1.22911pt\lower 0.75346pt\hbox{\fiverm 2}}{1\!/2}},

where we choose to solve for (r2δw0)(r^{2}\delta w_{0}) rather than δw0\delta w_{0} so that we can easily enforce (r2δw0)/r=0\partial(r^{2}\delta w_{0})/\partial r=0 at the the upper boundary. Then, using hydrostatic equilibrium, we expand this to

1Δr{(Γ1¯p0r2)j[(r2δw0)j+1/2(r2δw0)j1/2]Δr\displaystyle\frac{1}{\Delta r}\left\{\left(\frac{\overline{\Gamma_{1}}p_{0}}{r^{2}}\right)_{j}\frac{\left[(r^{2}\delta w_{0})_{j+\mathchoice{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 1}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 1}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\fiverm 1}\kern-1.63885pt/\kern-1.22911pt\lower 0.75346pt\hbox{\fiverm 2}}{1\!/2}}-(r^{2}\delta w_{0})_{j-\mathchoice{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 1}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 1}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\fiverm 1}\kern-1.63885pt/\kern-1.22911pt\lower 0.75346pt\hbox{\fiverm 2}}{1\!/2}}\right]}{\Delta r}\right.
(Γ1¯p0r2)j1[(r2δw0)j1/2(r2δw0)j3/2]Δr}\displaystyle\left.-\left(\frac{\overline{\Gamma_{1}}p_{0}}{r^{2}}\right)_{j-1}\frac{\left[(r^{2}\delta w_{0})_{j-\mathchoice{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 1}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 1}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\fiverm 1}\kern-1.63885pt/\kern-1.22911pt\lower 0.75346pt\hbox{\fiverm 2}}{1\!/2}}-(r^{2}\delta w_{0})_{j-\mathchoice{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 3}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 3}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\fiverm 3}\kern-1.63885pt/\kern-1.22911pt\lower 0.75346pt\hbox{\fiverm 2}}{3\!/2}}\right]}{\Delta r}\right\}
(4rj1/23p0,jp0,j1Δr)(r2δw0)j1/2=(4rj1/23p0,jp0,j1Δr)(r2w0¯)j1/2\displaystyle-\left(\frac{4}{r_{j-\mathchoice{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 1}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 1}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\fiverm 1}\kern-1.63885pt/\kern-1.22911pt\lower 0.75346pt\hbox{\fiverm 2}}{1\!/2}}^{3}}\frac{p_{0,j}-p_{0,j-1}}{\Delta r}\right)(r^{2}\delta w_{0})_{j-\mathchoice{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 1}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 1}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\fiverm 1}\kern-1.63885pt/\kern-1.22911pt\lower 0.75346pt\hbox{\fiverm 2}}{1\!/2}}=\left(\frac{4}{r_{j-\mathchoice{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 1}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 1}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\fiverm 1}\kern-1.63885pt/\kern-1.22911pt\lower 0.75346pt\hbox{\fiverm 2}}{1\!/2}}^{3}}\frac{p_{0,j}-p_{0,j-1}}{\Delta r}\right)(r^{2}\overline{w_{0}})_{j-\mathchoice{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 1}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 1}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\fiverm 1}\kern-1.63885pt/\kern-1.22911pt\lower 0.75346pt\hbox{\fiverm 2}}{1\!/2}}
gj1/2rj1/22Δr[(r2ηρ)j(r2ηρ)j1](4πGρ0ηρ)j1/2.\displaystyle-\frac{g_{j-\mathchoice{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 1}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 1}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\fiverm 1}\kern-1.63885pt/\kern-1.22911pt\lower 0.75346pt\hbox{\fiverm 2}}{1\!/2}}}{r_{j-\mathchoice{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 1}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 1}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\fiverm 1}\kern-1.63885pt/\kern-1.22911pt\lower 0.75346pt\hbox{\fiverm 2}}{1\!/2}}^{2}\Delta r}\left[\left(r^{2}\eta_{\rho}\right)_{j}-\left(r^{2}\eta_{\rho}\right)_{j-1}\right]-\left(4\pi G\rho_{0}\eta_{\rho}\right)_{j-\mathchoice{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 1}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 1}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\fiverm 1}\kern-1.63885pt/\kern-1.22911pt\lower 0.75346pt\hbox{\fiverm 2}}{1\!/2}}. (B13)

If we write this in matrix form, so that:

Aj(r2δw0)j3/2+Bj(r2δw0)j1/2+Cj(r2δw0)j+1/2=Fj,A_{j}(r^{2}\delta w_{0})_{j-\mathchoice{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 3}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 3}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\fiverm 3}\kern-1.63885pt/\kern-1.22911pt\lower 0.75346pt\hbox{\fiverm 2}}{3\!/2}}+B_{j}(r^{2}\delta w_{0})_{j-\mathchoice{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 1}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 1}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\fiverm 1}\kern-1.63885pt/\kern-1.22911pt\lower 0.75346pt\hbox{\fiverm 2}}{1\!/2}}+C_{j}(r^{2}\delta w_{0})_{j+\mathchoice{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 1}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 1}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\fiverm 1}\kern-1.63885pt/\kern-1.22911pt\lower 0.75346pt\hbox{\fiverm 2}}{1\!/2}}=F_{j}, (B14)

then:

Aj\displaystyle A_{j} =\displaystyle= 1Δr2(Γ1¯inp0inr2)j1,\displaystyle\frac{1}{\Delta r^{2}}\left(\frac{\overline{\Gamma_{1}}^{\mathrm{in}}p_{0}^{\mathrm{in}}}{r^{2}}\right)_{j-1}, (B15)
Bj\displaystyle B_{j} =\displaystyle= 1Δr2[(Γ1¯inp0inr2)j+(Γ1¯inp0inr2)j1](4rj1/23p0,jinp0,j1inΔr),\displaystyle-\frac{1}{\Delta r^{2}}\left[\left(\frac{\overline{\Gamma_{1}}^{\mathrm{in}}p_{0}^{\mathrm{in}}}{r^{2}}\right)_{j}+\left(\frac{\overline{\Gamma_{1}}^{\mathrm{in}}p_{0}^{\mathrm{in}}}{r^{2}}\right)_{j-1}\right]-\left(\frac{4}{r_{j-\mathchoice{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 1}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 1}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\fiverm 1}\kern-1.63885pt/\kern-1.22911pt\lower 0.75346pt\hbox{\fiverm 2}}{1\!/2}}^{3}}\frac{p_{0,j}^{\mathrm{in}}-p_{0,j-1}^{\mathrm{in}}}{\Delta r}\right), (B16)
Cj\displaystyle C_{j} =\displaystyle= 1Δr2(Γ1¯inp0inr2)j,\displaystyle\frac{1}{\Delta r^{2}}\left(\frac{\overline{\Gamma_{1}}^{\mathrm{in}}p_{0}^{\mathrm{in}}}{r^{2}}\right)_{j}, (B17)
Fj\displaystyle F_{j} =\displaystyle= (4rj1/23p0,jinp0,j1inΔr)(r2w0¯)j1/2gj1/2inrj1/22Δr[(r2ηρin)j(r2ηρin)j1]\displaystyle\left(\frac{4}{r_{j-\mathchoice{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 1}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 1}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\fiverm 1}\kern-1.63885pt/\kern-1.22911pt\lower 0.75346pt\hbox{\fiverm 2}}{1\!/2}}^{3}}\frac{p_{0,j}^{\mathrm{in}}-p_{0,j-1}^{\mathrm{in}}}{\Delta r}\right)(r^{2}\overline{w_{0}})_{j-\mathchoice{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 1}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 1}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\fiverm 1}\kern-1.63885pt/\kern-1.22911pt\lower 0.75346pt\hbox{\fiverm 2}}{1\!/2}}-\frac{g_{j-\mathchoice{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 1}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 1}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\fiverm 1}\kern-1.63885pt/\kern-1.22911pt\lower 0.75346pt\hbox{\fiverm 2}}{1\!/2}}^{\mathrm{in}}}{r_{j-\mathchoice{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 1}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 1}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\fiverm 1}\kern-1.63885pt/\kern-1.22911pt\lower 0.75346pt\hbox{\fiverm 2}}{1\!/2}}^{2}\Delta r}\left[\left(r^{2}\eta_{\rho}^{\mathrm{in}}\right)_{j}-\left(r^{2}\eta_{\rho}^{\mathrm{in}}\right)_{j-1}\right] (B18)
(4πGρ0inηρin)j1/2,\displaystyle-\left(4\pi G\rho_{0}^{\mathrm{in}}\eta_{\rho}^{\mathrm{in}}\right)_{j-\mathchoice{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 1}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\sevenrm 1}\kern-1.22911pt/\kern-1.22911pt\lower 0.75346pt\hbox{\sevenrm 2}}{\kern 0.0pt\raise 1.50694pt\hbox{\fiverm 1}\kern-1.63885pt/\kern-1.22911pt\lower 0.75346pt\hbox{\fiverm 2}}{1\!/2}},

We define the lower boundary condition, δw0=0\delta w_{0}=0 at r=0r=0, which corresponds to j=0,j=0, by setting:

A0=C0=F0=0;B0=1.A_{0}=C_{0}=F_{0}=0;\quad B_{0}=1. (B19)

We also specify (r2δw0)/r=0\partial(r^{2}\delta w_{0})/\partial r=0 at the the upper boundary, which corresponds to the location where ρ0\rho_{0} falls below ρcutoff\rho_{\rm cutoff}, by setting:

AN=1;BN=1;CN=FN=0.\displaystyle A_{N}=-1;\quad B_{N}=1;\quad C_{N}=F_{N}=0. (B20)

Finally, w0out=w0¯+δw0w_{0}^{\mathrm{out}}=\overline{w_{0}}+\delta w_{0}. Once ρ0\rho_{0} falls below ρcutoff\rho_{\rm cutoff}, we hold r2w0outr^{2}w_{0}^{\mathrm{out}} constant.

Appendix C Test Problem Initial Model

We use the same general initial model for the convergence test (§6.3), adaptive bubble rise test (§6.4) and forced convection test (§6.5). We define a base temperature, Tbase=6×108T_{\mathrm{base}}=6\times 10^{8} K, and density, ρbase=2.6×109gcm3\rho_{\mathrm{base}}=2.6\times 10^{9}~\mathrm{g~cm^{-3}}, at some height rbaser_{\mathrm{base}} above the bottom of the domain (rbaser_{\mathrm{base}} varies in each problem, and can be equal to zero). This defines a base entropy, sbase=s(ρbase,Tbase)s_{\mathrm{base}}=s(\rho_{\mathrm{base}},T_{\mathrm{base}}). The gravitational acceleration, g=1.5×1010cms2g=-1.5\times 10^{10}~\mathrm{cm~s^{-2}}, is constant. The composition is uniform everywhere with X(12C)=0.3X(^{12}\mathrm{C})=0.3 and X(16O)=0.7X(^{16}\mathrm{O})=0.7. For r>rbaser>r_{\mathrm{base}}, we integrate the equation of hydrostatic equilibrium along with the constraint that entropy is constant:

p0,j+1\displaystyle p_{0,j+1} =\displaystyle= p0,j+12Δr(ρ0,j+ρ0,j+1)g.\displaystyle p_{0,j}+\frac{1}{2}\Delta r(\rho_{0,j}+\rho_{0,j+1})g. (C1)
s0,j+1\displaystyle s_{0,j+1} =\displaystyle= sbase\displaystyle s_{\mathrm{base}} (C2)

upwards from rbaser_{\mathrm{base}}. We define a temperature cutoff, Tcutoff=107T_{\mathrm{cutoff}}=10^{7} K, and when T0,j+1<TcutoffT_{0,j+1}<T_{\mathrm{cutoff}}, we replace equation (C2) with T0,j+1=TcutoffT_{0,j+1}=T_{\mathrm{cutoff}}. If we choose rbase>0r_{\mathrm{base}}>0, then we must also define the model for 0<r<rbase0<r<r_{\mathrm{base}}. In this case, we define a desired linear entropy profile with a discontinuous jump from sbases_{\mathrm{base}} as

swant=13sbase+rrbaserbasesbase12.s_{\mathrm{want}}=\frac{1}{3}s_{\mathrm{base}}+\frac{r-r_{\mathrm{base}}}{r_{\mathrm{base}}}\frac{s_{\mathrm{base}}}{12}. (C3)

This entropy profile creates a convectively stable layer below the atmosphere to prevent any motions generated from heating above from interfering with the lower boundary. The initial model for this region is then computed by integrating:

p0,j\displaystyle p_{0,j} =\displaystyle= p0,j+112Δr(ρ0,j+ρ0,j+1)g,\displaystyle p_{0,j+1}-\frac{1}{2}\Delta r(\rho_{0,j}+\rho_{0,j+1})g, (C4)
s0,j\displaystyle s_{0,j} =\displaystyle= swant(rj),\displaystyle s_{\mathrm{want}}(r_{j}), (C5)

downward from r=rbaser=r_{\mathrm{base}}.

References

  • Almgren et al. (2010) Almgren, A. S. et al. 2010, accepted for publication in ApJS
  • Almgren et al. (1998) Almgren, A. S., Bell, J. B., Colella, P., Howell, L. H., & Welcome, M. 1998, Journal of Computational Physics, 142, 1
  • Almgren et al. (2008) Almgren, A. S., Bell, J. B., Nonaka, A., & Zingale, M. 2008, Astrophysical Journal, 684, 449
  • Almgren et al. (2006a) Almgren, A. S., Bell, J. B., Rendleman, C. A., & Zingale, M. 2006a, Astrophysical Journal, 637, 922
  • Almgren et al. (2006b) —. 2006b, Astrophysical Journal, 649, 927
  • Almgren et al. (2007) Almgren, A. S., Bell, J. B., & Zingale, M. 2007, Journal of Physics Conference Series, 78, 2085
  • Bell et al. (1994) Bell, J. B., Berger, M. J., Saltzman, J. S., & Welcome, M. 1994, SIAM J. Sci. Statist. Comput., 15, 127
  • Bell et al. (2004) Bell, J. B., Day, M. S., Rendleman, C. A., Woosley, S. E., & Zingale, M. A. 2004, Journal of Computational Physics, 195, 677
  • Berger & Colella (1989) Berger, M. J., & Colella, P. 1989, Journal of Computational Physics, 82, 64
  • Berger & Rigoutsos (1991) Berger, M. J., & Rigoutsos, J. 1991, IEEESMC, 21, 1278
  • Chamulak et al. (2008) Chamulak, D. A., Brown, E. F., Timmes, F. X., & Dupczak, K. 2008, Astrophysical Journal, 677, 160
  • Colella & Woodward (1984) Colella, P., & Woodward, P. R. 1984, Journal of Computational Physics, 54, 174
  • Day & Bell (2000) Day, M. S., & Bell, J. B. 2000, Combust. Theory Modelling, 4, 535
  • Durran (1990) Durran, D. 1990, Meteorol. Monographs, 23, 59
  • Fryxell et al. (2000) Fryxell, B. et al. 2000, Astrophysical Journal Supplement, 131, 273
  • Glasner et al. (2007) Glasner, S. A., Livne, E., & Truran, J. W. 2007, Astrophysical Journal, 665, 1321
  • Höflich & Stein (2002) Höflich, P., & Stein, J. 2002, Astrophysical Journal, 568, 779
  • Kuhlen et al. (2006) Kuhlen, M., Woosley, S. E., & Glatzmaier, G. A. 2006, Astrophysical Journal, 640, 407
  • Lin et al. (2006) Lin, D. J., Bayliss, A., & Taam, R. E. 2006, Astrophysical Journal, 653, 545
  • Meakin & Arnett (2007) Meakin, C. A., & Arnett, D. 2007, Astrophysical Journal, 665, 690
  • Miller & Colella (2002) Miller, G. H., & Colella, P. 2002, Journal of Computational Physics, 183, 26
  • Pember et al. (1998) Pember, R. B., Howell, L. H., Bell, J. B., Colella, P., Crutchfield, W. Y., Fiveland, W. A., & Jessee, J. P. 1998, Comb. Sci. Tech., 140, 123
  • Saltzman (1994) Saltzman, J. 1994, Journal of Computational Physics, 115, 153
  • Strohmayer & Bildsten (2006) Strohmayer, T., & Bildsten, L. 2006, Compact Stellar X-Ray Sources, ed. W. H. G. Lewin & M. van der Klis (Cambridge: Cambridge Univ. Press), 113–+
  • Timmes & Swesty (2000) Timmes, F. X., & Swesty, F. D. 2000, Astrophysical Journal Supplement, 126, 501
  • Woosley et al. (2004) Woosley, S. E., Wunsch, S., & Kuhlen, M. 2004, Astrophysical Journal, 607, 921
  • Zingale et al. (2009) Zingale, M., Almgren, A. S., Bell, J. B., Nonaka, A., & Woosley, S. E. 2009, Astrophysical Journal, 704, 196