From: Bill P. <pa...@ki...> - 2011-09-12 15:38:13
|
Hi, On Sep 12, 2011, at 7:33 AM, Ehsan Moravveji wrote: > I want to know if it is possible to have uneven mesh spacing in some regions of interest in our models during evolution. > For instance, I like all layers whose interior mass m(r) is less than say 1.2345 Msun have 3 times more dense mesh than the evelope. Or similarly in terms of log T or distance from the core. > Do we have currently a criteria for this in MESA? There are lots of controls to adjust the mesh. start by reading the section in star_defaults "gradient controls for mesh adjustment". The basic idea is that the grid will be adjusted so that none of the mesh functions have any cell-to-cell jumps larger than the value of mesh_delta_coeff. For example the P_function = P_function_weight*log10(P), with a default P_function_weight = 30. This means the mesh will be adjusted so that the cell to cell jump of 30*log10(P) <= mesh_delta_coeff. There are mesh functions for T, R, and M that might be useful. The ones for grad_ad and omega are more experimental -- I haven't found them to be very useful so far. There are also mesh functions for abundance mass fractions -- these can be very handy. And controls to modify the value of mesh_delta_coeff around convection boundaries. The actual mesh is constrained by more than the mesh functions -- there are also restrictions on the relative sizes of adjacent cells. Also there are single step limits on how many times a cell can be divided and similarly on how many adjacent cells can be merged. Try to see if you can get what you want to adjusting the current set of mesh functions. I can add an option for a user-defined mesh function if necessary. Cheers, Bill p.s. as an example of special mesh adjustments, here's the relevant part of the inlist in test_suite/make_solar ! mesh adjustment mesh_delta_coeff = 0.9 P_function_weight = 25 T_function1_weight = 75 xtra_coef_czb_full_on = 0 xtra_coef_czb_full_off = 1 xtra_coef_a_l_nb_czb = 0.01 ! above lower nonburn convective boundary xtra_dist_a_l_nb_czb = 10 ! above lower nonburn convective boundary xtra_coef_b_l_nb_czb = 0.05 ! below lower nonburn convective boundary xtra_dist_b_l_nb_czb = 3 ! below lower nonburn convective boundary xa_function_species(1) = 'he4' ! name of nuclide as defined in chem_def xa_function_weight(1) = 80 xa_function_param(1) = 1d-2 xa_function_species(2) = 'he3' ! name of nuclide as defined in chem_def xa_function_weight(2) = 20 xa_function_param(2) = 1d-5 |