  State of the art models of the ISM use adaptive mesh refinement to capture
small scale structures, by refining on the fly those regions of the grid where
density and pressure gradients occur, keeping at the same time the existing
resolution in the other regions. With this technique it became possible to
study the ISM in star-forming galaxies in a global way by following matter
circulation between stars and the interstellar gas, and, in particular the
energy input by random and clustered supernova explosions, which determine the
dynamical and chemical evolution of the ISM, and hence of the galaxy as a
whole. In this paper we review the conditions for a self-consistent modelling
of the ISM and present the results from the latest developments in the 3D
HD/MHD global models of the ISM. Special emphasis is put on the effects of the
magnetic field with respect to the volume and mass fractions of the different
ISM ``phases'', the relative importance of ram, thermal and magnetic pressures,
and whether the field can prevent matter transport from the disk into the halo.
The simulations were performed on a grid with a square area of 1 kpc$^{2}$,
centered on the solar circle, extending $\pm 10$ kpc perpendicular to the
galactic disk with a resolution as high as 1.25 pc. The run time scale was 400
Myr, sufficiently long to avoid memory effects of the initial setup, and to
allow for a global dynamical equilibrium to be reached in case of a constant
energy input rate.
