Interface State Details
Predicting interface states
The MAESTROeX hyperbolic equations come in two forms: advective and conservative. The procedure for predicting interface states differs slightly depending on which form we are dealing with.
Advective form
Most of the time, we are dealing with equations in advective form.
Here, a scalar,
where
A piecewise linear prediction of
(see the Godunov notes section for more details). Here, the
“transverse term” is accounted for in MakeEdgeScal
. Any
additional forces should be added to ModifyScalForce
. This will be noted below.
Conservative form
A conservative equation takes the form:
Now a piecewise linear prediction of
Here the “transverse term” is now in conservative form, and an additional
term, the non-advective portion of the
MakeEdgeScal
automatically when we call it
with is_conservative = true
.
Density Evolution
Basic equations
The full density evolution equation is
The species are evolved according to
In practice, only the species evolution equation is evolved, and the total density is set as
To advance species_pred_type
parameter. The
quantities predicted to edges and the
resulting edge state are shown in the Table 4.
|
quantities predicted
in |
|
1 / |
||
2 / |
||
3 / |
Method 1: species_pred_type = predict_rhoprime_and_X
Here we wish to construct
We predict both
Subtract Eq.141 from Eq.138 and rearrange
terms, noting that
We also need
When using Strang-splitting, we ignore the
Predicting at edges
We define MakeEdgeScal
in DensityAdvance
and the
underbraced term in Eq.142 as the forcing. This
force is computed in ModifyScalForce
. This prediction is
done in advective form.
Predicting at edges
There are two ways to predict
We call make_edge_state_1d using the underbraced term in Eq.141 as the forcing. This gives us
. This term is used to advect in Advect Base Density. In plane-parallel geometries, we also use to compute , which will be used to compute .We define
. We compute from using Advect Base Density, which advances Eq.141 through in time. The in the superscript indicates that we have not called Correct Base yet, which computes from . We use rather than to construct since is not available yet. is used to construct at edges from at edges, and this at edges is used to compute fluxes for .
We note that in essence these choices reflect a hyperbolic (1)
vs. elliptic (2) approach. In MAESTROeX, if we setup a problem with
Computing at edges
For the non-radial edges, we directly add
Predicting at edges
Predicting MakeEdgeScal
in DensityAdvance
on MakeEdgeScal
is 0. The prediction is
done in advective form.
Method 2: species_pred_type = predict_rhoX
Here we wish to construct
The edge state is created by calling MakeEdgeScal
in
DensityAdvance
with is_conservative = true
.
We do not consider the
We note that even though it is not needed here, we still compute
Method 3: species_pred_type = predict_rho_and_X
Here we wish to construct
Predicting
Predicting the full
Using this, MakeEdgeScal
in DensityAdvance
, with the underbraced
force computed in ModifyScaleForce
with fullform = true
.
Advancing
The evolution equation for React
, and the
associated discretization is:
Energy Evolution
Basic equations
MAESTROeX solves an enthalpy equation. The full enthalpy equation is
Due to Strang-splitting of the reactions, the call to
react_state has already been made. Hence, the goal is to compute
an edge state enthalpy starting from
We define the base state enthalpy evolution equation as
Perturbational enthalpy formulation
Subtracting Eq.151 from Eq.150 and rearranging terms gives the perturbational enthalpy equation
Temperature formulation
Alternately, we can consider an temperature evolution equation, derived from enthalpy, as:
Again, we neglect the reaction terms, since that will be handled during the reaction step, so we can write this as:
Pure enthalpy formulation
A final alternative is to consider an evolution equation for
Prediction requirements
To update the enthalpy, we need to compute an interface state for
enthalpy_pred_type
. A complexity of the
enthalpy evolution is that the formation of this edge state will
depend on species_pred_type
.
The general procedure for making the
predict
, , , or to the edges (depending onenthalpy_pred_type
) usingMakeEdgeScal
and the forces identified in the appropriate evolution equation (Eq.152, Eq.154, or Eq.155 respectively).The appropriate forces are summaried below.
if we predicted
, convert this predicted edge state to an intermediate “enthalpy” state (the quotes indicate that it may be perturbational or full enthalpy) by calling the EOS.construct the final enthalpy edge state in
mkflux
. The precise construction depends on what species and enthalpy quantities are input to mkflux.
Finally, when MAESTROeX is run with use_tfromp = T
, the
temperature is derived from the density, basestate pressure (use_tfromp = T
mode, the temperature will
not see the heat release, since the enthalpy does not feed in. Only
after the hydro update does the temperature gain the effects of the
heat release due to the adjustment of the density (which in turn sees
it through the velocity field and enthalpy_pred_types
that predict temperature to the interface
( predict_T_then_rhoprime
and predict_T_then_h
) will
not work. MAESTROeX will abort if the code is run with this
combination of parameters.
The behavior of enthalpy_pred_type
is:
enthalpy_pred_type = 0
(predict_rhoh
) : we predict . The advective force is:(156)enthalpy_pred_type = 1
(predict_rhohprime
) : we predict . The advective force is:(157)enthalpy_pred_type = 2
(predict_h
) : we predict . The advective force is:(158)enthalpy_pred_type = 3
(predict_T_then_rhohprime
) : we predict . The advective force is:(159)enthalpy_pred_type = 4
(predict_T_then_h
) : we predict . The advective force is:(160)
The combination of species_pred_type
and enthalpy_pred_type
determine how we construct the edge state. The variations are:
species_pred_type = 1
(predict_rhoprime_and_X
)enthalpy_pred_type = 0
(predict_rhoh
) :cell-centered quantity predicted in
MakeEdgeScal
:intermediate “enthalpy” edge state :
species quantity available in
mkflux
: ,final
edge state :
enthalpy_pred_type = 1
(predict_rhohprime
) :cell-centered quantity predicted in
MakeEdgeScal
:intermediate “enthalpy” edge state :
species quantity available in
mkflux
: ,final
edge state :
enthalpy_pred_type = 2
(predict_h
)cell-centered quantity predicted in
MakeEdgeScal
:intermediate “enthalpy” edge state :
species quantity available in
mkflux
: ,final
edge state :
enthalpy_pred_type = 3
(predict_T_then_rhohprime
)cell-centered quantity predicted in
MakeEdgeScal
:intermediate “enthalpy” edge state :
species quantity available in
mkflux
: ,final
edge state :
enthalpy_pred_type = 4
{predict_T_then_h
)cell-centered quantity predicted in
MakeEdgeScal
:intermediate “enthalpy” edge state :
species quantity available in
mkflux
: ,final
edge state :
species_pred_type = 2
(predict_rhoX
)enthalpy_pred_type = 0
(predict_rhoh
)cell-centered quantity predicted in
MakeEdgeScal
:intermediate “enthalpy” edge state :
species quantity available in
mkflux
: ,final
edge state :
enthalpy_pred_type = 1
(predict_rhohprime
)cell-centered quantity predicted in
MakeEdgeScal
:intermediate “enthalpy” edge state :
species quantity available in
mkflux
: ,final
edge state :
enthalpy_pred_type = 2
(predict_h
)cell-centered quantity predicted in
MakeEdgeScal
:intermediate “enthalpy” edge state :
species quantity available in
mkflux
: ,final
edge state :
enthalpy_pred_type = 3
(predict_T_then_rhohprime
)cell-centered quantity predicted in
MakeEdgeScal
:intermediate “enthalpy” edge state :
species quantity available in
mkflux
: ,final
edge state :
enthalpy_pred_type = 4
(predict_T_then_h
)cell-centered quantity predicted in
MakeEdgeScal
:intermediate “enthalpy” edge state :
species quantity available in
mkflux
: ,final
edge state :
species_pred_type = 3
(predict_rho_and_X
)enthalpy_pred_type = 0
(predict_rhoh
)cell-centered quantity predicted in
MakeEdgeScal
:intermediate “enthalpy” edge state :
species quantity available in
mkflux
: ,final
edge state :
enthalpy_pred_type = 1
(predict_rhohprime
)cell-centered quantity predicted in
MakeEdgeScal
:intermediate “enthalpy” edge state :
species quantity available in
mkflux
: ,final
edge state :
enthalpy_pred_type = 2
(predict_h
)cell-centered quantity predicted in
MakeEdgeScal
:intermediate “enthalpy” edge state :
species quantity available in
mkflux
: ,final
edge state :
enthalpy_pred_type = 3
(predict_T_then_rhohprime
)cell-centered quantity predicted in
MakeEdgeScal
:intermediate “enthalpy” edge state :
species quantity available in
mkflux
: ,final
edge state :
enthalpy_pred_type = 4
(predict_T_then_h
)cell-centered quantity predicted in
MakeEdgeScal
:intermediate “enthalpy” edge state :
species quantity available in
mkflux
: ,final
edge state :
Method 0: enthalpy_pred_type = predict_rhoh
Here we wish to construct MakeEdgeScal
with
is_conservative = .true.
on mkrhohforce
).
Method 1: enthalpy_pred_type = predict_rhohprime
Here we wish to construct
Predicting at edges
We define MakeEdgeScal
in enthalpy_advance
and the underbraced term in Eq.152 as the forcing (see
below for the forcing term).
The first two terms in modify_scal_force
, and the last two terms are accounted for in
mkrhohforce
. For spherical problems, we have found that a different
representation of the pressure term in the
Predicting at edges
We use an analogous procedure described in Section Predicting \rho_0 at edges for computing
For spherical, however, instead of computing
Computing at edges
We use an analogous procedure described in Section Computing \rho at edges for computing
Method 2: enthalpy_pred_type = predict_h
Here, the construction of the interface state depends on what species
quantities are present. In all cases, the enthalpy state is found
by predicting
For species_pred_types
: predict_rhoprime_and_X
, we wish to construct
For species_pred_types
: predict_rho_and_X
or
predict_rhoX
, we wish to construct
Predicting at edges
We define MakeEdgeScal
in enthalpy_advance
and the
underbraced term in Eq.155 as the forcing (see
below). This force is computed by
mkrhohforce
and then divided by mkrhoforce
knows about the different enthalpy_pred_types
and computes
the correct force for this type.
Computing at edges
species_pred_types
: predict_rhoprime_and_X
:species_pred_types
: predict_rhoX
:species_pred_types
: predict_rho_and_X
:Method 3: enthalpy_pred_type = predict_T_then_rhohprime
Here we wish to construct
Predicting at edges
We predict MakeEdgeScal
in
enthalpy_advance
and the underbraced term in Eq. `[T equation
labeled] <#T equation labeled>`__ as the forcing (see below).
This force is computed by mktempforce
.
Converting to
We call the EOS in makeHfromRhoT_edge
(called from
enthalpy_advance
) to convert from species_pred_type
, since the species edge states may differ
between the various prediction types (see the “species quantity”
notes below). The EOS inputs are
constructed as:
|
||
---|---|---|
|
||
|
||
|
After calling the EOS, the output of makeHfromRhoT_edge
is
Computing at edges
The computation of the final predict_rhohprime
version.
Method 4: enthalpy_pred_type = predict_T_then_h
Here, the construction of the interface state depends on what species
quantities are present. In all cases, the enthalpy state is found by
predicting
For species_pred_types`: ``predict_rhoprime_and_X
we wish to
construct
For species_pred_type
: predict_rhoX
, we wish to
construct
For species_pred_type
: predict_rho_and_X
, we wish to
construct
Predicting at edges
The prediction of predict_T_then_rhohprime
version.
Converting to
This is identical to the predict_T_then_rhohprime
version,
except that on output, we compute
Computing at edges
The computation of the final predict_h version
.
Advancing
We update the enthalpy analogously to the species update in Section 2.5. The forcing term does not include reaction source terms accounted for in React State, and is the same for all enthalpy_pred_types.
where table:pred:hoverview
for the given enthalpy_pred_type
and species_pred_type
.
Experience from toy_convect
Why is toy_convect Interesting?
The toy_convect problem consists of a carbon-oxygen white dwarf with an accreted layer of solar composition. There is a steep composition gradient between the white dwarf and the accreted layer. The convection that begins as a result of the accretion is extremely sensitive to the amount of mixing.
Initial Observations
With use_tfromp = T
and cflfac = 0.7
there is a large
difference between species_pred_type = 1
and species_pred_type =
2,3 as seen in fig:spec1_vs_23`
. species_pred_type = 1
shows quick heating (peak T vs. t) and there is ok agreement between
tfromh
and tfromp
. species_pred_type = 2,3
show cooling
(peak T vs. t) and tfromh
looks completely unphysical (see
Fig. 19). There are also strange filament type
features in the momentum plots shown in Fig. 20.
Using use_tfromp = F
and dpdt_factor
Change cflfac and enthalpy_pred_type
With species_pred_type = 1
and cflfac = 0.1
, there is much
less heating (peak T vs. t) than the cflfac = 0.7
(default). There
is also a lower overall Mach number (see Fig. 23)
with the cflfac = 0.1
and excellent agreement between tfromh
and tfromp
.
use_tfromp = F
, dpdt_factor = 0.0
, enthalpy_pred_type = 3,4
and
species_pred_type = 2,3
shows cooling (as seen in use_tfromp = T
)
with a comparable rate of cooling (see Fig. 24)
to the use_tfromp = T
case. The
largest difference between the two runs is that the use_tfromp = F
case shows excellent agreement between tfromh
and tfromp
with
cflfac = 0.7
. The filaments in the momentum plot of Fig. 20 are still present.
For a given enthalpy_pred_type
and use_tfromp = F
,
species_pred_type = 2
has a lower Mach number (vs. t) compared to
species_pred_type = 3
.
Any species_pred_type
with use_tfromp = F
, dpdt_factor = 0.0
and enthalpy_pred_type = 1
shows significant heating, although
the onset of the heating is delayed in species_pred_type = 2,3
(see
Fig. 25). Only
species_pred_type = 1
gives good agreement between tfromh
and
tfromp
.
Comparing cflfac = 0.7
and cflfac = 0.1
with
use_tfromp = F
, dpdt_factor = 0.0
, species_pred_type = 2
and
enthalpy_pred_type = 4
shows good agreement overall (see Fig. 22.
Additional Runs
bds_type = 1
Using bds_type = 1, use_tfromp = F, dpdt_factor = 0.0, species_pred_type = 2, enthalpy_pred_type = 4 and cflfac = 0.7 seems to cool off faster, perhaps due to less mixing. There is also no momentum filaments in the bottom of the domain.
evolve_base_state = F
Using evolve_base_state = F, use_tfromp = F, dpdt_factor = 0.0, species_pred_type = 2 and enthalpy_pred_type = 4 seems to agree well with the normal evolve_base_state = T run.
toy_convect in CASTRO
toy_convect was also run using CASTRO with castro.ppm_type = 0,1. These runs show temperatures that cool off rather than increase (see Fig. 26) which suggests using species_pred_type = 2,3 instead of species_pred_type = 1.
Recommendations
All of these runs suggest that running under species_pred_type = 2 or 3, enthalpy_pred_type = 3 or 4 with either use_tfromp = F and dpdt_factor = 0.0 or use_tfromp = T gives the most consistent results.