The various GYRE frontends <frontends>
all discretize their equations on a spatial grid {x1, x2, …, xN} in the dimensionless radial coordinate x ≡ r/R. The computational cost of a calculation scales with the total number of points N in this grid, while the grid's resolution --- i.e., the spacing between adjacent points --- impacts both the accuracy of solutions, and in the case of the gyre
frontend, the number of solutions that can be found. (The numerical-limits
section discusses these behaviors in the context of the stretched string BVP).
A fresh spatial grid is constructed for each iteration of the main computation loop (see the flow-charts in the frontends
chapter). This is done under the control of the :nml_g:grid namelist groups; there must be at least one of these, subject to the tag matching rules (see the working-with-tags
chapter). If there is more than one matching :nml_g:grid namelist group, then the final one is used.
Each grid begins as a scaffold grid, comprising the following points:
- an inner point
$\xin$ ; - an outer point
$\xout$ ; - the subset of points of the source grid satisfying
$\xin < x < \xout$
The source grid can be either the input model grid, or a grid read from file; this choice is determined by the :nml_n:scaffold_src parameter of the :nml_g:grid namelist group. By default,
Scaffold grids are refined via a sequence of iterations. During a given iteration, each subinterval [xj, xj + 1] is assessed against various criteria (discussed in greater detail below). If any criteria match, then the subinterval is refined by bisection, inserting an additional point at the midpoint
The sequence terminates if no refinements occur during a given iteration, or if the number of completed iterations equals the value specified by the :nml_n:n_iter_max parameter of the :nml_g:grid namelist group.
The wave criterion involves a local analysis of the mechanical parts of the oscillation equations, with the goal of improving resolution where the displacement perturbation osc-dimless-form
section) take the approximate form
where χ is one of the two eigenvalues of the mechanical (upper-left) 2 × 2 submatrix of the full Jacobian matrix
In propagation zones the imaginary part
Based on this analysis, the criterion for refinement of the subinterval is
where
Because there are two possible values for χ, the above refinement criterion is applied twice (once for each). Moreover, because χ depends implicitly on the oscillation frequency, the criterion is applied for each frequency in the grid {ω1, ω2, …, ωM} (see the freq-grids
section).
Similar to the wave criterion discussed above, the thermal criterion involves a local analysis of the energetic parts of the oscillation equation, with the goal of improving resolution where the thermal timescale is very long and perturbations are almost adiabatic. Within the subinterval [xj, xj + 1], the y5 and y6 perturbation take the approximate form
where ± τ are the eigenvalues of the matrix formed from the energetic (bottom-right) 2 × 2 submatrix of the full Jacobian matrix
Based on this analysis, the criterion for refinement of the subinterval is
where
Because τ depends implicitly on the oscillation frequency, this criterion is applied for each frequency in the grid {ω1, ω2, …, ωM}.
The structural criteria have the goal of improving resolution where the stellar structure coefficients are changing rapidly. For a given coefficient C, the criterion for refinement of the subinterval [xj, xj + 1] is
where osc-struct-coeffs
section).
All of the above criteria depend on the logarithmic subinterval width (ln xj + 1 − ln xj), and cannot be applied to the first subinterval [x1, x2] if it extends to the center of the star, x = 0. In such cases, the :nml_n:resolve_ctr parameter of the :nml_g:grid namelist group determines whether the subinterval is refined. If set to :nml_v:.FALSE., then no refinement occurs; while if set to :nml_v:.TRUE., then the refinement criteria are
or
where χ is the eigenvalue from the local analysis (see the spatial-grids-mech
section) corresponding to the solution that remains well-behaved at the origin, and
Because χ depends implicitly on the oscillation frequency, these criteria are applied for each frequency in the grid {ω1, ω2, …, ωM}.
A couple of additional controls affect the iterative refinement described above. Refinement of the [xj, xj + 1] subinterval always occurs if
and never occurs if
where both
The full set of parameters supported by the :nml_g:grid namelist group is listed in the grid-params
section. However, the table below summarizes the mapping between the user-definable controls appearing in the expressions above, and the corresponding namelist parameters.
Symbol | Parameter |
---|---|
:nml_n:w_osc | |
:nml_n:w_exp | |
:nml_n:w_thm | |
:nml_n:w_str | |
:nml_n:w_ctr | |
:nml_n:dx_max | |
:nml_n:dx_min |
While :nml_n:w_exp, :nml_n:w_osc and :nml_n:w_ctr all default to zero, it is highly recommended to use non-zero values for these parameters, to ensure adequate resolution of solutions throughout the star. Reasonable starting choices are :nml_n:w_osc = 10, :nml_nv:w_exp = 2 and :nml_n:w_ctr = 10.