[Mesa-users] saving profiles when evolution stops

Ali Pourmand pourmand at ualberta.ca
Sat Apr 22 23:57:25 UTC 2023


Hello,

I am having a simulation terminating with the following condition:

 retry: max residual jumped -- give up in solver     696
                                                     dt
 7.0155661665216534D-07
                                     min_timestep_limit
 9.9999999999999995D-07
 stopping because of problems dt < min_timestep_limit
                                 WARNING: rel_run_E_err         696
 1.8323459126673360D-02
terminated evolution: cannot find acceptable model
termination code: min_timestep_limit
DATE: 2023-04-22
TIME: 17:24:05

I want to save the profile at the moment the simulation stopped.
I have found the          s% need_to_save_profiles_now = .true. command,
which should theoretically save the model if we write it in
extras_finish_step:

      integer function extras_finish_step(id)
         integer, intent(in) :: id
         integer :: ierr
         type (star_info), pointer :: s
         ierr = 0
         call star_ptr(id, s, ierr)
         if (ierr /= 0) return
         extras_finish_step = keep_going
         ! to save a profile,
         s% need_to_save_profiles_now = .true.
         if (extras_finish_step == terminate) s% termination_code =
t_extras_finish_step

      end function extras_finish_step

However, it doesn't seem to save anything. as the final profile produced
with and without this are identical.

Can anyone help me with this command?

If there is any better command that could help me save the profile when the
code terminates, that would be more helpful.


best
Ali
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.mesastar.org/pipermail/mesa-users/attachments/20230422/00c27c8e/attachment.htm>


More information about the Mesa-users mailing list