  The magnetic network extending from the photosphere (solar radius $\simeq
R_\odot$) to lower corona ($R_\odot + 10$ Mm) plays an important role in the
heating mechanisms of the solar atmosphere. Here we further develop the models
with realistic open magnetic flux tubes of the authors in order to model more
complicated configurations. Closed magnetic loops, and combinations of closed
and open magnetic flux tubes are modelled. These are embedded within a
stratified atmosphere, derived from observationally motivated semi-empirical
and data-driven models subject to solar gravity and capable of spanning from
the photosphere up into the chromosphere and lower corona. Constructing a
magnetic field comprising self-similar magnetic flux tubes, an analytic
solution for the kinetic pressure and plasma density is derived. Combining flux
tubes of opposite polarity it is possible to create a steady background
magnetic field configuration modelling a solar atmosphere exhibiting realistic
stratification. The result can be applied to SOHO/MDI and SDO/HMI and other
magnetograms from the solar surface, upon which photospheric motions can be
simulated to explore the mechanism of energy transport. We demonstrate this
powerful and versatile method with an application to Helioseismic and Magnetic
Imager data.
