19_18-10-2011_11-35_Presentation

Embed Size (px)

Citation preview

  • 8/10/2019 19_18-10-2011_11-35_Presentation

    1/29

    On Two Flash Methods for CompositionalReservoir Simulations: Table Look-up and

    Reduced Variables

    Wei Yan, Michael L. Michelsen, Erling H. Stenby, Abdelkrim Belkadi

    Center for Energy Resources Engineering (CERE)Technical University of Denmark

    October 18, 2011

    32ndIEA EOR Annual Symposium & Workshop

  • 8/10/2019 19_18-10-2011_11-35_Presentation

    2/29

    2

    Introduction

    Flash: for a mixture of compositionz, will it split into two (or more)phases at specified Tand P and what are the phase compositionsand phase amounts?

    A summary of two recent studies:

    CSAT(table look-up):

    Belkadi et al., Comparison of two methods for speeding up

    flash calculations in compositional simulations, SPE 142132

    compared with the shadow region method

    Reduced variables/reduction methods:

    Michelsen, M.L., Reduced variables - revisited, CEREDiscussion Meeting 2011

    compared with the conventional flash

  • 8/10/2019 19_18-10-2011_11-35_Presentation

    3/29

    3

    Blind calculations without a prioriinformation

    Two steps

    Stability analysis: whether the feed splits into two phases?

    Phase split: calculate the equilibrium compositions using theinitial estimates from the first step

    Old but robust, virtually no convergence problems

    More on safety than speed

    The phase of composition z is stable at the specified (T,P)if and only if the tangent plane distance (TPD)

    Conventional flash

    Michelsen, M. L. (1982a & b) Fluid Phase Equilibria 9: 119 & 21-40.

    Michelsen and Mollerup (2007) Thermodynamic models: Fundamentals and Computational Aspects

    ( )( )( ) ln ln ( ) ln ln 0i i i i ii

    tpd w w z = + w w z

  • 8/10/2019 19_18-10-2011_11-35_Presentation

    4/29

    4

    Compositional simulations where information from previouscalculations may be utilized (NF,x, tpd, )

    Distinction between different regions by TPD

    Shadow region method

    A. Unstable: one or twonegative TPD

    B. Just stable: one trivial andone non trivial TPD=0

    C. Single phase: one trivial andone non trivial TPD>0

    D. Single phase: only trivialsolutions

    Shadowregion

    Rasmussen et al. (2006) SPE Res Eval & Eng 9: 32 38.

    Michelsen and Mollerup (2007) Thermodynamic models: Fundamentals and Computational Aspects.

  • 8/10/2019 19_18-10-2011_11-35_Presentation

    5/29

    5

    CSP/CST/CSAT

    inspired by the 1D analytical solution of gas injectiona

    few key tie-lines in the solution path. CSP based table look-up approach to replace stability

    test/phase split

    Procedure

    Tie-line tables constructed either in advance or adaptively For a new feed z

    Compositional Space Adaptive

    Tabulation (CSAT) method

    Voskov and Tchelepi (2007) SPE 106029

    Voskov and Tchelepi (2008) Transport in Porous Media 75: 111128.

    2

    ( (1 ) )k k

    i i i

    iz y x +

  • 8/10/2019 19_18-10-2011_11-35_Presentation

    6/29

    6

    Only for phase split step to approximate flash results in two-phase region

    A unique distance for each tie-line

    Shortest distance ( ) from the feed z to tie-line k

    The corresponding is readily obtained as

    If ek for all the Mtie-lines in the table, flash thecomposition and update the tie-line table if it is two-phase.

    Tie-line Table Look-up (TTL)

    our implementation of CSAT

    ( )( )( ) = = + 2

    2( ) min 1k k k k i i ii

    e d z y x dk tie-line distance

    ( ) ( )

    ( ) ( )

    Tk k k

    Tk k k k

    =

    z x y x

    y x y x

    =k kd e

    Eq.(5)

  • 8/10/2019 19_18-10-2011_11-35_Presentation

    7/29

    7

    Gas injection systems tested

    System 1 System 2 System 3 System 4

    Oil 13-component oil Zick Oil 1* Zick Oil 2* Zick Oil 3*

    Gas 0.8 CO2+ 0.2 C1 Zick Gas 1* Zick Gas 2* Zick Gas 3*

    T(K) 375.00 358.15 358.15 358.15

    P (atm) 300 140 200 230

    EoS used SRK PR PR PR

    * 12-component fluid description from Jessen (2000) Ph.D. thesis or Orr (2007) GasInjection Processes.

    Tested with 1-D slimtube simulation with 500 cells

  • 8/10/2019 19_18-10-2011_11-35_Presentation

    8/29

    8

    Analysis of CSAT using System 1 The influence of number of tie-lines Mand the tolerance on

    simulation time and %skips of flash calculations

    Larger Mincreases simulation time and %skips Smaller increases simulation time but decreases %skips Sorting tie-lines gives limited help

    =10-4 =10-5 =10-6 =10-7

    M= 100 Time (sec) 4.2 7.0 7.1 7.1

    % skips 41% 0.1% 0.0% 0.0%

    M= 500 Time (sec) 2.0 18.1 21.2 21.5% skips 99.9% 10% 0.3% 0.2%

    M= 1000 Time (sec) 2.0 28.8 37.3 38.3

    % skips 99.9% 18% 0.9% 0.4%

    M= 5000 Time (sec) 2.0 66.4 134.8 157.2% skips 99.9% 64.7% 25.8% 7%

    Decreasing

    In

    creasing

    M

  • 8/10/2019 19_18-10-2011_11-35_Presentation

    9/29

    9

    Analysis of CSAT using System 1

    =10-4 not accurate; =10-6 or 10-7 too few skips. Higher Mrequires even smaller

    =10-4 =10-5 =10-6 =10-7

    M= 1000 Time (sec) 2.0 28.8 37.3 38.3

    % skips 99.9% 18% 0.9% 0.4%

  • 8/10/2019 19_18-10-2011_11-35_Presentation

    10/29

    10

    TTL with pre-calculated tie-lines

    (TTL-PRE) The tie-line table can be calculated in advance to reduce

    simulation time

    Use M = 20000 and = 10-8 to find the most frequently

    used tie-lines during the simulation.

    3 tie-lines are identified, accounting for 88% of hits

    Gas saturation Recovery

  • 8/10/2019 19_18-10-2011_11-35_Presentation

    11/29

    11

    System 1: simulation timesPVI=0.5 PVI=1.2

    Time

    (sec)

    Direct

    approximation in

    two-phase*

    Time

    (sec)

    Direct

    approximation

    in two-phase*

    Conventional/

    Full stability

    47.4 163.3

    TTL

    M=100, =10-5 7.0 0.1% 28.0 0.02%

    M=500,

    =10-6

    21.2 0.3% 91.6 0.06%M=1000, =10-6 37.3 0.9% 166.0 0.18%

    M=5000, =10-7 157.2 7% 731.5 1.5%

    TTL-PRE

    (three tielines)

    =10-4

    2.5 49% 6.4 63%=10-5 2.6 46% 6.5 61%

    =10-6 2.7 45% 8.5 60%

    =10-7 2.8 37% 10.1 22%

    Shadow region 3.2 10.9

    * Reported numbers are percentages of total flashes in two-phase region

  • 8/10/2019 19_18-10-2011_11-35_Presentation

    12/29

    12

    Just compare one tie-line in the same cell from a previousrigorous flash using tie-line distance.

    Procedure

    Tie-line Distance Based Approximation

    (TDBA)an alternative and simpler

    Calculate ek as before (only one)

    If e>, do new flash, and update the tie-line if it is two-phase

    If ee>10-4, use the previous results with adjustment

    ( )1i

    i

    i i old

    y

    y x

    =

    + ,i i new iv z = ( ), 1i i new il z =

    Option 1 (TDBA1): use old K values to solve Rachford-Rice Eq.

    Option 2 (TDBA2): use vapor split factors i to adjust directly

  • 8/10/2019 19_18-10-2011_11-35_Presentation

    13/29

    13

    System 1: simulation times

    * Reported numbers are percentages of total flashes in two-phase region

    PVI=0.5 PVI=1.2

    Time

    (sec)

    Approx. with

    adjustment

    in two-phase*

    Direct

    approximation

    in two-phase*

    Time

    (sec)

    Approx. with

    adjustment

    in two-phase*

    Direct

    approximation

    in two-phase*

    Conventional/

    Full stability

    47.4 163.3

    TTL-PRE

    (three tielines)

    =10-4 2.5 49% 6.4 63%

    =10

    -7

    2.8 37% 10.1 22%TDBA1

    =10-4 1.5 84% 11% 3.5 86% 12%

    =10-5 1.7 76% 11% 3.9 84% 11%

    =10-6 2.0 68% 8% 4.7 79% 10%

    =10-7 2.3 58% 7% 5.6 72% 10%

    TDBA2

    =10-4 1.4 84% 11% 3.2 85% 13%=10-5 1.7 77% 10% 3.7 83% 11%

    =10-6 2.0 67% 9% 4.4 78% 11%

    =10-7 2.3 59% 6% 5.3 73% 9%

    Shadow region 3.2 10.9

  • 8/10/2019 19_18-10-2011_11-35_Presentation

    14/29

    14

    Accurate solution

    TDBA1 =10-6

    TDBA1 =10-4

    TDBA1 =10-5

    TDBA1 =10-7

    Accurate solution

    TDBA1 =10-6

    TDBA1 =10-4

    TDBA1 =10-5

    TDBA1 =10-7

    Cell#

    Gassa

    turation

    PVI

    Recovery(%)

    TDBA1 results for System 1

  • 8/10/2019 19_18-10-2011_11-35_Presentation

    15/29

    15

    6-component gas injection simulated by PC-SAFT and SRK

    Speed-up 1: SPE 142995 (soliddashed )

    Speed-up 2: TDBA1 (dasheddash-dot)

    TDBAs potential : speeding upcomplicated EoSs

  • 8/10/2019 19_18-10-2011_11-35_Presentation

    16/29

    16

    Summary on approximation methods

    CSAT/TTL saves the time for rigorous flash but managing the tie-line table can be a significant overhead.

    The simulation time increases dramatically with the number

    of tie-lines used. Big tolerances lead to inaccurate results.

    TTL-PRE is better but gives limited speeding-up compared withthe shadow region algorithm.

    TDBA is simpler and cuts the simulation time by 1/3 to 1/2.

    The approximation methods may have potential to speed upsimulation with complicated EoSs.

  • 8/10/2019 19_18-10-2011_11-35_Presentation

    17/29

    17

    Reduced variables methodsbasics Solution procedure for equilibrium calculations with a cubic EoS

    where the matrix of BIPs is of low rank

    If all BIPs are zero, and

    Consequently, the vector of can be written as a linear combination of3 pre-calculated vectors, with ith elements 1, and bi. Sameapplies to the lnKi.

    ( )

    nRT A

    P V B V V B= +

    C

    i i

    i

    B b n= C C

    ij i j

    i j

    A a n n= (1 )ij ii jj ija a a k =

    ln i n a i b iC C A C b = + +

    2C

    i ii ij j

    j

    A a a n=

    2

    C

    i ij j

    ji

    AA a nn

    = =

    *ln i n a ii b iC C a C b = + +

    ln i

    iia

  • 8/10/2019 19_18-10-2011_11-35_Presentation

    18/29

    18

    A brief history First - to our knowledge - used 30 years ago by Michelsen and

    Heideman (1981) for critical point calculation

    Suggested for flash calculations by Michelsen (1986)

    Single nonzero BIP row/column, Jensen and Fredenslund (1987)

    Generalized for nonzero BIPs by Hendriks (1992)

    Extensively used in the generalized version for the last 20 years

    Its advantages first questioned in public by Haugen and Becknerin 2011 (SPE 141399)

  • 8/10/2019 19_18-10-2011_11-35_Presentation

    19/29

    19

    Arguments against reduced variables Essentially restricted to the cubic EOS

    Difficult to be formulated as unconstrained minimization problemsconsequently, less safe.

    More cumbersome composition derivatives

    The simple algebraic operations required to evaluateAi are today veryinexpensive (SIMD)

    Our experience: Effort of the conventional approach grows

    approximately linearly with C , not proportionally with C2

    or C3

    .

    A fair comparison between minimization based reduced variablesmethod and conventional flash requires substantial coding (perhapsmodest potential for improvement)

    But recent development by Nichita and Graciaa (2010) enabled anadaption to Michelsens existing code without extensive modifications!

  • 8/10/2019 19_18-10-2011_11-35_Presentation

    20/29

    20

    Reduced variables by spectral

    decomposition Consider the matrix P with elements Pij=1-kij. We calculate the

    spectral decomposition

    where is the kth eigenvalue of P and u the correspondingeigenvector. The eigenvalues are numbered in decreasing

    magnitude. Assume now that the eigenvalues are negligible for k> Mwhere M >

  • 8/10/2019 19_18-10-2011_11-35_Presentation

    21/29

    21

    Contd We then get and

    and with

    Net results

    Vector of : Linear combination of 2m + 3 vectors

    Results identical to full approach

    Computational effort reduced from C2 to 2CMplus overhead!

    Successive substitution

    Conventional implementation, where the reduction method is onlyimplemented to calculateAi

    Acceleration as usual

    No effect on convergence behavior

    Used for stability analysis, as well as for phase split

    1

    MT

    k k k

    k

    =

    = P u u1 1

    M M

    ij k ii ik jj jk k ik jk

    k k

    a a u a u e e = =

    = =

    1 1 1 1

    2 2C M C M

    i ij j k ik jk j k ik

    k k j k

    A a n e e n d e= = = =

    = = = 1

    2C

    k k jk j

    j

    d e n=

    =

    ln i

  • 8/10/2019 19_18-10-2011_11-35_Presentation

    22/29

    22

    Second order Gibbs energy minimization

    Independent variables c1, c2, , and cM+2 Gradient

    or

    where is vapor moles iand (from Rachford-Rice equation)

    Hessian

    Wij looks complex to calculate, but simple algebraic expressions for theelements can be derived.

    iv

    2

    1

    lnM

    i l il

    l

    K c e+

    =

    = , 1 1i Me + = , 2i M ie b+ =

    1

    Ci

    ij i j

    vG G

    c v c=

    =

    c=g Wg

    c TH WHW

    /ij i j

    W v c=

  • 8/10/2019 19_18-10-2011_11-35_Presentation

    23/29

    23

    Procedure for the 2nd

    order minimization

    Calculate the K-factors from c

    Solve the Rachford-Rice equation to get vi Calculate conventional gradient and Hessian

    Calculate transformation matrix W

    Calculate c-based gradient and Hessian

    Calculate corrected c using trust-region approach

    Similar procedure for Stability Analysis

    How does it compare to the classic approach?

  • 8/10/2019 19_18-10-2011_11-35_Presentation

    24/29

    24

    Alternative simplification: sparse k

    where

    and

    Uses approximately 2mCmultiplications.

    1

    (1 ) ( )C

    ii jj ij j ii i

    j

    a a k n a S S =

    =

    1

    C

    jj j

    j

    S a n=

    =

    1

    1

    C

    jj ij j

    j

    i m

    jj ij j

    j

    a k n i mS

    a k n i m

    =

    =

    = >

  • 8/10/2019 19_18-10-2011_11-35_Presentation

    25/29

    25

    Test examples Example 1Modified SPE3 with 9 components. Modified such that

    all kij = 0 for i > 3, j > 3. Non-zero interaction coefficients for N2,CO2 and CH4.

    Example 2Removal of N2 and CO2. Only CH4 has nonzero BIPs.Phase diagram largely unmodified, as the content of the removedspecies was small. Only 5 variables in the reduced case!

    In both tests, the mixture was expanded to 27 or 25 componentsby subdividing the last species.

    One million flash calculations in an equidistant 1000 by 1000 grid in

    Tand P. All calculations are blind. About 60% two-phase.

  • 8/10/2019 19_18-10-2011_11-35_Presentation

    26/29

    26

    Test example 1

  • 8/10/2019 19_18-10-2011_11-35_Presentation

    27/29

  • 8/10/2019 19_18-10-2011_11-35_Presentation

    28/29

    28

    Summary on reduced variables Modest effect of increasing C: Linear, but less than proportional

    No advantage of reduction methods over alternatives

    Fastest result: utilize sparsity of BIP-matrix

    Computing times are in general very implementation dependent

    Other implementations of reduction methods might be more efficientthan the one used here.

    To be convincing, they should be able to beat the current computingtimes.

  • 8/10/2019 19_18-10-2011_11-35_Presentation

    29/29

    29

    Acknowledgment

    Danish Council for Technologyand Production Sciences