sandialabs / Spitfire

Spitfire is a Python/C++ library for constructing tabulated chemistry models and solving differential equations.
Other
37 stars 9 forks source link

Make compute_steady_state stop/retry if extinguished, intelligently #20

Open michael-a-hansen opened 2 years ago

michael-a-hansen commented 2 years ago

Currently the build_adiabatic_slfm_library method will actually solve the extinction problem before identifying that extinction has occurred. This is wasteful as the extinction solve can be difficult. We should make the compute_steady_state method smarter. A caveat here is that we could "predict" extinction simply due to a nonlinear solve being too aggressive. We would need to be careful here, perhaps rerunning the solve more conservatively to ensure that extinction is indeed expected.