[mesa-users] [MESA]: Question Astrophysical Factor
Robert Farmer
rjfarmer at asu.edu
Mon Nov 7 18:21:08 EST 2016
Hi
A convergence problem is not a bug. What its telling you is that MESA has
struggled and failed to find a way to satisfy all the stellar structure
equations given the constraints that your inlist sets. Updating to a new
version may help, and is worth a shot, as changes are made to the code but
i don't know of anything particular that will has been fixed that would help
>This might work, but then I cannot specify the mass and the Z right?
You can specify mass but not Z, that is pre-set to solar for the pre
created pre-MS models
The next thing to think about is, are your rates sensible? If we look at
MESA's rate for rpp_he3, to do this we need to look at the cached data mesa
written out:
cd $MEA_DIR/rates/test
./show_rates $MESA_DIR/data/rates_data/cache/rpp_to_he3_1.bin >
rpp_to_he3_1.txt
Then inspecting rpp_to_he3_1.txt shows that for T<10**7K the rates are
~<10^-20. So maybe a trial for you would be to add some more low
temperature data points, with a very small rate factors such that the
rpp_he3 rate is almost 0 for the temperatures on the pre-MS and early
evolution until the star gets hotter. This is the E (experiment) part of
MESA.
Why the rates folder isn't working properly i'll have a look into.
Rob
On Mon, Nov 7, 2016 at 3:52 PM, Gonçalo Andrade <gnmandrade at hotmail.com>
wrote:
> Hi
>
> ------
> Does having the rates_table option as:
> rate_tables_dir = './rates_tables' (put a ./ in front of the folder name)
> Work for you? for loading the rates from a local folder called rates_table
> ------
>
>
> I've tried that, the code looks for the tables in the non existing
> directory
>
> $MESA_DIR/data/rates_data/./rates_tables
>
> So I gave up on that and added my tables on a "test_nuclear_rates_tables"
> folder inside rates_data, using then
>
> rate_tables_dir = 'test_nuclear_rates_tables'
>
>
> ----------
>
> First test, does the model work okay without the new rates, given all the
> other options you have set?
>
> ----------
>
>
> If I use the same inlist but comment just the line
>
> rate_tables_dir = 'test_nuclear_rates_tables'
>
> It runs without any problem.
>
>
> -----------
>
> Some options that may or may not work for you:
>
> Don't make your own pre-MS star, (create_pre_main_sequence_model =
> .false.) MESA will load a pre-built model and then continue the evolution
> with your inlist options
>
> -----------
>
> This might work, but then I cannot specify the mass and the Z right? I
> needed to model a real observable star, so it would be useful to have
> freedom in these parameters.
>
> -----------
>
> set pre_ms_relax_num_steps = 100 this makes MESA take more steps during
> the pre-MS so the change per-step is smaller and it might be easier to
> converge the results
>
> -----------
>
>
> I've tried it at 100, and in several values as high as 25000, still
> doesn't converge.
>
>
> -----------
>
> Make a pre-MS model with the rate changes off, save a photo, stop the run
> then restart from the photo with the rates on (a more complicated and
> manual way of running the first option)
>
> -----------
>
> I've tried this. I used the same inlist commenting the line that calls my
> tables and using the comands
>
> Lnuc_div_L_zams_limit = 0.99d0
> stop_near_zams = .true.
>
> to stop and save the ZAMS model.
>
> When I restart with the new reactions on the last photo it has the same
> convergence problem, but with an even smaller dt.
>
>
>
> -----------
>
>
> Change mixing_length_alpha (again you can always change it after the
> pre-MS has finished by stopping the run, changing the file and restarting
> from a photo)
>
>
> -----------
>
>
> I've tried a wide variety of values, between 0.005 and 500, they all had
> the same convergence problem.
>
>
>
>
>
> Having tried all the suggestions, is it possible that this is a bug that
> has been fixed in more recent versions?
> My MESA version is the 8118. Current version is the 8845. Is it worth to
> try installing it all again with the new version?
>
>
>
> Gonçalo Andrade
>
>
> ------------------------------
> *De:* Robert Farmer <rjfarmer at asu.edu>
> *Enviado:* 7 de novembro de 2016 18:35
> *Para:* Gonçalo Andrade
> *Cc:* mesa-users at lists.sourceforge.net
> *Assunto:* Re: [mesa-users] [MESA]: Question Astrophysical Factor
>
> Hi
>
> Does having the rates_table option as:
> rate_tables_dir = './rates_tables' (put a ./ in front of the folder name)
> Work for you? for loading the rates from a local folder called rates_table
>
> Convergence issues are hard to fix normally and even harder to do during
> the pre-MS.
>
> First test, does the model work okay without the new rates, given all the
> other options you have set?
>
> Some options that may or may not work for you:
>
> Don't make your own pre-MS star, (create_pre_main_sequence_model =
> .false.) MESA will load a pre-built model and then continue the evolution
> with your inlist options
>
> set pre_ms_relax_num_steps = 100 this makes MESA take more steps during
> the pre-MS so the change per-step is smaller and it might be easier to
> converge the results
>
> Make a pre-MS model with the rate changes off, save a photo, stop the run
> then restart from the photo with the rates on (a more complicated and
> manual way of running the first option)
>
> Change mixing_length_alpha (again you can always change it after the
> pre-MS has finished by stopping the run, changing the file and restarting
> from a photo)
>
> Rob
>
>
> On Sun, Nov 6, 2016 at 4:45 PM, Gonçalo Andrade <gnmandrade at hotmail.com>
> wrote:
>
>> Hi Robert
>>
>>
>> Since our last email I've been trying to solve this problem.
>> I've fixed some errors but others have appeared.
>>
>>
>> 1) I was misunderstanding how MESA uses the nuclear tables directory. By
>> looking at the error messages I saw that MESA instead of using the folder
>> inside the working directory (where I have my inlists and stuff like that),
>> it ads whatever I put as argument in the
>>
>> rate_tables_dir = 'rates_tables'
>>
>> to the folder
>>
>> $MESA_DIR/data/rates_data/
>>
>> So I need to place my tables in this directory.
>>
>>
>>
>>
>> 2) After "solving" this problem, the code stopped ignoring my tables and
>> started to output error messages saying "segmentation fault". This was easy
>> to solve, it was only due to errors in the files' names.
>>
>>
>>
>> 3) I now think I've managed to get the code reading the tables, but each
>> time I change a reaction the code doesn't run because it has convergence
>> problems. I've already tried a wide range of values in the rate files.
>> I've changed some things, so I send you as an attachment my current
>> inlist files, my rate files and a print of the error message.
>>
>>
>> Thank you,
>> Gonçalo
>>
>>
>> ------------------------------
>> *De:* Robert Farmer <rjfarmer at asu.edu>
>> *Enviado:* 1 de novembro de 2016 17:35
>>
>> *Para:* Gonçalo Andrade
>> *Cc:* mesa-users at lists.sourceforge.net users
>> *Assunto:* Re: [mesa-users] [MESA]: Question Astrophysical Factor
>>
>> Hi
>>
>> So looking over your files
>>
>> When the run starts you see MESA prints out a list of isotopes and
>> abundances, there is no h2 printed at all, this means there is no h2 in
>> your nuclear networks. You need to remove the comment in you
>> add_test_nuclear file on the add_isos(h2) file.
>>
>> Also maybe just a copy error, but in the rate file the temperature should
>> be in units of 10^8 not 10^9 as your comment in the file suggests
>>
>> Rob
>>
>>
>> On Tue, Nov 1, 2016 at 3:59 AM, Gonçalo Andrade <gnmandrade at hotmail.com>
>> wrote:
>>
>>> Hi
>>>
>>>
>>>
>>> I've fixed that detail on the rates_list.txt, but the result was the
>>> same. It doesn't change a bit and I've put some really big numbers on the
>>> rates of the pp reaction so I think it should have a major impact on the
>>> model.
>>>
>>>
>>> I now tried changing the first line of rpp_to_he3.txt from low rate to
>>> high rate, but I'm still waiting for the results.
>>>
>>>
>>>
>>> Thank you,
>>>
>>> Gonçalo
>>>
>>>
>>> ------------------------------
>>> *De:* Robert Farmer <rjfarmer at asu.edu>
>>> *Enviado:* 31 de outubro de 2016 20:06
>>>
>>> *Para:* Gonçalo Andrade
>>> *Cc:* mesa-users at lists.sourceforge.net users
>>> *Assunto:* Re: [mesa-users] [MESA]: Question Astrophysical Factor
>>>
>>> Hi
>>>
>>> your rates_list.txt has the line
>>>
>>> r_pp_to_he3 'rpp_tp_he3.txt'
>>>
>>> guessing it should be:
>>>
>>> r_pp_to_he3 'rpp_to_he3.txt'
>>>
>>> Rob
>>>
>>>
>>> On Mon, Oct 31, 2016 at 1:00 PM, Gonçalo Andrade <gnmandrade at hotmail.com
>>> > wrote:
>>>
>>>> Hi
>>>>
>>>>
>>>> >So you have a modified network, does this network include the reaction
>>>> you want? you have the list_net_reactions = .true. so check that list to
>>>> see if your desired reaction is there.
>>>>
>>>> I've tried with the other networks (commented) and It seemed not to
>>>> work, so I tried modifying it but the result was practically the same.
>>>>
>>>>
>>>> > What does rate_tables/rates_list.txt look like? What does the rates
>>>> file you are using look like? What does your network look like?
>>>>
>>>> I think I attached all the relevant files. I created a folder called
>>>> "nets" for the networks.
>>>>
>>>> Gonçalo
>>>>
>>>> ------------------------------
>>>> *De:* Robert Farmer <rjfarmer at asu.edu>
>>>> *Enviado:* 31 de outubro de 2016 19:50
>>>> *Para:* Gonçalo Andrade
>>>> *Cc:* mesa-users at lists.sourceforge.net users
>>>>
>>>> *Assunto:* Re: [mesa-users] [MESA]: Question Astrophysical Factor
>>>>
>>>> Hi
>>>>
>>>> >new_net_name = 'mod_cno_extras_o18_and_ne22.net'
>>>>
>>>> So you have a modified network, does this network include the reaction
>>>> you want? you have the list_net_reactions = .true. so check that list to
>>>> see if your desired reaction is there.
>>>>
>>>> What does rate_tables/rates_list.txt look like? What does the rates
>>>> file you are using look like? What does your network look like?
>>>>
>>>> Rob
>>>>
>>>>
>>>> On Mon, Oct 31, 2016 at 12:28 PM, Gonçalo Andrade <
>>>> gnmandrade at hotmail.com> wrote:
>>>>
>>>>> Hi
>>>>>
>>>>>
>>>>> > Please keep replies on the mesa users list, others may be able to
>>>>> help and may be helped by any response.
>>>>>
>>>>> Thanks for you advice!
>>>>>
>>>>> > Did you alter your star_job inlist to point to the rates folder? I
>>>>> would need to see your inlists, folder structure and rates files to see
>>>>> whats gone wrong.
>>>>>
>>>>> I think I did. I added the line:
>>>>>
>>>>> rate_tables_dir = './rate_tables'
>>>>>
>>>>> on my inlist and put the files on that folder.
>>>>>
>>>>> I send my inlist as an attachment, maybe that helps.
>>>>> It also has a commented section using the special rate factor command,
>>>>> I tried it because of another member's advice, but I think it doesn't allow
>>>>> me to test the astrophysical as I need.
>>>>>
>>>>>
>>>>> Thanks for the rest of the information.
>>>>>
>>>>> Gonçalo Andrade
>>>>>
>>>>>
>>>>> ------------------------------
>>>>> *De:* Robert Farmer <rjfarmer at asu.edu>
>>>>> *Enviado:* 31 de outubro de 2016 18:18
>>>>> *Para:* Gonçalo Andrade; mesa-users at lists.sourceforge.net users
>>>>>
>>>>> *Assunto:* Re: [mesa-users] [MESA]: Question Astrophysical Factor
>>>>>
>>>>> Hi
>>>>> Please keep replies on the mesa users list, others may be able to help
>>>>> and may be helped by any response.
>>>>>
>>>>> >I've created the rate_tables directory and put the files there as you
>>>>> said but the code seems to ignore my tables.
>>>>>
>>>>> Did you alter your star_job inlist to point to the rates folder? I
>>>>> would need to see your inlists, folder structure and rates files to see
>>>>> whats gone wrong.
>>>>>
>>>>> >1) If I do what you said for an existing reaction, like rpp_to_he3,
>>>>> the code is supposed to ignore the default tables and use mine right? Or it
>>>>> adds a new reaction with my tables?
>>>>>
>>>>> It should use yours, if its been set up correctly
>>>>>
>>>>> >2) On the table files (txt), what are the units of the "Rates" column?
>>>>>
>>>>> Reactions per second
>>>>>
>>>>> Rob
>>>>>
>>>>> On Sun, Oct 30, 2016 at 10:59 AM, Gonçalo Andrade <
>>>>> gnmandrade at hotmail.com> wrote:
>>>>>
>>>>>> Hi Rob
>>>>>>
>>>>>>
>>>>>>
>>>>>> Thank you for your help. It took me a long time to produce properly
>>>>>> the rate tables from the s-factor so I could only try your method a few
>>>>>> weeks ago.
>>>>>>
>>>>>>
>>>>>>
>>>>>> I've created the rate_tables directory and put the files there as you
>>>>>> said but the code seems to ignore my tables. I even tried to put really big
>>>>>> numbers just to check if it was using the tables and the result was no
>>>>>> different from what I had before.
>>>>>>
>>>>>> Is there any step missing? I always do "./clean && ./mk && ./rn" when
>>>>>> running the code.
>>>>>>
>>>>>>
>>>>>> Two more questions:
>>>>>>
>>>>>> 1) If I do what you said for an existing reaction, like rpp_to_he3,
>>>>>> the code is supposed to ignore the default tables and use mine right? Or it
>>>>>> adds a new reaction with my tables?
>>>>>>
>>>>>>
>>>>>> 2) On the table files (txt), what are the units of the "Rates" column?
>>>>>>
>>>>>>
>>>>>> Thanks a lot for your help.
>>>>>>
>>>>>>
>>>>>> Gonçalo Andrade
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>> ------------------------------
>>>>>> *De:* Robert Farmer <rjfarmer at asu.edu>
>>>>>> *Enviado:* 16 de setembro de 2016 00:59
>>>>>> *Para:* Gonçalo Andrade
>>>>>> *Cc:* mesa-users at lists.sourceforge.net
>>>>>> *Assunto:* Re: [mesa-users] [MESA]: Question Astrophysical Factor
>>>>>>
>>>>>> Hi
>>>>>> You cant change the s-factor directly, however you can give mesa a
>>>>>> file with a customized set of nuclear reaction rates where you have changed
>>>>>> the s-factor yourself.
>>>>>>
>>>>>> What you need to do (and example inlists and rate files can be found
>>>>>> here http://mesastar.org/results/properties-of-carbon-oxygen-whit
>>>>>> e-dwarfs-from-monte-carlo-stellar-models) follows:
>>>>>>
>>>>>>
>>>>>> Add this to the star_job section of your inlists
>>>>>>
>>>>>> rate_tables_dir = './rate_tables'
>>>>>>
>>>>>> Then make a folder rate_tables in your mesa work directory. Inside
>>>>>> that folder make a file rates_list.txt file with the following line:
>>>>>>
>>>>>> r_h1_pg_h2 'r_h1_pg_h2.txt'
>>>>>>
>>>>>> This says we want to alter the reaction h1+h1 -> h2 by looking for a
>>>>>> file called r_h1_pg_h2.txt where we will specify the rate as a function of
>>>>>> temperature
>>>>>>
>>>>>> Then make a file called r_h1_pg_h2.txt in (rate_tables), where the
>>>>>> first two lines are:
>>>>>> # r_h1_pg_h2 low rate:
>>>>>> # T8 RATE
>>>>>>
>>>>>> Then you need to add a line with the number of rate points you have.
>>>>>> Then give the temperature in units of 10**8 K and a rate with one rate per
>>>>>> line. An example file might look like this though you will want many more
>>>>>> rate points than this:
>>>>>>
>>>>>> # r_h1_pg_h2 low rate:
>>>>>> # T8 RATE
>>>>>> 5
>>>>>> 0.01 0.0
>>>>>> 0.5 1.0
>>>>>> 1.0 2.0
>>>>>> 10.5 3.0
>>>>>> 100.0 10.0
>>>>>>
>>>>>> Then run mesa and it should be using your new nuclear rate.
>>>>>>
>>>>>> Rob
>>>>>>
>>>>>>
>>>>>>
>>>>>> On Thu, Sep 15, 2016 at 4:25 PM, Gonçalo Andrade <
>>>>>> gnmandrade at hotmail.com> wrote:
>>>>>>
>>>>>>> Dear Sir or Madam,
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> I'm a MSc student and I'm doing my master thesis on asteroseismology
>>>>>>> of red giant stars. I'm using MESA to do models of these stars.
>>>>>>>
>>>>>>>
>>>>>>> I found this email on the MESA community website and I decided to
>>>>>>> try it as a last resource.
>>>>>>>
>>>>>>>
>>>>>>> The thing I need to do now in my project is to change the
>>>>>>> Astrophysical Factor (S-Factor) from the pp nuclear reaction to try to find
>>>>>>> out what changes does it have in the star and if these can be measured
>>>>>>> using seismology. The problem is I've been been searching online for some
>>>>>>> weeks and I can't find out how to change this factor. I've tried several
>>>>>>> things, the closest to what I wanted, I think, was to change the value on
>>>>>>> the file $MESA_DIR/rates/private/ratelib.f90 , but after that
>>>>>>> change the code no longer compiles...
>>>>>>>
>>>>>>>
>>>>>>> I a few words, I just need to change the S-Factor of the pp reaction.
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> I thank you in advance and hope I'm not being inconvenient.
>>>>>>>
>>>>>>>
>>>>>>> Yours faithfully,
>>>>>>>
>>>>>>> Gonçalo Andrade
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> ------------------------------------------------------------
>>>>>>> ------------------
>>>>>>>
>>>>>>> _______________________________________________
>>>>>>> mesa-users mailing list
>>>>>>> mesa-users at lists.sourceforge.net
>>>>>>> https://lists.sourceforge.net/lists/listinfo/mesa-users
>>>>>>>
>>>>>>>
>>>>>>
>>>>>
>>>>
>>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.mesastar.org/pipermail/mesa-users/attachments/20161107/a94af0d2/attachment.html>
More information about the Mesa-users
mailing list