In order to follow the evolution of a galaxy, the basic equations to solve are of course the Euler equations, namely the standard set of equations (conservation of mass, momentum and energy) governing inviscid flows. Viscosity in astrophysical plasmas is in fact usually very small. It can be large in some localised system, for instance in accretion disks, but on a larger, galactic-wide scale the ISM can be considered inviscid and there is no need to invoke the Navier-Stokes equations. Conversely, astrophysical plasmas are usually very turbulent . In spite of that, also the use of turbulence models in simulations of galaxies is still quite limited. The main reason for that is the lack of a satisfying characterisation and modelling strategy for the compressible turbulence. Progress in this field is however constant and very sophisticated turbulence models have been applied recently to astrophysical problems [33, 32, 251, 103, 88, 187, 104]. Important first steps have been performed also in the simulation of turbulent gas in galaxies [126, 252, 29, 160, 231].
Since a large volume fraction of the ISM of star forming galaxies is ionised, a description of the electro-magnetic interactions is clearly required. This is most often realized by means of the so called ideal magneto-hydrodynamical equations, where various ions are treated as a single fluid, the conductivity of the ionised gas is assumed to be very large and the plasma is assumed to be frozen in the magnetic field. Many modern hydrodynamical codes, such as ZEUS , FLASH [85, 153], RAMSES [305, 83], ATHENA , just to name a few, solve the ideal magneto-hydrodynamical equations. The inclusion of magnetic fields affects the dynamics of gas in a galaxy in many ways. (i) Magnetic fields strongly reduce the transverse flow of charged particles, hence the thermal conduction in directions orthogonal to field lines . Thermal conduction along field lines remains unaltered compared to non-magnetised gases. (ii) Magnetic tension forces tend also to suppress dynamical instabilities parallel, but not perpendicular, to field lines . Magnetic fields might also inhibit the break-out of hot bubbles and superbubbles . Also the mixing between the hot bubble and the surrounding cold supershell can be reduced due to the presence of magnetic fields. (iii) The magnetic pressure B2 / 8 plays an important role in the gas dynamics. It is in fact comparable with the thermal pressure and, if the magnetic field is not too weak, it is the dominant form of pressure for temperatures below ~ 200 K .
Not so much is known about magnetic fields in DGs. Starbursting DGs such as NGC 1569  or NGC 4449  are known to have magnetic fields with strengths as high as few tens of µG, whereas quiescent DGs have much weaker magnetic fields (a few µG, [117, 118]). Magnetic fields are probably not the main drivers of DG evolution, at least during periods of quiescent or weak star formation.
Since our knowledge of galaxies almost exclusively depends on their emitted (or absorbed) radiation, radiation hydrodynamics clearly allows a description of galaxies which is more complete and easier to compare with observations. The radiation hydrodynamical equations are more complex than the Euler equations. A few textbooks exist, in which these equations and related numerical methods are described in detail [188, 107, 43]. Many authors who attempted to solve them made simplifying assumptions about the matter-radiation coupling.
The simplest possible way to include the effects of radiation in hydrodynamical simulations is to assume that the gas is optically thin. The only effect of radiation is thus to reduce the available thermal energy of the gas, i.e. radiation acts only as an energy sink. Many works in the literature are devoted to the calculation of the cooling function of an optically thin plasma [23, 296, 258] and these functions are used to calculate the rate of thermal energy loss as a function of density, temperature and chemical composition. A further commonly adopted assumption is the on the spot approximation , according to which the photons produced in recombination processes do not propagate but are immediately absorbed locally. In this way, the transport of these photons must not be considered and the equations to solve simplify considerably. The heat produced by the radiation is transported out according to a law similar to the thermal conduction. This approximation turns out to be valid as long as the particle density is sufficiently high, i.e. when the optically thick limit applies. There are various examples of radiation hydrodynamical simulations which make use of the on the spot approximation [157, 81, 82, 328, 92]. A step forward is the so called flux limited diffusion, where the optically thin and optically thick limits are connected by appropriate flux limiter functions [342, 84, 138]. Although radiation hydrodynamics is clearly very relevant and might quite substantially change our understanding of galaxy formation and evolution of galaxies [44, 344, 116], the inherent complexity has so far limited the use of radiation hydrodynamical equations in galaxy simulations.
Of course, gas is not the only component of a galaxy. Stars and, very often, dark matter must be considered, too. The gravitational potential they generate has been already considered in Sect. 2. However, their dynamics can be very important, as well. The relevance of a live dark matter halo for the evolution of a galaxy is not clear and many authors still assume a fixed dark matter halo. Conversely, it is clear that the stellar dynamics plays an important role in the evolution of a galaxy, at least if one is interested in time spans larger than a few tens of Myr. This has been demonstrated for instance by Slyz  by means of a clear numerical experiment. According to this study, spurious results can be obtained if one does not allow stars to move from their natal sites. In particular, the energy of Type II Supernovae (SNeII) is, in this case, always released in regions of high densities (because in these regions it is more likely to form stars, see Sect. 4), where cooling rates are high. This leads to the so-called overcooling problem (see also Sect. 7). This problem can be simply avoided if one allows stars to move during their lifetimes and, hence, SNeII to explode in environments other than their natal ones (in particular, to explode in less dense environments).
A widely used strategy to follow the dynamics of stars (and of dark matter particles) is to consider individual stars, or more often, populations of stars, as point masses and to follow their orbits by means of standard N-body integration techniques. This approach is straightforward in SPH simulations of galaxies but it is widely used also in grid-based codes. However, in grid-based codes there is the problem that star particles must be mapped to the mesh in order for the global gravitational potential to be calculated. Once the gravitational potential is computed, it is then interpolated back to the particles. This process can lead to a loss of accuracy due to the required interpolations, it might spuriously generate entropy if the particle resolution is too low to adequately sample the density field  and it increases the communication overhead in massively parallel simulations . A possible remedy in grid-based codes is the stellar hydrodynamical approach [144, 39]. With this approach, the stars are treated as a collisionless fluid and their evolution is regulated by the moments of the Boltzmann equation. This approach has been used many times to simulate galaxies [307, 243, 332, 333]. Recently, Mitchell et al.  implemented this method into the FLASH code. Numerical tests confirmed the validity of this approach and the advantages over the more conventional particle schemes.
Another very important aspect of the evolution of galaxies is the multi-fluid, multi-phase treatment. Stars and gas exchange mass, momentum and energy during the whole life of the stars. Moreover, various gaseous phases are known to exist in the ISM and phase transformations occur continuously during the life of a galaxy. Eventually, the gas in the ISM is composed of many different elements, with various ionisation states. A complete treatment of the galaxy evolution must take into account the various phases of a galaxy and all possible exchange processes among them. In the classical chemodynamical approach, put forward by Hensler and collaborators [39, 98, 307] stars and various gas phases (typically a cold and a warm-hot phase) co-exist within a single grid and exchange mass, momentum and energy according to physically-based recipes. The dynamics of the various phases might or might not be the same. Typically, the various gas phases share the same velocity field whereas the dynamics of the stars are different. This approach has been refined over the years and many groups use it to simulate galaxies , with various degrees of sophistication [259, 99, 94, 248, 316, 209]. Nowadays, chemodynamics is a widely used term that generically refers to simulations in which some treatment of the chemical evolution is included [226, 112, 120, 317, 78]. Although these codes clearly represent a step forward with respect to more traditional single-fluid simulations, still they lack the complexity of the multi-phase chemodynamical codes described above.