[mesa-users] Changing Timestep Dynamically
Spencer C Wallace
spencerw at email.arizona.edu
Thu Dec 11 22:12:04 EST 2014
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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.mesastar.org/pipermail/mesa-users/attachments/20141211/1e4b9e33/attachment.html>
More information about the Mesa-users
mailing list