[mesa-users] Stop at a certain core_mass/total_mass ratio

Bill Paxton paxton at kitp.ucsb.edu
Tue Jan 29 23:45:43 EST 2013


On Jan 29, 2013, at 8:34 PM, trobolo dinni wrote:

> 
> Dear MESA users,
> 
> By checking the controls.defaults file I noticed that there are controls to stop at a certain core_mass (h1_boundary_mass_limit) and at a certain envelope_mass (envelope_mass_limit).
> 
> I would like to ask if there is any control to stop a simulation at a certain core_mass/total_mass ratio, or maybe if you can suggest me an easy way to do that.
> 
> Thanks,
>                 Roberto Iaconi

Hi Roberto,

It is time for you to add run_star_extras to your mesa repertoire.  ;-)

You need to use the run_star_extras extras_check_model routine to implement your mass ratio test.
You can use s% h1_boundary_mass for the core mass and s% star_mass for the total mass.
Something like this:

      ! returns either keep_going, retry, backup, or terminate.
      integer function extras_check_model(s, id, id_extra)
         type (star_info), pointer :: s
         integer, intent(in) :: id, id_extra
         extras_check_model = keep_going         
         if ((s% star_mass-s% h1_boundary_mass)/s% star_mass < 0.35d0) then
            extras_check_model = terminate
            write(*, *) 'have reached desired ratio'
            return
         end if
      end function extras_check_model

If you aren't clear about how to use run_star_extras, there are lots of folks who can help.

Good luck,
Bill







More information about the Mesa-users mailing list