huright 发表于 2006-6-21 17:21

[转帖](来自罗卜驿站)气泡在液体中运动

clear;
density=2.7e3;
g=9.8;
Pa=1.0e5;
tension=1.0;
h=20;
viscosity=100.0e-3;

axis()%如何同一单位尺寸?
set(gcf,'DoubleBuffer','on');
lbefore=0;
deltt=1;
r=1e-4;
circle=inline('exp(i*linspace(0,pi*2,200))*r+x+y*i','r','x','y');
while(lbefore<h)
v=density*g*(r^2)/(3*viscosity);
llast=lbefore+1000*deltt*v;
R=((Pa+1000*2*tension/r+density*g*(h-lbefore)/1000)/...
(Pa+1000*2*tension/r+density*g*(h-llast)/1000))^(1/3)*r;
lbefore=llast;
r=R;
z=circle(1000*r,5,lbefore);
plot(z);axis();
pause(0.3);
end

[ 本帖最后由 suffer 于 2006-10-9 20:45 编辑 ]

hustbill 发表于 2006-6-29 15:09

<P>不哦错,还搞不懂如何实现的<BR></P>
页: [1]
查看完整版本: [转帖](来自罗卜驿站)气泡在液体中运动