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
evaluation based on phase_of_evolution #340
Comments
What's the approximate size of factor? |
Seems like is triggering during the create prems relax call. You need to add logic to stop that as the create prems relaxation needs to run with as simple physics as possible to make the initial model. |
The size of 'factor' can vary a lot, but even if I set it to unity, the problem still happens. Hence, I think it is an order-of-evaluations problem rather than a "weird value" problem. I agree that this appears to be triggered during the relaxation phase, which should be equivalent to Does that make sense? |
My point is you shouldn't try to do make any changes to the stellar structure during create_pre_main_sequence. You can check if your in the pre-ms relax phase with (if (s%doing_relax) "relaxing") and I would suggest just returning from other_mlt at that point. The phase maybe wrong during the relax process, but remember a relax routine is taking the star between point A to point B but there's no guarantee that any intermediate step maps to a real star. During the relax process you should consider it in a "not-a-phase" phase. |
mesa/star/private/star_utils.f90 Lines 2794 to 2800 in 680a2b9
I don't think that's what the code does. I agree with @rjfarmer that a reasonable workaround is to handle the relaxation phase in your PS: Do we ever get models with central temperatures below 10⁵ K...? |
Maybe at the top of this block we should add something like
to indicate that we're in a "not-a-phase" state? |
Planets might be below 10^5k? |
Ok, I added |
Can I request also that phase_of_evolution become a history_columns
parameter?
…On Tue, Nov 9, 2021 at 4:09 PM Evan Bauer ***@***.***> wrote:
Ok, I added phase_relax = -1 in 91047bc
<91047bc>
.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#340 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/ADT342O57NJP3R5ZLGTUQDTULGZ4PANCNFSM5HKILPGA>
.
--
Dr Meridith Joyce
Lasker Fellow
Space Telescope Science Institute
|
I already added it a few days ago in e6055bf |
As discussed with @evbauer last night and with help from @aarondotter and Jamie Tayar (at KITP), I've got a new definition for phase_of_evolution =2 working within run_star_extras. This uses the deuterium birth line (DBL) as the definition for the pre-MS, which is a physically motivated choice unlike the current EEP definition. This is also based on discussions with Marc Pinsonneault, much of which was covered in his 2019 summer school lectures. I propose making this the internal definition of phase 2 |
Does this work if deuterium isn't in the net? |
probably not, but checks are performed to confirm that deuterium is in the net before trying to determine the physical state. We can just default back to the original phase 2 definition if it's not |
What's the new code to determine phase 2? I don't think anyone is really stuck with the old way given its not even been in a release yet, but we should make sure a model without H2 gives a reasonablely similar result (but does not need to be exactly the same). |
still working on it...found some additional issue with Aaron earlier today. I think @evbauer has agreed to help me put this in while at KITP once we're all convinced. I will post plots when I have them. A few not-minor side issues this also dredges: (2) it is strange (to the low-mass star community, from which I hail) that our idea of a "basic" nuclear reaction network does not include deuterium, and likewise that an initial deuterium abundance is not set by default. These are logistical necessities for The reference I'm using is the deuterium birth line (DBL), as described near Figure 1 here: https://ui.adsabs.harvard.edu/abs/2020ApJ...891...29S/abstract edit: quoted some numbers incorrectly |
basic.net is really basic and honestly most people should just go to approx21 (but that also lacks h2) so doesn't help here. If you care about h2 (or any isotope) then you have to pick a network that includes that isotope (and everything that makes/destroys it). If you want we can try to come up with a "low_mass_star.net" network that has just the isotopes that low mass stars care about? |
From what I remember in discussing the new control with @orlox and Bill, Bill implemented it because many of the changes to things like setting the initial (i.e. near-ZAMS) rotation rate or changing the atmosphere model are much more robustly made after the radiative core has developed in a massive star. That said, I'm in favour of it the default being pre_ms_check_radiative_core_Lnuc_div_L_limit = 0.1d0 which I think should be much smaller, like
I think in many circumstances it's reasonable to assume that I'm also not sure what you mean by the "onset of the pre-main-sequence". What comes before the pre-MS? For everything before central hydrogen burning starts is pre-MS.
I seldom evolve models that far but don't the defaults automatically switch to |
Would you mind trying that in a branch and we can see if anything breaks? and if its better for the low mass stars.
Yes but net swaps are messy and things are much simpler if you just start with approx21 rather than doing a swap (if you didn't realize you going to do a net swap, you can break your history output when it tries to add new columns for the new isotopes). My point though really is just basic is so basic you should try to avoid it whenever possible. |
See branch |
@mjoyceGR does @warrickball branch whb/pre-ms-Lnuc-limit give you a better starting temperature for your low mass stars? |
will investigate when there's a break in conference activities
…On Mon, Nov 15, 2021 at 8:00 AM Robert Farmer ***@***.***> wrote:
@mjoyceGR <https://github.com/mjoyceGR> does @warrickball
<https://github.com/warrickball> branch whb/pre-ms-Lnuc-limit give you a
better starting temperature of your low mass stars?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#340 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/ADT342MRNH54WVNZP4PSTVLUMEVBPANCNFSM5HKILPGA>
.
--
Dr Meridith Joyce
Lasker Fellow
Space Telescope Science Institute
|
(which is probably going to be next week some time...apologies) |
OK, so this could simply be that I'm not working with the branches correctly, but here is what happens When I run Warrick's branch with
I get the yellow track, which is fine. When I run Warrick's branch with
I get the red (non-)track and this error as soon as the post-relaxation phase starts:
So not only is this starting temperature still inappropriately high, but the atmosphere tables are not happy...Maybe Warrick can share his inlist to make sure I'm not introducing some other kind of problem with my (science) inlist? I'm using photosphere tables, A09, and setting an initial composition. But, all of these things work fine (in the sense of not throwing atm get_table errors) on branch b9a5f96 with create_prems and relax_to_radiative_core both on |
The only thing my branch changes is
to
in |
the same thing (which is good, probably):
|
Could you send your inlists (via whatever channel you like) and let me know exactly which commit you're using? |
will do on Slack (don't want to share publicly yet because there are other science components I'm developing) |
Though something of a tangent to the original point of this thread, my cut on |
FYI, I have made a branch on which I am incorporating the DBL definition for Something else worth noting here and in #347 is that |
Hi all, more
phase_of_evolution
content:I ran into serious issues trying to use
s% phase_of_evolution >= 2
as a condition for activating a particular modification withinother_MLT_results
inrun_star_extras
(this is related to my contextless post aboutretry: error in do1_dlnT_dm_eqn 3
in bugs-and-problems on Slack). When running an 0.2Ms model at solar composition,this (case 1) runs fine:
as does this (case 2):
but this (case 3) does not:
even though
s% star_age = 1 ! yr
is definitely after the onset ofphase_of_evolution = 2
(the transition time for this parameter combination between phase 1 and phase 2 is about 1d-5 yr)error.log
"factor" is a number, gradr_spot is the same type as MLT's standard gradr ( type(auto_diff_real_star_order1) )
The result of running case (3) is attached, but can be summarized by
retry: error in do1_dlnT_dm_eqn
a bunch of times untilfailed in do_relax_num_steps
.I confirmed that
phase_of_evolution = 1
is met before immediately crashing atphase_of_evolution = 2
. I suspect that things work exactly one timestep after thephase_of_evolution = 2
switch comes on, but not at the switch. Tagging @adamjermyn at his requestThe text was updated successfully, but these errors were encountered: