kill(all)$

part 2 : intro staged-process models ( problem model )
peter.vlasschaert@gmail.com,31/01/2017

problem :(n+1)= log(phi)/log(theta)

theta = L/(k*V)

1e)if log(theta)= 0 and log(phi)= value : (n+1) -> infinity    
     
2e)if log(theta)= 0 and log(phi)= 0     : (n+1) -> indeterminate   

   theta = 1 = L/(k*V)

eq1:phi1 = -(y[i+1]-x[0]*k)*theta-y[i+1]+y[1];
eq2:phi2 = x[0]*k-y[1];
eq3:phi = rhs(eq1)/rhs(eq2);
eq4:theta = L/(k*V);
eq: m = n+1;

indeterminate => L'Hopital rule = 0/0 = phi'/theta'

eq5:diff(rhs(eq3),theta,1);
eq6:diff(lhs(eq4),theta,1);
eq7:rhs(eq) = eq5/eq6;

cascade: plate :  distillation operation

1e) operating line       : y[i+1]=a*x[i]+b
2e) relative volatility  : alpha = y[i]/x[i]/((1-y[i])/(1-x[i]))

1e) operating line :

eq8:a = L/V;
eq9:b = y[1]-x[0]*L/V;

eq10:y[i+1]=rhs(eq8)*x[i]+rhs(eq9);

2e) relative volatility = alpha :

eq11:alpha = y[i]/x[i]/((1-y[i])/(1-x[i]));

eq12:solve(eq11,y[i])[1];

eq13:subst(i+1,i,eq12);

eq14:rhs(eq10)=rhs(eq13);

eq15:lhs(eq14)-rhs(eq14)=0;

total condenser : y[1]=x[0]

eq16:subst(x[0],y[1],eq15);

eq17:radcan(-(alpha*x[i+1])/((alpha-1)*x[i+1]+1)+(L*x[i])/V-(x[0]*L)/V+x[0]);

eq18:factor(part(eq17,1));
eq19:factor(part(eq17,2));

eq20:coeff(eq18,x[i]);
eq21:coeff(eq18,x[i+1]);
eq22:ev(eq18,x[i]=0,x[i+1]=0);

eq23:factor(ratsubst(t,x[i]*x[i+1],eq18));
eq24:coeff(eq23,t);
eq25:t=x[i+1]*x[i];

Ricatti : equation
part 3: How to solve Ricatti equation

x[i+1]*x[i]+A*x[i+1]+B*x[i]+C = 0

eq26: A = eq21/eq24;
eq27: B = eq20/eq24;
eq28: C = eq22/eq24;