Cours BO 2014.Pdf1

download Cours BO 2014.Pdf1

of 25

Transcript of Cours BO 2014.Pdf1

  • 8/12/2019 Cours BO 2014.Pdf1

    1/25

    Simulation of oil recovery with miscible gas injection

    using a black oil model

    R. Masson

    04/06/2014

    http://find/http://goback/
  • 8/12/2019 Cours BO 2014.Pdf1

    2/25

    1 Black oil model

    2 Discretization of Black Oil models

    3 Solution of the discrete system of equations

    http://find/
  • 8/12/2019 Cours BO 2014.Pdf1

    3/25

    Motivations of compositional two phase oil gas models

    Saturated or under saturated oil reservoirs: volatile HydrocarbonComponents (HC) evaporate with pressure drop

    Oil recovery by miscible gas injection

    Gas condensate reservoirs: liquid phase appears with pressure drop

    http://find/
  • 8/12/2019 Cours BO 2014.Pdf1

    4/25

    Black Oil Model: definition

    Two phases: oil and gasTwo components: heavy HC (h), and light HC: (l)

    The light component can dissolve into the oil phase

    The heavy component cannot evaporate into the gas phase

    http://find/
  • 8/12/2019 Cours BO 2014.Pdf1

    5/25

    Black Oil Model: conservation equations

    t

    o (1 c) So

    +div

    (1 c) o

    kr,o(So)

    o Vo

    = 0,

    to c So +g Sg+ divc o kr,o(So)

    o Vo

    + div

    g kr,g(Sg)

    g Vg

    = 0,

    Vo = KP og

    , Vg = K

    P gg

    ,

    So + Sg = 1.

    Oil phase properties: o(P, c), o(P, c)

    Gas phase properties: g(P), g(P)

    http://find/
  • 8/12/2019 Cours BO 2014.Pdf1

    6/25

    Black Oil Model: thermodynamical equilibrium

    If the oil and gas phases are both present, the thermodynamical equilibriumimposes that c= c(P).

    Sg (c(P) c) = 0,Sg 0,

    (c(P) c) 0.

    http://find/
  • 8/12/2019 Cours BO 2014.Pdf1

    7/25

    Black Oil Model

    t

    o(P, c) (1 c) So

    +div

    (1 c) o(P, c)

    kr,o(So)

    o(P,c)Vo

    = 0,

    t

    o(P, c) c So +g(P) Sg

    +div

    c o(P, c)

    kr,o(So)

    o(P,c) Vo

    + div

    g(P)

    kr,g(Sg)

    g(P) Vg

    = 0,

    Vo = KP o(P, c)g

    , Vg = K

    P g(P)g

    ,

    So + Sg = 1,Sg (c(P) c) = 0,Sg 0,(c(P) c) 0.

    Remarks:

    Only one set of unknowns P, So, Sg, cand equations because the oil phaseis always present.

    No flash needed.

    http://find/
  • 8/12/2019 Cours BO 2014.Pdf1

    8/25

    Black Oil Model: Bo, Bg and Rs

    Bo

    = Vo

    Vo,h,s=

    h,s

    o(P, c) (1 c), B

    g=

    Vg

    Vg,l,s=

    l,s

    g(P)

    Rs= Vo,l,s

    Vo,h,s=

    1 c

    c

    l,s

    h,s

    h,s and l,sare the oil and gas densities at surface conditions. T is fixed.

    http://find/
  • 8/12/2019 Cours BO 2014.Pdf1

    9/25

    Black Oil Model: phase properties in terms ofBo, Bg andRs

    Bo(P), Rs(P), o

    (P) are given at equilibrium (saturated oil).Bg(P) and

    g(P) are given.

    For saturated oil (c= c(P) orP=Pb(c))and undersaturated oil (c< c(P) orP>Pb(c))

    Bo(P, Pb) = Bo(Pb) + cBo(P Pb), o(P, Pb) = o(Pb) + co(P Pb)

    o(P, c) = h,s

    (1 c) Bo(Pb(c)) + cBo(P Pb(c)),

    o

    (P, c) = o

    (Pb(c)) + co(P Pb(c)),c(P) =

    l,s

    h,s Rs(P) +l,s,

    Pb(c) = c1(c),

    g(P) = l,s

    Bg(P).

    http://find/
  • 8/12/2019 Cours BO 2014.Pdf1

    10/25

    Discretization of Black Oil model: 2D fivespots test case

    2D horizontal reservoir with 4 gas injectors at the corners and 1 producerat the center.Prescribed pressures Pinj for the injection wells and Pprod for theproduction wellInitial state: under saturated oil at Pprod

  • 8/12/2019 Cours BO 2014.Pdf1

    11/25

    Discretization of Black Oil model: diffusion fluxes andupwinding (without gravity)

    Diffusion fluxes (without gravity for simplicity)

    Fint1(), = F

    int2(),

    =Tint p1() p2(), int,Fprodw = WIprodw

    pprod(w) pprodw

    , w prod,

    Finjw = WIinjw

    pinj(w) p

    injw

    , w

    inj,

    Upwinding (without gravity): for all int

    up() =

    1() = si Fint1(), >0,

    2() = si Fint1(),

    0.

    Five Spots example: prod = one producer, inj = the four injectors.

    Di i i f Bl k Oil M d l di

    http://find/
  • 8/12/2019 Cours BO 2014.Pdf1

    12/25

    Discretization of Black Oil Model: discrete system(without gravity)

    Heavy HC residual

    Rh,

    = o(P

    , c

    ) So

    (1 c

    ) mn1h, ||

    t

    +

    int

    (1 cup()) o(Pup(), cup())

    kro(Soup()

    )

    o(Pup(), cup()) Fint,

    +

    wprod|prod(w)=

    o(P, c) (1 c) kro(So)

    o(P, c)

    Fprodw

    + = 0,

    Di i i f Bl k Oil M d l di

    http://find/
  • 8/12/2019 Cours BO 2014.Pdf1

    13/25

    Discretization of Black Oil Model: discrete system(without gravity)

    Light HC residual

    Rl, =

    o(P, c) So c+

    g(P) Sg m

    n1l,

    ||t

    + int

    cup() o(Pup(), cup())

    kro(Soup()

    )

    o

    (Pup(), cup())

    Fint,

    +

    int

    g(Pup())krg(S

    g

    up())

    g(Pup()) Fint,

    +

    wprod|prod(w)=

    c

    o(P, c) kro(So)

    o(P, c)+g(P)

    krg(Sg )

    g(P)

    Fprodw

    += 0,

    + winj|inj(w)=

    g(Pinjw

    ) krg(1)

    g(Pinj

    w)Finjw

    = 0,

    Di i i f Bl k Oil M d l di

    http://find/
  • 8/12/2019 Cours BO 2014.Pdf1

    14/25

    Discretization of Black Oil Model: discrete system(without gravity)

    Local closure laws (volume conservation an thermodynamical equilibrium)

    So

    + Sg

    = 1,

    Sg (c(P) c) = 0,

    Sg 0,

    (c(P) c) 0.

    http://find/
  • 8/12/2019 Cours BO 2014.Pdf1

    15/25

    Discretization of Black Oil Model: Newton type algorithm

    The oil phase is always present in all cells (Sor >0)

    Gas phase indicator for all cell K

    I = 1 if gas phase is present0 if gas phase is absent

    Given I for all cells, the closure laws are eliminated at the non linear level: ifI= 1 : S

    o = 1 S

    g , c = c(P),

    ifI= 0 : Sg = 0, S

    o = 1,

    the unknowns X for the Newton linearization depend on I for all cells:

    ifI= 1 : X =

    P, S

    g

    ,

    ifI= 0 : X =

    P, c

    .

    S l ti f th di t t f ti N t t

    http://find/
  • 8/12/2019 Cours BO 2014.Pdf1

    16/25

    Solution of the discrete system of equations: Newton typealgorithm

    The conservation equations are linearized with respect to the set of

    unknownsX =

    X

    K

    taking into account the previous elimination of

    the closure laws for a given I:

    R(X) =

    Rh,(X)

    Rl,(X)

    R= RK, dX = RX

    1

    R

    On each cell update of the unknowns P, S, c and of the Gas phaseindicatorI to satisfy the inequality constraints S

    g 0 and c c(P),

    K.

    http://find/
  • 8/12/2019 Cours BO 2014.Pdf1

    17/25

    Solution of the discrete system of equations: algorithm

    P= (P)K

    , I= (I)K

    , S= (S =Sg

    )K

    ,c= (c)K

    .

    R=

    Rh,, Rl,

    K

    .

    Initialization ofP=P0,I= I0, S=S0, c=c0 and t at t= 0.

    Time loop: while t then Restart the time step: t= tt,

    t= t/2, P= P0,I=I0,S= S0, c= c0

    Else new time step: update t

    and setP

    0

    =P

    ,I

    0

    =I,S

    0

    =S

    ,c

    0

    =c

    Solution of the discrete system of equations: update of

    http://find/
  • 8/12/2019 Cours BO 2014.Pdf1

    18/25

    Solution of the discrete system of equations: update ofP, S, c andI

    dX = J1 R

    Newton update: for = 1, , N:

    P P+ dX(21),ifI = 1 then S S+ dX(2), c = c(P)else c c+ dX(2), S = 0.

    Gas phase indicator update: for = 1, , N:IfI = 1 then

    ifS < 0 thenI 0, S 0, c c(P)

    else ifS > 1Sor thenS 1 Sor,

    Else ifI = 0 then

    ifc > c(P) then

    I 1, S 0, c c(P)

    Solution of the discrete system of equations: computation

    http://find/
  • 8/12/2019 Cours BO 2014.Pdf1

    19/25

    Solution of the discrete system of equations: computationof the residual R(P, S, c,P0, S0, c0, t)

    numbering of the cells: = 1, , N

    numbering of the equations:

    Rh R(2k 1), = 1, , N

    Rl

    R(2

    k)

    , = 1

    ,

    , N

    Loop on cells = 1, , N

    o = o(P, c),

    g = g(P),

    R(2 1) R(2 1) +

    o (1S) (1c)o(P0,c0) (1S0) (1c0)

    ||

    t

    R(2) R(2) +

    o

    (1S) c+g S

    o(P0,c0

    ) (1S0

    ) c0g(P0

    ) S0

    ||

    t

    Solution of the discrete system of equations: computation

    http://find/
  • 8/12/2019 Cours BO 2014.Pdf1

    20/25

    Solution of the discrete system of equations: computationof the residual R(P, S, c,P0, S0, c0, t)

    Loop on interior faces:

    Fh = (1 cup()) oup()

    kro(1Sup())

    o Fint1(),

    Fl =

    cup() oup()

    kro(1Sup())

    o +g

    up()

    krg(Sup())

    g

    Fint1(),

    R(21() 1) R(21() 1) + Fh

    R(22() 1) R(22() 1) Fh

    R(21()) R(21()) + FlR(22()) R(22()) F

    l

    Solution of the discrete system of equations: computation

    http://find/
  • 8/12/2019 Cours BO 2014.Pdf1

    21/25

    Solution of the discrete system of equations: computationof the residual R(P, S, c,P0, S0, c0, t)

    Loop on injector wells w:

    R(2inj(w)) R(2inj(w)) +g(Pinj

    w)

    krg(1)

    gFinj

    w

    Producer well w

    R(2prod(w) 1) R(2prod(w) 1) +

    o (1 c)

    kro(1S)o F

    prodw

    +

    R(2prod(w)) R(2prod(w)) +

    c o kro(1S)

    o +g krg(S)g

    Fprodw

    +

    Solution of the discrete system of equations: Newton

    http://find/
  • 8/12/2019 Cours BO 2014.Pdf1

    22/25

    Solution of the discrete system of equations: Newton

    linearization R(X) +

    RX

    dX = 0

    Unknowns numbering for the Newton linearization: = 1, , N

    dX(2 1) = dP,

    dX(2) =

    dS if I = 1,

    dc if I = 0.

    Notation X1, X2

    =

    P, S

    if I= 1 c= c(P),

    P, c

    if I= 0 S= 0.

    Derivatives: example ofo

    (P, c):

    o

    X1 =o

    P(P, c) +

    o

    c (P, c)

    c

    P(P)I +

    oP

    (P, c)

    (1 I)

    o

    X2 = o

    c (P, c)(1 I)

    Solution of the discrete system of equations: Newton

    http://find/
  • 8/12/2019 Cours BO 2014.Pdf1

    23/25

    Solution of the discrete system of equations: Newton

    linearization R(X) +

    RX

    dX = 0

    Jacobian: example of the accumulation term for Rh:o (1 S) (1 c)

    o(P0, c0) (1 S

    0) (1 c

    0)||

    t

    Loop on cells

    J(2 1, 2 1) J(2 1, 2 1) +I

    o (1 S)

    cP

    (P)

    +(1 S) (1 c)

    o

    P(P, c) +

    o

    c(P, c)

    cP

    (P)

    ||t

    +(1 I)oP(P, c) (1 S) (1 c)

    ||t

    J(2 1, 2) J(2 1, 2) +I

    o (1 c)

    ||t

    +(1 I)

    o

    c(P, c) (1 S) (1 c)

    o (1 S)

    ||t

    Solution of the discrete system of equations: Newton

    http://find/
  • 8/12/2019 Cours BO 2014.Pdf1

    24/25

    Solution of the discrete system of equations: Newton

    linearization R(X) +

    RX

    dX = 0

    Jacobian: example of the interior face flux term:

    Fh = (1 cup()) oup()

    kro(1Sup())

    o Fint1(),

    Loop on interior faces : 1 =1(), 2 =2(), up=up()

    Gh = (1 cup) oup

    kro(1Sup )

    o

    J(21 1, 21 1) J(21 1, 21 1) + Gh T

    int

    J(22 1, 22 1) J(22 1, 22 1) + Gh T

    int

    J(21 1, 22 1) J(21 1, 22 1) Gh T

    int

    J(22 1, 21 1) J(22 1, 21 1) Gh Tint

    to be continued ...

    Solution of the discrete system of equations: Newton

    http://find/
  • 8/12/2019 Cours BO 2014.Pdf1

    25/25

    y q

    linearization R(X) +

    RX

    dX = 0

    suite of the interior flux term Fh

    =I

    (1 cup)

    o

    P(Pup , cup) + (1 cup)

    o

    c(Pup , cup)

    cP

    (Pup)

    cP

    (Pup)oup

    + (1 I) (1 cup)

    o

    P(Pup , cup)

    kro(1Sup )

    o Fint1,

    = I

    (1cup )oup

    okroS

    ((1 Sup)

    Fint1,

    +(1 I)oup + (1 cup)

    o

    c(Pup , cup)

    kro(1Sup )

    o Fint1,

    J(21 1, 2up 1) J(21 1, 2up 1) +J(22 1, 2up 1) J(22 1, 2up 1) J(21 1, 2up) J(21 1, 2up) +J(22 1, 2up) J(22 1, 2up)

    to be continued for all remaining terms of the Jacobian ...

    http://find/