Need help in calculation for determining the compressibility factor of nitrogen, natural gas, and air at various pressures and temperatures. Any help will be greatly appreciated Thanks.
There is a simplified version in the GPSA Engineering Data Book (if you don't have one and you work in gases you are making a huge mistake). It doesn't handle acid gases very well, but comes quite close to the NIST REFPROP.exe equation of state for hydrocarbon products. Both air and Nitrogen are so close to ideal gases that any use you put your equation too will not suffer from calling it 1.0.
For natural gas that includes some acid gas I use the Hall-Yarborough correlation with the Turek modification for acid gas, and below about 5,000 psi it is close enough to REFPROP (which is very close to what you would get from something like HySys). This correlation takes about 3 pages to implement in a MathCad program.