Function phi_CO2(T) 'Equation for the fugacity coefficient is from Kortzinger (1999) pages 149-158 in ' Grasshoff et al. (1999) Methods of Seawater Analysis Wiley-VCH, Weinheim, 600pp. 'Virial coefficients are from Weiss (1974) Mar Chem 2: 203-215. 'INPUT: Temperature (T) in degrees C. ' Pressure (P) is assumed to be 1 atm = 101325 Pa. 'OUTPUT: Fugacity coefficient for CO2 = fCO2/pCO2. 'DEFINE CONSTANTS R = 8.314472 P = 101325 B0 = -1636.75 B1 = 12.0408 B2 = -3.27957/100 B3 = 3.16528/100000 'CALCULATE CO2 FUGACITY COEFFICIENT T = T + 273.15 B = (((B3 * T + B2) * T + B1) * T + B0) / 1000000 delta = (57.7 - 0.118 * T) / 1000000 phi_CO2 = Exp(P * (B + 2 * delta) / (R * T)) End Function