  In this work, a second order smoothed particle hydrodynamics is derived for
the study of relativistic heavy ion collisions. The hydrodynamical equation of
motion is formulated in terms of the variational principle. In order to
describe the fluid of high energy density but of low baryon density, the
entropy is taken as the base quantity for the interpolation. The smoothed
particle hydrodynamics algorithm employed in this study is of the second order,
which guarantees better particle consistency. Furthermore, it is shown that the
variational principle preserves the translational invariance of the system, and
therefore improves the accuracy of the method. A brief discussion on the
potential implications of the model in heavy ion physics is also presented.
