[mesa-users] Sudden envelope mixing in a low-mass star, and a segmentation fault in debugging info

Warrick Ball wball at astro.physik.uni-goettingen.de
Mon Jan 18 10:58:26 EST 2016


Hi all,

Earlier, Earl Bellinger asked me about a suspicious HR track he found in 
his modelling.  I've attached a plot showing the main sequence: you can 
see the jumps around the middle (logT ~= 3.88).  I've also attached the 
relevant inlist.  Just watch out: it saves a *lot* of data (several GB) in 
the form of all the profiles.  (This is MESA revision 7624.)

We've been looking at the output and found that the issue appears at model 
number 1180.  I've attached a plot with the hydrogen abundance at models 
1180 and 1181, which are before and after the first jump.  As can be seen, 
the outer 28% (by radius) of model 1181 appears to be mixed, even though 
all the diffusion coefficients of mixing are effectively nil.  This also 
corresponds to a convergence failure, so the first question we have is why 
the star is behaving this way.

Diffusion is on and all the metals and helium have settled out of the 
envelope, but I don't see why this should be a numerical problem.  The 
back and forth seems to occur as the star mixes part of the envelope, the 
metals and helium drain out, then the star mixes part of the envelope 
again (remixes the envelope?), and so on.  But the sudden mixing near the 
surface is a mystery.

The second issue is related.  Following Bill Wolf's excellent tutorial 
[1], I tried to get the debug data for the hydro solver.  You can activate 
this by uncommenting the last three lines in &controls:

       ! report_hydro_solver_progress = .true.
       ! hydro_inspectB_flag = .true.
       ! hydro_dump_call_number = 1281

Much to my surprise, this causes a segfault on my machine at hydro call 
1272.  I've attached the last ~150 lines from the terminal as 
"segfault.txt".  The backtrace reads:

Program received signal SIGSEGV: Segmentation fault - invalid memory 
reference.

Backtrace for this error:
#0  0x7FAB239F4557
#1  0x7FAB239F4B6E
#2  0x7FAB22AEBD9F
#3  0x6B9447 in __hydro_newton_procs_MOD_write_solve_logs
#4  0x6BA03C in __hydro_newton_procs_MOD_inspectb
#5  0x69EAA8 in __star_newton_MOD_do_newton
#6  0x6A1779 in __star_newton_MOD_newton
#7  0x617D29 in newt.10440 at solve_hydro.f90:0
#8  0x618F61 in __solve_hydro_MOD_hydro_newton_step
#9  0x61A697 in __solve_hydro_MOD_do_hydro_newton
#10  0x61BE46 in __solve_hydro_MOD_do_hydro_converge
#11  0x627567 in __struct_burn_mix_MOD_do_struct_burn_mix
#12  0x5200DC in __evolve_MOD_do_evolve_step_part2
#13  0x40B291 in __star_lib_MOD_star_evolve_step
#14  0x41D364 in __run_star_support_MOD_run1_star
#15  0x406AD2 in __run_star_MOD_do_run_star
#16  0x406B6F in MAIN__ at run.f:0
./rn: line 9:  8120 Segmentation fault      ./star

So the second question we have is why the code segfaults.  I haven't yet 
dug down into where this is coming from, and I'll try to in the next few 
days if I have a chance.  For now, any help is as always very welcome and 
hugely appreciated!

Cheers,
Warrick

[1] http://wmwolf.github.io/projects/mesa_debugging/

------------
Warrick Ball
Postdoc, Institut für Astrophysik Göttingen
wball at astro.physik.uni-goettingen.de
+49 (0) 551 39 5069
-------------- next part --------------
&star_job

      show_log_description_at_start = .false.
      
      !show_net_species_info = .true.
      !show_net_reactions_info = .true.

      create_pre_main_sequence_model = .true. ! .false.
      
      save_model_when_terminate = .true.
      save_model_filename = 'final.mod'
      
      load_saved_model = .false. ! .true.
      saved_model_name = 'final.mod'
      
      steps_to_take_before_terminate = -1
      
      write_profile_when_terminate = .true.
      filename_for_profile_when_terminate = 'final_profile.data'

      kappa_file_prefix = 'gs98'
      
      change_lnPgas_flag = .true.
      new_lnPgas_flag = .true.

      !change_initial_net = .true.
      !new_net_name = 'o18_and_ne22.net'

      pre_ms_relax_num_steps = 100
      pre_ms_T_c = 9e5 ! 3e5
      
      !new_surface_rotation_v = 0 ! changed from 2 solar (km sec^1)
      !change_rotation_flag = .true.
      !new_rotation_flag = .false.

      !pgstar_flag = .true.
      
      relax_initial_Y = .false.
      relax_initial_Z = .false.
      new_Y = 0.334415
      new_Z = 0.000183
      !change_Y = .true.
      !change_Z = .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 = 200
      !max_number_retries = 500
      
      max_num_profile_models = -1
      
      min_timestep_limit = 1d-12
      max_years_for_timestep = 5d6
      !max_timestep = 3.15d14
      
      initial_mass = 0.874811
      initial_z = 0.000183d0
      initial_y = 0.334415
      mixing_length_alpha = 2.071075
      
      use_Type2_opacities = .true.
      Zbase = 0.000183d0
      !cubic_interpolation_in_Z = .true.
      
      !D_DSI_factor = 0
      !D_SH_factor  = 0
      !D_SSI_factor = 0
      !D_ES_factor  = 0
      !D_GSF_factor = 0
      !D_ST_factor  = 0
      skip_rotation_in_convection_zones = .true.
      
      !varcontrol_target = 1d-3
      mesh_delta_coeff = 1
      
      photostep = 50
      write_profiles_flag = .true.
      profile_interval = 1
      history_interval = 1
      terminal_cnt = 10
      write_header_frequency = 10
      
      !log_L_lower_limit = -1
      smooth_convective_bdy = .false.
      !convective_bdy_weight = 1
      
      !overshoot_f_above_nonburn_core = 0.005
      !overshoot_f0_above_nonburn_core = 0.001
      !overshoot_f_above_nonburn_shell = 0.005
      !overshoot_f0_above_nonburn_shell = 0.001
      !overshoot_f_below_nonburn_shell = 0.005
      !overshoot_f0_below_nonburn_shell = 0.001
      
      !RGB_wind_scheme = 'Reimers'
      !AGB_wind_scheme = 'Blocker'
      !RGB_to_AGB_wind_switch = 1d-4
      !Reimers_wind_eta = 0.7d0  
      !Blocker_wind_eta = 0.7d0  
      
      ! atomic diffusion
      do_element_diffusion = .true.
      diffusion_calculates_ionization = .true.
      diffusion_use_isolve = .true.
      
      diffusion_class_representative(1) = 'h1'
      diffusion_class_representative(2) = 'he3'
      diffusion_class_representative(3) = 'he4'
      diffusion_class_representative(4) = 'c12'
      diffusion_class_representative(5) = 'n14'
      diffusion_class_representative(6) = 'o16'
      diffusion_class_representative(7) = 'ne20'
      diffusion_class_representative(8) = 'mg24'
      
      ! in ascending order.  species goes into 1st class with A_max >= species A
      diffusion_class_A_max(1) = 2
      diffusion_class_A_max(2) = 3
      diffusion_class_A_max(3) = 4
      diffusion_class_A_max(4) = 12
      diffusion_class_A_max(5) = 14
      diffusion_class_A_max(6) = 16
      diffusion_class_A_max(7) = 20
      diffusion_class_A_max(8) = 10000
      
      calculate_Brunt_N2 = .true.
      write_pulse_info_with_profile = .false. ! .true.
      pulse_info_format = 'FGONG'
      write_pulsation_plot_data = .true.
      add_center_point_to_pulse_info = .false.
      
      add_atmosphere_to_pulse_info = .true.
      which_atm_option = 'Eddington_grey' ! Eddington T-tau integration
         ! you could also use:
         ! 'Krishna_Swamy' ! Krishna Swamy T-tau integration
         ! 'solar_Hopf_grey' ! another T(tau), this one tuned to solar data
      
      ! stopping conditions
      Lnuc_div_L_zams_limit = 0.999d0
      stop_near_zams = .false.
      max_model_number = 25000
      max_age = 15e9
      xa_central_lower_limit_species(1) = 'h1'
      xa_central_lower_limit(1) = 1d-3
      stop_when_done_with_center_flash = .true.
      stop_at_TP = .true.

      ! report_hydro_solver_progress = .true.
      ! hydro_inspectB_flag = .true.      
      ! hydro_dump_call_number = 1281
/ ! end of controls namelist


&pgstar
/ ! end of pgstar namelist

-------------- next part --------------
A non-text attachment was scrubbed...
Name: earl_HR.png
Type: image/png
Size: 68475 bytes
Desc: 
URL: <https://lists.mesastar.org/pipermail/mesa-users/attachments/20160118/870f5932/attachment.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: earls_bug.png
Type: image/png
Size: 78981 bytes
Desc: 
URL: <https://lists.mesastar.org/pipermail/mesa-users/attachments/20160118/870f5932/attachment-0001.png>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: segfault.txt
URL: <https://lists.mesastar.org/pipermail/mesa-users/attachments/20160118/870f5932/attachment.txt>


More information about the Mesa-users mailing list