Comparative Solution Project

 View Only

Calculation of CO2 solubility

  • 1.  Calculation of CO2 solubility

    Posted 07-24-2024 10:26 AM

    I have been examining the calculation of CO2 solubility. The plot shown here compares solubility (expressed as the mole fraction of CO2 in the aqueous phase) as a function of pressure, at 50°C. I have calculated the solubility in various ways:

    ·           Using two different commercial simulators, each of which use the Spycher-Pruess method

    ·           A web-based calculator tool which gives solubility for pure-CO2 / pure-H2O mixtures

    ·           A published table of solubility for  pure-CO2 / pure-H2O

    ·           A calculation using the make_solubility_table.py script from the thermodynamics section of the SPE CSP 11 competition's GitHub repository

    At low pressures all of these calculations yield very similar solubilities, but at pressures above ~150 bar the calculation from the make_solubility_table.py script deviates from the others. In problem 11B simulated pressures exceed 400 bar.

    I know that the CSP definition states that for fluid PVT calculations, all mixture properties should be considered equal to that of the pure phase (except for water density). The reason given is that the range of pressures and temperatures in problems 11A, 11B and 11C imply that the mutual solubilities are quite small. I can also see that the Python code in the make_solubility_table.py script has simplified the Spycher-Pruess equations – presumably to reflect the assumption of low mutual solubility, and also because the script should only be used for the range of conditions expected in the CSP cases. I don't know whether these simplifications are the sole reason for the differences seen on the plot.

    Nonetheless, I wanted to point out that (if my calculations are correct) the solubilities calculated by the make_solubility_table.py script will differ from those calculated by simulators which use the full Spycher-Pruess formulation.

    Calculated CO2 Solubility (50degC)


    ------------------------------
    David Element
    Reservoir Engineer
    RPS Energy
    ------------------------------


  • 2.  RE: Calculation of CO2 solubility

    Posted 07-25-2024 02:33 AM

    Hi David,

    Thank you for the detailed investigation! I was not aware of the fact that the script implements a simplified version. Can you let me know what exact simplification is done? I would also be interested in the data points of the plot so that I can do a comparison myself.

    Kind regards

    Bernd




  • 3.  RE: Calculation of CO2 solubility

    Posted 07-25-2024 07:56 AM
      |   view attached

    Thanks for replying to my query.

    I haven't checked all of the equations in the Spycher-Pruess papers and the Python code, but I can highlight one area of simplification, which relates to the calculation of fugacity coefficients. The Spycher-Pruess equations for fugacity require Redlich-Kwong a and b parameters aCO2, aH2O, bCO2, bCO2 and mixing rules (giving amix and bmix). I have included below a couple of screen grabs of equations from the Spycher-Pruess paper:

    ·           Spycher, N., Pruess, K., and Ennis-King, J. 2003. CO2-H2O Mixtures in the Geological Sequestration of CO2. I. Assessment and Calculation of Mutual Solubilities from 12 to 100°C and up to 600 Bar. Geochimica et Cosmochimica Acta 67 (16): 3015–3031.

    In the Python script, b_CO2 is used instead of a bmix term. In the case of the CO2 fugacity calculation, I have highlighted below in red where the full equations imply a bmix term should be:

    def fugacityCoefficientCO2(T, p, rhoCO2):

        molarMassCO2 = 44.01e-3 # [kg/mol]

        V = 1/(rhoCO2/molarMassCO2)*1e6 # molar volume [cm3/mol]

        p_bar = p/1e5 # phase pressure in bar

        a_CO2 = (7.54e7 - 4.13e4*T) # mixture parameter of Redlich-Kwong equation

        b_CO2 = 27.8 # mixture parameter of Redlich-Kwong equation

        R = 83.1446261815324 # universal gas constant [bar.cm3/mol.K]

        lnPhiCO2 = math.log(V/(V - b_CO2)) + b_CO2/(V - b_CO2) \

                   - 2*a_CO2/(R*math.pow(T, 1.5)*b_CO2)*math.log((V + b_CO2)/V) \

                   + a_CO2*b_CO2/(R*math.pow(T, 1.5)*b_CO2*b_CO2) \

                     *(math.log((V + b_CO2)/V) - b_CO2/(V + b_CO2)) \

                   - math.log(p_bar*V/(R*T))

        return math.exp(lnPhiCO2)

    def fugacityCoefficientH2O(T, p, rhoCO2):

        molarMassCO2 = 44.01e-3 # [kg/mol]

        V = 1/(rhoCO2/molarMassCO2)*1e6 # molar volume [cm3/mol]

        p_bar = p/1e5 # phase pressure in bar

        a_CO2 = (7.54e7 - 4.13e4*T) # mixture parameter of  Redlich-Kwong equation

        a_CO2_H2O = 7.89e7 # mixture parameter of Redlich-Kwong equation

        b_CO2 = 27.8 # mixture parameter of Redlich-Kwong equation

        b_H2O = 18.18 # mixture parameter of Redlich-Kwong equation

        R = 83.1446261815324 # universal gas constant [bar.cm3/mol.K]

        lnPhiH2O = math.log(V/(V - b_CO2)) + b_H2O/(V - b_CO2) \

                   - 2*a_CO2_H2O/(R*math.pow(T, 1.5)*b_CO2)*math.log((V + b_CO2)/V) \

                   + a_CO2*b_H2O/(R*math.pow(T, 1.5)*b_CO2*b_CO2) \

                     *(math.log((V + b_CO2)/V) - b_CO2/(V + b_CO2)) \

                   - math.log(p_bar*V/(R*T))

        return math.exp(lnPhiH2O)

    There may be other simplifications. As I noted in my earlier post, I do not know whether differences between Python-calculated solubilities and other solubilities are due to such simplifications.

    You asked about the data points on the plot I shared.

    ·           The solubilities from simulators were obtained by from a 1d model initialised with a mixture of CO2 and H2O.

    ·           The web-based calculation of CO2 solubility made use of the tool at https://www.zetaware.com/utilities/CO2/index.html (although other online CO2 property calculators are available).

    ·           The published tables of CO2 solubility at 50°C were obtained from Mao, Zhang, Li and Liu (https://www.sciencedirect.com/science/article/abs/pii/S0009254113001241), although many other measured and calculated CO2/H2O solubility tables are available in the literature.

    I have summarised solubility values in the attached Excel file, with values at 10, 30, 50 and 70°C.

    Regards,

    Spycher-Pruess equations


    ------------------------------
    David Element
    Reservoir Engineer
    RPS Energy
    ------------------------------

    Attachment(s)

    xlsx
    CO2_solubility_tables.xlsx   77 KB 1 version


  • 4.  RE: Calculation of CO2 solubility

    Posted 07-25-2024 08:39 AM

    Thank you! My guess is that the simplification is made since the definition of b_mix contains the solubilities which are to be calculated. I will check how this can be resolved. I'd certainly appreciate any hint in this direction.




  • 5.  RE: Calculation of CO2 solubility

    Posted 07-25-2024 08:42 AM

    Actually, the issue is addressed in the paragraph below (23) (in my case (B7)) in the paper, where they also suggest the simplification.




  • 6.  RE: Calculation of CO2 solubility

    Posted 07-25-2024 10:19 AM

    Yes. I'd been looking at the equations in the papers and hadn't spotted that the text introduces a possible simplification. The authors state that this should be valid for temperatures up to at least 75°C (and I presume up to pressures of 600 bar, given the scope of the whole paper). That's a wide enough range to cover the conditions anticipated in the CSP cases.

    Discrepancies between the Python calculations of CO2 solubilities and other calculations must be related to some other aspect of the formulation. As I've said previously, I haven't checked through all of the Python script.

    Regards,



    ------------------------------
    David Element
    Reservoir Engineer
    RPS Energy
    ------------------------------



  • 7.  RE: Calculation of CO2 solubility

    Posted 07-26-2024 08:20 AM

    I have just noticed that someone else independently brought this up in an issue on the GitHub repository back in April, but has not received any response: https://github.com/Simulation-Benchmarks/11thSPE-CSP/issues/28



    ------------------------------
    Adam Turner
    Reservoir Engineer
    RPS Energy
    ------------------------------



  • 8.  RE: Calculation of CO2 solubility

    Posted 07-26-2024 08:50 AM

    I found the reason. The script uses the NIST database to obtain the CO2 density and uses this value together with the CO2 molar mass to calculate the molar volume. If instead the molar volume is calculated by solving the Redlich-Kwong equation as suggested in the Spycher paper, the results seem to be consistent with David's. I added this as an option to the script, which can be triggered by passing "--no-nist" as a parameter. It would be great if you could double-check.

    I am at the moment a bit unsure how to resolve this. Because we require to take NIST for the densities on the one hand, but Spycher for the solubilities on the other hand. This seems to be inconsistent.

    Suggestions are of course welcome.

    Kind regards

    Bernd




  • 9.  RE: Calculation of CO2 solubility

    Posted 07-26-2024 09:08 AM
    Edited by Alberto Cominelli 07-26-2024 09:12 AM

    Thanks Adam & David for noticing this. Giacomo Rivolta and I  submitted lthe issue (CO2 solubility behavior at high pressures · Issue #28 · Simulation-Benchmarks/11thSPE-CSP

    GitHub remove preview
    CO2 solubility behavior at high pressures · Issue #28 · Simulation-Benchmarks/11thSPE-CSP
    Hi, I'm looking a bit into the script make_solubility_table.py and I tried to compare the results obtained from the script with experimental results available in literature and reported in Spycher, Pruess and Ennis-King, 2003. For exampl...
    View this on GitHub >

    ) long time ago, and I also wrote to Olav Moyner about.

    This picture compare SPE11 python script output with experimental data:

    comparison between Spe11 python script results and some experimental data available from one of the Stengby 's paper




  • 10.  RE: Calculation of CO2 solubility

    Posted 07-31-2024 04:35 AM

    I double-checked with the data you provided and they coincide. I also came to the conclusion that there is no inconsistency in using Spycher for the solubilities and NIST for density and enthalpy, as required by the CSP description. The script now returns the Spycher values only.




  • 11.  RE: Calculation of CO2 solubility

    Posted 07-31-2024 06:31 AM

    I am happy about this choice, I think it is quite common for these computation: for instance if you use Soreide & Whitson extension to PR eos to conmpute water-hydrocarbon equilibria  water density is computed using correlation rather than EOS.

    Regards,

     Alberto.




  • 12.  RE: Calculation of CO2 solubility

    Posted 08-04-2024 11:36 PM
    Edited by Chaojie Di 08-04-2024 11:37 PM

    Dear Prof. Flemisch

    It seems that the new make_solubility_table.py script updated the solubility table. I want to confirm if we need to switch to using the new table for simulations to ensure that all participating teams are using the same solubility data?

    Best regards

    Chaojie Di

    University of Calgary




  • 13.  RE: Calculation of CO2 solubility

    Posted 08-05-2024 02:06 AM

    Hi Chaojie,

    yes, this would be preferred.

    Kind regards

    Bernd




  • 14.  RE: Calculation of CO2 solubility

    Posted 08-05-2024 08:23 PM

    Dear Prof. Flemisch:

    I see. Thanks for your reply.

    Best regards

    Chaojie Di