Three component phase separation for ultramassive white dwarfs, part 2#863
Three component phase separation for ultramassive white dwarfs, part 2#863
Conversation
Updated code in phase_separation.f90 and a new wd_o_ne_3_phase test suite.
|
@mcastrotapia I've pushed a few "housekeeping" fixes to get the static analysis script to pass, so you might want to merge this branch into your fork to stay up to date. Anyway, this PR will eventually be the one that merges the code into Thanks for submitting this code! |
|
Thanks for the fixes and for reviewing the PR! I will merge the branch into my fork, and I'll be attentive to comments/questions and updates. |
| if(s% phase(s% nz) < eos_phase_boundary) then !!! prevent to move the core size inwards if the core is suddently "melted" leaving everything liquid under phi<0.9 | ||
| if (s% crystal_core_boundary_mass>0d0)then | ||
| s% crystal_core_boundary_mass=s% crystal_core_boundary_mass | ||
| return |
There was a problem hiding this comment.
I see why you might need something like this, but I'm not sure this is the best approach in general. One alternative I've experimented with is just redistributing the phase separation heating over a significant fraction of the interior. That way you avoid transient local heating spikes that might melt the core, but still get the net right amount of energy deposited in the interior, which seems to work for capturing the effect on cooling rate. @mcastrotapia do you think that could be a viable alternative here?
There was a problem hiding this comment.
I think it is a good alternative. At some point, I tried something similar, but I didn't have success, and I ended up doing this because it seemed easier and faster to implement.
There was a problem hiding this comment.
Ok, I introduced the heat redistribution in 5519a13. Let's see if that works instead.
| ! Check that we're still in C/O or O/Ne dominated material as appropriate, | ||
| ! otherwise skip phase separation | ||
| if(components == 'CO'.and. XO + XC < 0.9d0) return | ||
| if(components == 'ONe'.and. XNe + XO < 0.8d0) return ! O/Ne mixtures tend to have more byproducts of burning mixed in |
There was a problem hiding this comment.
I believe we need to bring these lines back. Is there an argument for deleting them?
They shouldn't affect the new 3-componenent functionality that we're trying to add here, and I'd like to keep the behavior of the 2-component options unchanged unless there is a compelling reason to change them.
There was a problem hiding this comment.
I deleted them when trying to let the code decide for itself if doing C/O or O/Ne in the case of 2-component phase separation, this is because in ultramassive WD models the core is usually O/Ne, but towards the outer layers there is a C/O dominated zone before reaching the H/He atmosphere (for example, Figure 2 of Camisassa et al., 2019). In the 3-component, I was also letting the code check which were the 3 most abundant elements in the liquid zone to decide which phase diagram must be used.
There was a problem hiding this comment.
The bigger concern here is when you get all the way out to the interface with the He envelope, at which point I want to make sure phase separation ends. We can return to make a final decision on this once I refactor into separate 2-component and 3-component logic.
There was a problem hiding this comment.
Note to self for later: update run_star_extras, rn script, etc to make this a fully-fledged test case and integrate it into do1_test_source for the test suite.
|
We'll also need to add some documentation of the new options in controls.defaults. |
Updated code in phase_separation.f90 and a new wd_o_ne_3_phase test suite.