N
ð0Þ
iÀC 4 H 10
¼ 0:0015 Ã V
in
ð0Þ
iÀC 4 H 10
=ðA MP Ã n elements
2
Þ ð3:9eÞ
N
ð0Þ
nÀC 4 H 10
¼ 0:0015 Ã V
in
ð0Þ
nÀC 4 H 10
=ðA MP Ã n elements
2
Þ ð3:9fÞ
N
ð0Þ
H 2 O ¼ 0:5 Ã V
in
ð0Þ
H 2 O =ðA MP Ã n elements
2
Þ
ð3:9gÞ
N
ð0Þ
H 2 S ¼ 0:5 Ã V
in
ð0Þ
H 2 S =ðA MP Ã n elements
2
Þ
ð3:9hÞ
N
ð0Þ
N 2
¼ 0:075 Ã V
in
ð0Þ
N 2
=ðA MP Ã n elements
2
Þ
ð3:9iÞ
N
ð0Þ
k6 ¼CO 2 ;CH 4 ;C 2 H 6 ;C 3 H 8 ;iC 4 H 10 ;nC 4 H 10 ;H 2 O;H 2 S;N 2
¼ 10
À4
à V
in
ð0Þ
k
Ä ðA MP Ã n elements
2
Þ ðk ¼ 1. . .ncÞ
ð3:9jÞ
T out
ð0Þ
V
¼ T
in
ð0Þ
V
À 5
ð3:9kÞ
T out
ð0Þ
L
¼ T
in
ð0Þ
V
À 15
ð3:9mÞ
[S5] Distributed permeation and energy balance calculations loop: The distributed model comprises n_elements
loops, starting from index m = 0 until (n_elements − 1).
The NRM is applied for the target equations of the current
MP element, described in Eqs. (3.10a) to (3.10c), which
represent the transmembrane molar fluxes of species k, and
the energy balance equations for retentate and permeate
streams, respectively. As the number of elements selected by
the user increases, the area of each membrane element
decreases, and the log mean approximates to the arithmetic
mean. Therefore, the log means of MPx-UOE algorithm
(DP
LN
k ; DT
LN
I ; DT
LN
E ; H k
) are valid in MPd-UOE for
n_elements < 10; for higher values, they are replaced by the
respective arithmetic means. This procedure is described by
Eqs. (3.10d) to (3.10k). Equations (3.10m) to (3.10r) are
applied to calculate the molar flow rates and molar compositions of outlet streams of the current element
(V
out
ðmÞ ; L
out
ðmÞ ; Y
out
ðmÞ ; X
out
ðmÞ ). The respective molar enthalpies (H
out
ðmÞ
V
and H
out
ðmÞ
L
) are obtained via flashðT
out
ðmÞ
V
;
P
out
ðmÞ
V
; Y
out
ðmÞ Þ and flashðT
out
ðmÞ
L
; P
out
ðmÞ
L
; X
out
ðmÞ Þ. The model
comprises a system of 7nc + 6 nonlinear equations Eqs.
(3.10a) to (3.10r), to be numerically solved by NRM for
7nc + 6 variables N
ðmÞ
k ; DP
LN
k ; T
out
ðmÞ
V
; T
out
ðmÞ
L
; DT
LN
I ; DT
LN
E ,
H k
h i; L
out
ðmÞ
k
; L
out
ðmÞ ; X
out
ðmÞ
k
; V
out
ðmÞ
k
, V
out
ðmÞ ; Y
out
ðmÞ
k
for each MP
element. After finding the NRM solution for the current
element, Eqs. (3.10s) to (3.10y) are applied to set parameters
and initial values for the next element as follows: (i) retentate and permeate streams from current element respectively
become main and second feed of the next element—Eqs.
(3.10s) to (3.10u); (ii) DT F of the next element is calculated
as the difference between the temperatures of the two feed
streams—Eq. (3.10v); and (iii) initial values for NRM of the
next element are set for N k ; T
out
V ; T
out
L
variables—Eqs.
(3.10x) to (3.10y). Then, the algorithm loops again for the
next m MP element.
For m = 0 to (n_ elements − 1)
NRM Block Begins
Target Equations:
N
ðmÞ
k
À P k DP
LN
k ¼ 0 ðk ¼ 1. . .ncÞ
ð 3:10aÞ
V
out
ðmÞ
H
out
ðmÞ
V
À V
in
ðmÞ
H
in
ðmÞ
V
À U E A E DT
LN
E þ U I A I DT
LN
I
þ
X nc
k¼1
N
ðmÞ
k A I
H k
h i ¼ 0
ð3:10bÞ
L
out
ðmÞ
H
out
ðmÞ
L
À L
in
ðmÞ
H
in
ðmÞ
L
À U I A I DT
LN
I
À
X nc
k¼1
N
ðmÞ
k A I
H k
h i ¼ 0
ð3:10cÞ
Auxiliary Equations:
If n_elements ! 10 then
DP
LN
k % DP
Arith:
k
¼
P
in
ðmÞ
V Y
in
ðmÞ
k
þ P
out
ðmÞ
V
Y
out
ðmÞ
k
À P
out
ðmÞ
L
X
out
ðmÞ
k
2
0
@
1
A
ðk ¼ 1. . .ncÞ
ð3:10dÞ
DT
LN
I
% DT
Arith:
I
¼
DT
ðmÞ
F þ ðT
out
ðmÞ
V
À T
out
ðmÞ
L
Þ
2
"
#
ð3:10eÞ
DT
LN
E % DT
Arith:
E
¼
ðT E À T
in
ðmÞ
V Þ þ ðT E À T
out
ðmÞ
V
Þ
2
"
#
ð3:10fÞ
H k
h i ¼
H
out
ðmÞ
V k
þ
H
in
ðmÞ
V k
2
ðk ¼ 1. . .ncÞ
ð3:10gÞ
Else
DP
LN
k ¼
P
in
ðmÞ
V Y
in
ðmÞ
k
À P
out
ðmÞ
V
Y
out
ðmÞ
k
À P
out
ðmÞ
L
X
out
ðmÞ
k
ln
P in ðmÞ
V
Y in ðmÞ
k
P out ðmÞ
V
Y out ðmÞ
k
ÀP out ðmÞ
L
X out ðmÞ
k
0
B
B
@
1
C
C
A
ðk ¼ 1. . .ncÞ
ð3:10hÞ
168
J. L. de Medeiros et al.
ð0Þ
iÀC 4 H 10
¼ 0:0015 Ã V
in
ð0Þ
iÀC 4 H 10
=ðA MP Ã n elements
2
Þ ð3:9eÞ
N
ð0Þ
nÀC 4 H 10
¼ 0:0015 Ã V
in
ð0Þ
nÀC 4 H 10
=ðA MP Ã n elements
2
Þ ð3:9fÞ
N
ð0Þ
H 2 O ¼ 0:5 Ã V
in
ð0Þ
H 2 O =ðA MP Ã n elements
2
Þ
ð3:9gÞ
N
ð0Þ
H 2 S ¼ 0:5 Ã V
in
ð0Þ
H 2 S =ðA MP Ã n elements
2
Þ
ð3:9hÞ
N
ð0Þ
N 2
¼ 0:075 Ã V
in
ð0Þ
N 2
=ðA MP Ã n elements
2
Þ
ð3:9iÞ
N
ð0Þ
k6 ¼CO 2 ;CH 4 ;C 2 H 6 ;C 3 H 8 ;iC 4 H 10 ;nC 4 H 10 ;H 2 O;H 2 S;N 2
¼ 10
À4
à V
in
ð0Þ
k
Ä ðA MP Ã n elements
2
Þ ðk ¼ 1. . .ncÞ
ð3:9jÞ
T out
ð0Þ
V
¼ T
in
ð0Þ
V
À 5
ð3:9kÞ
T out
ð0Þ
L
¼ T
in
ð0Þ
V
À 15
ð3:9mÞ
[S5] Distributed permeation and energy balance calculations loop: The distributed model comprises n_elements
loops, starting from index m = 0 until (n_elements − 1).
The NRM is applied for the target equations of the current
MP element, described in Eqs. (3.10a) to (3.10c), which
represent the transmembrane molar fluxes of species k, and
the energy balance equations for retentate and permeate
streams, respectively. As the number of elements selected by
the user increases, the area of each membrane element
decreases, and the log mean approximates to the arithmetic
mean. Therefore, the log means of MPx-UOE algorithm
(DP
LN
k ; DT
LN
I ; DT
LN
E ; H k
) are valid in MPd-UOE for
n_elements < 10; for higher values, they are replaced by the
respective arithmetic means. This procedure is described by
Eqs. (3.10d) to (3.10k). Equations (3.10m) to (3.10r) are
applied to calculate the molar flow rates and molar compositions of outlet streams of the current element
(V
out
ðmÞ ; L
out
ðmÞ ; Y
out
ðmÞ ; X
out
ðmÞ ). The respective molar enthalpies (H
out
ðmÞ
V
and H
out
ðmÞ
L
) are obtained via flashðT
out
ðmÞ
V
;
P
out
ðmÞ
V
; Y
out
ðmÞ Þ and flashðT
out
ðmÞ
L
; P
out
ðmÞ
L
; X
out
ðmÞ Þ. The model
comprises a system of 7nc + 6 nonlinear equations Eqs.
(3.10a) to (3.10r), to be numerically solved by NRM for
7nc + 6 variables N
ðmÞ
k ; DP
LN
k ; T
out
ðmÞ
V
; T
out
ðmÞ
L
; DT
LN
I ; DT
LN
E ,
H k
h i; L
out
ðmÞ
k
; L
out
ðmÞ ; X
out
ðmÞ
k
; V
out
ðmÞ
k
, V
out
ðmÞ ; Y
out
ðmÞ
k
for each MP
element. After finding the NRM solution for the current
element, Eqs. (3.10s) to (3.10y) are applied to set parameters
and initial values for the next element as follows: (i) retentate and permeate streams from current element respectively
become main and second feed of the next element—Eqs.
(3.10s) to (3.10u); (ii) DT F of the next element is calculated
as the difference between the temperatures of the two feed
streams—Eq. (3.10v); and (iii) initial values for NRM of the
next element are set for N k ; T
out
V ; T
out
L
variables—Eqs.
(3.10x) to (3.10y). Then, the algorithm loops again for the
next m MP element.
For m = 0 to (n_ elements − 1)
NRM Block Begins
Target Equations:
N
ðmÞ
k
À P k DP
LN
k ¼ 0 ðk ¼ 1. . .ncÞ
ð 3:10aÞ
V
out
ðmÞ
H
out
ðmÞ
V
À V
in
ðmÞ
H
in
ðmÞ
V
À U E A E DT
LN
E þ U I A I DT
LN
I
þ
X nc
k¼1
N
ðmÞ
k A I
H k
h i ¼ 0
ð3:10bÞ
L
out
ðmÞ
H
out
ðmÞ
L
À L
in
ðmÞ
H
in
ðmÞ
L
À U I A I DT
LN
I
À
X nc
k¼1
N
ðmÞ
k A I
H k
h i ¼ 0
ð3:10cÞ
Auxiliary Equations:
If n_elements ! 10 then
DP
LN
k % DP
Arith:
k
¼
P
in
ðmÞ
V Y
in
ðmÞ
k
þ P
out
ðmÞ
V
Y
out
ðmÞ
k
À P
out
ðmÞ
L
X
out
ðmÞ
k
2
0
@
1
A
ðk ¼ 1. . .ncÞ
ð3:10dÞ
DT
LN
I
% DT
Arith:
I
¼
DT
ðmÞ
F þ ðT
out
ðmÞ
V
À T
out
ðmÞ
L
Þ
2
"
#
ð3:10eÞ
DT
LN
E % DT
Arith:
E
¼
ðT E À T
in
ðmÞ
V Þ þ ðT E À T
out
ðmÞ
V
Þ
2
"
#
ð3:10fÞ
H k
h i ¼
H
out
ðmÞ
V k
þ
H
in
ðmÞ
V k
2
ðk ¼ 1. . .ncÞ
ð3:10gÞ
Else
DP
LN
k ¼
P
in
ðmÞ
V Y
in
ðmÞ
k
À P
out
ðmÞ
V
Y
out
ðmÞ
k
À P
out
ðmÞ
L
X
out
ðmÞ
k
ln
P in ðmÞ
V
Y in ðmÞ
k
P out ðmÞ
V
Y out ðmÞ
k
ÀP out ðmÞ
L
X out ðmÞ
k
0
B
B
@
1
C
C
A
ðk ¼ 1. . .ncÞ
ð3:10hÞ
168
J. L. de Medeiros et al.
