The thermal Sunyaev Zeldovich ( SZ ) effect directly probes the thermal energy of the universe . Its precision modeling and future high accuracy measurements will provide a powerful way to constrain the thermal history of the universe . In this paper , we focus on the precision modeling of the gas density weighted temperature \bar { T } _ { g } and the mean SZ Compton y parameter . We run high resolution adiabatic hydro simulations adopting the WMAP cosmology to study the intergalactic medium ( IGM ) temperature and density distribution . To quantify possible simulation limitations , we run n = -1 , -2 self similar simulations . Our analytical model on \bar { T } _ { g } is based on energy conservation and matter clustering and has no free parameter . Combining both simulations and analytical models thus provides the precision modeling of \bar { T } _ { g } and \bar { y } . We find that the simulated temperature probability distribution function and \bar { T } _ { g } shows good convergence . For the WMAP cosmology , our highest resolution simulation ( 1024 ^ { 3 } cells , 100 Mpc/h box size ) reliably simulates \bar { T } _ { g } with better than 10 \% accuracy for z \ga 0.5 . Toward z = 0 , the simulation mass resolution effect becomes stronger and causes the simulated \bar { T } _ { g } to be slightly underestimated ( At z = 0 , \sim 20 \% underestimated ) . Since \bar { y } is mainly contributed by IGM at z \ga 0.5 , such simulation effect on \bar { y } is no larger than \sim 10 \% . Furthermore , our analytical model is capable of correcting this artifact . It passes all tests of self similar simulations and WMAP 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 } } { keV } , which accounts for 10 ^ { -8 } of the critical cosmological density and 0.024 \% of the CMB energy . 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 .