Mixer
My Solutions >
Write a function called mixer which takes in the flows and compositions of 2 incoming streams (F1 and F2) with 3 components each (passed as vectors xs1 and xs2) and
computes the resulting mixture flow and compositions assuming no reaction occurs in the mixer. The function will be tested using at the 2 different incoming mixtures shown
below. A typical mixer unit operation is shown below:
F1, XA1, XB1, XC1
F2, XA2, XB2, XC2
Fout, XAout, XBout XCout
The material balance equations expressing conservation of mass are:
Overall (Total) Balance:
F1+F2-Four=0
Component Balance Species A:
XAIF1+XA2F2-XAourFout = 0
Component Balance Species B:
XB1F1+XB2F2-XBour Fout = 0
Component Balance Species C:
Xc1F1+XC2F2-XCourFout = 0
The resulting mathematical model is shown below:
F_{out} = F_1 + F_2
\frac{x_{A1}F_1 + x_{A2}F_2}{F_{out}}
\frac{x_{B1}F_1 + x_{B2}F_2}{F_{out}}
\frac{x_{C1}F_1 + x_{C2}F_2}{F_{out}}
Test incoming mixtures:
F? mol/s
Test 1
100
Test 2
247.82
XA1
0.2
0.298
XB1
0.3
0.541
XC1
0.4
0.161
F2 mol/s
50
182.91
XA2
0.8
0.561
XB2
0.15
0.124
XC2
0.05
0.315