[mesa-users] how to turn off certain categories of nuclear burning

Aaron Dotter aaron.dotter at gmail.com
Tue May 30 17:46:12 EDT 2017


Hi Rob,

Thanks!  I've tried something like this and it doesn't work.  I also tried
your code, just to be sure, and it doesn't work either.

I *think* there is some disconnect between the reaction rates in g and the
rate factors -- or I just don't understand how the two go together.  The
two arrays are of different length, for one thing: size(s% rate_factors) is
greater than g% num_reactions = s% num_reactions.  Not sure what's going on
there.  Weak reactions, maybe?

I'm attaching as close to a MWE as I can make.  The attached tarball can be
unpacked into star/work.  The code is in extras_finish_step and just below
that.  The idea in this particular case is to turn off all but H- and
He-burning during the post-AGB.  It should take fewer than 20 steps before
the code to turn off burning is called.  Then, if you look at the terminal
output for LH, LHe, and LZ, you'll see that this is not what happens.  At
least that's what I see!

Aaron









On Tuesday, May 30, 2017, Robert Farmer <rjfarmer at asu.edu> wrote:

> Hi
>
>  s%rate_factors goes from 1 to g%num_reactions
>
> so you could do:
>
> call get_net_ptr(s%net_handle, g, ierr)
> s%rate_factors=0d0
>
>       do j=1,g %num_reactions
>          id = g% reaction_id(j)
>          icat = reaction_categories(id)
>          if(icat .eq. ipp .or. ........)then
>                 s%rate_factors(j)=1d0
>          end if
>      enddo
>
> Rob
>
>
>
> On Tue, May 30, 2017 at 1:01 PM, Aaron Dotter <aaron.dotter at gmail.com>
> wrote:
>
>> Hi,
>>
>> I have a situation where I'd like to turn off all nuclear burning that is
>> neither H-burning nor He-burning in run_star_extras.  In MESA/chem
>> terminology, I'd like reactions in these categories
>>
>> ipp = 1
>> icno = 2
>> i3alf = 3
>>
>> to go on as usual but to zero all other burning categories.  I'm using a
>> very recent version (9793 to be exact).  I had a way of doing this back in
>> 7503 but that no longer works.
>>
>> I have an array s% category_factors(1:num_categories); there are
>> currently 24 categories in chem_def.  This array is filled with values of 1
>> (first three elements) or 0 (all others).
>>
>> 1. I need to associate each reaction in my net with its category.  The
>> following seems to work:
>>
>>       call get_net_ptr(s%net_handle, g, ierr)
>>       do j=1,g %num_reactions
>>          id = g% reaction_id(j)
>>          icat = reaction_categories(id)
>>       enddo
>>
>> 2. I need to associate each reaction in my net with its s% rate_factor.
>> This has me stumped at the moment.
>>
>>
>> Any advice would be greatly appreciated!
>>
>>
>> Thanks,
>> Aaron
>>
>>
>>
>>
>> ------------------------------------------------------------
>> ------------------
>> Check out the vibrant tech community on one of the world's most
>> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
>> _______________________________________________
>> 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/20170530/892405a3/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: example.tgz
Type: application/x-gzip
Size: 1129908 bytes
Desc: not available
URL: <https://lists.mesastar.org/pipermail/mesa-users/attachments/20170530/892405a3/attachment.bin>


More information about the Mesa-users mailing list