# problem about ODE (Rayleigh-Plesset Equation) error in ode15s

조회 수: 24(최근 30일)
Ahmed Mehrem 2013년 5월 23일
Now , i simulate Rayleigh-Plesset Equation and i did the Function which is
function f = RP(t,y)
p_ref = 1e5; %reference pressure Pa
rho = 1e3; %density of fluid kg/m3
g = 1; %polytropic exponent Unitless
R0=0.0005;
f= [y(2);( pulse(t) - p_ref + p_ref*(R0./y(1))^(3*g) )/(rho*y(1))-(1.5*y(2)^2/(y(1)))];
return;
and this is the Pulse code
function z=pulse(t)
global A w t0 sigma env%accept globals.
z = A*sin(w*t); %no window
return
and this is the Solution
[T,R] = ode15s('RP',[0 3e-8],[1e-6 70]);
no i have this problem
??? Error using ==> odearguments at 103
RP returns a vector of length 1, but the length of initial conditions vector is 2. The
vector returned by RP and the initial conditions vector must have the same number of
elements.
Error in ==> ode15s at 227
[neq, tspan, ntspan, next, t0, tfinal, tdir, y0, f0, odeArgs, odeFcn, ...
Error in ==> solv at 6
[T,R] = ode15s('RP',[0 3e-1],[1e-6 70]);
what can i do ? i need a help i got the Signal simulation before but i did dome change , now i cant return

댓글을 달려면 로그인하십시오.

### 답변(2개)

Navid 2013년 7월 30일
I am using ode45 to solve this equation. I am considering everything such as surface tension, viscosity, and acoustic pressure. I will get good results when the oscillations are stable. And by stable I mean there is no sudden collapses and bubble oscillation is not huge comparing to its initial radius. But when the oscillations become huge, and oscillations get transient, I am not getting good results. bubble radius reaches to very very small values but again rebounds to huge values. Any experience of suggestions? Is it better to use another ODE solver?
##### 댓글 수: 1표시숨기기 없음
Ahmed Mehrem 2013년 8월 4일
Thank you ,i find the solution of this problem. and you are Right i am also used ode45 and the solution is very good and nearly the same with Experimental Part

댓글을 달려면 로그인하십시오.

bym 2013년 5월 23일
[T,R] = ode15s('RP',[0 3e-8],[1e-6 70]); %your code
what does the following give you?
[T,R] = ode15s(@RP,[0 3e-8],[1e-6 70]);
##### 댓글 수: 1표시숨기기 없음
Ahmed Mehrem 2013년 5월 24일
the same problem :(

댓글을 달려면 로그인하십시오.

### 범주

Find more on Ordinary Differential Equations in Help Center and File Exchange

### Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by