[mesa-users] Changing Timestep Dynamically

Ehsan Moravveji e.moravveji at gmail.com
Fri Dec 12 02:52:30 EST 2014


Hi Spencer,
In such cases, you can declare a variable on top of your run_star_extras, which will be within the scope of the whole module. With that, you can perfectly “remember” the last position/index of the core before a forced retry, and “refresh” it once a small enough timestep is taken.

I hope this helps.

Cheers
Ehsan.





On Dec 12, 2014, at 4:12 AM, Spencer C Wallace <spencerw at email.arizona.edu> wrote:

> Hi everyone,
> 
> I am working with models of massive main sequence stars which all have receding convective cores. For the work I am doing, I want to make sure that the core only recedes by one zone per timestep. In order to enforce this requirement, I sometimes need to reduce the time step size while the model is running.
> 
> I added some code to the function extras_check_model in run_star_extras.f. It basically works like this:
> 
> if the core receded by > 1 zone
>   extras_check_model = retry
> 
> Forcing a retry changes the timestep size by timestep_factor_for_retries, which reduces the amount by which the core recedes. However, it might take a few retries to get the right step size. In order to figure out how much the core receded, I look at
> 
> s% cz_top_mass(1)
> s% cz_top_mass_older(1)
> 
> However, after the first retry, it looks like cz_top_mass = cz_top_mass_older, so I no longer have the information I need to determine by which how many zones the core receded.
> 
> Is there a way to remember the change in the core size over multiple retries? Or am I going about this the totally wrong way?
> 
> Spencer Wallace
> ------------------------------------------------------------------------------
> Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
> from Actuate! Instantly Supercharge Your Business Reports and Dashboards
> with Interactivity, Sharing, Native Excel Exports, App Integration & more
> Get technology previously reserved for billion-dollar corporations, FREE
> http://pubads.g.doubleclick.net/gampad/clk?id=164703151&iu=/4140/ostg.clktrk_______________________________________________
> 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/20141212/23be8e10/attachment.html>


More information about the Mesa-users mailing list