Is this event detection correct
3 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Hi I am solving a problem involving the expansion and contraction of a bubble in response to a sinusoidal pressure, Pa sin (wt). (Rayleigh Plesset equation)
The formula for pressure of the gas in the bubble during expansion (isothermal expansion - gamma = 1) is different from that during contraction (adiabaic compression - gamma = 1.33).
To change the formula I am using 'EVENTS' to detect the end of contraction (event 1) and end of expansion (event 2).
The bubble starts contracting initially from a radius R0 = 1e-4 m.
The condition used to detect end of contraction is : radial velocity Rdot is negative and increasing to zero
The condition used to detect end of expansion is : radial velocity Rdot is positive and decreasing to zero.
The initial condition is : R0 = 1e-4 and Rdot = 0
------------------- When I run this program I am getting 4 events. I was expecting only 2 (first after compression and second after expansion). Why is this happening ? How can I overcome this ?
Is this method of detecting event correct ? Since the radius never becomes zero I cannot use zero detection of radius as a condition.
The files used are attached :
RP7.m - is the main script file
eventsFuncn1.m is the events function
zdot7.m is the function giving the derivative
THANKS IN ADVANCE
1 Kommentar
Chad Greene
am 27 Apr. 2015
Looks like the files didn't get uploaded. But realistically, you may have trouble getting a response if you upload multiple files and hope someone will sort through them.
Without having your files though, would an amplitude envelope do what you need? This could be done with a moving rms, or either of the methods discussed here.
Antworten (0)
Siehe auch
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!