摘要
提出并实现了一种面向对象的光滑粒子流体动力学(SPH)模型。采用统一建模语言(UML)进行SPH模型的软件体系结构建模,并分析说明各模块类以及类之间关系。其中SPH模型的最根本类是由问题域模块类和主控模块类组成的。问题域模块类是由文件操作类、粒子类、材料类、容器类、边界粒子类和数组存储类组成的。主控模块类是由近似函数类和粒子系统方法类组成的。在此体系结构下,采用C++语言结合OpenGL图形库进行SPH模型的编码,实现了在特定容器中进行SPH流体流动的3D仿真可视化实验。研究工作表明,面向对象方法适合于SPH模型的框架设计和代码编制,所编制的SPH模型程序可以对流体动力学问题进行初步的科学计算及其可视化。
An object-oriented smoothed particle hydrodynamics(SPH) model is presented and implemented.Using the unified modeling language(UML),the SPH model software architectures are designed,and each module class and their relationship are analyzed.In SPH model,the root-class consists of two sub-classes:domain-module and run-module.The domain-module consists of six sub-classes:file,particle,material,container,boundary particle and array.The run-module consists of two sub-classes:approximation function and particle-system.In the architecture,using C++ language with OpenGL library,a SPH model is programmed,and SPH fluid simulation is achieved flowing 3D visualization in the special container.The test shows that the object-oriented approach is suitable for designing and coding a SPH model framework,the SPH model program can make preliminary scientific calculations and visualization for fluid dynamics problems.
出处
《南昌大学学报(工科版)》
CAS
2010年第3期287-292,306,共7页
Journal of Nanchang University(Engineering & Technology)
基金
国家自然科学基金资助项目(50863003)
江西省研究生创新专项资金资助项目(YC09A038)