  (Abridged) The precision modeling of the thermal Sunyaev Zeldovich (SZ)
effect and future high accuracy measurements will provide a powerful way to
constrain the thermal history of the universe. In this paper, we combine high
resolution adiabatic hydro simulations and analytical models to provide a
precision modeling of the gas density weighted temperature $\bar{T}_g$ and the
mean SZ Compton $y$ parameter. Simulation artifacts are quantified and
corrected and our analytical model passes tests of various simulations and is
able to predict $\bar{T}_g$ and $\bar{y}$ to several percent accuracy. For low
matter density $\Lambda$CDM cosmology, the present $\bar{T}_g$ is $0.32
(\sigma_8/0.84)^{3.05-0.15\Omega_m}(\Omega_m/0.268)^{1.28-0.2\sigma_8} {\rm
keV}$. The mean $y$ parameter is $2.6\times 10^{-6}
(\sigma_8/0.84)^{4.1-2\Omega_m}(\Omega_m/0.268)^{1.28-0.2\sigma_8}$. The
current upper limit of $y<1.5\times 10^{-5}$ measured by FIRAS has already
ruled out combinations of high $\sigma_8\ga 1.1$ and high $\Omega_m\ga 0.5$.
