Contents
clear clc % CO2 SOLUBILITY IN PURE WATER AND AQUEOUS SOLUTIONS % Model written based on "An improved model calculating CO2 solubility in % pure water and aqueous NaCl solutions from 273 to 533 K and from 0 to % 2000 bar" by Zhenhao Duan and Rui Sun (2003), and "An improved model for % the calculation of CO2 solubility in aqueous solutions containing Na+, % K+, Ca2+, Cl-, and SO42-" by Zhenhao Duan and Rui Sun (2005). Valid range % T[K]: 273 < T < 533 , P[bar]: 0 < P < 2000, [m/kg]: 0 < m < 4.3
INPUT
check = 1; % (1/0) 1 = Only calculate value. 0 = Produce surface plot of whole valid interval. Pmin = 0; % Minimum pressure [Bar] Pmax = 2000; % Maximum pressure [Bar] Tmin = 273; % Minimum Temperature [Kelvin] Tmax = 533; % Maximum Temperature [Kelvin] % SSW composition mNa = 0.45; % Molality [mol/kg] mK = 0.01; % Molality [mol/kg] mCa = 0.013; % Molality [mol/kg] mMg = 0.045; % Molality [mol/kg] mCl = 0.525; % Molality [mol/kg] mSO4 = 0.024; % Molality [mol/kg] if check == 1; P = 50; %[bar] T = 298.15; %[K] solubility = CO2sol(P,T,mNa,mCa,mK,mMg,mCl,mSO4) return end % Creating solubility matrix of the whole valid interval Prange = linspace(Pmin,Pmax,(Pmax-Pmin)+1); Trange = linspace(Tmin,Tmax,(Tmax-Tmin)+1); for j = 1:(Tmax-Tmin)+1 T = Trange(j); for i = 1:(Pmax-Pmin)+1 P = Prange(i); solubility(i,j) = CO2sol(P,T,mNa,mCa,mK,mMg,mCl,mSO4); end end solubility(imag(solubility)~=0) = 0; mesh(Trange,Prange,solubility)