Page 244 - Separation process engineering
P. 244

q = Cells(5, 4).Value
                          LoverD = Cells(5, 6).Value
                          zA = Cells(4, 2).Value
                          zB = Cells(4, 4).Value
                          zC = Cells(4, 6).Value
                          fracBdist = Cells(6, 3).Value
                          fracCbot = Cells(6, 6).Value
                          fracAdist = Cells(7, 4).Value
                          epsilon = Cells(4, 8).Value

                          N = Cells(5, 8).Value
                          df = Cells(6, 8).Value
                         ' The For loop (most of remainder of program) is to obtain
                         convergence of guess of
                         ' fractional recovery of A in distillate.
                         For j = 1 To N
                         ' Calculate compositions and flow rates based on latest calculated
                         value of frac
                         ' recovery of A in distillate.
                          DxA = F * zA * fracAdist
                          DxB = F * zB * fracBdist
                          DxC = F * zC * (1 - fracCbot)
                          BxA = F * zA * (1 - fracAdist)

                          BxB = F * zB * (1 - fracBdist)
                          BxC = F * zC * fracCbot
                          D = DxA + DxB + DxC
                          B = BxA + BxB + BxC
                          xAdist = DxA / D
                          xBdist = DxB / D
                          xCdist = DxC / D
                          xAbot = BxA / B
                          xBbot = BxB / B
                          xCbot = BxC / B
                          L = LoverD * D
                          V = L + D
                          LoverV = L / V
                          Lbar = L + q * F
                          Vbar = Lbar - B
                          LbaroverVbar = Lbar / Vbar

                         ' Record values of flowrates and mole fractions on spreadsheet.
                          Cells(8, 2) = D
                          Cells(8, 4) = B
                          Cells(8, 6) = LoverV
                          Cells(8, 8) = LbaroverVbar
                          Cells(9, 2) = xAdist
                          Cells(9, 4) = xBdist
                          Cells(9, 6) = xCdist
                          Cells(10, 2) = xAbot
   239   240   241   242   243   244   245   246   247   248   249