### Flux tube

This set of IDL routines creates a magneto-static structure of a flux tube size following the method of Pneuman et al. (1986). The equations for magnetostatic equilibrium are written in cylindrical coordinates. All the variables are expanded in a power series in the horizontal radial coordinate r. The series is truncated after the second order in r. After some manipulations with the equations, one single equation is obtained for the vertical stratification of the magnetic field strength at the flux tube axis (for details, see Pneuman et al. 1986). This equation is solved numerically using an iterative interpolation scheme by fluxtubes2.pro. Once the magnetic field at the axis is obtained, all of the other variables are calculated from analytical expressions. The free parameters of the model are: magnetic field strength and flux tube radius at the base of photosphere and filling factor. The latter parameter allows us to produce a smooth merging of flux tubes at some chromospheric height. These parameters can be adjusted directly in the routine. More information in Khomenko, E., Collados, M., & Felipe, T. 2008, Sol. Phys., 251, 589