資源描述:
《正交配置求解問題》由會(huì)員上傳分享,免費(fèi)在線閱讀,更多相關(guān)內(nèi)容在行業(yè)資料-天天文庫(kù)。
1、正交配置求解問題:運(yùn)用正交配置法求解有軸向擴(kuò)散的固定床反應(yīng)器中催化反應(yīng)的溫度和濃度分布。柱形固體床反應(yīng)器中催化反應(yīng)的溫度和濃度方程為:=+=+︱r=1=
2、r=0=0-
3、r=1=Biw[T(1,z)-Tw(z)],-
4、r=1=0T(r,0)=T0,c(r,0)=c0=+=+︱r=1=
5、r=0=0-
6、r=1=Biw[T(1,z)-Tw(z)],-
7、r=1=0T(r,0)=T0,c(r,0)=c0其中R(c,T)為催化反應(yīng)的速率方程,其形式為R(c,T)=+=+︱r=1=
8、r=0=0-
9、r=1=Biw[
10、T(1,z)-Tw(z)],-
11、r=1=0T(r,0)=T0,c(r,0)=c0其中R(c,T)為催化反應(yīng)的速率方程,其形式為R(c,T)=解題思路:應(yīng)用對(duì)稱的正交配置法,有下面的方程和初始條件:=+(1-)=+(1-)Tj(0)=T0,cj(0)=c0邊界條件為:-AN+1,iTi=Biw(TN+1-Tw),AN+1,ici=0將溫度和濃度的邊界條件代入微分方程,消去邊界值,可得2N個(gè)常微分方程,而將兩邊界條件的代數(shù)方程同2N個(gè)常微分方程組聯(lián)合,就組成2N+2個(gè)微分代數(shù)方程組。結(jié)合正交配置系數(shù)的
12、計(jì)算程序與常微分方程組或微分方程組求解程序,可得到反應(yīng)器中的溫度和濃度分布。具體做法如下:一、利用對(duì)稱的正交配置格式:1、對(duì)稱常微分方程程序:(COLLAB.FOR,DLSODE.FOR)主程序:IMPLICITREAL*8(A-H,O-Z)EXTERNALFEX,JEXDIMENSIONAS(19,19),BS(19,19),Q(19,19),XS(19),WS(19)DIMENSIONDIF1(19),DIF2(19),DIF3(19),ROOT(19),V1(19),V2(19)DIMENS
13、IONY(99),ATOL(99),RWORK(10920),IWORK(120)DOUBLEPRECISIONYN1,YN2COMMON/AB/N,AS,BSCOMMON/BC/YN1,YN2CN---FORSYMMETRICCOLLOCATIONUSEDFORPARTICLEANDCM---FORASYMMETRICCOLLOCATIONUSEDFORCOLUMNN=7IW=1IS=2CALLCOLL(AS,BS,Q,XS,WS,19,N,IW,IS)NS=N+1WRITE(*,*)'*SYM
14、METRICSITUATION:*'WRITE(*,*)'*POLYNOMIALROOTS*'WRITE(*,*)(XS(I),I=1,NS)WRITE(*,*)WRITE(*,*)'*A-MATRIX*'DO20I=1,NS20WRITE(*,*)(AS(I,J),J=1,NS)WRITE(*,*)WRITE(*,*)'*B-MATRIX*'DO30I=1,NS30WRITE(*,*)(BS(I,J),J=1,NS)WRITE(*,*)WRITE(*,*)'*W-MATRIX*'WRITE(*,
15、*)(WS(J),J=1,NS)CCALCULATINGTHEPARAMETERSOFTHEPROBLEM,WHICHWILLBEUSEDCFORTHEDIMENSIONLESSFORMOFANDDEFININGOFTHEPROBLEM.NEQ=2*NLRW=22+9*NEQ+NEQ**2LIW=20+NEQCINITIALCONDITIONSDO201I=1,NY(I)=1.D0Y(N+I)=0.D0201CONTINUEYN1=1.0D0YN2=0.D0T=0.D0DT=5.D-2ITOL=2
16、RTOL=1.D-6DO203I=1,NEQATOL(I)=1.D-6203CONTINUEITASK=1ISTATE=1IOPT=0MF=22DO240IOUT=1,20TOUT=DT*DFLOAT(IOUT)CALLLSODE(FEX,NEQ,Y,T,TOUT,ITOL,RTOL,ATOL,ITASK,ISTATE,1IOPT,RWORK,LRW,IWORK,LIW,JEX,MF)OPEN(2,FILE='LW_S_ODE.OUT')WRITE(2,'(''Z:'',F8.4)')TWRITE
17、(2,*)'R'WRITE(2,'(10(4X,D11.5))')(XS(I),I=1,N+1)WRITE(2,*)'T:'WRITE(2,'(10(4X,D11.5))')(Y(I),I=1,N),YN1WRITE(2,*)'C:'CDO205I=1,NWRITE(2,'(10(4X,D11.5))')(Y(N+I),I=1,N),YN2CWRITE(2,*)C205CONTINUEC220FORMAT(7HATT=,D12.4,6HY=,3D15.7)IF(ISTATE.LT.