Define global parameters

(* define adiabatic index *)
Clear[γ];
γ=(5/3)

(* define mass of each Lagrangian zone *)
Clear[zonemass];
zonemass=1

(* factor in Courant condition for timestep *)
Clear[courant];
courant=.7

(* define number of zones *)
Clear[Nzone];
Nzone=(2^4)

(* size of box *)
Clear[boxsize];
boxsize=Nzone

Results for first 2 steps

positions//MatrixForm

zonepositions//MatrixForm

zonedensities//MatrixForm

velocities//MatrixForm

zonevelocities//MatrixForm

pressures//MatrixForm

zonepressures//MatrixForm

zoneenergies//MatrixForm

zonesoundspeeds//MatrixForm