! inlist_c13_pocket
! start at 53150 and end at 53350

&star_job
      show_log_description_at_start = .false.
      
      !create_pre_main_sequence_model = .true.

      !save_model_number = 53150
      !save_model_filename = 'AGBpreDUP2M.mod'

      load_saved_model = .true.
      saved_model_name =  'AGBpreDUP2M.mod'

      !change_net = .true.      
      !new_net_name = 'agb.net'

      !set_uniform_xa_from_file = .true.
      !file_for_uniform_xa = 'falk_xa.list.agb'

      set_rates_preference = .true. ! for use by net + rates modules
      new_rates_preference = 1 
         ! 1 = NACRE rates -- this is the default
         ! 2 = jina reaclib rates -- to match jina where possible
         
      set_rate_c12ag = 'Kunz' ! empty string means ignore this control
         ! one of 'NACRE', 'Buchmann', 'Kunz', or 'CF88'
         ! note: original CF88 rate is actually multiplied by 1.7 as in Timmes' rates
      set_rate_n14pg = 'Imbriani' ! empty string means ignore this control
         ! one of 'NACRE', 'Imbriani', or 'CF88'
      set_rate_3a = 'Fynbo' ! empty string means ignore this control
         ! one of 'NACRE', 'Fynbo', or 'CF88'

      !log_columns_file = 'log_columns.list' 


/ ! end of star_job namelist

&controls

      D_norm_kappa = 1
      D_norm_alpha = 0 
      D_norm_atol = 1d-3
      D_norm_rtol = 1d-3
      
      use_lnE_for_eps_grav = .true.


      !report_hydro_solver_progress = .true. ! set true to see info about newton iterations
      !report_ierr = .true. ! if true, produce terminal output when have some internal error

      !report_why_dt_limits = .true.
      !report_all_dt_limits = .true.
      
      !show_mesh_changes = .true.
      !mesh_dump_call_number = 8875
      !okay_to_remesh = .false.

      !trace_evolve = .true.
      
      ! hydro debugging
      !hydro_check_everything = .true.
      !hydro_inspectB_flag = .true.
      
      !hydro_numerical_jacobian = .true.
      !hydro_save_numjac_plot_data = .true.
      !small_mtx_decsol = 'lapack'
      !large_mtx_decsol = 'lapack'
      !hydro_dump_call_number = 195

      !max_model_number = 4000
      !min_timestep_limit = 1d8 ! (seconds)

      initial_mass = 2.00
      initial_z = 0.010

      ! check for retries and backups as part of test_suite
      max_number_backups = 10
      max_number_retries = 10

      mixing_length_alpha = 1.73

! some logistics
      max_model_number = 55000 ! negative means no maximum

      photostep = 100
      profile_interval = 100
      log_cnt = 100
      terminal_cnt = 10
      write_header_frequency = 10
      
      max_num_profile_models = 1000 ! maximum number of saved profiles

! mesh
      max_allowed_nz = 5000 ! maximum number of grid points allowed

! resolve the C13 pockets 
      xa_function_species(1) = 'h1'  ! name of nuclide as defined in chem_def
        xa_function_weight(1) = 5
        xa_function_param(1) = 3d-4
      xa_function_species(2) = 'he4'  ! name of nuclide as defined in chem_def
        xa_function_weight(2) = 5
        xa_function_param(2) = 1d-2
      xa_function_species(3) = 'c13'  ! name of nuclide as defined in chem_def
        xa_function_weight(3) = 4
        xa_function_param(3) = 1d-3
      xa_function_species(4) = 'n14'  ! name of nuclide as defined in chem_def
        xa_function_weight(4) = 3
        xa_function_param(4) = 1d-2

! timesteps
! general
      varcontrol_target = 1d-4
        ! this is the target value for relative variation in the structure from one model to the next.
        ! the default timestep adjustment is to increase or reduce the timestep depending on whether
        ! the actual variation was smaller or greater than this value.

      delta_lgRho_cntr_limit = 0.05  
      delta_lgRho_cntr_hard_limit = 0.1
   
      delta_lgT_cntr_limit = 0.01  
      delta_lgT_cntr_hard_limit = 0.02

      delta_lgTeff_limit = 0.01  
      delta_lgTeff_hard_limit = 0.02
   
      delta_lgL_limit = 0.1
      delta_lgL_hard_limit = 0.2

! TP
      delta_lgL_He_limit = 0.01 ! for TP resolution
      !delta_lgL_He_hard_limit = 0.05
      lgL_He_burn_min = 2.0 ! ignore changes in lgL_He if value 
      		            ! is less than this

! DUP
      DUP_varcontrol_factor = 1.0
        ! multiply varcontrol_target by this when TP_state == 2, i.e., during dredge up during thermal pulse
      
! time step controls for interpulse

      dH_limit_min_H = 1.e-2
      dH_limit = 0.1

      dH_div_H_limit_min_H = 1d-5
      dH_div_H_limit = 0.5

! Overshooting
      mass_for_overshoot_full_on = 1.8 ! Msun units
      mass_for_overshoot_full_off = 1.1 ! Msun units

      overshoot_f_above_nonburn = 0.014
      overshoot_f_below_nonburn = 0.014
      overshoot_f_above_burn_h = 0.014
      overshoot_f_below_burn_h = 0.014
      overshoot_f_above_burn_he = 0.014
      overshoot_f_below_burn_he = 0.014
      overshoot_f_above_burn_z = 0.014
      overshoot_f_below_burn_z = 0.014    
! C13 pocket      
      overshoot_below_noburn_factor = 9
! He-shell flash convection zone
      ovr_below_burn_he_factor = 0.72

! atmosphere option
      which_atm_option = 'photosphere_tables'
      which_atm_off_table_option = 'grey_and_kap'

! mass loss       
      RGB_wind_scheme = 'Reimers'
      AGB_wind_scheme = 'Blocker'
      RGB_to_AGB_wind_switch = 1d-4
      Reimers_wind_eta = 0.5d0  
      Blocker_wind_eta = 0.05d0  

! opacities
      use_CO_enhanced_opacities = .true.
      base_Z = 0.01
      base_fC = 0.17123643187d0 ! base value of XC/Z
      base_fO = 0.4812175d0 ! base value of XO/Z

/ ! end of controls namelist

