|
回复 13楼 leohust 的帖子
我改了之后的,LZ可以参考一下,不过会报9楼的错误
function f=coal2(t,y,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12,a13,a14,a15,a16,a17,a18)
f=[6*a1*a2*y(6)*exp(-a4/y(1))/(a3*y(3))+6*a5*(a6^4-y(1)^4)/(a3*y(3))-12*a7*(y(1)-y(2))/(y(3)^2*y(4)*a3);
a8*a10*exp(-a11/(a12*y(2)))*y(7)^(-0.3)*y(6)^1.3/a9+a13*a14*exp(-a11/(a12*y(2)))*y(8)^(-0.1)*y(6)^1.85/a9...
+12*a15*a7*y(3)*(y(1)-y(2))/(a9*a16^3*y(5))+6*a15*a3*(y(1)-a6)*0.3*a17*exp(-a11/(a12*y(1)))*y(9)/(y(5)*3.14*a16^3*a9)...
+6*a15*a3*(y(1)-a6)*0.7*a18*exp(-a11/(a12*y(1)))*y(9)/(y(5)*3.14*a16^3*a9)+6*a15*a3*(y(1)-a6)*y(3)^2*a1*exp(-a4/y(1))*y(4)*y(6)/(a9*a16^3*y(5)...
+12*a7*(a6-y(2))/(a9*a16^2*y(5)));
2*a1*y(6)*exp(-a4/y(1));
-6*0.3*a17*exp(-a11/(a12*y(1))*y(9)/(3.14*y(3)^3)+4.2*a18*y(9)*exp(-a11/(a12*y(1)))/(3.14*y(3)^3));
6*a15*0.3*a17*exp(-a11/(a12*y(1)))*y(9)/(3.14*a16^3)+6*a15*0.7*a18*exp(-a11/(a12*y(1)))*y(9)/(3.14*a16^3)+6*a15*a1*y(3)^2*y(4)*y(6)/(a16^3);
-16*a15*y(3)^2*a1*y(4)*y(6)*exp(-a4/y(1))-4*a8*y(7)^(-0.3)*y(6)^1.3*exp(-a11/(a12*y(2)))-3*a13*y(8)^(-0.1)*y(6)^1.85*exp(-a11/(a12*y(2)));
1.8*a17*y(9)*a15*exp(-a11/(a12*y(1)))/(3.14*a16^3*y(5))+a8*y(7)^(-0.3)*y(6)^1.3*exp(-a11/(a12*y(2)));
4.2*a18*a15*y(9)*exp(-a11/(a12*y(1)))/(3.14*a16^3*y(5))+a13*y(8)^(-0.1)*y(6)^1.85*exp(-a11/(a12*y(2)));
-a17*exp(-a11/(a12*y(1)))*y(9)-a18*exp(-a11/(a12*y(1)))];
end
options=odeset('RelTol',1e-3,'AbsTol',[1e-3],'OutputFcn',@odeplot,'OutputSel',[1]);
t_end=5; a1=7630; a2=32805; a3=1.1; a4=17615; a5=4.7628*10^(-8); a6=1273; a7=0.05; a8=1.5*10^7; a9=1; a10=3.95*10^4;
a11=125000; a12=8.314; a13=1.3*10^9; a14=3.21*10^4; a15=2243; a16=0.01; a17=3.7*10^5; a18=1.46*10^13;
[t,y]=ode45(@coal2,[0 t_end],[300 300 7.5*10^(-5) 1250 1.183 0.23 0 0 6.2*10^(-7)],options,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12,a13,a14,a15,a16,a17,a18); |
评分
-
1
查看全部评分
-
|