Variable smoothing lengths and energy conservation in smoothed particle hydrodynamics | Synapse