-
Notifications
You must be signed in to change notification settings - Fork 41
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
one-zone burner at constant density #733
Comments
I need @fxt44 or @Debraheem to help me understand the code logic in I see that the function My questions are, is this the intended behavior, and why does this happen? |
I'm not at my computer yet, but i think "just_dydt" is the flag for for split burn. If it's true you skip calculating the derivatives like "d(dyidt)dyj" and all the jacobian terms for composition derivatives are 0. The derivs functions are only called when fully coupled. |
It looks like star/private/struct_burn_mix.f90 which is where the bruning is done in star. Here, when split_burn is turned on in do_burn -> burn1_zone-> call net_1_zone_burn_const_density. This is where split_burn is activated in the evolution. Then it calls to net_get (from net/public/net_lib) but with "just_dxdt = .false.", meaning we don't want any mixed derivative information. So the constant density solver is used for one zone burning and the eps_nuc_MeV term from net_derivs is not used in this circumstance to calculate eps_nuc. Either eps_nuc_MeV is set somewhere else, or there is a separate variable doing the same job. |
I believe net_1_zone_burn_const_density is called directly out of star into net and hands the eps_nuc_MeV information back to star in the form of the vairable "avg_eps_nuc" wherein struct_burn_mix.f90, there is line 916: this leads back to star/private/hydro_energy.f90, where we have on line 234+:
|
This seems expected, as eps_nuc from eval_net is not used when the constant_density solver is called. |
Thanks, @Debraheem for the explanations! I see that if we move the guards |
I was trying to use the one-zone burner at constant density from $MESA_DIR/net/test , with an initial composition of pure helium, logT = 9 and logRho = 5, and I noticed that the temperature didn't evolve much (changed only by 1d-8) when I used a net like mesa_125.net . The simplest net that shows this problem is one with only he4 and c12. However, the temperature does evolve (logT changes by 0.2ish) if I use approx21.net, or if I use other nets with use_3a_fl87 = .true. (e.g., by adding the line
g% use_3a_fl87 = .true.
near line 236 in$MESA_DIR/net/test/mod_one_zone_burn.f90
).I dug deeper with the he4+c12-only net. I added some print statements and found that
eps_nuc
returned byeval_net
(called byburner_derivs
in$MESA_DIR/net/private/net_burn_const_density.f90
) is zero , whiledxdt(:)
gives the right rates. I should also note thateval_net
is also called byburner_jakob
but returns the righteps_nuc
.I used the same conditions (pure He, logT=9, logRho=5 and he4+c12-only net) with sample_net (which also lives in
$MESA_DIR/net/test
) and got the righteps_nuc
, so I think this behavior seems to only affect the one-zone burner. I'm using 24.08.1, so reverse 3a and detailed balance with >2 reactants are also not the problem.I'm attaching my inlist and net here.
he4_and_c12.net.txt
inlist_one_zone_burn_pureHe.txt
Any pointers/suggestions are greatly appreciated!
Version
The text was updated successfully, but these errors were encountered: