function dy= konghua( t,y)
global f R0 P0 PA n pi rho sigma mu w Pv
dy(1,1)=y(2);
dy(2,1)=[y(2);((P0+2*sigma/R0-Pv)*((R0/y(1))^(3*n)+Pv+PA*sin(w*t)-P0-2*sigma/y(1))/(rho*y(1))...
-4*mu
*y(2)/(rho*y(1)^2))...
+((P0+2*sigma/R0-Pv)*(R0^(3*n))*(-3)*n*(y(2))^((-3)*n-1)-w*PA*cos(w*t))/(rho*c)...
-3/2*y(2)^2/y(1)];
end
clear all;
clc;
tspan=[0,1];
x0=[10,0];
c=1400;
Pv=1.23*10^3;
PA=2.41*10^5;
sigma=7.42*10^(-2);
rho=1000;
n=1.33;
mu=1.31*10^(-3);
R0=10;
P0=1.013*10^5;
f=0.025*10^6;
pi=3.1415926;
w=2*pi*f;
[t,y]=ode45(@konghua,tspan,x0);
plot(t,y(:,1),'r-');
xlabel('t=Time/T');ylabel('Solution R(t)/RO');legend('R=R(t)/RO')
请各位大佬,帮我看看,我写的程序,有没有哪里不对的,谢谢各位大佬
global f R0 P0 PA n pi rho sigma mu w Pv
dy(1,1)=y(2);
dy(2,1)=[y(2);((P0+2*sigma/R0-Pv)*((R0/y(1))^(3*n)+Pv+PA*sin(w*t)-P0-2*sigma/y(1))/(rho*y(1))...
-4*mu
*y(2)/(rho*y(1)^2))...
+((P0+2*sigma/R0-Pv)*(R0^(3*n))*(-3)*n*(y(2))^((-3)*n-1)-w*PA*cos(w*t))/(rho*c)...
-3/2*y(2)^2/y(1)];
end
clear all;
clc;
tspan=[0,1];
x0=[10,0];
c=1400;
Pv=1.23*10^3;
PA=2.41*10^5;
sigma=7.42*10^(-2);
rho=1000;
n=1.33;
mu=1.31*10^(-3);
R0=10;
P0=1.013*10^5;
f=0.025*10^6;
pi=3.1415926;
w=2*pi*f;
[t,y]=ode45(@konghua,tspan,x0);
plot(t,y(:,1),'r-');
xlabel('t=Time/T');ylabel('Solution R(t)/RO');legend('R=R(t)/RO')
请各位大佬,帮我看看,我写的程序,有没有哪里不对的,谢谢各位大佬
