Skip to content

True SDC ignores castro.do_react #3391

Description

@zingale

Locations: Source/sdc/sdc_react_util.H:11-45,
Source/sdc/Castro_sdc_util.H:134-236, and
Source/driver/Castro_advance_sdc.cpp:182-198,241-249.

Finding

In a build with REACTIONS, true SDC always constructs reactive sources and
invokes its reaction update. Both overloads of okay_to_burn check temperature,
density, and shock suppression, but neither checks castro.do_react. There is
no reference to do_react anywhere in Source/sdc or the true-SDC advance
driver.

Consequently, setting castro.do_react=0 does not disable burning. This changes
the physics of a supposedly nonreacting control run. The timestep estimator does
honor do_react, so nuclear timestep restrictions can also be disabled while
burning remains active.

Evidence

Static call-path verification: sdc_update_o2 and sdc_update_centers_o4 reach
sdc_solve through okay_to_burn; instantaneous_react uses the same gate.
single_zone_react_source then calls actual_rhs unconditionally. Compare the
explicit guard in Source/reactions/Castro_react.cpp:152 and the timestep guard
in Source/driver/Castro.cpp:1712.

No fresh reacting simulation was run for this finding.

Proposed fix

Add an early if (!castro::do_react) { return false; } to both okay_to_burn
overloads, preferably via a shared helper. This disables both implicit burning
and stored instantaneous rates while preserving advection and the correction
sweeps. Do not bypass the complete SDC update, since it also evolves nonreactive
terms.

Validation after fixing

Use a uniform hot periodic state in reacting_convergence. For both SDC orders,
run once with do_react=0 and once with do_react=1. With no advection or
other sources, the disabled run must preserve species and energy and report zero
reaction rates. The enabled run must burn. Repeat with each solver option.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions