Effacer les filtres
Effacer les filtres

Why is this program not running for full time span ?

3 vues (au cours des 30 derniers jours)
Sreedhar
Sreedhar le 19 Juil 2015
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

Réponses (2)

Jan
Jan le 19 Juil 2015
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"?

Sreedhar
Sreedhar le 20 Juil 2015
Jas Simon Thank you for the reply. Yes t = 55 microsec is where it stops. But how do i get rid of the warnings ? Any help is appreciated
TIA

Catégories

En savoir plus sur Parallel Computing dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by