# Building Polytropic Structure Files¶

This appendix describes the **build_poly** executable, which creates polytropic structure
files for use with GYRE.

## Pre-Requisites¶

In addition to GYRE’s general pre-requisites (see the
Installation chapter), **build_poly** needs a
thread-safe version of the ODEPACK ordinary
differential integrator library. This library is shipped with version
20.3.2 (and more recent) of the MESA SDK.

On Linux and MacOS platforms, this library is bundled together with all of the other pre-requisites in the Madison Software Development Kit (SDK), which can be downloaded from the MESA SDK homepage. Using this SDK is strongly recommended.

It does this by solving the Lane-Emden equation

for constant polytropic index \(\npoly\). Here, the dependent variable \(\Theta\) represents the local density \(\rho\) via

where \(\rho_{\rm c}\) is the central density; and the independent variable :math:`Theta` is related to the radial coordinate \(r\) via

where \(R\) and \(\xi_{1}\) are the surface values of \(r\) and \(\xi\), respectively. The Lane-Emden is solved subject to the boundary conditions