build_poly
Synopsis
build_poly POLY_FILE [options]
Description
The build_poly tool constructs a composite polytrope, and writes it to a file in the POLY format.
Options
- -h, --help
Print a summary of options.
- -n, --n_poly=N_POLY[,N_POLY...]
Polytropic indices \(\npoly\) (either a single value, or a comma-separated list of values, one for each region).
- -G, --Gamma_1=GAMMA_1
Adiabatic index \(\Gamma_{1}\).
- -A, --Gamma_A=GAMMA_A
Adiabatic index \(\Gamma_{A}\) used when evaluating \(\As\) structure coefficient
- -z, --z_b=Z_B[,Z_B...]
Polytropic coordinate of region boundaries.
- -D, --Delta_b=DELTA_B[,DELTA_B...]
Logarithmic density jumps at region boundaries.
- --theta_s=THETA_S
Surface polytropic variable value.
- -d, --dz=DZ
Grid spacing in polytropic coordinate.
- -l, --dlnz=DLNZ
Logarithmic grid spacing in polytropic coordinate. Where \(\text{DLNZ} \times z\) exceeds DZ, the spacing between points is \(\text{DLNZ} \times z\) rather than DZ, so points are uniform in \(\ln z\) far from the origin. This keeps the number of points manageable for composite polytropes whose outer regions extend to very large \(z\) (for instance, models with a centrally condensed core). Defaults to 0, giving uniform spacing DZ everywhere.
- -t, --toler=TOLER
Tolerance of Lane-Emden equation solver.
Examples
To build a simple (complete) polytrope with \(\npoly=3\), run build_poly as follows:
$ $GYRE_DIR/bin/build_poly --n_poly=3 --dz=0.01 poly.simple.h5
This model, written to the file poly.simple.h5, is visualized in the figure below.
Fig. 12 Plot of the Lane-Emden solution variable \(\theta\), density
\(\rho\), pressure \(P\) and interior mass \(M_{r}\) as a
function of radial coordinate, for the simple
polytrope. (Source)
To build a composite polytrope, comprising two regions (inner \(\npoly=3\), outer \(\npoly=1.5\)) separated by a density discontinuity, run build_poly as follows:
$ $GYRE_DIR/bin/build_poly --n_poly=3,1.5 --z_b=1.4 --Delta_b=-0.5 --dz=0.01 poly.composite.h5
This model, written to the file poly.composite.h5, is visualized in the figure below.
Fig. 13 Plot of the Lane-Emden solution variable \(\theta\), density
\(\rho\), pressure \(P\) and interior mass \(M_{r}\) as a
function of radial coordinate, for the composite polytrope. Note
the density discontinuity, and the associated discontinuities in
the gradients of the pressure and interior mass. Note also that
\(\theta\) restarts at unity at the region boundary, as
described in Solution Method. (Source)
Composite polytropes can also represent centrally condensed stars,
such as red giants, with a small dense core surrounded by an extended
envelope. A large negative density jump makes the envelope extend to
very large polytropic coordinate (see Solution Method),
so the --dlnz option should be used to keep the number of
points manageable. To build such a model, with 30% of its mass in an
\(\npoly=3\) core occupying less than 0.4% of the radius, and an
\(\npoly=1.5\) envelope, run build_poly as follows:
$ $GYRE_DIR/bin/build_poly --n_poly=3,1.5 --z_b=6 --Delta_b=-2.527275 --dz=0.01 --dlnz=0.001 poly.condensed.h5
This model, written to the file poly.condensed.h5, contains
6,083 points; without the --dlnz option, the same
--dz would require 160,289 points. The model is visualized
in the figure below.
Fig. 14 Log-log plot of the Lane-Emden solution variable \(\theta\),
density \(\rho\), pressure \(P\) and interior mass
\(M_{r}\) as a function of radial coordinate, for the centrally
condensed composite polytrope. The density drops by more than ten
orders of magnitude from the center to the outer envelope.
(Source)