[Mesa-users] Custom screening

Rob Farmer robert.j.farmer37 at gmail.com
Fri Mar 5 20:07:27 UTC 2021


Hi Michael,
Currently mesa does not have any way to hook easily into screening. Without
seeing your code, what you're doing sounds sensible.

Inside you other_net_get you could try calling net_get with mesa's Salpter
screening then call net_get again (in the same other_net_get call) with
your method and check that you get the same screening factors.  You can
access mesa's screened rates via net_info (n% rate_screened)

What nuclear network are you using? If you look in set_combo_screen_rates
in net_screen.f90 there is some complexity to get the screening factors
"right" for reactions in an approx net (as well as triple alpha in any
network).

A limitation with your method is when mesa computes screening it also
computes the derivatives of screening wrt temperature and density.
Unfortunately there is no way at the moment for you to insert those
derivatives without hacking into mesa.

Rob


On Fri, 5 Mar 2021 at 17:48, Michael Famiano <michael.famiano at wmich.edu>
wrote:

> Hi All;
>
>
> I'm trying to set up a custom reaction screening routine.  For my first
> attempt, I just adapted the existing screening routines (version 11701)
> and added an additional subroutine for custom screening as well as the
> option in the inlist screening_mode tag. However, I don't like the idea
> of changing the base code, so I thought the best way to do this was
> utilize the hook for other_net_get. However, I don't think I'm using the
> hook correctly.
>
> In this case, I copied the skeleton from the other_net_get.f90 and
> modified the  null_other_net_get subroutine.  Here, I set up an array
> for the number of reactions and pointer to this array. Then, within the
> routine, I modify the screening factor for each reaction, filling the
> array I made earlier.  Then at the end of the routine, I call net_get,
> and I replace the rate_factors parameter with the pointer I made earlier.
>
> I think I'm missing something fundamental here.  If I do something
> simple, like set the reaction factors equal to unity, the results (for
> the ns_he test, for example) match the results I would get if I disable
> screening, which is what I expect. However, if I do something like
> implement Salpeter weak screening, the results are quite different than
> if I just use the already-implemented Salpeter screening. I'm pretty
> sure the screening enhancement factors I'm using are calculated
> correctly.  (For my custom screening, I also make sure to disable
> screening in the inlist, since my routine is supposed to take care of it.)
>
> I think I am missing something here.  Is it incorrect to use the
> other_net_get hook to do something like this, where I just pass the new
> rate factors to net_get?
>
> I should also note that when I call net_get, I keep all the other
> parameters the same as what they were when I called null_other_net_get.
>
> Any insight you can offer would be a great help!  Thanks a lot for your
> time!
>
> mike
>
> _______________________________________________
> 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/20210305/b98a60f5/attachment.htm>


More information about the Mesa-users mailing list