[Mesa-users] Question about inject_until_reach_model_with_total_energy
Francis Timmes
fxt44 at mac.com
Tue Dec 19 18:40:50 EST 2017
> ... injecting (relatively small amounts of) heat into non-degenerate envelopes of WDs, ...
best practice, if possible, is to use the other_energy hook in a run_star_extra.f.
if this is not possible, please say why an other_energy is not sufficient for your purposes.
fxt
> On Dec 19, 2017, at 12:33 PM, Patrick Neunteufel <neunteufel at astro.uni-bonn.de> wrote:
>
> Hello everyone,
>
> Relatively new mesa user here. While experimenting with injecting
> (relatively small amounts of) heat into non-degenerate envelopes of WDs,
> I came across a possible problem with the
> inject_until_reach_model_with_total_energy setting, as well as,
> relatedly, the inject_until_reach_delta_total_energy option.
>
> Using the 10108 mesa release and the November 20th 2017 release of mesasdk.
>
> -- inject_until_reach_model_with_total_energy --
>
> The total energy of highly bound objects tends to be negative, as
> correctly modeled by mesa. However, this option requires the user to
> request an absolute positive target energy, as defined in the
> check_for_extra_heat subroutine in evolve.f90, line 1225 (not mentioned
> in the users guide, btw.). This makes it impossible to inject small
> amounts of heat that would not, by themselves, unbind the object.
>
> Is this the desired behavior?
>
> Note: This option is used in the 30M_core_collapse_big_net test suite
> with an absolute positive target energy.
>
> -- inject_until_reach_delta_total_energy --
>
> An alternative to defining absolute negative target energies would be to
> use the inject_until_reach_delta_total_energy option. However, there
> seems to be a problem with the built-in stopping condition, as the code
> seems to simply keep adding energy until the model (deservedly) crashes
> at total (positive) energies of around 10^59 ergs.
>
> Best guess: I am doing something wrong.
>
> Second best guess: The else-statement in the check_for_extra_heat
> subroutine in evolve.f90, line 1232, does not yield the desired results.
>
> Please see below for an example inlist.
>
> Best wishes
>
> Patrick Neunteufel
>
>
> ----------------------------------------------------------------------------
>
> Inlist:
>
> &star_job
>
> mesa_dir = '../../mesa-10108'
>
> show_log_description_at_start = .true.
>
> load_saved_model = .true.
> saved_model_name = 'initwdh.mod'
>
> change_initial_RTI_flag = .true.
> new_RTI_flag = .false.
>
> save_model_when_terminate = .true.
> save_model_filename = 'wdh.mod'
>
> pgstar_flag = .true.
>
> set_initial_model_number = .true.
> initial_model_number = 0
>
> change_initial_u_flag = .true.
> change_initial_v_flag = .true.
> new_v_flag = .false.
> new_u_flag = .true.
>
> set_initial_dt = .true.
> seconds_for_initial_dt = 1d-6
>
> set_initial_age = .true.
> initial_age = 0
>
> / ! end of star_job namelist
>
>
> &controls
>
> inject_until_reach_model_with_total_energy = -1.004e50 ! Either
> this (see above). Tried with different values.
>
>
> ! All negative values yield the same result.
>
>
> ! All positive values work as advertised
>
> inject_until_reach_model_with_total_energy = 1e48 ! Or
> this. Tried with different values. All values yield the same result.
>
>
> total_mass_for_inject_extra_ergs_sec = 1d-3
> base_of_inject_extra_ergs_sec = 0.822 ! < 0 means at base of model
> start_time_for_inject_extra_ergs_sec = 0d0
>
> min_timestep_limit = -1
>
> Zbase = 0.02d0
>
> fe_core_infall_limit = 1d99 ! cm/sec
> max_age_in_seconds = 0.005 ! at least enough to finish injecting
> energy
>
>
> mix_factor = 0d0
> dxdt_nuc_factor = 0d0
> non_nuc_neu_factor = 0d0
> eps_nuc_factor = 0d0
>
>
> 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_length_alpha = 1.0
> 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
>
>
> okay_to_remesh = .true
>
>
> max_timestep = 1d-0
>
> 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
>
> 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
>
>
> / ! end of controls namelist
>
>
>
> &pgstar
>
>
>
> / ! end of pgstar namelist
>
More information about the Mesa-users
mailing list