节点文献
C#中铸件凝固过程温度场三维数值模拟软件开发研究
Numerical Simulation Software Development in C# on Three-Dimensional Temperature Field of Casting Solidification Process
【作者】 杨平;
【导师】 张金山;
【作者基本信息】 太原理工大学 , 材料加工工程, 2008, 硕士
【摘要】 通过铸造过程的数模模拟,人们可以掌握主要铸造缺陷的形成机理,优化铸造工艺参数,确保铸件质量,缩短试制周期,降低生产成本。温度场数值模拟是缩孔缩松、、热裂、偏析等缺陷预测和流场、热应力场模拟的基础。在当前的数值模拟软件开发中,用得比较多的是Fortran和C++语言,在三维图形显示方面多使用OpenGL来实现。本文用微软最新推出的C#为开发语言,用DirectX来实现三维图形显示,编制了一套铸件凝固过程三维温度场数值模拟软件,实现了STL造型文件的处理、直角六面体网格剖分、温度场数值计算、冷却曲线和查看最后凝固区域等功能,且程序运行过程中均实现了三维直观显示。软件开发的平台和语言,直接决定着软件开发的难易,以及软件运行的效率。本文在微软公司最新推出的.NET程序开发平台下,对使用最新的C#语言进行数值模拟软件开发进行了研究。研究发现:在C#中进行数值模拟软件开发,不仅编程容易实现,程序运行效率很高且更有利于程序后续版本的控制。面向对象思想是当前程序开发的主流思想,在程序开发过程中,充分使用面向对象的编程思想,不但使编程工作变得更加快捷、方便,更可提高程序代码可读性、可扩充性和可维护性。本文充分使用面向对象的思想,对数值模拟计算中的大量数据进行索引、排序,大大提高了程序的开发和运行效率。造型是数值模拟的第一步,本文直接对Pro/E、UG等大型造型软件所造模型实体进行调用,经过处理后存入计算机内存,能够迅速用于网格剖分和数值计算。网格剖分是数值模拟顺利进行的前提条件。本文充分使用面向对象思想,采用逆向思维,对传统网格剖分方法进行改进,描述了一种快速生成均匀或非均匀直角六面体网格的网格剖分方法。这种方法不仅原理简单,编程实现方便,而且剖分速度快,适用于剖分任意形状的铸件。数值计算是数值模拟的核心。传统的直接差分法具有程序复杂、计算时间较长、数据量大等缺点,本文采用简化的直接差分法,减少了数据量,使程序开发更简单,计算效率更高。并使用等价比热法和温度回复法对凝固潜热进行处理,可以比较准确地模拟出二元合金在浇注后凝固和冷却过程的温度场变化。三维图形的直观显示是数值模拟软件应该具备的功能。在当前的计算机编程中,常用的图形显示技术有OpenGL和DirectX,但是在数值模拟方面,OpenGL使用较多,而DirectX则使用较少。本文使用DrectX实现了网格剖分、温度场计算、查看最后凝固的区域等功能,并列出了使用DirectX的关键步骤,用C#语言给出了实现数值模拟网格可视化的关键代码,并对主要参数进行了说明。探讨发现,使用DirectX不仅编程实现容易,且能实现半透明、旋转等功能,能满足数值模拟图形显示的要求。为了验证软件的实用性,本文对湿砂型中含硅6.57%的亚共晶铝硅合金起吊凸轮的凝固过程的温度场进行计算,模拟的铸件冷却趋势、冷却曲线、最后凝固区域、程序计算时间和界面显示等效果基本令人满意。
【Abstract】 Numerical simulation of foundry process is very important,Which can help foundrymen to research the reason of casting defect,Use better foundry parameters,Make sure casting quality,Shorten the develop time of new product and Decrease production cost. Numerical simulation of Temperature field is the basis on predicting solidification shrinkage, gas porosity, lack of fill, laps, hot cracks, macrosegregation and micro-segregation and also the basis of flow field and hot power field simulation.Fortran and C++ are common used on current development of numerical simulation,and OpenGL is used more on 3D sketch manifestation. This paper developed a numerical simulation software on 3D temperature field of casting solidification process in C#,which Microsoft strongly released and DirectX is used to on 3D sketch manifestation .This software realized some important function,Such as input STL model files,Slice veridical hexahedron meshes,Numerical calculation of temperature field,View the cooling curve and the last solidified district,etc.3D direct manifestation is keeped when software is running. OOP is the main thought on current application develop,Which make our programming faster and more Convenience,The code can be easy to read and Maintenance.A great deal of data was ordered and indexed by fully used of OOP in this paper,Which greatly increased develop and circulate Efficiency.Making model is the first step in numerical simulation. The paper use STL model files directly,Which created in Pro/E,A big Software to make model.After models be solved,Useful information will keep in computer memory,Which can be used to slice mesh and calculate quikly.Mesh generation is the prior condition that the numerical simulation smoothly progress.The paper improved common mesh generation method by use oop thought and Contrary thinking,Descripted a new method,In which regular or irregular veridical hexahedron meshes can be quickly generated,Be applicable to generate casting with arbitrarily shape.The improved method of mesh generation is easy to understanding and programming.Numerical calculation is the core in numerical simulation.Traditional direct difference method have some weakness:Procedure complications,Cost long time to calculate,Much more data.The improved DFDM decrease data quantity,Exaltation procedure efficiency.Using the specific heat method and temperature restoring method, temperature field of two-phase alloy can be simulated more precisely.The 3D sketch manifestation is the basic function of numerical simulation software.On current computer programming,OpenGL and directX are common used on graphics field,But directX is less used than OpenGL on numerical simulation.This paper carried on a study on the important steps of using directX, The important code is listed in C# and main parameters are introduced.The study show that using directX to display mesh,Which is easy to programming, Can match the request of numerical simulation and can creat translucent and revolve effects.A temperature field calculation of AL-6.57SI two-phase alloy in wet sand mold was conducted to identify function of the software.The numerical simulation result is basically match the actual circumstance on the trend of casting cooling,the cooling curve,the last solidified district,Time of procedure calculation and Interface manifestation,etc.
【Key words】 C#; DirectX; Temperature Field; DFDM; Numerical Simulation; Mesh Generation;
- 【网络出版投稿人】 太原理工大学 【网络出版年期】2008年 10期
- 【分类号】TG21
- 【被引频次】2
- 【下载频次】324