CO_{2} fugacity

For accurate calculations, the fugacity of CO_{2}, fCO_{2}, may be used instead of its partial pressure. The fugacity can be calculated from its partial pressure (Koerzinger, 1999). The calculation for this gas requires two virial coefficients B and d , as explained here as follows (from Zeebe 2001) 

Here are the related lines of code : 
fCO2 = ppmCO2*exp(101325*((1636.75 + 12.0408*T  3.27957e2*T^2 + 3.16528e5*T^3)*1e6 +
+ 2*(57.7  0.118*T)*1e6)/R/T) 