Sponge

Castro uses a sponge source term to damp velocities in regions where we are not interested in the dynamics, to prevent them from dominating the timestep constraint. Often these are buffer regions between the domain of interest and the boundary conditions.

The sponge parameters are set in the inputs file. The timescale of the damping is set through castro.sponge_timescale, while factors such as the radius/density/pressure at which the sponge starts to begin being applied are described below.

The sponge value, fsponge is computed as described below and then the sponge factor, f is computed as:

f=[111+αfsponge]

for an implicit update or

f=αfsponge

for an explicit update. This choice is controlled by sponge_implicit. Here, α is constructed from the sponge_timescale parameter, tsponge as:

α=Δttsponge

The sponge source is then added to the momentum and total energy equations.

The general sponge parameters are:

variable

runtime parameter

flower

sponge_lower_factor

fupper

sponge_upper_factor

There are three sponges, each controlled by different runtime parameters:

  • radial sponge : The radial sponge operates beyond some radius (define in terms of the center(:) position for the problem). It takes the form:

    fsponge={flowerr<rlowerflower+fupperflower2[1cos(π(rrlower)Δr)]rlowerr<rupperfupperrrupper

    The parameters controlling the various quantities here are:

    variable

    runtime parameter

    rlower

    sponge_lower_radius

    rupper

    sponge_upper_radius

    and Δr=rupperrlower .

  • density sponge : The density sponge turns on based on density thresholds. At high densities, we usually care about the dynamics, so we will want the sponge off, but as the density lowers, we gradually turn on the sponge. It takes the form:

    fsponge={flowerρ>ρupperflower+fupperflower2[1cos(π(ρρupper)Δρ)]ρupperρ>ρlowerfupperρ<ρlower

    The parameters controlling the various quantities here are:

    variable

    runtime parameter

    ρlower

    sponge_lower_density

    ρupper

    sponge_upper_density

    and Δρ=ρupperρlower .

  • pressure sponge : The pressure sponge is just like the density sponge, except it is keyed on pressure. It takes the form:

    fsponge={flowerp>pupperflower+fupperflower2[1cos(π(ppupper)Δp)]pupperpplowerfupperρ<ρlower

    The parameters controlling the various quantities here are:

    variable

    runtime parameter

    plower

    sponge_lower_pressure

    pupper

    sponge_upper_pressure

    and Δp=pupperplower .