MATLAB求一组互相耦合的微分方程组的解,急用,请各位高手帮忙,纠错 20
我不懂matlab,依葫芦画瓢写了一点但是好多错误m文件(其中,x(1),x(2),x(3)分别为u,R,rug)functiondx=bubble(x,t)dx(1)=...
我不懂matlab,依葫芦画瓢写了一点 但是好多错误
m文件(其中,x(1),x(2),x(3)分别为u,R,rug)
function dx=bubble(x,t)
dx(1)=2*g-0.75*CD*x(1)^2/x(2);
dx(2)=x(2)/4/miu*(x(3)*Tb*P/rug0/T0-P0-ruL*g*(h-s)-2*sga/x(2));
dx(3)=-3*ruL*Sh*k*(CS-C0)/2/x(2)^2-3*x(3)/4/miu*(x(3)*Tb*P/rug0/T0-P0-ruL*g*(h-s)-2*sga/x(2));
Re=2*ruL*x(2)*x(1)/miu;
CD=16*(1+1/(8/Re+(1+3.315/Re^0.5)/2))/Re;
s=int(x(1));
Sh=2/(1-2/3/(1+0.09*Re^(2/3))^(3/4))^(0.5)*(Pe^0.5+Pe);
Pe=2*x(2)*x(1)/k;
CS=Pb/H;
global g ruL miu h sga P0 Tb T0 P rug0 k H C0;
程序:
global g ruL miu h sga P0 Tb T0 P rug0 k H C0;
g=9.8;
ruL=850;
miu=0.25;
h=10;
sga=0.3;
P0=300000;
Tb=20;
T0=25;
P=100000;
rug0=0.717;
k=1.2*10^(-7);
H=1.38*10*(-5);
C0=0;
t0=0:0.01:10;
x0=[0;0.002;0.717];
[x,t]=ode45(@bubble,t0,x0); 展开
m文件(其中,x(1),x(2),x(3)分别为u,R,rug)
function dx=bubble(x,t)
dx(1)=2*g-0.75*CD*x(1)^2/x(2);
dx(2)=x(2)/4/miu*(x(3)*Tb*P/rug0/T0-P0-ruL*g*(h-s)-2*sga/x(2));
dx(3)=-3*ruL*Sh*k*(CS-C0)/2/x(2)^2-3*x(3)/4/miu*(x(3)*Tb*P/rug0/T0-P0-ruL*g*(h-s)-2*sga/x(2));
Re=2*ruL*x(2)*x(1)/miu;
CD=16*(1+1/(8/Re+(1+3.315/Re^0.5)/2))/Re;
s=int(x(1));
Sh=2/(1-2/3/(1+0.09*Re^(2/3))^(3/4))^(0.5)*(Pe^0.5+Pe);
Pe=2*x(2)*x(1)/k;
CS=Pb/H;
global g ruL miu h sga P0 Tb T0 P rug0 k H C0;
程序:
global g ruL miu h sga P0 Tb T0 P rug0 k H C0;
g=9.8;
ruL=850;
miu=0.25;
h=10;
sga=0.3;
P0=300000;
Tb=20;
T0=25;
P=100000;
rug0=0.717;
k=1.2*10^(-7);
H=1.38*10*(-5);
C0=0;
t0=0:0.01:10;
x0=[0;0.002;0.717];
[x,t]=ode45(@bubble,t0,x0); 展开
2个回答
展开全部
Warning: File: f:\MATLAB6p5\work\bubble.m Line: 10 Column: 1
Variable 'Pe' has been previously used as a function name.
(Type "warning off MATLAB:mir_warning_variable_used_as_function" to suppress this warning.)
> In F:\MATLAB6p5\toolbox\matlab\funfun\private\odearguments.m at line 104
In F:\MATLAB6p5\toolbox\matlab\funfun\ode45.m at line 155
Warning: File: f:\MATLAB6p5\work\bubble.m Line: 11 Column: 1
Variable 'CS' has been previously used as a function name.
(Type "warning off MATLAB:mir_warning_variable_used_as_function" to suppress this warning.)
> In F:\MATLAB6p5\toolbox\matlab\funfun\private\odearguments.m at line 104
In F:\MATLAB6p5\toolbox\matlab\funfun\ode45.m at line 155
你的很多变量名 都是库函数 要改名
Variable 'Pe' has been previously used as a function name.
(Type "warning off MATLAB:mir_warning_variable_used_as_function" to suppress this warning.)
> In F:\MATLAB6p5\toolbox\matlab\funfun\private\odearguments.m at line 104
In F:\MATLAB6p5\toolbox\matlab\funfun\ode45.m at line 155
Warning: File: f:\MATLAB6p5\work\bubble.m Line: 11 Column: 1
Variable 'CS' has been previously used as a function name.
(Type "warning off MATLAB:mir_warning_variable_used_as_function" to suppress this warning.)
> In F:\MATLAB6p5\toolbox\matlab\funfun\private\odearguments.m at line 104
In F:\MATLAB6p5\toolbox\matlab\funfun\ode45.m at line 155
你的很多变量名 都是库函数 要改名
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询