[Mesa-users] Doubts from a master's student about MESA
francandon
francandon at unizar.es
Mon Jun 3 17:19:03 UTC 2024
Hi Frank,
Thanks for the reply and sorry for the delay in answering.
I tried what you suggested, and I encountered two different issues.
First of all, I created my own .dat file containing the normalized rates
for my network isotopes. I used typical values for element abundances
and isotope rates, then I normalized them and put the values in the .dat
file as you suggested. However, I encountered a convergence problem:
_stopping because of problems dt < min_timestep_limit_
_terminated evolution: cannot find acceptable model_
_termination code: min_timestep_limit_
_DATE: 2024-05-29_
_TIME: 15:28:10_
_Right after it finishes doing "relax_to_radiative_core", in the first
step:_
_step lg_Tmax Teff lg_LH lg_Lnuc Mass H_rich
H_cntr N_cntr Y_surf eta_cntr zones retry_
_ lg_dt_yrs lg_Tcntr lg_R lg_L3a lg_Lneu lg_Mdot He_core
He_cntr O_cntr Z_surf gam_cntr iters_
_ age_yrs lg_Dcntr lg_L lg_LZ lg_Lphoto lg_Dsurf CO_core
C_cntr Ne_cntr Si_cntr v_div_cs dt_limit_
____________________________________________________________________________________________________________________________________________________
_ hydro_solver_step returned ierr -1_
_ s% model_number 1_
_ nz 488_
_ s% num_retries 0_
_ retry: correction rejected by sizeB -- give up in solver 1_
_ 1st model retry log10(dt/yr)
-5.3010299956639804D+00_
_ hydro_solver_step returned ierr -1_
_ s% model_number 1_
_ nz 488_
_ s% num_retries 1_
_…_
_stopping because of problems dt < min_timestep_limit_
_terminated evolution: cannot find acceptable model_
_termination code: min_timestep_limit_
_DATE: 2024-06-03_
_TIME: 18:43:24_
I thought that there was probably a mistake in my normalized rates .dat
file, so I tried to use the example you sent me. For that, I created a
network using add_isos_and_reactions() and all the isotopes. The issue
then is that MESA is complaining about my .net file formatting:
_problem reading net file network_new.net error somewhere around here
<he>. please check for missing comma or other typo._
_ set_net failed in net_tables_
_ failed in set_net_
In sort, I have two questions:
1. Could you explain me the what is wrong with my .net file and what
formatting rules do I have to follow?
2. Why am I getting the convergence problem?
You will fin attached all the corresponding files (now yes :). Thank you
for your time.
Best regards,
Fran
El 2024-05-27 21:27, Francis Timmes escribió:
> hi fran,
>
> i didn't see an attachment, so just a few comments.
>
> stars of ~1 msun don't hot enough to alter iron from nuclear
> reactions. the iron-input is equal to the iron-output. if you are
> doing an s-process on iron seed nuclei, that is something else.
>
> to set a precise initial composition in mesa, one goes something like
>
> ! set specific abundances - these are set after the pre-ms relaxation
> set_uniform_initial_xa_from_file = .true.
> file_for_uniform_xa = 'gch_0p0_mesa_79.dat'
>
> where gch_0p0_mesa_79.dat is attached. the mass fractions listed
> should sum to unity and usually depend on the chosen reaction network.
> note that the resulting initially flat iron profile can change if
> element diffusion is active, for example. without a precise initial
> composition, mesa re-normalizes the initial mass fractions such that
> the sum is unity - this may be what you are reporting.
>
> fxt
>
>> On May 23, 2024, at 12:57 PM, francandon via Mesa-users
>> <mesa-users at lists.mesastar.org> wrote:
>>
>> Dear MESA members,
>>
>> I'm a master student at the university of Zaragoza, currently
>> finishing my master thesis. I have just started using MESA to run
>> stellar simulations, and I read the documentation and tutorials.
>>
>> For my project, I need to calculate the abundance of some isotopes
>> in the Sun. For example, I want to know the abundance of Fe57. What
>> I did was the following: I used te documentation example
>> (https://docs.mesastar.org/en/latest/using_mesa/running.html [1 [1]])
>> and changed some parameters. In addition, I used the nuclear network
>> "http://aprox21.net [2 [2]]" and I added Fe57 to consider all the
>> possible reactions that can produce it.
>> However, my problem arises at the first step of the simulation. The
>> abundance rate of Fe57 is 10 times larger than I expected, because
>> the presence of the Fe57 isotope in nature is just 2% of that of Fe.
>> I even tried changing the set_uniform_initial_composition with the
>> initial_zfracs = 3, corresponding to GS98. I obtain the following
>> for the first step:
>>
>> total_mass_fe56
>> total_mass_fe57
>> 1.4142415754937801E-003 3.0840908076103230E-004
>> which means that Fe57 is the 21.43% if we assume Fe56 to be the 98%.
>>
>> I would appreciate it if someone could clarify this for me. You can
>> find attached to this email the inlist and the nuclear network files
>> that I'm using.
>> Thank you for your attention.
>>
>> Best regards,
>> Fran
>> _______________________________________________
>> mesa-users at lists.mesastar.org
>> https://lists.mesastar.org/mailman/listinfo/mesa-users [3 [3]]
>
> Links:
> ------
> [1]
> https://urldefense.com/v3/__https://docs.mesastar.org/en/latest/using_mesa/running.html__;!!D9dNQwwGXtA!U4CJ7ljB-GpPO5BtlyS2y4zTJ-LN4eoBzjHC-u-QetickWlZeGMzyxA5xflcJDh_SRaMsCoNUFRS_g$
> [2]
> https://urldefense.com/v3/__http://aprox21.net__;!!D9dNQwwGXtA!U4CJ7ljB-GpPO5BtlyS2y4zTJ-LN4eoBzjHC-u-QetickWlZeGMzyxA5xflcJDh_SRaMsCra12GfDA$
> [3]
> https://urldefense.com/v3/__https://lists.mesastar.org/mailman/listinfo/mesa-users__;!!D9dNQwwGXtA!U4CJ7ljB-GpPO5BtlyS2y4zTJ-LN4eoBzjHC-u-QetickWlZeGMzyxA5xflcJDh_SRaMsCqEJx2Dpg$
Links:
------
[1]
https://urldefense.com/v3/__https://docs.mesastar.org/en/latest/using_mesa/running.html__;!!D9dNQwwGXtA!U4CJ7ljB-GpPO5BtlyS2y4zTJ-LN4eoBzjHC-u-QetickWlZeGMzyxA5xflcJDh_SRaMsCoNUFRS_g$
[2]
https://urldefense.com/v3/__http://aprox21.net__;!!D9dNQwwGXtA!U4CJ7ljB-GpPO5BtlyS2y4zTJ-LN4eoBzjHC-u-QetickWlZeGMzyxA5xflcJDh_SRaMsCra12GfDA$
[3]
https://urldefense.com/v3/__https://lists.mesastar.org/mailman/listinfo/mesa-users__;!!D9dNQwwGXtA!U4CJ7ljB-GpPO5BtlyS2y4zTJ-LN4eoBzjHC-u-QetickWlZeGMzyxA5xflcJDh_SRaMsCqEJx2Dpg$
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.mesastar.org/pipermail/mesa-users/attachments/20240603/4e576258/attachment.htm>
-------------- next part --------------
! inlist to evolve a 15 solar mass star
! For the sake of future readers of this file (yourself included),
! ONLY include the controls you are actually using. DO NOT include
! all of the other controls that simply have their default values.
&star_job
! see star/defaults/star_job.defaults
! begin with a pre-main sequence model
create_pre_main_sequence_model = .true.
change_initial_net = .true.
new_net_name = 'franks_example_network.net'
set_uniform_initial_xa_from_file = .true.
file_for_uniform_xa = 'gch_0p0_mesa_79.dat'
! save a model at the end of the run
save_model_when_terminate = .false.
save_model_filename = '1M_at_TAMS_fe57.mod'
! display on-screen plots
pgstar_flag = .true.
/ ! end of star_job namelist
&eos
! eos options
! see eos/defaults/eos.defaults
/ ! end of eos namelist
&kap
! kap options
! see kap/defaults/kap.defaults
use_Type2_opacities = .true.
Zbase = 0.02
/ ! end of kap namelist
&controls
! see star/defaults/controls.defaults
! starting specifications
initial_mass = 20 ! in Msun units
initial_z = 0.02
! when to stop
! stop when the star nears ZAMS (Lnuc/L > 0.99)
Lnuc_div_L_zams_limit = 0.99d0
stop_near_zams = .true.
! stop when the center mass fraction of h1 drops below this limit
xa_central_lower_limit_species(1) = 'h1'
xa_central_lower_limit(1) = 1d-3
! wind
! atmosphere
! rotation
! element diffusion
! mlt
! mixing
! timesteps
! mesh
! solver
! options for energy conservation (see MESA V, Section 3)
energy_eqn_option = 'dedt'
use_gold_tolerances = .true.
! output
/ ! end of controls namelist
-------------- next part --------------
add_isos_and_reactions(
neut
h 1 2 4 ! hydrogen
he 3 4 ! helium
li7 ! lithium
be9 ! beryllium
c 12 13 ! carbon
n 14 15 ! nitrogen
o 16 17 18 ! oxygen
f19 ! fluorine
ne 20 21 22 ! neon
na23 ! sodium
mg 24 25 26 ! magnesium
al27 ! aluminum
si 28 29 30 ! silicon
p31 ! phosphorus
s 32 33 34 ! sulfur
cl35 ! chlorine
ar 36 38 ! argon
k39 ! potassium
ca 40 42 ! calcium
ti 44 46 ! titanium
cr 48 50 ! chromium
fe 52 54 56 57 ! iron
ni 56 58 ! nickel
)
-------------- next part --------------
h1 7.113085E-01
h2 2.757851E-05
he3 3.421283E-05
he4 2.734284E-01
li7 9.808136E-09
be9 1.499814E-10
c12 2.322780E-03
c13 2.828083E-05
n14 8.059514E-04
n15 3.174029E-06
o16 6.833290E-03
o17 2.708000E-06
o18 1.541563E-05
f19 4.156627E-07
ne20 1.662503E-03
ne21 4.184913E-06
ne22 1.344662E-04
na23 3.610796E-05
mg24 5.285972E-04
mg25 6.973094E-05
mg26 7.977627E-05
al27 6.210132E-05
si28 7.020890E-04
si29 3.692380E-05
si30 2.517804E-05
p31 6.998362E-06
s32 3.482032E-04
s33 2.834363E-06
s34 1.641050E-05
cl35 3.725703E-06
ar36 7.672425E-05
ar38 1.472366E-05
k39 3.715245E-06
ca40 6.364586E-05
ca42 4.460341E-07
ti46 2.550769E-07
cr50 7.726903E-07
fe54 7.272397E-05
fe56 1.183841E-03
ni58 5.261962E-05
-------------- next part --------------
h1 1.279182e-01
he4 1.163242e-01
c12 8.918583e-02
n14 8.328052e-02
o16 9.242847e-02
ne20 7.974248e-02
mg24 6.357392e-02
si28 7.383106e-02
s32 7.199084e-02
ar36 5.732054e-02
ca40 6.510405e-02
ti44 1.000000e-12
cr48 1.000000e-12
fe52 1.000000e-12
fe54 4.648183e-03
fe56 7.296654e-02
fe57 1.685116e-03
ni56 1.000000e-12
-------------- next part --------------
approx21(fe57)
More information about the Mesa-users
mailing list