
&star_job

      load_saved_model = .true.
      saved_model_name = 'ready_for_edep.mod'

      save_model_when_terminate = .true.
      save_model_filename = 'done_with_edep.mod'
      
      change_initial_RTI_flag = .true.
      new_RTI_flag = .false.

      change_initial_u_flag = .true.
      change_initial_v_flag = .true.
      new_v_flag = .false.
      new_u_flag = .true.

      set_initial_model_number = .true.
      initial_model_number = 0

      set_initial_dt = .true.
      seconds_for_initial_dt = 1d-6

      !pgstar_flag = .true.

/ ! end of star_job namelist


&controls

! inject energy to start shock

      inject_until_reach_model_with_total_energy = 0.9d51

      total_mass_for_inject_extra_ergs_sec = 1d-2
      base_of_inject_extra_ergs_sec = -1 ! < 0 means at base of model
      start_time_for_inject_extra_ergs_sec = 0d0


      ! check for retries and backups as part of test_suite
      ! you can/should delete this for use outside of test_suite
      !  max_number_backups = 20
      !  max_number_retries = 200
       
         max_model_number = 20000

      initial_mass = 20
      initial_z = 0.02d0
      Zbase = 0.02d0

      fe_core_infall_limit = 1d99 ! cm/sec
      max_age_in_seconds = 0.005 ! at least enough to finish injecting energy

      
      ! turn off nuclear reactions when injecting energy.
      ! else lots of the injected energy is used for photodisintegration.
      mix_factor = 0d0
      dxdt_nuc_factor = 0d0      
      non_nuc_neu_factor = 0d0
      eps_nuc_factor = 0d0

! equation controls
      use_ODE_var_eqn_pairing = .true.      
      use_dPrad_dm_form_of_T_gradient_eqn = .true.
      use_dedt_form_of_energy_eqn = .true.
      
      !use_momentum_outer_BC = .true.
      use_fixed_vsurf_outer_BC = .true.
      fixed_vsurf = 0d0
      

! mixing controls
      mixing_length_alpha = 1.9
      MLT_option = 'Henyey'
      thermohaline_coeff = 0
      min_T_for_acceleration_limited_conv_velocity = 0
      okay_to_reduce_gradT_excess = .false.
      min_dt_for_increases_in_convection_velocity = 1
      mlt_accel_g_theta = 1d-2


! mesh controls
      okay_to_remesh = .true
      use_split_merge_amr = .true.
      split_merge_amr_log_zoning = .true.
      split_merge_amr_nz_baseline = 1000
      split_merge_amr_MaxLong = 1.5d0
      split_merge_amr_MaxShort = 2d0
      split_merge_amr_max_iters = 10
      !trace_split_merge_amr = .true.


! timestep controls

      delta_lgL_He_limit = 0.5
      delta_lgT_cntr_limit = 0.2
      delta_lgRho_cntr_limit = 0.5

      dX_nuc_drop_limit_at_high_T = 1d-2
      
      limit_for_abs_rel_E_err = 1d-4
      hard_limit_for_abs_rel_E_err = 1d-2

      varcontrol_target = 1d-2
      
      max_timestep = 1d-4


! solver controls

      use_gold_tolerances = .true.

      newton_iterations_limit = 20 ! this is used for setting timesteps
      max_tries = 21
      iter_for_resid_tol2 = 20
      tol_residual_norm1 = 1d-7
      tol_max_residual1 = 1d-4
      
!      convergence_ignore_equL_residuals = .true.
      
      xa_scale = 1d0

      tiny_corr_coeff_limit = 999999
      newton_itermin_until_reduce_min_corr_coeff = 999999
      max_resid_jump_limit = 1d99 ! turn this off until fix residuals


! output controls
      max_num_profile_models = 1000
      terminal_show_age_in_years = .false.

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


      num_trace_history_values = 3
      trace_history_value_name(1) = 'cumulative_extra_heating'
      trace_history_value_name(2) = 'total_energy'
      trace_history_value_name(3) = 'log_center_T'



! FOR DEBUGGING

      !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
      !hydro_show_correction_info = .true.
      
      !max_years_for_timestep = 3.67628942044319d-05

      !report_why_dt_limits = .true.
      !report_all_dt_limits = .true.
      !report_hydro_dt_info = .true.
      
      !show_mesh_changes = .true.
      !mesh_dump_call_number = 5189
      !okay_to_remesh = .false.
      
      !trace_evolve = .true.
            

      ! hydro debugging
      !hydro_check_everything = .true.
      !hydro_inspectB_flag = .true.
      !hydro_sizequ_flag = .true.
      
      !hydro_get_a_numerical_partial = 1d-4
      !hydro_test_partials_k = 560
      
      !hydro_numerical_jacobian = .true.
      !hydro_save_numjac_plot_data = .true.
      !hydro_dump_call_number = 67
      !hydro_dump_iter_number = 5
      !hydro_epsder_struct = 1d-8
      !hydro_epsder_chem = 1d-6

      !trace_newton_bcyclic_solve_input = .true. ! input is "B" j k iter B(j,k)
      !trace_newton_bcyclic_solve_output = .true. ! output is "X" j k iter X(j,k)

      !trace_newton_bcyclic_matrix_input = .true.
      !trace_newton_bcyclic_matrix_output = .true.
      
      !trace_newton_bcyclic_steplo = 1 ! 1st model number to trace
      !trace_newton_bcyclic_stephi = 1 ! last model number to trace
      
      !trace_newton_bcyclic_iterlo = 2 ! 1st newton iter to trace
      !trace_newton_bcyclic_iterhi = 2 ! last newton iter to trace
      
      !trace_newton_bcyclic_nzlo = 1 ! 1st cell to trace
      !trace_newton_bcyclic_nzhi = 10000 ! last cell to trace; if < 0, then use nz as nzhi
      
      !trace_newton_bcyclic_jlo = 1 ! 1st var to trace
      !trace_newton_bcyclic_jhi = 100 ! last var to trace; if < 0, then use nvar as jhi
      
      !trace_k = 0

      !fill_arrays_with_NaNs = .true.
      !stop_for_NaNs = .true.

/ ! end of controls namelist

&pgstar
         
!pause = .true.
         
Profile_Panels1_xmin = -101 ! 1.9
Profile_Panels2_xmin = -101 ! 1.9
Abundance_xmin = -101 ! 1.9
Mixing_xmin = -101 ! 1.9

Mixing_ymin = 5

Profile_Panels1_xmax = 1.72
Profile_Panels2_xmax = 1.72
Abundance_xmax = 1.72
Mixing_xmax = 1.72

! for 14M
!Profile_Panels1_xmax = 1.9
!Profile_Panels2_xmax = 1.9
!Abundance_xmax = 1.9
!Mixing_xmax = 1.9

! for 15M
!Profile_Panels1_xmax = 2
!Profile_Panels2_xmax = 2 
!Abundance_xmax = 2
!Mixing_xmax = 2

! for M15Mdot_a
Profile_Panels1_xmax = 2
Profile_Panels2_xmax = 2 
Abundance_xmax = 2
Mixing_xmax = 2

! for 16M
!Profile_Panels1_xmax = 2
!Profile_Panels2_xmax = 2 
!Abundance_xmax = 2
!Mixing_xmax = 2

! for 17M
!Profile_Panels1_xmax = 2.2
!Profile_Panels2_xmax = 2.2
!Abundance_xmax = 2.2
!Mixing_xmax = 2.2

! for 18M
!Profile_Panels1_xmax = 2.3
!Profile_Panels2_xmax = 2.3
!Abundance_xmax = 2.3
!Mixing_xmax = 2.3

! for 19M
!Profile_Panels1_xmax = 2.4
!Profile_Panels2_xmax = 2.4
!Abundance_xmax = 2.4
!Mixing_xmax = 2.4

! for 20M
!Profile_Panels1_xmax = 2.5
!Profile_Panels2_xmax = 2.5
!Abundance_xmax = 2.5
!Mixing_xmax = 2.5

! for 21M
!Profile_Panels1_xmax = 2.6
!Profile_Panels2_xmax = 2.6
!Abundance_xmax = 2.6
!Mixing_xmax = 2.6

! for 22M
!Profile_Panels1_xmax = 2.9
!Profile_Panels2_xmax = 2.9
!Abundance_xmax = 2.9
!Mixing_xmax = 2.9

/ ! end of pgstar namelist
