
&star_job
      show_log_description_at_start = .false.

      load_saved_model = .true.
      saved_model_name = 'ready_to_shock.mod'

      save_model_when_terminate = .true.
      save_model_filename = 'done_with_edep.mod'

      set_initial_L_center = .true.
      new_L_center = 0d0

      change_v_flag = .true.
      new_v_flag = .true.

      change_E_flag = .true.
      new_E_flag = .true.

      set_initial_v_center = .true.
      new_v_center = 0

      set_initial_age = .true.
      initial_age = 0 ! in years

      set_initial_model_number = .true.
      initial_model_number = 0

      set_initial_dt = .true.
      years_for_initial_dt = 1d-10

!      pgstar_flag = .true.

/ ! end of star_job namelist


&controls

      ! 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 = 20
      
      x_ctrl(1) = -1

      initial_mass = 7
      initial_z = 0.001d0
      Zbase = 0.02d0

      velocity_logT_lower_bound = 0

      fe_core_infall_limit = 1d99 ! cm/sec

      max_model_number = 1000
      max_age = 3.2e-07 ! >~ 10sec (in year)

! equation controls
      use_ODE_var_eqn_pairing = .true.
      use_dvdt_form_of_momentum_eqn = .true.
      use_dPrad_dm_form_of_T_gradient_eqn = .true.
      use_dedt_form_of_energy_eqn = .true.
      use_momentum_eqn_outer_BC = .true.

! No Wind
      RGB_wind_scheme = 'Dutch'
      AGB_wind_scheme = 'Dutch'
      RGB_to_AGB_wind_switch = 1d-4
      Dutch_wind_eta = 0.0d0 ! 0.8

! mixing controls
      mixing_length_alpha = 1.89
      MLT_option = 'Henyey'
      T_mix_limit = 0
      min_T_for_acceleration_limited_conv_velocity = 0
      okay_to_reduce_gradT_excess = .false.

! artificial viscosity controls
      use_artificial_viscosity = .true.
      shock_spread_linear = 0
      shock_spread_quadratic = 1.e-3 ! 1d-2  <<< must be same as will use in explosion

! mesh controls
      okay_to_remesh = .true.
      mesh_delta_coeff = 0.27
      min_dq = 1d-4
      max_center_cell_dq = 1d-4
      max_surface_cell_dq = 1d-4

! output controls
      max_num_profile_models = 1000
      terminal_show_age_in_years = .false.

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

! inject energy to start shock
      inject_until_reach_delta_total_energy = 1.01e49
      inject_extra_ergs_sec = 1.01e48 ! erg/s
      start_time_for_inject_extra_ergs_sec = 0
      duration_for_inject_extra_ergs_sec = 10.5
      base_of_inject_extra_ergs_sec = -1 ! < 0 means at base of model
      total_mass_for_inject_extra_ergs_sec = 5e-2 ! Msun

! timestep controls
      delta_lgL_He_limit = 0.5
      delta_lgT_cntr_limit = 0.2
      delta_lgRho_cntr_limit = 0.5
      dt_div_dt_Courant_limit = 0.5

      dX_nuc_drop_limit_at_high_T = 1d-3

      varcontrol_target = 1d-3


! solver controls
      use_energy_conservation_form = .true.

      newton_iterations_limit = 7
      iter_for_resid_tol2 = 6
      tol_residual_norm1 = 1d-8
      tol_max_residual1 = 1d-7

      tiny_corr_coeff_limit = 999999
      newton_itermin_until_reduce_min_corr_coeff = 999999

      num_trace_history_values = 8
      trace_history_value_name(1) = 'dt_div_dt_Courant'
      trace_history_value_name(2) = 'total_energy'
      trace_history_value_name(3) = 'log_rel_cumulative_energy_error'
      trace_history_value_name(4) = 'rel_cumulative_energy_error'
      trace_history_value_name(5) = 'rel_error_in_energy_conservation'
      trace_history_value_name(6) = 'avg_E_residual'
      trace_history_value_name(7) = 'max_E_residual'
      trace_history_value_name(8) = 'cumulative_extra_heating'



! debugging controls

      !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_all_dt_limits = .true.
      !report_why_dt_limits = .true.

      !show_mesh_changes = .true.
      !mesh_dump_call_number = 26545

      !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 = 6836


      !dX_nuc_drop_limit = 1d-3


/ ! end of controls namelist




&pgstar


!pause = .true.

         Grid7_title = '15 M\d\(2281)\u Post-Core-Collapse'

Grid7_win_flag = .true.
         Grid7_win_width = 10
         Grid7_win_aspect_ratio = 0.7 ! aspect_ratio = height/width

         Grid7_num_cols = 2 ! divide plotting region into this many equal width cols
         Grid7_num_rows = 5 ! divide plotting region into this many equal height rows
         Grid7_num_plots = 3 ! <= 10


         Grid7_plot_name(1) = 'Profile_Panels1'
         Grid7_plot_row(1) = 1 ! number from 1 at top
         Grid7_plot_rowspan(1) = 4 ! plot spans this number of rows
         Grid7_plot_col(1) =  1 ! number from 1 at left
         Grid7_plot_colspan(1) = 1 ! plot spans this number of columns
         Grid7_plot_pad_left(1) = 0.0 ! fraction of full window width for padding on left
         Grid7_plot_pad_right(1) = 0.09 ! fraction of full window width for padding on right
         Grid7_plot_pad_top(1) = 0.0 ! fraction of full window height for padding at top
         Grid7_plot_pad_bot(1) = 0.06 ! fraction of full window height for padding at bottom
         Grid7_txt_scale_factor(1) = 0.6 ! multiply txt_scale for subplot by this


         Grid7_plot_name(2) = 'Profile_Panels2'
         Grid7_plot_row(2) = 1 ! number from 1 at top
         Grid7_plot_rowspan(2) = 4 ! plot spans this number of rows
         Grid7_plot_col(2) =  2 ! number from 1 at left
         Grid7_plot_colspan(2) = 1 ! plot spans this number of columns
         Grid7_plot_pad_left(2) = 0.05 ! fraction of full window width for padding on left
         Grid7_plot_pad_right(2) = 0.04 ! fraction of full window width for padding on right
         Grid7_plot_pad_top(2) = 0.0 ! fraction of full window height for padding at top
         Grid7_plot_pad_bot(2) = 0.06 ! fraction of full window height for padding at bottom
         Grid7_txt_scale_factor(2) = 0.6 ! multiply txt_scale for subplot by this



         Grid7_plot_name(3) = 'Text_Summary1'
         Grid7_plot_row(3) = 5 ! number from 1 at top
         Grid7_plot_rowspan(3) = 1 ! plot spans this number of rows
         Grid7_plot_col(3) =  1 ! number from 1 at left
         Grid7_plot_colspan(3) = 2 ! plot spans this number of columns
         Grid7_plot_pad_left(3) = -0.08 ! fraction of full window width for padding on left
         Grid7_plot_pad_right(3) = -0.03 ! fraction of full window width for padding on right
         Grid7_plot_pad_top(3) = 0.02 ! fraction of full window height for padding at top
         Grid7_plot_pad_bot(3) = -0.05 ! fraction of full window height for padding at bottom
         Grid7_txt_scale_factor(3) = 0.21 ! multiply txt_scale for subplot by this



         ! file output
!Grid7_file_flag = .true.
         Grid7_file_dir = 'png'
         Grid7_file_prefix = 'shock_'
         Grid7_file_cnt = 2 ! output when mod(model_number,Grid7_file_cnt)==0





         Profile_Panels1_title = '' ! 'Shock Profiles'
         Profile_Panels2_title = '' ! 'Abundances + Power'


Profile_Panels_show_Mach_1_location = .true.
!Profile_Panels_xwidth_left_of_shock = 10 ! -1
!Profile_Panels_xwidth_right_of_shock = 0.5
!Profile_Panels_xwidth_left_div_shock_value = 1
!Profile_Panels_xwidth_right_div_shock_value = 0.3


         Profile_Panels1_xaxis_name =  'mass' !  'logR_cm' !
Profile_Panels1_xmin = -101d0 ! only used if /= -101d0
Profile_Panels1_xmax = 1.9 ! 1.54 ! 2 ! 12 ! only used if /= -101d0
!Profile_Panels1_xmin = 3.99853 ! only used if /= -101d0
!Profile_Panels1_xmax = 11 ! 3.99855 ! only used if /= -101d0

         Profile_Panels1_num_panels = 3

         Profile_Panels1_yaxis_name(1) = 'logRho'
            Profile_Panels1_ymin(1) = -101d0 ! -1.2 ! only used if /= -101d0
            Profile_Panels1_ymax(1) = -101d0 ! 3 ! only used if /= -101d0
            Profile_Panels1_ymargin(1) = 0.1

         Profile_Panels1_other_yaxis_name(1) = 'entropy' ! 'entropy'
            Profile_Panels1_other_ymin(1) = -101d0 ! -1e4 ! only used if /= -101d0
            Profile_Panels1_other_ymax(1) = -101d0 ! 2e4 ! only used if /= -101d0
            Profile_Panels1_other_ymargin(1) = 0.1

         Profile_Panels1_yaxis_name(2) = 'logT'
            Profile_Panels1_ymin(2) = -101d0 ! -1.2 ! only used if /= -101d0
            Profile_Panels1_ymax(2) = -101d0 ! 3 ! only used if /= -101d0
            Profile_Panels1_ymargin(2) = 0.1

         Profile_Panels1_other_yaxis_name(2) = 'gamma1' ! 'total_energy'
            Profile_Panels1_other_ymin(2) = -101d0 ! -1e4 ! only used if /= -101d0
            Profile_Panels1_other_ymax(2) = -101d0 ! 2e4 ! only used if /= -101d0
            Profile_Panels1_other_ymargin(2) = 0.1

         Profile_Panels1_yaxis_name(3) = 'v_div_cs' ! 'velocity'
            Profile_Panels1_ymin(3) = -101d0 ! -1.2 ! only used if /= -101d0
            Profile_Panels1_ymax(3) = -101d0 ! 3 ! only used if /= -101d0
            Profile_Panels1_ymargin(3) = 0.1

         Profile_Panels1_other_yaxis_name(3) = 'ni56'
            Profile_Panels1_other_ymin(3) = -101d0 ! -1e4 ! only used if /= -101d0
            Profile_Panels1_other_ymax(3) = -101d0 ! 2e4 ! only used if /= -101d0
            Profile_Panels1_other_ymargin(3) = 0.1


         Profile_Panels2_xaxis_name =  'mass' !  'logR_cm' !
         Profile_Panels2_xaxis_reversed = .false.
Profile_Panels2_xmin = -101d0 ! only used if /= -101d0
Profile_Panels2_xmax = 1.9 ! 1.54 ! 2 ! 12 ! only used if /= -101d0
!Profile_Panels2_xmin = 7 ! 3.9985 ! only used if /= -101d0
!Profile_Panels2_xmax = 2.2 ! 3.9986 ! only used if /= -101d0

         Profile_Panels2_num_panels = 4

         Profile_Panels2_yaxis_name(1) = 'Abundance'

         Profile_Panels2_yaxis_name(2) = 'Power'

         Profile_Panels2_yaxis_name(3) = 'Mixing'
         Mixing_legend_txt_scale_factor = 1

         Profile_Panels2_yaxis_name(4) = 'total_energy'
            Profile_Panels2_ymin(4) = -101d0 ! -1.2 ! only used if /= -101d0
            Profile_Panels2_ymax(4) = -101d0 ! 3 ! only used if /= -101d0
            Profile_Panels2_ymargin(4) = 0.1

         Profile_Panels2_other_yaxis_name(4) =  'mass'  ! 'logR_cm'
            Profile_Panels2_other_ymin(4) = -101d0 ! -1e4 ! only used if /= -101d0
            Profile_Panels2_other_ymax(4) = -101d0 ! 2e4 ! only used if /= -101d0
            Profile_Panels2_other_ymargin(4) = 0.1

         Power_legend_max_cnt = 10
         Power_legend_txt_scale_factor = 1.3 ! relative to other text
         Power_ymin = 6 ! only used if /= -101d0

         Text_Summary1_name(2,1) = 'star_age_sec'
         Text_Summary1_name(3,1) = 'time_step_sec'
         Text_Summary1_name(7,1) = 'total_energy'

         Text_Summary1_name(2,2) = 'c_core_mass'
         Text_Summary1_name(4,2) = 'o_core_mass'
         Text_Summary1_name(5,2) = 'v_center'
         Text_Summary1_name(6,2) = 'r_center'
         Text_Summary1_name(7,2) = 'dt_div_dt_Courant'
         Text_Summary1_name(8,2) = 'dt_div_dt_cell_collapse'

         Text_Summary1_name(3,3) = 'max_abs_v_lgRho'
         Text_Summary1_name(4,3) = 'max_abs_v_lgT'
         Text_Summary1_name(5,3) = 'max_abs_v_velocity'
         Text_Summary1_name(6,3) = 'max_abs_v_v_div_cs'
         Text_Summary1_name(7,3) = 'max_abs_v_mass'
         Text_Summary1_name(8,3) = 'max_abs_v_radius'

      Grid2_win_flag = .false.


/ ! end of pgstar namelist
