2d liquid simulation

版本 1.0.0.0 (7.8 KB) 作者: Maxim Vedenyov
in rectangle without air.
691.0 次下载
更新时间 2011/1/31

查看许可证

http://simulations.narod.ru/

There was try to simulate 2d liquid in rectangle vessel without air in matlab. The idea was to use voronoi graph to separate liquid into pieces. Each piece has forces:
1) friction from neighbor, proportional to contact edge length
2) friction from wall if any
3) pressures from neighbor
Each piece has pressure that defined from area of polygon and compare it with initial area. Voronoi diagram is plotted over extended set of point. The extended set of point is original points plus 4 mirrored set of points. Each mirror is mirror from each wall. This trick is need to make walls.

Each piece has mass and F=m*a equations are integrated with Euler's method. In this video initial condition is liquid rotation.

Found problems:
1) Slow computation expensive code
2) There are some oscillations of masses that's looks unnatural

See animation here:
http://www.youtube.com/watch?v=2X_LD7-FYFw

引用格式

Maxim Vedenyov (2024). 2d liquid simulation (https://www.mathworks.com/matlabcentral/fileexchange/30234-2d-liquid-simulation), MATLAB Central File Exchange. 检索来源 .

MATLAB 版本兼容性
创建方式 R2009b
兼容任何版本
平台兼容性
Windows macOS Linux
类别
Help CenterMATLAB Answers 中查找有关 Voronoi Diagram 的更多信息

Community Treasure Hunt

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

Start Hunting!
版本 已发布 发行说明
1.0.0.0