Skip to content
GitLab
Projects Groups Topics Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • SWIFTsim SWIFTsim
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributor statistics
    • Graph
    • Compare revisions
  • Issues 53
    • Issues 53
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 19
    • Merge requests 19
  • Deployments
    • Deployments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Commits
  • Issue Boards
Collapse sidebar
  • SWIFT
  • SWIFTsimSWIFTsim
  • Issues
  • #183
Closed
Open
Issue created Jul 06, 2016 by Matthieu Schaller@matthieuOwner

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. energy

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.

Compare_InternalEnergy

To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
Time tracking