博士研究生期间的课题研究化工过程非线性动态系统的稳态解并判断其稳定性,研究过程中写了一些代码,现在整理成一款工具,并将它作为在线的工具,供感兴趣的人员使用。
使用方法:
1.登陆网址
2.新建notebook
3.在单元格内输入:
import chemengdstool
chemengdstool.chemengdstool()
4.shift+enter 对默认的动态过程体系进行稳态解求解并判断稳定性。
输出结果如下:
以下是几个经典的动态系统的代码及运算结果。将相关代码复制粘贴到单元格,然后shift+enter运行,稍等片刻就能得到计算结果。
import chemengdstool
#The code of of the Anaerobic Fermentor system
functions=’dx/dt=x*(y/(y+0.00014)*(1-y)*(1-z)-d),dy/dt=d*(y0-y)-x*0.1306*(0.0286+2.3929*y/(y+0.00014)*(1-y)*(1-z)+y/(y+0.01)),dz/dt=x*0.8955*(0.0083+0.5583*y/(y+0.00014)*(1-y)*(1-z)+y/(y+0.025))-z*d’
parameters=’d=0.6,y0=0.0104′
initialvalues=’x=0.03158,y=0.00022,z=0.01659′
freeparameter=’y0′
display_y=’z’
display_x=’y0′
steps=174
chemengdstool.chemengdstool(functions,parameters,initialvalues,freeparameter,steps,display_x,display_y,1e-3,1e-4,1e-2,True,’Dimensionless substrate feed concentration y0′,’Dimensionless product concentration z’,’d=0.6′)
#No.2 MMA Polymerization Reactor
import chemengdstool
#The Code of the MMA Polymerization Reactor
functions=’dCm/dt=-0.3531044406e4*(0.177e10*exp(-0.2199061823e4/T)+0.10067e16*exp(-0.8958142892e4/T))*Cm*sqrt(CI*exp(-0.1548833293e5/T)/exp(-0.3541255713e3/T))+0.1e2*F*(0.64678e1-Cm),dCI/dt=-0.3792e19*CI*exp(-0.1548833293e5/T)+0.80e2*FI-0.1e2*F*CI,dT/dt=0.2085721876e15*exp(-0.2199061823e4/T)*Cm*sqrt(CI*exp(-0.1548833293e5/T)/exp(-0.3541255713e3/T))-0.8314087760e1*T+0.8314087760e1*Tj+0.1e2*F*(Tin-T),dD0/dt=0.4160432571e19*CI*exp(-0.1548833293e5/T)+0.3554702404e19*exp(-0.8958142892e4/T)*Cm*sqrt(CI*exp(-0.1548833293e5/T)/exp(-0.3541255713e3/T))-0.1e2*F*D0,dD1/dt=0.3535281659e6*(0.177e10*exp(-0.2199061823e4/T)+0.10067e16*exp(-0.8958142892e4/T))*Cm*sqrt(CI*exp(-0.1548833293e5/T)/exp(-0.3541255713e3/T))-0.1e2*F*D1,dTj/dt=0.5000000000e2*Fcw*(0.2932e3-Tj)+0.1714285714e2*T-0.1714285714e2*Tj’
parameters = ‘F=1.0,FI=0.0032,Fcw=0.1588,Tin=350′
initialvalues=’Cm=6.44280,CI=0.00041,T=338.825,D0=0.00003,D1=2.50255,Tj=324.382′
freeparameter=’FI’
display_x=’FI’
display_y=’T’
stepsize=1
minstepsize=0.1
maxstepsize=10
steps=74
chemengdstool.chemengdstool(functions,parameters,initialvalues,freeparameter,steps,display_x,display_y,stepsize,minstepsize,maxstepsize,True,’Initiator volumetric flowrate FI (m3/h)’,’Temperature T (K)’,’Fcw=0.1588′)
#No.3 MMA Polymerization Reactor
import chemengdstool
#The Code of the MMA Polymerization Reactor
functions=’dCm/dt=-0.3531044406e4*(0.177e10*exp(-0.2199061823e4/T)+0.10067e16*exp(-0.8958142892e4/T))*Cm*sqrt(CI*exp(-0.1548833293e5/T)/exp(-0.3541255713e3/T))+0.1e2*F*(0.64678e1-Cm),dCI/dt=-0.3792e19*CI*exp(-0.1548833293e5/T)+0.80e2*FI-0.1e2*F*CI,dT/dt=0.2085721876e15*exp(-0.2199061823e4/T)*Cm*sqrt(CI*exp(-0.1548833293e5/T)/exp(-0.3541255713e3/T))-0.8314087760e1*T+0.8314087760e1*Tj+0.1e2*F*(Tin-T),dD0/dt=0.4160432571e19*CI*exp(-0.1548833293e5/T)+0.3554702404e19*exp(-0.8958142892e4/T)*Cm*sqrt(CI*exp(-0.1548833293e5/T)/exp(-0.3541255713e3/T))-0.1e2*F*D0,dD1/dt=0.3535281659e6*(0.177e10*exp(-0.2199061823e4/T)+0.10067e16*exp(-0.8958142892e4/T))*Cm*sqrt(CI*exp(-0.1548833293e5/T)/exp(-0.3541255713e3/T))-0.1e2*F*D1,dTj/dt=0.5000000000e2*Fcw*(0.2932e3-Tj)+0.1714285714e2*T-0.1714285714e2*Tj’
#4.534351 0.003321 399.647745 0.058087 193.576934 365.951620 2.113005
parameters = ‘F=0.0085,FI=0.0032,Fcw=0.1588,Tin=350′
initialvalues=’Cm=3.7358,CI=3.0046,T=297.8348,D0=0.004,D1=273.5261,Tj=296.3677′
#parameters = ‘F=1.0,FI=0.0001,Fcw=0.1588,Tin=350′
#initialvalues=’Cm=6.44280,CI=0.00041,T=338.825,D0=0.00003,D1=2.50255,Tj=324.382′
freeparameter=’F’
display_x=’F’
display_y=’T’
stepsize=1
minstepsize=0.1
maxstepsize=5
steps=269
chemengdstool.chemengdstool(functions,parameters,initialvalues,freeparameter,steps,display_x,display_y,stepsize,minstepsize,maxstepsize,True,’Initiator volumetric flowrate FI (m3/h)’,’Temperature T (K)’,’Fcw=0.1588′,direction=’backward’,locbiftype=’LP’)
转载请注明:王杭州的个人网页 » 在线动态系统稳态解求解工具