Energy conservation
@yvesrevaz has run some very simple tests of a periodic homogeneous box containing particles distributed randomly (Poissonian noise). The velocity is initially set to zero while the internal energy is not. The density corresponds to 0.1a/cc and the temperature to 1e4K.
I've then simply plotted the Total (black), Kinetic (green) and Internal (yellow) energy and compared with the values from a Gadget-2 run (see the attached figure).
Clearly the energy in the Swift simulation is not conserved, while it is (at a 0.15% level) for the Gadget-2 run. While the evolution of the kinetic energy is quite similar, it appears that the internal one is similar at the beginning, but quickly diverging. I've used similar SPH parameters for the two simulations. The version of the Swift code is given below. I've also checked in the code that the values flagged E_int are indeed corresponding to the Internal energy, I can confirm that it is the case. BTW, running the UniformBox test, I've found also very bad energy conservation.
UPDATES:
I've been struggling to reproduce this result. Running the perturbed box I found perfect energy conservation for the internal energy for both SWIFT and Gadget-2. I also found excellent energy conservation with the cosmaVolume run over about 60 timesteps.
One thing that is clearly different though is that for Yves test the KE and TE (thermal/internal energy) are comparable. For my tests the KE is smaller by around 9 orders of magnitude compared to the TE.