[Mesa-users] Setting Multiple Element Abundances
Andrew Nine
anine at astro.wisc.edu
Wed Mar 10 17:08:49 UTC 2021
Hi Rob, Frank, and all,
Setting the file_for_uniform_xa worked great once I figured out how to
count to 1. Thanks for your help!
-Andrew
On Wed, Mar 10, 2021 at 4:58 AM Rob Farmer <r.j.farmer at uva.nl> wrote:
> Hi
> I agree with Frank your best bet is to explicitly set all the abundances
> in one go. You can do this with:
>
>
> https://docs.mesastar.org/en/latest/reference/star_job.html#file-for-uniform-xa
>
> Where you provide a file with each isotope in your network and the
> starting abundances you want.
>
> Rob
>
>
> On Wed, 10 Mar 2021 at 06:10, Francis Timmes via Mesa-users <
> mesa-users at lists.mesastar.org> wrote:
>
>> hi andrew,
>>
>> set_abundance, set_initial_abundance, chem_name, and new_frac are scalars
>> not vectors.
>> thus, after the inlist is read only the last setting holds. this means
>> only 1 isotope
>> can be changed by this method with one inlist.
>>
>> to demonstrate, i copied basic_ba.net to basic_ba_new.net
>> and uncommented sr88 and pb208 in basic_ba_new.net.
>>
>> in inlist_accrete
>>
>> set_abundance = .true.
>> set_initial_abundance = .true.
>> chem_name = 'ba138'
>> new_frac = 1.11d-16
>>
>> set_abundance = .true.
>> set_initial_abundance = .true.
>> chem_name = 'pb208'
>> new_frac = 2.22d-16
>>
>> set_abundance = .true.
>> set_initial_abundance = .true.
>> chem_name = 'sr88'
>> new_frac = 3.33d-16
>>
>> upon running 12115 the network was expanded from the 9 isotopes in
>> start.mod
>> to the desired 11 isotopes, and the single output line
>>
>> set_abundance of sr88 3.3299999999999999E-016 1 931
>>
>> confirms that only the last setting is applied.
>>
>> one can also see the scalar not vector nature of these settings in the
>> source code
>> beginning at line 2435 in $MESA_DIR/star/job/run_star_support.f90
>>
>>
>> i was able to achieve the desired result of changing all 3 isotopes by a
>> kludge.
>> i changed one isotope, took 1 tiny timestep, and saved a new mod file.
>> starting from this new mod file, repeat the process for the second
>> isotope.
>> and finally once more for the third isotope. e.
>>
>> a better solution would be to make these settings vectors such that
>> an arbitrary number of isotopes can be modified with one inlist.
>>
>> fxt
>>
>>
>>
>>
>>
>>
>>
>>
>> > On Mar 9, 2021, at 12:10 PM, Andrew Nine via Mesa-users <
>> mesa-users at lists.mesastar.org> wrote:
>> >
>> > Hello all,
>> >
>> > I'm running evolutionary models of stars after they accrete mass from
>> an AGB donor in r12115. When I try to set the accreting star's initial
>> abundances of Ba138, Pb208, and Sr88 to zero, two of the three will take on
>> some default value that is not zero. Here's what I have in my inlist:
>> >
>> > change_net = .true.
>> > new_net_name = 'basic_ba.net'
>> >
>> > set_abundance = .true.
>> > set_initial_abundance = .true.
>> > chem_name = 'ba138'
>> > new_frac = 0
>> >
>> > !set_abundance = .true.
>> > !set_initial_abundance = .true.
>> > !chem_name = 'pb208'
>> > !new_frac = 0
>> >
>> > !set_abundance = .true.
>> > !set_initial_abundance = .true.
>> > !chem_name = 'sr88'
>> > !new_frac = 0
>> >
>> > I have also attached full copies of my inlist, reaction net, starting
>> model, and run_star_extras. Is there a way to set all three initial
>> abundances to zero?
>> >
>> > Best,
>> >
>> > Andrew Nine
>> > <basic_ba.net
>> ><inlist_accrete><start.mod><run_star_extras.f>_______________________________________________
>> > mesa-users at lists.mesastar.org
>> > https://lists.mesastar.org/mailman/listinfo/mesa-users
>> >
>>
>> _______________________________________________
>> mesa-users at lists.mesastar.org
>> https://lists.mesastar.org/mailman/listinfo/mesa-users
>>
>>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.mesastar.org/pipermail/mesa-users/attachments/20210310/18344cf3/attachment.htm>
More information about the Mesa-users
mailing list