Cosmological smoothed particle hydrodynamics simulations: the entropy equation | Synapse