!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
! inlist_agb_from_mod
!
! This inlist runs an AGB star with initial mass 2.0 Msolar and Z=0.01, terminating....
! This requires use of the input model agb2.mod, taken from the test suite of mesa-r10398 (where it is named 2m_z1m2_agb.modk) and included with this suite
! You must change the directory strings to point to
!     - your MESA2HYDRO data directory
!     - your MESA directory
!     - the location of agb.mod, set by default to $MESA2HYDRO_ROOT/data/AGB/agb.mod
!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

&star_job
      mesa_dir = '<MESA_DIR>'
      history_columns_file='<MESA2HYDRO_ROOT>/data/MESA_controls/history_columns_testsuite.list'
      profile_columns_file='<MESA2HYDRO_ROOT>/data/MESA_controls/profile_columns_testsuite.list'
      load_saved_model = .true.
      saved_model_name = '/home/mjoyce/data/AGB/agb2.mod'

      filename_for_profile_when_terminate = 'profile_AGB_from_mod.data'

      show_log_description_at_start = .false.
      !list_net_reactions = .true.

      save_model_when_terminate = .true.
      save_model_filename = 'final.mod'

      !change_initial_net = .true.      
      !new_net_name = 'o18_and_ne22.net'  ! 10 species
      !new_net_name ='18_to_mg24.net'
      !new_net_name = 'agb.net' ! 18 species
      !new_net_name = 'sagb_NeNa.net' ! 24 species
      !new_net_name = 'sagb_NeNa_MgAl.net' ! 29 species
      
      !pgstar_flag = .true.


/ ! end of star_job namelist

&controls

    star_history_name = 'history_AGB_from_mod.data'

    use_gold_tolerances = .true.

      ! check for retries and backups as part of test_suite
      ! you can/should delete this for use outside of test_suite
         max_number_backups = 10
         max_number_retries = 30

         max_model_number = 6000

      initial_mass = 2.0
      initial_z = 0.01d0

      xa_surface_upper_limit_species(1) = 'c12'
      xa_surface_upper_limit(1) = 0.0013         
 
      mesh_dlog_pp_dlogP_extra = 0.25
      mesh_dlog_cno_dlogP_extra = 0.25
      
      mesh_dlog_3alf_dlogP_extra = 0.225
      mesh_dlog_burn_c_dlogP_extra = 0.225
      mesh_dlog_burn_n_dlogP_extra = 0.225
      mesh_dlog_burn_o_dlogP_extra = 0.225
      
      
      mesh_logX_species(1) = 'h1'
      mesh_logX_min_for_extra(1) = -6
      mesh_dlogX_dlogP_extra(1) = 0.25
      
      mesh_logX_species(1) = 'he4'
      mesh_logX_min_for_extra(1) = -6
      mesh_dlogX_dlogP_extra(1) = 0.25

      xtra_coef_os_above_nonburn = 0.5
      xtra_coef_os_below_nonburn = 0.25
   
      xtra_coef_os_above_burn_h = 0.25
      xtra_coef_os_below_burn_h = 0.15
   
      xtra_coef_os_above_burn_he = 0.25
      xtra_coef_os_below_burn_he = 0.25
   
      xtra_coef_os_above_burn_z = 0.25
      xtra_coef_os_below_burn_z = 0.25

      xtra_dist_os_above_nonburn = 0.1
      xtra_dist_os_below_nonburn = 0.2
   
      xtra_dist_os_above_burn_h = 0.2
      xtra_dist_os_below_burn_h = 0.2
   
      xtra_dist_os_above_burn_he = 0.2
      xtra_dist_os_below_burn_he = 0.2
   
      xtra_dist_os_above_burn_z = 0.2
      xtra_dist_os_below_burn_z = 0.2

      overshoot_f_above_nonburn_core = 0.014
      overshoot_f_above_nonburn_shell = 0.014
      overshoot_f_below_nonburn_shell = 0.014
      overshoot_f_above_burn_h_core = 0.014
      overshoot_f_above_burn_h_shell = 0.014
      overshoot_f_below_burn_h_shell = 0.014
      overshoot_f_above_burn_he_core = 0.014
      overshoot_f_above_burn_he_shell = 0.014
      overshoot_f_below_burn_he_shell = 0.014
      overshoot_f_above_burn_z_core = 0.014
      overshoot_f_above_burn_z_shell = 0.014
      overshoot_f_below_burn_z_shell = 0.014

      overshoot_f0_above_nonburn_core = 0.004
      overshoot_f0_above_nonburn_shell = 0.004
      overshoot_f0_below_nonburn_shell = 0.004
      overshoot_f0_above_burn_h_core = 0.004
      overshoot_f0_above_burn_h_shell = 0.004
      overshoot_f0_below_burn_h_shell = 0.004
      overshoot_f0_above_burn_he_core = 0.004
      overshoot_f0_above_burn_he_shell = 0.004
      overshoot_f0_below_burn_he_shell = 0.004
      overshoot_f0_above_burn_z_core = 0.004
      overshoot_f0_above_burn_z_shell = 0.004
      overshoot_f0_below_burn_z_shell = 0.004
      
      overshoot_below_noburn_shell_factor = 10
      
      use_Type2_opacities = .true.
      Zbase = 0.01d0
      
      T_mix_limit = 1d4

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


/ ! end of controls namelist

