Simple implementation of smoothed particle hydrodynamics