(optionally) add T/e correction term to Strang Jacobians#1595
Conversation
this is the dT/dX |_e term that appears in all species
|
closes #729 |
|
some Strang data using then run the old way: and it take 8084 steps. Running with the new correction, 6788 steps |
|
curiously, with |
|
for He-C-Fe-group, using the correction terms speeds things up by 4x 104499 without the corrections |
|
Here's some
|
|
here's a Castro run with these changes: |
|
@BenWibking can you make sure that this works for you? |
It works. |
|
can you review it? |
|
reviewing now |
BenWibking
left a comment
There was a problem hiding this comment.
I think this is only mathematically valid for networks that use mass densities.
| // now correct the species derivatives | ||
| // this constructs dy/dX_k |_e = dy/dX_k |_T - e_{X_k} |_T dy/dT / c_v | ||
|
|
||
| if (integrator_rp::correct_jacobian_for_const_e) { |
There was a problem hiding this comment.
This may need to be disabled for number densities, since it assumes the species variables are mass fractions.
There was a problem hiding this comment.
then I'm confused -- that means that this PR will do nothing for the number density case. Is that your intent?
There was a problem hiding this comment.
I think it needs to be rederived for number densities. I can probably do that later this week if it can wait, or it can go in a separate PR.
There was a problem hiding this comment.
let's do that in a separate PR. I'll wrap this in an if-test for now
|
It doesn't crash our network, and it still seems to get the right answer, so the correction must be small or zero in our network. |
this is the dT/dX |_e term that appears in all species
it is now controlled by integrator.correct_jacobian_for_const_e