Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix the Jacobian for the simplified-SDC system #228

Merged
merged 31 commits into from
May 6, 2020
Merged

Conversation

zingale
Copy link
Member

@zingale zingale commented Dec 9, 2019

For simplified SDC we need to convert from the reaction system Jacobian (in terms of X, T, e) to the system for the conserved variables. This does that transformation.

@zingale zingale changed the base branch from master to development December 9, 2019 00:22
@zingale
Copy link
Member Author

zingale commented Dec 9, 2019

this will close #147

still need to do the MAESTROeX / enthalpy part

@zingale zingale marked this pull request as ready for review December 16, 2019 19:08
@zingale
Copy link
Member Author

zingale commented Dec 16, 2019

This now works for both the energy and enthalpy-based SDC formulations.

@zingale
Copy link
Member Author

zingale commented Dec 16, 2019

The energy based Jacobian derivation is here:

simplified_sdc_derivations.pdf

The enthalpy based Jacobian derivation is here:

maestroex_simplified_sdc_derivations.pdf

@zingale
Copy link
Member Author

zingale commented Jan 3, 2020

For the test_sdc unit test, with these changes, when we run with the numerical Jacobian, we get:

Run time = 19.73930645
min number of rhs calls: 21
avg number of rhs calls: 445
max number of rhs calls: 6883

and with the analytic Jacobian we get:

Run time = 17.52168508
min number of rhs calls: 6
avg number of rhs calls: 358
max number of rhs calls: 5737

The speed-up is the same when considering the enthalpy system. On development, with the analytic Jacobian, we get:

Run time = 20.20451861
min number of rhs calls: 6
avg number of rhs calls: 450
max number of rhs calls: 12023

so this change is definitely a win.

@zingale
Copy link
Member Author

zingale commented Apr 29, 2020

I think that this is ready to be reviewed. Here's an updated derivation of the system used for energy.

simplified_sdc_derivations.pdf

@zingale
Copy link
Member Author

zingale commented Apr 30, 2020

Castro detonation tests, running for 250 steps.

  • numerical Jacobian:

    Run time without initialization = 97.3357413

  • analytic Jacobian with Microphysics on development:

    Run time without initialization = 2439.936833

  • analytic Jacobian with Microphysics on sdc_jacobian before my most recent changes
    (9d097e745ab5c00620546f7e0d154df34b1a98f3):

    dies with burn failures right out of the gate in lots of different zones

  • analytic Jacobian with Microphysics on sdc_jacobian after my
    changes:

    Run time without initialization = 66.74610559

@zingale zingale merged commit 8279112 into development May 6, 2020
@zingale zingale deleted the sdc_jacobian branch December 27, 2020 13:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants