Skip to content

Latest commit

 

History

History
60 lines (48 loc) · 2.45 KB

working-with-tags.rst

File metadata and controls

60 lines (48 loc) · 2.45 KB

Working With Tags

This chapter uses a worked example to demonstrate tags --- a simple yet powerful feature allowing a much greater degree of control over GYRE calculations.

Example Tag Usage

Consider calculating the eigenfrequencies of a red giant branch (RGB) stellar model. Because non-radial p-modes in the convective envelope couple with high-order g-modes in the radiative core, the frequency spacing of the non-radial modes is much smaller than that of the radial modes. In such cases, we ideally want to use a coarse frequency scan for the radial modes and a fine frequency scan for the non-radial modes.

The following input file, which is designed to work with the 2\,\Msun RGB model in :file:`${GYRE_DIR}/models/mesa/rgb/rgb.mesa`, achieves this goal using tags:

.. literalinclude:: working-with-tags/gyre.in

Observe that each :nml_g:`mode` namelist groups has a :nml_n:`tag` parameter. When processing a given :nml_g:`mode`, GYRE pairs it up with other namelist groups that match one of the following criteria:

In the example given above, the :nml_g:`osc` namelist group doesn't have a :nml_n:`tag_list` parameter; therefore, it is paired with all three :nml_g:`mode` namelist groups, irrespective of their :nml_n:`tag` values. However, the two :nml_g:`scan` namelist groups each have :nml_n:`tag_list` parameters. In the first group the :nml_v:`radial` tag appears, and so this group is paired with the first :nml_g:`mode` namelist group (i.e., the \ell=0 mode). Likewise, in the second group the :nml_v:`non-radial` tag appears, and so this group is paired with the second and third :nml_g:`mode` namelist groups (i.e., the \ell=1 and \ell=2 modes).

Tag Rules

In addition to the matching criteria given above, there are a couple of rules that must be obeyed by tags: