! MESA VERSION: r8118
! Inlist reproduces the results of Sengar et al. 2017 


&star_job

 !    mesa_dir = '../../..'
      show_log_description_at_start = .false.

      save_model_when_terminate = .true.
      save_model_filename = 'UCXB.data'

      pgstar_flag = .true.
   

/ ! end of star_job namelist

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

&controls


      extra_terminal_output_file = 'log1'
      photo_directory = 'photos1'
      log_directory = 'LOGS1'
 
      max_model_number = 500000

      profile_interval = 50
      history_interval = 1
      terminal_interval = 1
      write_header_frequency = 10

      varcontrol_target = 5d-5

!! numerical parameters to help convergence
!! near the Eddington limit

      max_logT_for_k_below_const_q = 100
      max_q_for_k_below_const_q = 0.995
      min_q_for_k_below_const_q = 0.995
      max_logT_for_k_const_mass = 100
      max_q_for_k_const_mass = 0.99
      min_q_for_k_const_mass = 0.99


!! For Convection, semiconvection, thermohaline mixing. However, Schwarzschild convection criteria was used.
    ! use_ledoux_criterion = .true.
    ! mixing_length_alpha = 1.5
    ! alpha_semiconvection = 1d0
    ! thermohaline_coeff = 1d0


      max_age = 1.8d10
!     max_years_for_timestep = 800000


/ ! end of controls namelist

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!1

&pgstar

      History_Panels1_win_flag = .true.
      History_Panels1_win_width = 5
      History_Panels1_win_aspect_ratio = 1.0 ! aspect_ratio = height/width

      History_Panels1_title = 'Orbital evolution'
      History_Panels1_num_panels = 2

      History_Panels1_yaxis_name(1) = 'period_days'
      History_Panels1_other_yaxis_name(1) = 'lg_mstar_dot_1'
      History_Panels1_yaxis_name(2) = 'Jdot'
      History_Panels1_other_yaxis_name(2) = 'binary_separation'


      History_Track1_win_flag = .true.
      History_Track1_title = 'P vs t'
      History_Track1_xname = 'age'
      History_Track1_yname = 'period_days'
      History_Track1_xaxis_label = 't (years)'
      History_Track1_yaxis_label = 'P (days)'
      History_Track1_log_xaxis = .false. 
      History_Track1_log_yaxis = .true. 
      History_Track1_reverse_xaxis = .false.

      Summary_History_win_flag = .true.
      Summary_History_win_width = 6
      Summary_History_win_aspect_ratio = 0.75 
      Summary_History_xleft = 0.15
      Summary_History_xright = 0.85
      Summary_History_ybot = 0.15
      Summary_History_ytop = 0.85
      Summary_History_txt_scale = 1.0         
      Summary_History_title = 'Summary_History'      
      Summary_History_xmax = -1 
      Summary_History_xmin = -1 
      Summary_History_max_width = -1 
      Summary_History_name(:) = '' 

           
      Summary_History_legend(:) = '' 
      Summary_History_scaled_value(:) = .true.


      Summary_History_num_lines = 7 ! <= 16
      Summary_History_name(1) = 'log_center_T'
      Summary_History_legend(1) = 'log T\dc\u rel'
      Summary_History_name(2) = 'log_center_Rho'
      Summary_History_legend(2) = 'log Rho\dc\u rel'


      Summary_History_name(7) = 'center_he4'  
      Summary_History_legend(7) = 'he4\dc\u'
      Summary_History_scaled_value(7) = .false.

         
         !! file output

         Summary_History_file_flag = .true.
         Summary_History_file_dir = 'png'
         Summary_History_file_prefix = 'Summary_History_'
         Summary_History_file_cnt = 10000 ! output when mod(model_number,Summary_History_file_cnt)==0
         Summary_History_file_width = -1 ! (inches) negative means use same value as for window
         Summary_History_file_aspect_ratio = -1 ! negative means use same value as for window          



          !! History_Panels2



         History_Panels2_win_flag = .true.
         History_Panels2_win_width = 6
         History_Panels2_win_aspect_ratio = 0.75 
         History_Panels2_xleft = 0.15
         History_Panels2_xright = 0.85
         History_Panels2_ybot = 0.15
         History_Panels2_ytop = 0.85
         History_Panels2_txt_scale = 1.2
         History_Panels2_title = 'History_Panels2'
         History_Panels2_xaxis_name = 'star_1_mass'
         History_Panels2_xmin = -3
         History_Panels2_xmax = 1.0
         History_Panels2_max_width = 0 
         History_Panels2_dxmin = -1
         History_Panels2_xaxis_reversed = .false.
         History_Panels2_xaxis_log = .true. 

         History_Panels2_num_panels = 1

         History_Panels2_yaxis_name(1) = 'period_days'
         History_Panels2_yaxis_reversed(1) = .false.
         History_Panels2_yaxis_log(1) = .true. ! show log10 of abs value
         History_Panels2_ymin(1) = -2.0 ! only used if /= -101d0
         History_Panels2_ymax(1) = 1.0 ! only used if /= -101d0
         History_Panels2_ymargin(1) = 0.1
         History_Panels2_dymin(1) = -1

         Summary_History_file_flag = .true.
         Summary_History_file_dir = 'png'
         Summary_History_file_prefix = 'Porb_Md_'
         Summary_History_file_cnt = 10000 ! output when mod(model_number,Summary_History_file_cnt)==0
         Summary_History_file_width = -1 ! (inches) negative means use same value as for window
         Summary_History_file_aspect_ratio = -1 ! negative means use same value as for window


         !!! History_Panels3


!        History_Panels3_win_flag = .true.

         History_Panels3_win_width = 6
         History_Panels3_win_aspect_ratio = 0.75 ! aspect_ratio = height/width
         History_Panels3_xleft = 0.15
         History_Panels3_xright = 0.85
         History_Panels3_ybot = 0.15
         History_Panels3_ytop = 0.85
         History_Panels3_txt_scale = 1.2
         History_Panels3_title = 'History_Panels2'

         History_Panels3_xaxis_name = 'star_1_mass'
         History_Panels3_xmin = -3
         History_Panels3_xmax = 1.0
         History_Panels3_max_width = 0 ! only used if > 0.  causes xmin to move with xmax.
         History_Panels3_dxmin = -1
         History_Panels3_xaxis_reversed = .false.
         History_Panels3_xaxis_log = .true. ! show log10 of abs value


         History_Panels3_num_panels = -1
         History_Panels3_yaxis_name(1) = 'center_entropy'
         History_Panels3_yaxis_reversed(1) = .false.
         History_Panels3_yaxis_log(1) = .false. ! show log10 of abs value
         History_Panels3_ymin(1) = 0.0 ! only used if /= -101d0
         History_Panels3_ymax(1) = 20.0 ! only used if /= -101d0
         History_Panels3_ymargin(1) = 0.1
         History_Panels3_dymin(1) = -1


/ ! end of pgstar namelist
