Closed joe637 closed 2 years ago
The energy is never expected to be conserved in a system using a multiple time-step scheme where particles can change time-step sizes. That will be true for every code. The onus is on the user to chose a maximal time-step size, CFL number, and gravity time-step condition that leads to a level of accuracy they are happy with.
Some effects can be mitigated by additionally running with the time-step limiter loops (--limiter
) at runtime if the losses are predominantly coming from the hydro solver.
I am currently running giant impact simulations using the EoS of Hubbard and Macfarlane (1980) and swift seems to have trouble with energy conservation whenever I set the max timestep to be large (100s) to allow swift to find its preffered timestep, it seems to have trouble with energy conservation, which in turn leads to problems with the simulation itself, but when I cap the max dt at 10s, it forces the timesteps to be smaller, and it conserves energy much better, but this in turn leads the simulation to take much longer than if I set the max dt to be 100s. I'm not quite sure what the problem here might be, so could it be a problem with swift itself ? The top graph is where the timesteps have been capped at 10s, the bottom is a maximum of 100s