Experiments and modeling of CO2 solubility in water-based and oil-based drilling fluids