140 likes | 328 Views
Research Update. Seon Kim Laboratory of Product and Process Design University of Illinois at Chicago Feb. 3 rd , 2011. Research Update. Separation case study 4 component mixtures separation network Testing 24 networks (18 non-sharp basic + 6 non basic)
E N D
Research Update Seon Kim Laboratory of Product and Process Design University of Illinois at Chicago Feb. 3rd, 2011
Research Update Separation case study • 4 component mixtures separation network • Testing 24 networks (18 non-sharp basic + 6 non basic) • Optimization of efficiency with genetic algorithm • Analyzing 24 networks with overall cost • 3 different system: ideal, nonideal without Azeotroph, and nonideal azeotropic mixture
Network Case study 18 basic networks + 6 non-basic network
Column profiles Ode15s (MATLAB) Dassl (Delphi) Aspen
Distillation flowsheet Delphi Code • Basic code TDesignSpec.net1_1; TMassBalance.AnyColumn; TAntoineClass.proc; TFindBoilingT.proc1; productT; InternalFlow; for sections:=0 to DesignVar.np-2 do begin ColumnProfileParameters(sections); PinchPointT_CPE; Tgrid_Preperation(sections); CompositionFinding; CompositionFinding_s; PolyApproximation_R; PolyApproximation_S; OverlappingTgrid(sections); PolyApp_OTWr; PolyApp_OTWs; OTWpoly; end; Polynomial approximation by Lagrange method Composition findings by DASSL solver Solve polynomial Find pinch point temperatures and compositions
Distillation flowsheet Delphi Code • Visualization with automation var xr,xs,Tr,Ts,minBPT : variant; …… xr:=Xcomp_r; xs:=Xcomp_s; Tr:=Tr_EN_array; Ts:=Ts_EN_array; MatApp:=CreateOleObject('matlab.application'); MatApp.PutWorkspaceData('xr','base',xr); …… MatApp.Execute('plot(Tr,xr(:,1))'); MatApp.Execute('hold on'); MatApp.Execute('plot(Tr,xr(:,2))'); …… MatApp.Execute('plot(Ts,xs(:,1))'); ……
Column profiles and pinch point • Column Profile Equation (Difference Point Equation) • Pinch point with 1D equation
Pinch Point Delphi Code • Pinch point Procedure PinchPointT_CPE; Var …… begin Tolx:=1e-8; Tolf:=1e-10; Tolfun:=1; MaxIter:=30; for indexP:=0 to DesignVar.nc-1 do begin T0:=FindMax(Tbp)+500; for i:=0 to MaxIter do begin df1:=Pinchfunc_CPE(T0+Tolx,indexP); df2:=Pinchfunc_CPE(T0-Tolx,indexP); df:=(df1-df2)/(2*Tolx); T1:=T0-Pinchfunc_CPE(T0,indexP)/df; Tolfun:=T1-T0; . . . end; function Pinchfunc_CPE(T0:double;……) Var …… Begin for i:=0 to DesignVar.nc-1 do begin k[i]:=power(10,(TAnt.A[i]-TAnt.B[i]/(T0+……) a[i]:=(Rdelta+1)*k[i]-Rdelta; …… if indexP=0 then begin …… else if indexP=1 then begin for i:=0 to DesignVar.nc-1 do result0:= Xdelta[i]*b/a[i]+result0; result:=(result0-b)/(T0-Tpinch[0]); end else if ……
Lagrange Polynomial • Lagrange Approximation • Estimation a missing function with known function values at neighboring points
Polynomial Approximation Delphi Code Procedure LagrangeApp(x,y:array of double;…… …… // Denominater for i1:=0 to length(y)-1 do begin y1:=1; xi[i1]:=x[i1]; for i2:=0 to length(y)-1 do if i1 <> i2 then y1:=(x[i1]-x[i2])*y1; yout[i1]:=y[i1]/y1; end; // Numerator for h:=0 to length(x)-1 do begin xout[h,0]:=1; xi[h]:=0; x1:=0; for i1:=0 to length(x)-1 do x1:=xi[i1]+x1; xout[h,1]:=x1; for i1:=0 to length(x)-1 do begin for i2:= i1+1 to length(x)-1 do x1:=xi[i1]*xi[i2]+x1; …… procedure PolyApproximation_R; …… while n<length(Tr_EN_array)-1 do begin for i:=0 to DesignVar.nr-1 do begin Tr1[i]:=Tr_EN_array[n]; for j:=0 to nc-1 do Xr[i,j]:=Xcomp_r[n,j]; n:=n+1; end; for i:=0 to nc-1 do begin for j:=0 to DesignVar.nr-1 do Xr1[j]:=Xr[j,i]; LagrangeApp(Tr1,Xr1,coeff); for k:=0 to length(coeff) - 1 do CoeffM_R[i,m,k]:=coeff[k]; end; n:=n-1; ……
Polynomial Approximation • Polynomial Approximation with Lagrange interpolation 3rd order approximation 4th order approximation
Distillation flowsheet Delphi Code • Root finding procedure OTWpoly; …… for i:=0 to length(CoeffM_R)-1 do begin for j:=0 to 2*DesignVar.nr-2 do OTWpolyM[j]:=0; for j:=0 to DesignVar.nc-1 do begin for k:=0 to DesignVar.nr-1 do begin OTWSubPoly[j,k]:=CoeffM_R[i,j,k]-CoeffM_S[length(CoeffM_S)-1-i,j,k]; OTWSubPoly0[k]:=CoeffM_R[i,j,k]-CoeffM_S[length(CoeffM_S)-1-i,j,k]; end; Convolution(OTWSubPoly0,OTWSubPoly0,OTWSubPoly1); for k1:=0 to 2*DesignVar.nr-2 do OTWpolyM[k1]:=OTWpolyM[k1]+OTWSubPoly1[k1]; end; PolyDerivative(OTWpolyM,dOTWpolyM); Zeros_Laguerre(dOTWpolyM); ......
Laguerre code procedure Zeros_Laguerre(P0:array of double); //take polynomial coeff array in order of a1+a2*x+a3*x^2+... …… begin // real coeffs -> complex coeffs. setlength(P,length(P0)); n:=length(P); for i:=0 to n-1 do begin P[i].Re:=P0[i]/P0[n-1]; P[i].Im:=0; end; …… // Root finding Algorithm while (cABS(aout)>aTol) and (Iter<=Maxiter) do begin Eval_func(x0,n,P,fval,dfval,d2fval); if (cabs(fval) < fTol) then break; g:=cFraction(dfval,fval); h:=cMinus(cMulti(g,g),cFraction(d2fval,fval)); a1:=rcFraction(n,cPlus(g,cSQRT(rcMulti(n-1,cMinus(rcMulti(n,h),cPower(g,2)))))); a2:=rcFraction(n,cMinus(g,cSQRT(rcMulti(n-1,cMinus(rcMulti(n,h),cPower(g,2)))))); ……