基于VTK的CFD可视化系统开发
详细信息    本馆镜像全文|  推荐本文 |  |   获取CNKI官网全文
摘要
随着计算机技术的不断进步和计算流体动力学(CFD)技术的不断提高,CFD数值计算的精度和复杂度越来越提高,产生了越来越大规模的海量数据。这些数据类型比较复杂,既有温度、压力等标量数据,又有速度等矢量数据,而且它们通常定义在非规则网格上的拓扑关系也很复杂。面对这些海量级数据,不借助有效的工具,很难做出准确的理解和判断。同时,现代科学提供的很多信息如流体流动仿真、舰船运动仿真等,必须借助可视图形才能交流。高效、准确、直观地进行大量输入数据的组织和计算结果三维数据场状态的分析,将有赖于科学计算可视化。可视化技术已经成为CFD研究领域具有特别重要意义的研究方向。
     科学计算可视化是一个新兴的发展特别迅速的领域,新的可视化技术日新月异。所以,为了提供对随时出现的新技术的支持,良好的可扩展性是可视化系统设计首先必须考虑的重要因素之一。本文应用结构化面向对象的思想,具体阐述了开发CFD可视化系统的技术和理念。采用结构化软件开发方法可以在很大程度上提高系统软件的开发质量。结构化方法的关键是进行问题的分解。面向对象分解法使功能抽象与数据抽象结合在一起进行分解,因而模块具有独立性、可重用性、可理解性及易扩展性。
     VTK(Visualization Toolkit)是面向计算机图形、图像处理和可视化的大型软件工具箱。它是采用面向对象的设计思想,用C++语言来实现的。系统以Visual C++6.0和VTK为开发工具,采用结构化的面向对象分解法进行设计:(1)将特定的、新的可视化技术、算法设计成新的VTK类,(2)将VTK类库进行扩充,(3)直接应用VTK类库。
     针对数值计算时被计算的几何外形,即三维空间离散的数据所确定的几何外形需要显示出来特性,本文详细介绍了两种常用的剖分技术,即三角形剖分和四边形剖分原理、方法;将现有的、特定的可视化算法和技术与VTK类库充分结合,设计了能读取、存贮三角形或四边形剖分的数据组织以及实现其几何体绘制的类库。
     本文介绍了常见标量场、矢量场可视化的各种技术并比较了它们的优缺
    
    武汉理工大学硕士学位论文
    点。目的是利用其基本原理、方法设计新的程序类库或扩充已有类库或利用
    已有类库开发自己的应用系统。
     在VTK类库的基础之上设计和开发的CFD可视化系统在实际应用中显
    示了较强的功能,集成了诸多实用性技术,如多种图片格式的存贮、三维空
    间数据的剖分和切片、三维空间数据场的动态显示等。CFD计算的结果数据
    是以文件格式存贮的,所以能读取常见的文件格式也是一个可视化系统必需
    的,系统提供了多种文件格式的输入、输出及其转换。
     同时友好、完善的人机交互界面也是系统的一个特点。用户可以方便地
    选择各种参数,动态观察交互中参数的变化,也可以在图像中加入文字、符
    号等信息。可以用鼠标和键盘来进行交互。
     为了说明系统程序设计的基本理念、实现流程以及结果显示,本文在每
    一章节的后面都以船舶流体力学为主要对象进行了设计举例,以期探讨。
Advances in computer and Computational Fluid Dynamics (CFD) techniques are allowing mathematical models and simulations to have ever-increasing level of precision and complexity. Tremendously large amounts of heterogeneous, massive data are being generated and collected. These data consist of scalar data (temperature, pressure, etc) and vector data (velocity, etc), which are commonly defined on unstructured grids with complex topology. Without effective tools, it is usually impossible to gain understanding and insight into the data. Scientific visualization encompasses and unifies the fields of computer graphics, image processing, computer vision, computer-aided design, signal processing, and human-computer interaction to represent vast amounts of numerical data in an effective way using graphical representations for researchers to comprehend or manipulate the data. The larger the data set, the more important it is to have capable and flexible visual tools from which to choose.
    Scientific visualization is a relatively new computer-based field that is in rapid and constant progress; hence one of the primary concerns in design a new visualization system is the extendibility to embrace newly emerging technology. To achieve this goal, structured, object-oriented principles should be followed. The quality'of a software system can be improved to a large extent by following these principles. The primary concern in structured, object-oriented design is to get a large system broken down into many small ones by combined functional and data abstract. Each module is independent, reusable, comprehensible and extensible.
    The technique and ideas in developing a CFD visualization system are described elaborately. The design and implementation of the system has been strongly influenced by structured, object-oriented principles.
    The Visualization ToolKit (VTK) is an open source, freely available software system for three-dimensional (3D) computer graphics, image
    
    
    
    processing, and visualization used by thousands of researchers and developers around the world. VTK consists of a C++ class library, and several interpreted interface layers including Tcl/Tk, Java, and Python. VTK and Visual C++ 6.0 are taken to develop the visualization system. The system is developed in the following structured, object-oriented manner: (1) each new specific visualization algorithm is encapsulated with a C++ class; (2) Some VTK classes are enhanced or extended with new attributes and functions; (3) Classes are assembled to carry out a particular visualization task.
    For visualization geometrical data generated in numerical simulations, two subdivision methods are used and described in full detail. The two methods, which are triangular subdivision and quadrilateral subdivision, are incorporated into the visualization system with VTK for surface and volume rendering. The system supports a wide variety of visualization algorithms including scalar, vector, tensor, texture, and volumetric methods; and advanced modeling techniques such as implicit modeling, polygon reduction, mesh smoothing, cutting, and contouring. In addition, dozens of imaging algorithms have been directly integrated to manage two-dimensional (2D) image / 3D graphics data. The merits and demerits of each algorithm are fully addressed.
    The results of CFD computations are commonly stored in different file formats; a visualization system should be able to recognize these file formats. For this purpose, the visualization system supports many wide-used CFD data file formats.
    The visualization system also features a user-friendly graphical user interface (GUI). The user can easily master most of the system operations, change visualization parameters, and view the results interactively. Users are encouraged to use mouse to interact with the system, although advanced users can use keyboard shortcuts for speed.
    Visualization examples in ship mechanics are given in several chapters for demonstration and discussion.
引文
[1]李晓梅,黄朝晖.科学计算可视化导论.长沙:国防科技大学出版社,1996
    [2]唐泽圣等.三维数据场可视化.北京:清华大学出版社,1999
    [3]Edwards D.E., 3 Dimensional Visualization of Fluid Dynamics, AIAA, p89-136,1989
    [4]石教英,蔡文立.计算机可视化算法与系统.北京:科学出版社,1996
    [5]王长波.基于OpenGL的交通工程结构物视景建模软件的开发:[学位论文].武汉:武汉理工大学.2002
    [6]邱磊.船舶操纵相关粘性流及水动力计算:[学位论文].武汉:武汉理工大学.2004
    [7]邱磊,邹早建,张谢东.船舶计算流体动力学可视化系统的SCFDVS开发.武汉理工大学学报(交通科学与工程版).2002,26(5):563-566
    [8]Helman J., Representation and Display of Vector Field Topology in Fluid Flow Data Sets, Visualization in Scientific Computing. IEEE Computer Society Press,p61-73,1990
    [9]张文.矢量场可视化算法研究与系统设计:[学位论文].长沙:国防科技大学,2001
    [10]常君明,邱磊,邹早建.基于VTK的CFD可视化系统开发和应用.武汉理工大学学报.2004.4
    [11]蔡青,高光焘.CAD/CAM系统的可视化 集成化 智能化 网络化.西安:西安工业大学出版社,1996
    [12]David J. Kruglinski, Scot Wingo, George Shepherd. Programming Visual C++6.0技术内幕.北京:北京希望电子出版社,2002
    [13]Will Schroeder, Ken Martin, Bill Lorensen. The Visualization Toolkit,2nd Edition. Prentice Hall PTR ,Upper Saddle River, NJ0758
    [14]陈莉.三维矢量场可视化的基础算法研究:[学位论文].杭州:浙江大学.1996
    [15]李定,周连弟.计算流体力学的可视化系统.水动力学研究与进展,1993(3)
    [16]郭福亮.计算流体力学及其可视化技术与应用.海军工程学院学报.1999.88(3):116—119
    [17]马征,韩卫东.水轮机流场可视化系统设计.华东工业大学学报.1997,19(2):86-89
    [18]应文烨.船舰设计可视化技术.哈尔滨:哈尔滨工程大学出版社,2003
    [19]雷勇,魏涛,柳共青.CFD可视化研究与进展.航空计算技术.1999.29(1):6-9
    [20]朱心雄等.自由曲线曲面造型技术.北京:科学出版社,2000
    [21]陈永府,张华,陈兴,李得群.任意曲面的三角形网格划分.计算机辅助设计与图形学学报,1997(5)
    [22]郑志镇,李尚健,李志刚.复杂曲面上的四边形网格生成方法.计算机辅助设计与图形学学报,1999(5)
    
    
    [23]David F. Rogers.计算机图形学的算法基础.北京:机械工业出版社,2002
    [24]李定,周连弟.三维组合体消隐算法和显示技术.中国造船,1992(3)
    [25]陈元琰,张晓竞.计算机图形学实用技术.北京:科学出版社,2000
    [26]Hearn,D.计算机图形学.北京:电子工业出版社,2002
    [27]Will Schroeder, Ken Martin, Bill Lorensen. The Visualization Toolkit-An ObjectOriented Approach To 3D Graphics[M]. Prentice Hall,1997
    [28]Gardner G.Y., Visual simulation of Clouds, Computer Graphics, Vol.19, pp297-303, 1985
    [29]Helman J L, Hesselink L. Visualizing Vector Field Topology in Fluid Flows. LEEE Computer Graphics & Applications, May:36~46, 1991
    [30]David N Knight , et al. A 3D Streamline Tracking Algorithm Using Dual Stream Functions[C]. Visualization '92, Proceedings, IEEE Conference on, 1992.62-68.
    [31]. David N Knight, et al. Visualizing Unstructured Flow Data Using Dual Stream Functions[J]. IEEE Transactions on Visualization and Computer Graphics, 1996,2(4):355-363. [12].
    [32]Hultquist J P M. Interactive Numeric Flow Visualization Using Stream Surface. Computing in Engineering, 12(4): 349~353, 1990 [13]. Ronald J Norman. ObjectOriented Systems Analysis And Design[M]. Tsinghua Press,2000
    [33]胡星,杨光.流线可视化技术研究与进展.计算机应用研究.2002,(8):8-11
    [34]刘顺隆.计算流体力学.哈尔滨:哈尔滨工程大学.1999
    [35]Christopher R Volpe, Ephraim P Glinert. Visualization of Streamline Vorticity in Computational Fluid Dynamics Data[C]. Visualization'97, Proceedings, 1997.51-57
    [36]黄凤良,任立义.流动矢量场的形象处理.系统工程与电子技术.1998.(4):56-62
    [37]Boring E, Pang A. Directional Flow Visualization of Vector Fields[c]. Visualization'96, Proceedings,1996. 389-392,506
    [38]任碧宁,魏生民.三维CFD矢量场自适应流线耙并行计算.西安电子科技大学学报.1999,26(5):646-790
    [39]何克清.计算机软件工程学.武汉:武汉大学出版社,1983
    [40]朱海滨.面向对象技术:原理与设计.北京:国防科技大学出版社,1992
    [41]李大有.程序设计系统设计师(高级程序员).北京:人民邮电出版社.2002
    [42]王春森.系统设计师(高级程序员)教程.北京:清华大学出版社.2001
    [43]David J. Kruglinski, Scot Wingo, George Shepherd. Programming Visual C++6.0技术内幕.北京:北京希望出版社,2002
    [44]王延华,洪飞,吴恩华.基于VTK库的医学图像处理子系统设计和实现.计算机工程与应用,2003(8):205-207
    [45]江早,王洪成.OpenGL VC/VB图形编程.北京:科学出版社,2001
    
    
    [46]吴建明,施鹏飞.Visualization Toolkit及其在三维体重建中的应用.微型机算计应用.2002,18(8):9-12
    [47]李功权,张春生.三维储层模型可视化的实现方法研究.物探化探计算技术.2002,24(1):37-41
    [48]钱能.C++程序设计教程.北京:清华大学出版社, 1999
    [49]崔汉国,陈玉林,张慧.基于微机的三维数据场可视化系统的研制.计算机工程.1998.24(3):31-33
    [49]David F.Rogers.计算机图形学的算法基础.北京:机械工业出版社,2002
    [50]刘伟.程序设计 高级程序员级考试辅导书.北京:科学出版社.2000

© 2004-2018 中国地质图书馆版权所有 京ICP备05064691号 京公网安备11010802017129号

地址:北京市海淀区学院路29号 邮编:100083

电话:办公室:(+86 10)66554848;文献借阅、咨询服务、科技查新:66554700