  Using high-resolution non-radiative hydrodynamic simulations of galaxy
clusters we obtain simple analytic formulae for DM and gas distribution in the
spherical approximation. We derive fits for the DM density, velocity dispersion
and velocity anisotropy. We use these models to test the dynamical equilibrium
hypothesis through the Jeans equation: we find that this is satisfied to good
accuracy. This result show that our fits constitute a self-consistent dynamical
model. We then extend our analysis to the gas, studying its density,
temperature and velocity structure, with no further hypothesis on the dynamical
status or state equation. Gas and DM show self-similar density profiles down to
0.06 R_vir, while at smaller radii the gas produces a central core. Gas
temperatures are almost isothermal out to 0.2 R_vir, then steeply decrease
reaching at R_vir a value a factor of 2 lower. We find that the gas is not at
rest inside R_vir: velocity dispersions are increasing functions of the radius,
motions are isotropic to slightly tangential, and contribute to the total
pressure support. We test our model using a generalization of the hydrostatic
equilibrium equation, where the gas motion is properly taken into account. We
find that our fits provide an accurate description of the system: the gas is in
equilibrium and is a good tracer the overall cluster potential if all terms are
taken into account, while simpler assumptions, as the beta-model, cause
systematic mass underestimates. We also find that, if gas velocities are
neglected, then a simple isothermal model fares better at large radii than a
non-isothermal one. (abridged)
