Rayleigh–Plesset equation (problem with ode45)

17 visualizaciones (últimos 30 días)
Md Ishak Khan
Md Ishak Khan el 8 de Nov. de 2016
Editada: Sam Chak el 21 de Nov. de 2025
Hello, I'm trying to solve Rayleigh–Plesset equation to compute bubble radius at certain time instants.
The image above shows the equation. I've chosen fluid density, kg/m³, Pascal. I have to vary the Pressure at infinity () as a function of time. As the paper shows (from which I have taken the values of P at infinity and time range), the bubble radius must increase first and then it should collapse. But I have been getting the radius increment out of bound. What would be the solution to this problem? Am I missing something obvious?
The pulse code (varying P at infinity) is here:
function z = pulse(t)
z = (-.0002*t^3) + (0.0851*t^2) - (8.7073*t) + 52.853; % code
end
The differential equation code is here:
function f = RP(t, y)
p_ref = 3200; % reference pressure (Pa)
rho = 1e3; % density of the surrounding fluid (kg/m3)
f = [y(2);
(p_ref - pulse(t))/(rho*y(1)) - 1.5*(y(2)^2)/y(1)];
end
I'm taking the initial radius as 50 micrometer. The plotting code is here:
[t, y] = ode45(@RP, [0, 0.3], [50e-6, 0]);
plot(t, y(:,1)), grid
xlabel('time'),
ylabel('$R, \;(\rm{m})$', 'interpreter', 'latex')
title('Radius of the spherical bubble')
for i = 1:length(t)
z(i) = pulse(t(i));
end
plot(t, z), grid
xlabel('time'),
ylabel('$P_{\infty}, \;(\rm{Pa})$', 'interpreter', 'latex')
title('External pressure infinitely far from the bubble')
Any help with the code will be appreciated. Thanks.

Respuestas (2)

Sulekha
Sulekha el 16 de Feb. de 2018
Were you able to find a solution to this issue? I am also facing the same problem.

Jhonath wensenber
Jhonath wensenber el 21 de Nov. de 2025
Editada: Jhonath wensenber el 21 de Nov. de 2025

Lo que sucede es que el término de (PR-PL)/rho debe tener unidades de m2/s2 para ello modifica la expresión a: g(PR-PL)/(g*rho), de tal modo que, [g]= m/s2, [PR-PL]=N/m2 y [g*rho]=9810 N/m3.

Categorías

Más información sobre Ordinary Differential Equations en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by