burn_cell_sdc

burn_cell_sdc is a simple one-zone burn analogous to burn_cell that exercises the simplified-SDC code paths in the integrator. The system that is evolved has the form:

d(ρXk)dt=[A(ρXk)]n+1/2+ρω˙k(ρ,Xk,T)d(ρe)dt=[A(ρe)]n+1/2+ρϵ(ρ,Xk,T)

with density constructed as needed via:

ρ(t)=ρn+[A(ρ)]n+1/2(ttn)

In this system, we now need to specify the advective terms for the unit test.

Note

This test can also be used with NSE to test how the integration bails out into NSE if the in_nse() test is true.

Getting Started

The burn_cell_sdc code is located in Microphysics/unit_test/burn_cell_sdc. By default, USE_SIMPLIFIED_SDC=TRUE is set in the GNUmakefile.

Setting the thermodynamics

The parameters that affect the thermodynamics are:

  • unit_test.density : the initial density

  • unit_test.temperature : the initial temperature

  • unit_test.rhoe : the initial (rhoe). If this is not set (or set to be <0), then it will be computed from the temperature using the EOS.

The composition can be set either by specifying individual mass fractions or setting unit_test.uniform_xn as described in Defining composition.

Aux composition

When built with USE_NSE_TABLE=TRUE (see Tabulated NSE and aprox19) or with USE_AUX_THERMO=TRUE (see Auxiliary composition) then the auxiliary composition, Ye, A¯, B/A, is defined.

The auxiliary composition can either be initialized directly via unit_test.Aux1, unit_test.Aux2, and unit_test.Aux3, or their values can be computed at initialization from the mass fractions if unit_test.recompute_aux=1 is set.

Advective terms

But default, the advective terms are set to zero. In this mode, burn_cell_sdc largely mimics burn_cell (although with a slightly different ODE system integrated).

The advective terms can be set manually via

  • unit_test.Adv_rho : [A(ρ)]n+1/2

  • unit_test.Adv_rhoe : [A(ρe)]n+1/2

  • unit_test.Adv_X1, unit_test.Adv_X2, … : [A(ρX1)]n+1/2, [A(ρX2)]n+1/2, … (up to X35)

  • unit_test.Adv_Aux1, unit_test.Adv_Aux2, unit_test.Adv_Aux3 : [A(ρα1)]n+1/2, [A(ρα2)]n+1/2, [A(ρα3)]n+1/2

Controlling time

The integration time and output frequency are controlled by the same set of parameters as in burn_cell. see Controlling time.

Integration parameters

The tolerances, choice of Jacobian, and other integration parameters can be set via the usual Microphysics runtime parameters, e.g. integrator.atol_spec.

Rerunning a burn fail

When a network integration encounters a failure, it will output the entire burn state to stdout (for GPU builds, this needs to be enabled explicitly by building with USE_GPU_PRINTF).

The script unit_test/burn_cell_sdc/parse_integration_failure.py can be used to parse the output (copy and paste the full error into a file) and produce the runtime parameter settings needed to reproduce the burn. This is especially important with SDC, since it will contain all of the advective terms.

Building and Running the Code

The code can be built simply as:

make

and the network and integrator can be changed using the normal Microphysics build system parameters.

Important

You need to do a make clean before rebuilding with a different network or integrator.

To run the code, in the burn_cell_sdc directory run:

./main3d.gnu.ex inputs

where inputs is the name of your inputs file.