View License

Download apps, toolboxes, and other File Exchange content using Add-On Explorer in MATLAB.

» Watch video

Highlights from
Methane Solubility

Join the 15-year community celebration.

Play games and win prizes!

» Learn more

Be the first to rate this file! 6 Downloads (last 30 days) File Size: 10.6 KB File ID: #36963 Version: 1.2

Methane Solubility



01 Jun 2012 (Updated )

Calculates the solubility of methane in water.

| Watch this File

File Information

Given pressure (in MPa), Temperature (in Kelvin) and Salinity (in either mol/kg or parts per thousand), this function uses the formulae in Tischenko et al (2005) and Duan et al (1992, 2006) to calculate the solubility of methane inside and outside the methane hydrate stability field.
This function will compute solubilities either over a range of pressures, temperatures or salinities, or for discrete pressure, temperature, salinity points. Two demonstration can be seen using the following code:

To calculate solubility over a range of conditions:

    P = [5:.5:15]';
    T = [273:.5:293]';
    S = [0:10:30];
    SalinityUnits = 'ppt';
    Datatype = 'range';
    NetCH4Solubility = MethaneSolubility(P,T,S,SalinityUnits,Datatype);
    xlabel('Temperature (K)')
    ylabel('Pressure (MPa)')
    zlabel('Methane Solubility (moles CH4 per kg water)')

To calculate solubility for discrete data points:

P = [5:.5:15]';
    T = [273:1:293]';
    S = [0:1:20]';
    SalinityUnits = 'ppt';
    Datatype = 'points';
    NetCH4Solubility = MethaneSolubility(P,T,S,SalinityUnits,Datatype);


Progressbar and X Steam, Thermodynamic Properties Of Water And Steam. inspired this file.

This file inspired Methane Hydrate Stability Toolbox.

Required Products MATLAB
MATLAB release MATLAB 7.14 (R2012a)
Tags for This File   Please login to tag files.
Please login to add a comment or rating.
Comments and Ratings (2)
09 Jun 2016 William Waite

I'm sorry for the confusion, David. I was basing the matlab script off a series of published papers, and they suggest that at low pressures, the solubility should be in the .001 - .002 moles per kilogram range, so your answer of .0013 seems reasonable. See for example:

Duan, Z. H., and S. D. Mao (2006), A thermodynamic model for calculating methane solubility, density and gas phase composition of methane-bearing aqueous fluids from 273 to 523 K and from 1 to 2000 bar, Geochimica et Cosmochimica Acta, 70(13), 3369-3386.


Comment only
29 Apr 2013 David

David (view profile)

I might be converting wrong, because I am getting very high methane solubility equilibrium concentrations when I use real data from 10m depth.. see below

Press_MPa= 0.1014
ch4_eqsol_M=methanesolubility(Press_MPa, Temp_K, Sal_ppt, 'ppt','points');

I get a value of 0.0013 M, but it should be closer to 3nM

Can someone please help me figure out why this is?



Comment only
07 Jun 2012 1.1

This update is only to ensure the acknowledgments written in the script are also included on the Mathworks download page. "Methane Solubility" gratefully acknowledges the XSteam script by Magnus Holmgren and the Progressbar script by Steve Hoelzer.

11 Jun 2012 1.2

This version updates the U.S. Geological Survey disclaimer.

Contact us