[Mesa-users] Modifying constants during the relaxation routine

Bill Paxton paxton at kitp.ucsb.edu
Tue Jan 1 10:59:47 EST 2019


i see no reason why create_pre_main_sequence_model shouldn’t use s% cgrav as long as there has been a chance for your run_star_extras to set that by the time it is called.

as you note, the value of standard_cgrav in const is a variable rather than a compile time constant.

that is so that you can change it from run_star_extras at the start of the run.

check the code to see when the const do_const_init is called.  then check if that happens before your extras_controls is called.  if so, then you can change cgrav in const_def there.

if there isn’t currently a call on a run_star_extras routine after const is initialized and before create prems model, then we should add one.

cheers
bill

> On Jan 1, 2019, at 7:42 AM, Earl Bellinger via Mesa-users <mesa-users at lists.mesastar.org> wrote:
> 
> Hello mesa-users, 
> 
> In the extras_finish_step routine of run_stars_extras.f, I can modify constants such as standard_cgrav. These modifications are then applied to the evolution of the star. However, it seems during the initial relaxation, i.e., when using create_pre_main_sequence_model, these values are not used. 
> 
> I can achieve this by changing the constants in the MESA source code, but this is less desirable.  Is there a way to do this using run_stars_extras.f? 
> 
> Thanks for any help, 
> Earl 
> 
> 
> Earl Patrick Bellinger, Ph.D. 
> Postdoctoral Research Fellow 
> Stellar Astrophysics Centre 
> Aarhus University 
> Web: https://earlbellinger.com <https://earlbellinger.com/> 
> 
> _______________________________________________
> 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/20190101/bc10927e/attachment.html>


More information about the Mesa-users mailing list