[Mesa-users] How to adjust gradr and get surface cell density though other_mlt.f90

Evan Bauer ebauer at physics.ucsb.edu
Fri May 1 20:42:07 EDT 2020


Hi Wei,

Method (2) is definitely the recommended way of doing things. That’s what the other hooks are there for.

I’m not exactly sure how to interpret your question about using this method, but it would probably be a good idea to look at this tutorial if you haven’t already: https://jschwab.github.io/mesa-2019/#orgd4efaf6 <https://jschwab.github.io/mesa-2019/#orgd4efaf6>

The general strategy for other_mlt would be to start with an example subroutine like the one provided in star/other/other_mlt.f90, uncomment the code that calls star_mlt_eval to set the mlt variables as they would be from a normal mlt call, then modify mlt_basics and possibly mlt_partials to reflect your desired modifications to gradr. Does that make sense? Let us know if you have any more questions.

For surface density, you can get the density of the outer zone of the model with s% rho(1), though note that this might not always be the same as the density at the photosphere. Depending on what you want, you might have to calculate that on your own.

Cheers,
Evan


> On Apr 30, 2020, at 9:24 AM, Wei Zhong via Mesa-users <mesa-users at lists.mesastar.org> wrote:
> 
> Dear MESA users,
> 
> I'm looking for a method to adjust the "gradr" value, I puzzled that:
> (1) Can I adjust the "gradr" of subroutine Get_results (  mesa-r11701/star/private/mlt_info.f90) ?
> (2) If the first method is unfeasible, I will adjust the "gradr" in the run_star_extras.f  by other_mlt.f.
>    Although mlt_basics (in the other_mlt.f) include the gradr,  I doubt whether the code should follow  
>    subroutine my_other_mlt (...,mlt_basics,...)   --------->      call star_mlt_eval  (...,mlt_basics,...)    ------>
>    call get_results(...,mlt_basics(mlt_gradr), mlt_partials(:,mlt_gradr),....)  ------> adjust ''gradr'' and '' d_gradr_dvb(:)'' 
>     ----------> end  subroutine my_other_mlt  
> or 
>   subroutine my_other_mlt (...,mlt_basics,...)    ------> adjust ''mlt_basics(mlt_gradr)'' ----------> end  subroutine my_other_mlt  
> (3) I need the get surface cell density to adjust the gradr, but I do not find the surface_rho.
> 
> I am wondering if these can do in run_star_extras.f?
> 
> Many thanks in advance,
> 
> W. Zhong.
> 
> PhD student
> 
> 
>  
> _______________________________________________
> 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/20200501/f6ea1a5f/attachment.htm>


More information about the Mesa-users mailing list