Most of the interstellar medium is not at rest, but is in supersonic motion due to supernova explosions, stellar winds, radiation fields and a time dependent gravitational field caused by spiral density waves in the stellar discs of galaxies. Since supersonic motions almost always involve shock waves, shock waves must be accounted for in calculations. The galaxy also contains a dynamically significant magnetic field, meaning that the dynamics are governed by the equations of compressible magnetohydrodynamics. In many cases, the electrical conductivity is large enough for the ideal MHD equations to be a good approximation, but this is not true in star forming regions where the gas density is high and the degree of ionization is low.