Which is the best explanation for the formation of spiral galaxies? Were all galaxies spiral at some stage?
2 Answers
The first half of this text is taken from a chapter I wrote recently for an anthology. All pictures are taken from a popsci article I wrote some years back.
Initial collapse
In the early, expanding Universe, sufficiently large overdensities are able to withstand and detach themselves from the expansion, turn over, and collapse. With more than five times as much dark matter (DM) as baryonic matter (i.e. gas), the dynamics are initially dominated by the former. Eventually the collapsing cloud will virialize — astronomers' term for reaching a dynamical equilibrium — and come to a halt.
Gas, which unlike the collisionless DM is able to cool and fragment on small scales, condenses in the center of more extended DM halos, with the densest regions further collapsing to nurture the fundamental building blocks of the galaxies: stars.
Structure formation in the early Universe, visualized with a simple $N$-body code that simulates $256^3$ particles and their gravitational interactions.
Early galaxy evolution
In the very center, supermassive black holes form which accrete mass, ejecting excess energy as so-called active galactic nuclei. Meanwhile, dying stars inject not only energy but also heavy elements (in astronomy, everything heavier than helium is collectively called "metals").
With time, the interstellar medium is therefore enriched with metals, roughly half of which condenses to dust. Dust particles, in turn, in sufficiently dense environs (i.e. in the proto-stellar disks) coalesce to larger grains, pebbles, rocks, planetesimals, and eventually planets which, for all we know, are a necessary condition for life.
Merging and quenching
Thermal and kinetic feedback from stars and active galactic nuclei drive strong winds which may exceed the galaxy’s escape velocity, enriching also the intergalactic medium with metals. Star formation typically declines after an initial starburst, but may be sustained by continuous accretion of new material from the intergalactic medium, while new starbursts may be initiated by collisions with other galaxies, a process known as merging. Galactic winds, merging, and gas depletion is also responsible for some galaxies ceasing to form new stars, the process known as quenching.
Which processes dominate will determine the nature of the galaxy, in particular its color (governed mainly by the age and metallicity of the stellar population, and the amount of dust) and its morphology: will it end up as a disky spiral galaxy, a featureless elliptical galaxy, or something else?
Hierarchical structure formation: The smallest galactic halos are formed first. Some of them survive to later epochs, while others merge to form ever larger structures. The color of the halos indicates the time when they formed. Halos of a given size are typically formed at the same epoch (though there is great variation).
Formation of the disk
The original density field from which galaxies condense is turbulent, and hence clouds will, in general, have a non-vanishing rotation. Moreover — and this is in fact the dominant origin for rotation — tidal forces from neighboring clouds exert a torque on the cloud. As a cloud collapses, conservation of angular momentum ensures that that it will spin faster and faster, until eventually centrifugal forces outbalance gravitational forces.
However, this balance is only reached in the plane of the rotation. Perpendicular to this, the cloud can collapse freely.
A very important process in this context is the ability of the gas to cool. As gas contracts, it is heated, and if it cannot cool, it will at some point be unable to contract further, simply because of the kinetic energy of the gas particles. Gas cools through various process, depending primarily on the mass of the cloud and its chemical composition. I discussed this previously in some detail in this answer.
Disk formation: From left to right, a cloud of gas and dark matter is seen to acquire rotation through tidal forces from neighboring clouds. As gravity makes the cloud contract, it will tend to withstand this collapse in the plane of rotation, thereby creating a disk. The collisionless dark matter, however, will tend to stay in an extended halo.
Formation of the spiral structure
I wrote a quite extensive answer previously on the formation of spiral structure in disk galaxies.
tl;dr Spiral patterns can be created in different ways, through the amplification of instabilities generated e.g. by supernova shock waves or tidal forces from neighboring galaxies.
Elliptical galaxies
When galaxies merge, the relative orientation of the angular momentum will determine the outcome. If they spin in the same direction, they can settle down into a new and larger disk galaxy. In general their spin will not be aligned, however. "Minor mergers" (with mass ratios ~1:10) will tend to keep the original structure of the most massive galaxy, but when you have a "major merger" (with mass ratio 1:1) of galaxies with non-aligned spins, they may instead form an elliptical galaxy.
Such a process has the tendency to blow gas out of the system, and/or to heat it, leaving no cold gas available for new star formation. As the most massive and hence blue and short-lived stars die out, only a red population is left, giving elliptical galaxies their characteristic color.
Formation of an elliptical galaxy: Clouds with ordered, but non-aligned rotation end up with stars orbiting on random trajectories, the combination of which is seen as an elliptical galaxy.
Are all galaxies spirals at some point?
So, it seems that galaxies has a tendency to always form disks which then form spiral patterns. However, to settle down into a disk requires that the galaxy is not perturbed too much by neighboring galaxies. In the early Universe, where galaxies were much closer together, this sort of harassment happened frequently, and therefore it took some time before the first disk galaxies emerged (although recent JWST observations hint at disk formation earlier than previously expected).
Therefore some galaxies never had time to form a disk before merging with another galaxy. Moreover, some galaxies may lose their gas (e.g. in merger event, but also through violent star formation or quasar activity blowing out their gas. If this happens before it has had time to settle into a disk, then it won't be able to form one. Without the gas' ability to cool and contract, the orbits of stars will stay un-ordered.
Further, the formation of a disk does require some mass, and therefore dwarf galaxies will tend to stay irregular.
According to the National Astronomical Observatory of Japan
In the process of merging, a disk is formed and stars are born in this disk. As small galaxies pass around the periphery of this disk, the effects of their gravity create a spiral structure in the disk. Spiral galaxies like our Milky Way Galaxy are thought to be formed in this manner.