Gravity is needed to build up different gas phases!
I just started to run some isolated simulations of a core of a galaxy cluster. The simulation initially contains equally distributed isothermal gas and one black hole in the centre. Both simulations in the plot contain cooling and star formation. The red diamonds correspond to a simulations with gravity, whereas the blue diamonds show a simulation without gravity. The evolution of the phase diagram shows that different gas phases build up only in the simulation with gravity.