\( \DeclareMathOperator{\abs}{abs} \newcommand{\ensuremath}[1]{\mbox{$#1$}} \)
(%i1) kill(all)$

analytical method : binary distillation
[email protected],05/04/2017
part2:stripping-section 'operating line'

alpha :constant relative volatility

(%i1) assume(alpha >= 1);
\[\tag{\%{}o1}\label{o1} [\alpha\mbox{\ensuremath{\ensuremath{>}}=}1]\]

p1:hyperbole       : equilbrium equation.
p2:linear equation : operating line.

(%i3) p1:y=(alpha*x)/(1+(alpha-1)*x);
p2:y=m*x+b;
\[\tag{p1}\label{p1}y=\frac{\alphax}{\left( \alpha-1\right) x+1}\] \[\tag{p2}\label{p2}y=mx+b\]

removes (p1,p2),solve for x

(%i5) p3:ratsimp(rhs(p1)-rhs(p2))=0;
p4:(-1)*num(part(p3,1))=0;
\[\tag{p3}\label{p3}-\frac{\left( \alpha-1\right) m\,{{x}^{2}}+\left( m+\left( \alpha-1\right) b-\alpha\right) x+b}{\left( \alpha-1\right) x+1}=0\] \[\tag{p4}\label{p4}\left( \alpha-1\right) m\,{{x}^{2}}+\left( m+\left( \alpha-1\right) b-\alpha\right) x+b=0\]
(%i8) p5:coeff(part(p4,1),x^2);
p6:coeff(part(p4,1),x);
p7:ev(part(p4,1),x=0);
\[\tag{p5}\label{p5}\left( \alpha-1\right) m\] \[\tag{p6}\label{p6}m+\left( \alpha-1\right) b-\alpha\] \[\tag{p7}\label{p7}b\]

solve : quadratic equation ,two roots.

(%i10) p8:float(solve([p4], [x])[1]);
p9:float(solve([p4], [x])[2]);
\[\tag{p8}\label{p8}x=-\frac{1.0\left( \sqrt{{{m}^{2}}+\left( \left( 2.0-2.0\alpha\right) b-2.0\alpha\right) m+\left( {{\alpha}^{2}}-2.0\alpha+1.0\right) \,{{b}^{2}}+\left( 2.0\alpha-2.0{{\alpha}^{2}}\right) b+{{\alpha}^{2}}}+m+\left( \alpha-1.0\right) b-1.0\alpha\right) }{\left( 2.0\alpha-2.0\right) m}\] \[\tag{p9}\label{p9}x=\frac{\sqrt{{{m}^{2}}+\left( \left( 2.0-2.0\alpha\right) b-2.0\alpha\right) m+\left( {{\alpha}^{2}}-2.0\alpha+1.0\right) \,{{b}^{2}}+\left( 2.0\alpha-2.0{{\alpha}^{2}}\right) b+{{\alpha}^{2}}}-1.0m+\left( 1.0-1.0\alpha\right) b+\alpha}{\left( 2.0\alpha-2.0\right) m}\]
(%i13) m:0.501;
b:0.43;
alpha:5.5;
\[\tag{m}\label{m}0.501\] \[\tag{b}\label{b}0.43\] \[\tag{alpha}\label{alpha}5.5\]

y=x ,45 degree line.'ref line'

(%i14) p10:y=x;
\[\tag{p10}\label{p10}y=x\]
(%i17) p11:part(p1,2)$
p12:part(p10,2)$
p13:part(p2,2)$
(%i18) plot2d([p11,p12,p13],
    [x,-.5,1.3],[y,-.5,1.3],
[plot_format, gnuplot])$
\[\mbox{}\\\mbox{plot2d: some values were clipped.}\]

x=zf =.4 : feed of tower ? yf value for zf

(%i20) p14:zf=0.4;
p15:yf=m*part(p14,2)+b;
\[\tag{p14}\label{p14}\mathit{zf}=0.4\] \[\tag{p15}\label{p15}\mathit{yf}=0.6304000000000001\]
(%i22) p141:part(p14,2);
p151:part(p15,2);
\[\tag{p141}\label{p141}0.4\] \[\tag{p151}\label{p151}0.6304000000000001\]

xb < zf : b=bottom 'tower'

(%i24) p16:xb=0.2;
p17:yb=part(p16,2);
\[\tag{p16}\label{p16}\mathit{xb}=0.2\] \[\tag{p17}\label{p17}\mathit{yb}=0.2\]
(%i26) p161:part(p16,2);
p171:part(p17,2);
\[\tag{p161}\label{p161}0.2\] \[\tag{p171}\label{p171}0.2\]

line (zf,yf)-(xb,yb)

(%i27) p18:y=p151+((p171-p151)/(p161-p141))*(x-p141);
\[\tag{p18}\label{p18}y=2.152\left( x-0.4\right) +0.6304000000000001\]
(%i28) p181:part(p18,2);
\[\tag{p181}\label{p181}2.152\left( x-0.4\right) +0.6304000000000001\]
(%i29) plot2d([p11,p12,p13,p181],
    [x,-.5,1.3],[y,-.5,1.3],
[plot_format, gnuplot])$
\[\mbox{}\\\mbox{plot2d: some values were clipped.}\mbox{}\\\mbox{plot2d: some values were clipped.}\]

intersection'magenta line' and 'blue curve'
symbolic: y = m1*x+b1

(%i30) p19:y=m1*x+b1;
\[\tag{p19}\label{p19}y=\mathit{m1}x+\mathit{b1}\]
(%i32) p20:ratsimp(rhs(p1)-rhs(p19))=0;
p21:(-1)*num(part(p20,1))=0;
\[\tag{p20}\label{p20}-\frac{\left( \alpha-1\right) \,\mathit{m1}\,{{x}^{2}}+\left( \mathit{m1}+\left( \alpha-1\right) \,\mathit{b1}-\alpha\right) x+\mathit{b1}}{\left( \alpha-1\right) x+1}=0\] \[\tag{p21}\label{p21}\left( \alpha-1\right) \,\mathit{m1}\,{{x}^{2}}+\left( \mathit{m1}+\left( \alpha-1\right) \,\mathit{b1}-\alpha\right) x+\mathit{b1}=0\]
(%i35) p22:coeff(part(p21,1),x^2);
p23:coeff(part(p21,1),x);
p24:ev(part(p21,1),x=0);
\[\tag{p22}\label{p22}\left( \alpha-1\right) \,\mathit{m1}\] \[\tag{p23}\label{p23}\mathit{m1}+\left( \alpha-1\right) \,\mathit{b1}-\alpha\] \[\tag{p24}\label{p24}\mathit{b1}\]
(%i37) p25:float(solve([p21], [x])[1]);
p26:float(solve([p21], [x])[2]);
\[\mbox{}\\\mbox{rat: replaced -5.5 by -11/2 = -5.5}\mbox{}\\\mbox{rat: replaced 4.5 by 9/2 = 4.5}\mbox{}\\\mbox{rat: replaced 4.5 by 9/2 = 4.5}\] \[\tag{p25}\label{p25}x=-\frac{0.05555555555555555\left( \sqrt{4.0{{\mathit{m1}}^{2}}+\left( -36.0\mathit{b1}-44.0\right) \,\mathit{m1}+81.0{{\mathit{b1}}^{2}}-198.0\mathit{b1}+121.0}+2.0\mathit{m1}+9.0\mathit{b1}-11.0\right) }{\mathit{m1}}\mbox{}\\\mbox{rat: replaced -5.5 by -11/2 = -5.5}\mbox{}\\\mbox{rat: replaced 4.5 by 9/2 = 4.5}\mbox{}\\\mbox{rat: replaced 4.5 by 9/2 = 4.5}\] \[\tag{p26}\label{p26}x=\frac{0.05555555555555555\left( \sqrt{4.0{{\mathit{m1}}^{2}}+\left( -36.0\mathit{b1}-44.0\right) \,\mathit{m1}+81.0{{\mathit{b1}}^{2}}-198.0\mathit{b1}+121.0}-2.0\mathit{m1}-9.0\mathit{b1}+11.0\right) }{\mathit{m1}}\]

general equation : between two points (point1-point2)
point1 : (x1,y1)
point2 : (x2,y2)
m1=(y2-y1)/(x2-x1)
y=y1+m1*(x-x1) ⇒ m1=slope
b1=y1-m1*x1    ⇒ y=m1*x+b1

(%i39) p27:m1=(p151-p171)/(p141-p161);
p28:b1=p171-part(p27,2)*p161;
\[\tag{p27}\label{p27}\mathit{m1}=2.152\] \[\tag{p28}\label{p28}\mathit{b1}=-0.2304\]

intersection :   'purple line' and
'blue curve = equilibrium equation'
symbolic: y = m1*x+b1 : stripping 'operating line'

(%i41) p271:part(p27,2);
p281:part(p28,2);
\[\tag{p271}\label{p271}2.152\] \[\tag{p281}\label{p281}-0.2304\]

negative root: p25 (quadratic equation 'p21')

(%i42) p29:ev(part(p25,2),p27,p28);
\[\tag{p29}\label{p29}-0.04755135923748453\]

y value :'p29'

(%i43) p291:y=p271*p29+p281;
\[\tag{p291}\label{p291}y=-0.3327305250790668\]

stripping-line x<0 ,first point

positive root: p26 (quadratic equation 'p21')

(%i44) p30:ev(part(p26,2),p27,p28);
\[\tag{p30}\label{p30}0.5003394633267039\]

y value :'p30'

(%i45) p301:y=p271*p30+p281;
\[\tag{p301}\label{p301}y=0.8463305250790668\]

stripping-line x>0 ,second point


Created with wxMaxima.