Godunov Interface States
These are working notes for the Godunov step in MAESTROeX and VARDEN.
MAESTROeX Notation
For 2D,
and . Note that . We will use the shorthand .For 3D plane parallel,
and . Note that and . We will use the shorthand .For 3D spherical,
and . We will use the shorthand .
Computing From
For plane-parallel problems, in order to compute
For spherial problems, in order to compute
To compute full edge-state velocities, simply add
Computing
For plane-parallel problems, the spatial derivatives of
For spherical problems, we compute the radial bin centered gradient using
Then we put
Computing in MAESTROeX
(169)We extrapolate each velocity component to edge-centered, time-centered locations. For example,
(170)We are going to use a 1D Taylor series extrapolation in space and time. By 1D, we mean that we omit any spatial derivatives that are not in the direction of the extrapolation. We also omit the underbraced forcing terms. We also use characteristic tracing.
(171)
2D Cartesian Case
We predict
We pick the final trans states using a Riemann solver:
We predict
We pick the final
3D Cartesian Case
We use the exact same procedure in 2D and 3D to compute
3D Spherical Case
We predict the normal components of velocity to the normal faces using a 1D extrapolation. The equations for all three directions are identical to those given in the 2D and 3D plane-parallel sections. As in the plane-parallel case, make sure that the advection velocities, as well as the upwind velocity, is done with the full velocity, not the perturbational velocity.
Computing in MAESTROeX
(178)Note that the
term is treated like a forcing term, but it is not actually part of . We make use of the 1D extrapolations used to compute ( , , and ), as well as the “ ” states ( , , and )
2D Cartesian Case
Predict
to r-faces using a 1D extrapolation.Predict
to x-faces using a full-dimensional extrapolation.Predict
to x-faces using a 1D extrapolation.Predict
to r-faces using a full-dimensional extrapolation.
Predict
Upwind based on
Predict
Solve a Riemann problem:
Predict
Upwind based on
Predict
Solve a Riemann problem:
3D Cartesian Case
This algorithm is more complicated than the 2D case since we include the effects of corner coupling.
Predict
to y-faces using a 1D extrapolation.Predict
to r-faces using a 1D extrapolation.Predict
to x-faces using a 1D extrapolation.Predict
to r-faces using a 1D extrapolation.Predict
to x-faces using a 1D extrapolation.Predict
to y-faces using a 1D extrapolation.Update prediction of
to y-faces by accounting for -derivatives.Update prediction of
to r-faces by accounting for -derivatives.Update prediction of
to x-faces by accounting for -derivatives.Update prediction of
to r-faces by accounting for -derivatives.Update prediction of
to x-faces by accounting for -derivatives.Update prediction of
to y-faces by accounting for -derivatives.Predict
to x-faces using a full-dimensional extrapolation.Predict
to y-faces using a full-dimensional extrapolation.Predict
to r-faces using a full-dimensional extrapolation.
Predict
to y-faces using a 1D extrapolation.(187)Upwind based on
:(188)Predict
to r-faces using a 1D extrapolation.Predict
to x-faces using a 1D extrapolation.Predict
to r-faces using a 1D extrapolation.Predict
to x-faces using a 1D extrapolation.Predict
to y-faces using a 1D extrapolation.Update prediction of
to y-faces by accounting for -derivatives. The notation means state that has been updated to account for transverse derives in the r-direction.(189)Upwind based on
:(190)Update prediction of
to r-faces by accounting for -derivatives.Update prediction of
to x-faces by accounting for -derivatives.Update prediction of
to r-faces by accounting for -derivatives.Update prediction of
to x-faces by accounting for -derivatives.Update prediction of
to y-faces by accounting for -derivatives.Predict
to x-faces using a full-dimensional extrapolation.(191)Solve a Riemann problem:
(192)Predict
to y-faces using a full-dimensional extrapolation.Predict
to r-faces using a full-dimensional extrapolation. In this step, make sure you account for the term before solving the Riemann problem:(193)
3D Spherical Case
The spherical case is the same as the plane-parallel 3D Cartesian
case, except the
Computing , and in MAESTROeX
We call make_edge_scal to compute
For enthalpy_pred_type = 1, we predict
to faces.For enthalpy_pred_type = 2, we predict
to faces.For enthalpy_pred_type = 3 and 4, we predict
to faces.For enthalpy_pred_type = 5, we predict
to faces.For enthalpy_pred_type = 6, we predict
to faces.
We are using enthalpy_pred_type = 1 for now. The equations of motion are:
2D Cartesian Case
Predict
to r-faces using a 1D extrapolation.Predict
to x-faces using a full-dimensional extrapolation.Predict
to x-faces using a 1D extrapolation.Predict
to r-faces using a full-dimensional extrapolation.
Predict
to r-faces using a 1D extrapolation:(195)Upwind based on
:(196)Predict
to x-faces using a full-dimensional extrapolation. First, the normal derivative and forcing terms:(197)Account for the transverse terms:
if is_conservative then
(198)else
(199)end if
Account for the
term:if is_vel and comp = 2 then
(200)end if
Upwind based on
.(201)Predict
to x-faces using a 1D extrapolation:(202)Upwind based on
:(203)Predict
to r-faces using a full-dimensional extrapolation. First, the normal derivative and forcing terms:(204)Account for the transverse terms: if is_conservative then
(205)else
(206)end if
Account for the
term: if is_vel and comp = 2 then(207)end if
Upwind based on
:(208)
3D Cartesian Case
This algorithm is more complicated than the 2D case since we include the effects of corner coupling.
Predict
to x-faces using a 1D extrapolation.Predict
to y-faces using a 1D extrapolation.Predict
to r-faces using a 1D extrapolation.Update prediction of
to x-faces by accounting for y-derivatives.Update prediction of
to x-faces by accounting for r-derivatives.Update prediction of
to y-faces by accounting for x-derivatives.Update prediction of
to y-faces by accounting for r-derivatives.Update prediction of
to r-faces by accounting for x-derivatives.Update prediction of
to r-faces by accounting for y-derivatives.Predict
to x-faces using a full-dimensional extrapolation.Predict
to y-faces using a full-dimensional extrapolation.Predict
to r-faces using a full-dimensional extrapolation.
Predict
to x-faces using a 1D extrapolation.(209)(210)Upwind based on
:(211)Predict
to y-faces using a 1D extrapolation.Predict
to r-faces using a 1D extrapolation.Update prediction of
to x-faces by accounting for y-derivatives. The notation means “state that has been updated to account for the transverse derivatives in the -direction”.if is_conservative then
(212)else
(213)end if
Upwind based on
:(214)Update prediction of
to x-faces by accounting for r-derivatives.Update prediction of
to y-faces by accounting for x-derivatives.Update prediction of
to y-faces by accounting for r-derivatives.Update prediction of
to r-faces by accounting for x-derivatives.Update prediction of
to r-faces by accounting for y-derivatives.Predict
to x-faces using a full-dimensional extrapolation.if is_conservative then
(215)else
(216)end if
Account for the
term:if is_vel and comp = 2 then
(217)end if
Upwind based on
:(218)Predict
to y-faces using a full-dimensional extrapolation.Predict
to r-faces using a full-dimensional extrapolation.
3D Spherical Case
The spherical case is the same as the plane-parallel 3D Cartesian
case, except the
Computing in VARDEN
2D Cartesian Case
We do a 1D Taylor series extrapolation to get both components of velocity at the x-face:
(219)(220)(221)(222)We obtain the normal velocity using the Riemann problem:
(223)We obtain the transverse velocity by upwinding based on
:(224)We perform analogous operations to compute both components of velocity at the y-faces,
.Now we do a full-dimensional extrapolation to get the MAC velocity at the x-faces (note that we only compute the normal components):
(225)Then we solve a Riemann problem:
(226)We perform analogous operations to compute the normal velocity at the y-faces,
.
3D Cartesian Case
This is more complicated than the 2D case because we include corner
coupling. We compute varden U_L^1D]
-Eq.224. Then we compute an intermediate state,
Then upwind based on
We use an analogous procedure to compute five more intermediate states,
Then we use the Riemann solver given above for the 2D case (Eq.226) to compute
Computing and in VARDEN
To compute
2D Cartesian Case
The 1D extrapolation is:
Then we upwind based on
We use an analogous procedure to obtain
The extrapolation of a “conserved”
Then we upwind based on
We use an analogous procedure to compute
3D Cartesian Case
This is more complicated than the 2D case because we include corner
coupling. We first compute
For the “conservative” case, we use, for example:
Then we upwind based on
We use an analogous procedure to compute the other five intermediate
states. Now we do a full-dimensional extrapolation of
The extrapolation of a “conserved”
Then we upwind based on
ESTATE_FPU in GODUNOV_2D/3D.f
First, the normal predictor.
(241)If USE_MINION and ICONSERVE then:
(242)Apply boundary conditions on
and . Then,(243)Then, if
, we set . The procedure to obtain is analogous.Now, the transverse terms.
If ICONSERVE then:
(244)Now, define
.If NOT ICONSERVE and
and then:(245)(246)Else If NOT ICONSERVE and
and then:(247)Else If NOT ICONSERVE and
then:(248)Finally, upwind analogous to Eq.243 to get
.
ESTATE in GODUNOV_2D/3D.f
First, the normal predictor.
If USE_MINION then:
Apply boundary conditions on
Then, if
Note that the 2D and 3D algorithms are different - in 3D the transverse
terms use upwinding analogous to Eq.245-Eq.248, using UAD
instead of UEDGE. Finally, upwind analogous to Eq.251
to get
Piecewise Parabolic Method (PPM)
Consider a scalar,
The PPM method is described in a series of papers:
Colella and Woodward 1984 - describes the basic method.
Miller and Colella 2002 - describes how to apply PPM to a multidimensional unsplit Godunov method and generalizes the characteristic tracing for more complicated systems. Note that we only need to upwind based on the fluid velocity, so we don’t need to use fancy characteristic tracing.
Colella and Sekora 2008 - describes new fancy quadratic limiters. There are several errors in the printed text, so we have implemented a corrected version from Phil Colella.
Here are the steps for the
Step 1: Compute
and , which are spatial interpolations of to the hi and lo faces of cell , respectively. See Sections 9.1 and 9.2 for the two options.Step 2: Construct a quadratic profile within each cell.
(253)(254)(255)Step 3: Integrate quadratic profiles to get the average value swept over the face over time. Define the following integrals, where
:(256)Plugging in ([Quadratic Interp]) gives:
(257)Step 4: Obtain 1D edge states. Perform a 1D extrapolation, without source terms, to get left and right edge states. Add the source terms later if desired/necessary.
(258)
Colella and Woodward Based Approach
Spatially interpolate
A more compact way of writing this is
Without the limiters, Eq.259 is the familiar 4th-order spatial interpolation formula:
Next, we must ensure that
In anticipation of further limiting, we set double-valued face-centered values:
Modify
If this condition is true, we constrain
Colella and Sekora Based Approach
Spatially interpolate
to edges.Use a 4th-order interpolation in space to obtain edge values:
(269)Then, if
, we limit using a nonlinear combination of approximations to the second derivative. First, define:(270)Then, define
(271)(272)where
was used in Colella and Sekora. Then,(273)Now we implement Phil’s new version of the algorithm to eliminate sensitivity to roundoff. First we need to detect whether a particular cell corresponds to an “extremum”. There are two tests. For the first test, define
(274)If
, then we are at an extremum. We apply the second test if either . Then, we define:(275)(276)(277)(278)If
, set . Otherwise, set . Finally, we are at an extreumum if .Now that we have finished the extremum tests, if we are at an extremum, we scale
. First, we define(279)Then, define
(280)(281)Then,
(282)Otherwise, if we are not at an extremum and
, then define(283)(284)(285)If
, then we perform the following test. If , then(286)otherwise,
(287)Finally,
.