  This is the first of two papers examining the critical collapse of
spherically symmetric perfect fluids with the equation of state P = (Gamma
-1)rho. Here we present the equations of motion and describe a computer code
capable of simulating the extremely relativistic flows encountered in critical
solutions for Gamma <= 2. The fluid equations are solved using a
high-resolution shock-capturing scheme based on a linearized Riemann solver.
