[Mesa-users] Adding arbitrary stopping condition on a binary evolution

Thomas Steindl thomas.steindl at uibk.ac.at
Wed May 20 02:52:56 EDT 2020


Hello Gökhan,

I am no expert in binary modelling and can therefore not comment the output. However, I tested your stopping condition and found that 1st b% period seems to be in seconds and you are testing for a value in days, so you will have to compare the same units. 2nd I put the code in binary_check_model and the following terminates the evolution correctly. 

integer function extras_binary_check_model(binary_id)
         type (binary_info), pointer :: b
         integer, intent(in) :: binary_id
         integer :: ierr
         real(dp) :: per
         call binary_ptr(binary_id, b, ierr)
         per = b% period/(24*3600)  ! get value for period and transform units
         if (ierr /= 0) then ! failure in  binary_ptr
            return
         end if
         extras_binary_check_model = keep_going
         if (per < 2.232229) then ! Stop if period below 2.232229 days
            extras_binary_check_model = terminate
         end if      
end function extras_binary_check_model

I hope this helps. Good luck!
Thomas
__________________________________________________________________

Thomas Steindl, MSc
University of Innsbruck | Institute for Astro- and Particle Physics
Tel: +43 512507 52031
Mail: thomas.steindl at uibk.ac.at

> Am 19.05.2020 um 22:44 schrieb Gökhan Yücel <gokhanyucel at akdeniz.edu.tr>:
> 
> Dear MESA users,
> 
> I have been trying to add an arbitrary stopping condition on a binary evolution. Basically, I would like to end the evolution when orbital period of the system decreased on a certain value. I have modified "run_binary_extras.f" file accordingly and managed to compile code successfully. But even though condition has reached to expecting value, the evolution does not stop, and the results are not making any sense. I believe my mistake is on modifying the "run_binary_extras.f" file. Has anyone encounter such a problem before. I added the necessary files you guys to see problem.
> 
> Thanks,
> Gokhan.<binary.zip>_______________________________________________
> mesa-users at lists.mesastar.org
> https://lists.mesastar.org/mailman/listinfo/mesa-users
> 



More information about the Mesa-users mailing list