mesa
mesa copied to clipboard
[ci optional] Implemented Sunny Wong rotation brunt change
People seemed happy to merge this in #372 so let's check to see if the test suite passes and then merge it.
Closes #372
https://testhub.mesastar.org/brunt_in_rotation/commits/3f511c0
Hmmm, looks like we have another instance of a photo checksum failure without an fpe: https://testhub.mesastar.org/brunt_in_rotation/commits/69b4927/test_cases/star/ppisn
I suspect there's something non-trivial going on related to the state of brunt-related quantities.
Actually, it looks like this change is definitely not equivalent to the previous way of doing things. We have a line specifically skipping updates to s% brunt_N2
during solver iterations:
https://github.com/MESAHub/mesa/blob/3fb71741486e8397b8292b23d4562a2ac311ccd7/star/private/hydro_vars.f90#L596-L598
https://github.com/MESAHub/mesa/blob/3fb71741486e8397b8292b23d4562a2ac311ccd7/star/private/solver_support.f90#L844
So the quantities we're trying to take advantage of here are actually going to become stale during solver iterations. I'll push an experimental commit getting rid of that check to see what testing looks like, but I'd definitely like some input from @orlox before proceeding with a merge.
Actually, I'm realizing that was probably a red herring, as we don't update mixing info during solver iterations anyway, so it shouldn't matter if the brunt is getting updated during the iterations here. I'll revert that.
The photo checksum failure does seem to be telling us something important, and it's happening quite consistently, so we'll have to track that down.
If you diff the output of two runs it looks like there are differences immediately after the restart. So I'm guessing there is an issue with how the Brunt is computed at the start of a run that differs from how the old form worked.
Also, https://testhub.mesastar.org/brunt_in_rotation/commits/e03088c/test_cases/star/ppisn shows it's not a parallelisation issue.
@orlox and I discussed working on this some more today. Not clear on what our timeline will be yet, but I think we at least see a path forward that involves mostly trying to work through all the fpe's we can squash related to rotation and mixing.