to DS
w
was always negative so that S
w
þ DS
w
a 1.0. The sign assigned to Dx
ib
was positive unless the mole fraction of either the organic or the alcohol in the wetting phase, or
the water or the alcohol in the non-wetting phase, approached the plait point. This would ensure that the
algorithms for calculating the equations of state received appropriate input compositions.
At the completion of each Newton iteration, the state of each cell is determined. To switch from a state of 1 to a state
of 2, either the composition of the single phase at that node must fall below the binodal curve and a second phase is
precipitated or, as mentioned above, the non-wetting phase invades that node from neighboring nodes. If the
switch is made due to precipitation of a second phase, the two new phases are assumed to be in equilibrium with an
overall composition equivalent to that of the original single phase.
To switch from a state of 2 to a state of 1 at a particular node, either the composition of the two bulk phases at that
node are miscible, or the wetting phase saturation is greater than 1 at the end of an iteration. If the switch is made due to
miscibility of the two phases, the composition of the new single phase is equal to the overall composition of the two
original phases. If the switch is made due to S
w Nþ1
s 1.0, the composition remains equal to the composition of wetting
phase found at the end of the iteration, and the wetting phase saturation is set equal to 1.0.
Adaptive time stepping in a formulation similar to Ref.
56
is used for calculation of the time increment at the present time step, Dt
Nþ1
, given by Dt
N þ 1
¼ Min
Dt
N
DS
T w
DS
max w
, Dt
N
Dx
T
Dx
max b
, C
1
Dt
N
14 where Dt
N
is the previous time step increment, DS
w T
is the target change in wetting phase saturation, DS
w max
is the maximum change in wetting phase saturation in the entire
domain from time step N ¹ 1 to time step N, Dx
T
is the target change in composition, Dx
b max
is the maximum change in composition in the entire domain from time
step N ¹ 1 to time step N expressed as a mole fraction, and C
1
is a constant greater than 1.0 that dictates the rate of time increment increase. Input target changes in saturation
and composition represent the desired maximum changes of these variables in the entire domain from one time step
to the next.
3.3 Boundary conditions
Incorporation of boundary conditions is completed using a method similar to Ref.
16
. The boundary conditions are imposed by adding sourcesink terms to the boundary
nodes. When the wetting phase pressure at the boundary node is constant, the boundary conditions are imposed by
adding the sourcesink terms to the water component mass balance equation in the wetting phase, as follows
q
1w ,
B
¼ W
1
P
p w
¹ P
w ,
B
x
1w ,
B
c
tw ,
B
15 where W
I
is a very large number, e.g. 10
20
, P
w
is the specified wetting phase pressure at the boundary node,
and subscript B indicates a boundary node. This ensures a very large number in the Jacobian matrix for change in
pressure at the boundary node. When the ‘‘correction’’ matrix is solved, the change in P
w,B
will be minimal. Note that all the pressures, saturations, mole fractions,
and molar densities in the boundary node sourcesink terms are implicit and updated with each Newton iteration.
For a constant composition at a boundary node, B, the sourcesink terms for that node are given by
q
ib ,
B
¼ W
I
x
p ib
¹ x
ib ,
B
c
tb
16 where x
ib
is the specified mole fraction of component i in phase b. Composition in the wetting phase, the non-wetting
phase, or in both phases may be specified at the boundary node using eqn 16. For the wetting phase, the mole frac-
tion of organic and alcohol would be specified and for the non-wetting phase, the mole fraction of water and alcohol
would be specified if the compositions in the respective phases are fixed.
When free exit boundary conditions are specified, the sourcesink terms for the wetting phase mass conservation
equations for the boundary nodes are given by q
iw ,
B
¼ ¹ Q
w ,
B
c
tw ,
B
x
iw ,
B
17 where Q
w,B
is a volume flux representing the amount of wetting phase leaving the domain at the boundary node, B.
For inflow Cauchy-type boundary conditions, the source sink terms for the wetting phase mass conservation
equations for the boundary nodes are given by q
iw ,
B
¼ ¹ Q
w ,
B
c
p tw
, B
x
p iw
, B
18 where c
tw,B
is the molar density of the wetting phase being injected at the boundary node, B, and x
iw,B
is the mole fraction of component i in the injected wetting phase.
The sourcesink terms for the non-wetting phase equations for the boundary nodes, when a free exit boundary
condition is specified, are given by q
inw ,
B
¼ ¹
Q
nw ,
B
c
tnw ,
B
x
inw ,
B
Q
nw ,
B
s 0 Q
nw ,
B
a 0 19
where Q
nw,B
is the volumetric flux of non-wetting phase from the nodes connected to the boundary node.
3.4 Solution of inter-phase mass transfer equations
The equations used for calculation of the inter-phase mass transfer are developed in Ref.
44
. A two-film model for mass transfer calculations is used. The compositions at the
interface between the two phases are assumed to be at equi- librium and diffusion is assumed to be the only mechanism
of mass transfer. Ref.
55
recommends using Newton– Raphson iteration for solution to the inter-phase mass
transfer equations. Molar flux from the wetting to the non- wetting phase is positive by convention. Considering a
Non-equilibrium alcohol flooding model for immiscible phase remediation: 2. Model development and application 667
two-phase, three-component
alcohol–water–organic system, the inter-phase mass transfer equations can be writ-
ten as a series of equations in the form Fx ¼ 0 to give two equations for the molar fluxes in the wetting phase
55
R
w
; c
tw
[ k
• w
] x
b w
¹ x
I w
þ N
t
x
b w
¹ N
¼ 20
where R
w
is the residual vector for the wetting phase inter-phase mass transfer equations, [k
w •
] is the finite flux mass transfer coefficient matrix,
x
b w
¹ x
I w
is the vector containing the differences in mole fractions of each com-
ponent in the bulk wetting phase and at the interface in the wetting phase, N
t
is the total molar flux, and N is the vector of molar fluxes. Two equations for the molar
fluxes in the non-wetting phase can be written as R
nw
; c
tnw
[ k
• nw
] x
I nw
¹ x
b nw
þ N
t
x
b nw
¹ N
¼ 21
where the corresponding variables are defined as above. The equation set is completed using equations of state.
The independent equations are ordered into a vector of functions F as follows modified after Ref.
55
F
T
¼ R
w 1
, R
w 2
, R
nw 1
, R
nw 2
22 The unknown variables corresponding to this set of
equations are ordered into a vector x as follows modified after Ref.
55
x
T
¼ N
1
, N
2
, N
3
, x
I p
23 where x
I
is one mole fraction at the interface. Note that for a Type 1 ternary system, the equilibrium composition of the
two phases are distinctly defined by the mole fraction of one component in one phase from which all other mole
fractions can be determined. The mole fraction at the inter- face, x
I
, has been chosen to be the mole fraction of water in the wetting phase at the interface, x
1w I
, in this work. The Newton–Raphson structure to eqn 20 and eqn 21
is given by ]F
1
]N
1
]F
1
]N
2
]F
1
]N
3
]F
1
]x
I 1w
]F
2
]N
1
]F
2
]N
2
]F
2
]N
3
]F
2
]x
I 1w
]F
3
]N
1
]F
3
]N
2
]F
3
]N
3
]F
3
]x
I 1w
]F
4
]N
1
]F
4
]N
2
]F
4
]N
3
]F
4
]x
I 1w
2 6
6 6
6 6
6 6
6 6
6 6
6 6
4 3
7 7
7 7
7 7
7 7
7 7
7 7
7 5
DN
1
DN
2
DN
3
Dx
I 1w
B B
B B
B 1
C C
C C
C A
¼ ¹ R
w 1
R
w 2
R
nw 1
R
nw 1
B B
B B
B 1
C C
C C
C A
24 The Jacobian terms in eqn 24 are calculated numerically.
Several terms in eqn 24 may be approximated as sug- gested by Ref.
55
to give x
b 1w
¹ 1
x
b 1w
x
b 1w
]F
1
=]x
I 1w
x
b 2w
x
b 2w
¹ 1
x
b 2w
]F
2
=]x
I 1w
x
b 1nw
¹ 1
x
w 1n
x
b 1nw
]F
2
=]x
I 1w
x
b 2nw
x
b 2nw
¹ 1
x
b 2nw
]F
2
=]x
I 1w
2 6
6 6
6 6
4 3
7 7
7 7
7 5
25 During development of the mass transfer algorithms, both
numerically determined and estimated Jacobian terms have been used for solution to eqn 20 and eqn 21. The com-
putational savings afforded by using the estimated Jacobian matrix were found to be offset by the additional iterations
required for convergence and decreased algorithm robust- ness for the three-component systems tested here. While
both methods may be used in the non-equilibrium model, all subsequent simulations shown here use the Jacobian
matrix given by eqn 24.
4 MODEL TESTING
Due to the complexity of physical phenomena occurring during an alcohol flood and the non-linear equations
required for numerical simulation of this system, only partial model verification can be accomplished. Partially
verification was carried out using exact analytical solutions for two-phase flow
33
and for mass transport.
21
In both cases, agreement between the numerical model and the analytical
solution was excellent. Both Cauchy-type inlet conditions and free exit boundary conditions were shown to be properly
solved.
4.1 Mass transfer algorithm testing using Lewis Cell simulations