Why is this program not running for full time span ?
4 次查看(过去 30 天)
显示 更早的评论
Hi I have a program for bubble dynamics, i.e. adiabatic expansion & compression of a bubble by solving Rayleigh Plesset equation. The pattached program solves RP equation. An event function exists to merely flag events and NOT stop the program. I was expecting the program to run up to the given time span of 100 microseconds but it is stopping once the bubble is compressed at ~ 60 microseconds. Why is this happenimg ?
My understanding is as follows : When the bubble is expanding the velocity of bubble wall is positive. When this becomes zero at end of expansion (an event is flagged) and compression of the bubble starts because of the applied sinusoidal ultrasonic pressure. When the bubble reaches the end of compression (at ~ 60 microsec) again the wall vel. (which is now negative) becomes zero and event is flagged. Now I am expecting the bubble to start expanding because of the internal pressure as well as the applied ultrasonic pressure (which is now negative) and the cycle to repeat till 100 micro sec. But this isn't happening. Will someone please explain ?
TIA
0 个评论
回答(2 个)
Jan
2015-7-19
If you omit the brute clearing header, you can use the debugger to inspect, what's going on:
clear all;
close all;
clc;
clear all removes all breakpoints from the debugger, what is a crude impeding of the programmer's work. Note that there are no local variables at the top of a function, such that the clearing does not have any benefit.
When I run your code I get a lot of warnings:
Warning: Matrix is close to singular or badly scaled. Results may be inaccurate. RCOND =
1.539743e-034.
> In ode23s at 380
In qwe at 23
Warning: Failure at t=5.522703e-005. Unable to meet integration tolerances without reducing the
step size below the smallest value allowed (1.962058e-019) at time t.
Is this your "~60 micro s"?
0 个评论
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!