Simulation and Visualization of Water Flow
Total Page:16
File Type:pdf, Size:1020Kb
Acta Electrotechnica et Informatica, Vol. 11, No. 1, 2011, 25–32, DOI: 10.2478/v10198-011-0004-0 25 SIMULATION AND VISUALIZATION OF WATER FLOW František HROZEK, Branislav SOBOTA Department of Computers and Informatics, Faculty of Electrical Engineering and Informatics, Technical University of Košice, Letná 9, 042 00 Košice, Slovak Republic, tel.: +421 55 602 2563, e-mail: [email protected], [email protected] ABSTRACT At present the problematic of floods is larger than ever because global warming, deforestation and other factors increase chance of flood creation. As prevention to floods, designing of many new anti-floods projects have been started. In the future, these projects will stop floods completely or at least reduce their consequences. Water flow simulation and visualization is an integral part of this process. Simulation is used for testing, if the project meets flood protection requirements. Visualization is used for presenting and helps investors and wide public to better understand these projects. Stereoscopic visualization can be also used, because displaying of outputs from simulation and visualization is important, too. This paper aims at fluid flow simulation and visualization software. Also aims at hardware that can be used for stereoscopic visualization. Keywords: computational fluid dynamics, fluid flow simulation, fluid flow visualization, stereoscopic visualization 1. INTRODUCTION 2. USED METHODS Several floods hit Slovakia in recent years. Some of Both visualization and simulation use laws of fluid them were small and caused only small damage on human mechanics [1] for realistic visualizations and physically properties. But some of them were large and caused large accurate simulations (liquids, gases and plasmas belongs damage, even some people were killed. to fluids). Fluid mechanics is a part of physics that deals At present, designing of several anti-flood projects has with fluid flow. Fluid mechanics can be divided into fluid been started. In the future, these projects will stop floods statics, the study of fluids at rest and fluid dynamics, the completely or at least reduce their consequences. study of fluids in motion. Visualization and simulation of water flow is an integral The foundational axioms of fluid dynamics are the part of these projects. Simulation on anti-flood barrier conservation laws: virtual model is used for testing, whether the newly • conservation of mass, proposed project satisfies the requirements for flood • conservation of linear momentum (also known as protection. Visualization is used for project presenting and Newton's Second Law of Motion), helps investors and wide public to better understand the • conservation of energy (also known as First Law project, because not everyone knows how to read of Thermodynamics). blueprints. Another important thing is how will be outputs A solution to a fluid dynamics problem typically from water flow simulation and visualization displayed. involves calculating various properties of the fluid, such Nowadays the most used devices for displaying are as velocity, pressure, density and temperature as functions monitors and projectors, but for the better impression a of space and time. Fluid dynamics has a wide range of stereoscopic visualization can be used. applications, including calculating forces and moments on Simulation and visualization can be also used by flood aircraft, determining the mass flow rate of petroleum crisis management, because fast and accurate information through pipelines, predicting weather patterns, about flood spreading minimize damage on properties and understanding nebulae in interstellar space and reportedly human lives losses. modelling fission weapon detonation. Some of its This paper aims at simulation and visualization principles are even used in traffic engineering, where software that can be used for water (or any fluid) flow traffic is treated as a continuous fluid. simulation and visualization. It also aims at visualization Calculations for large simulations of fluid flow can be hardware that can be used for stereoscopic visualization. mathematically complex and therefore several algorithms Paper is organized as follows. In section 2 are and numerical methods have been developed to solve mentioned methods that are used in calculations for these calculations. A modern discipline, called simulations and visualizations. Section 3 deals with the computational fluid dynamics (CFD), is devoted to this software that can be used for water flow simulation. In approach. The most common methods used in CFD are: section 4 is mentioned a software which can be used for • Eulerian grid-based methods, flowing water photorealistic visualization. Section 5 deals • Smoothed particle hydrodynamics methods, with stereoscopic visualization that can be used for • Vorticity-based methods, displaying. Section 6 is about water inflow/drainage • Lattice Boltzmann methods. simulation program, which was developed at DCI FEEI TU of Košice. In section 7 are mentioned applications Computers are used to perform millions of calculations which use fluid flow simulations and visualizations. required to simulate the interaction of liquids and gases Section 8 summarizes information presented in the paper. with surfaces defined by boundary conditions. In many ISSN 1335-8243 (print) © 2011 FEI TUKE Unauthenticated | 194.138.39.60 ISSN 1338-3957 (online) www.aei.tuke.sk Download Date | 1/15/14 3:13 AM www.versita.com/aei 26 Simulation and Visualization of Water Flow cases, even with high-speed supercomputers, only by all commercial CFD programs when modelling free approximate solutions can be achieved. Ongoing research, surfaces. More about Flow-3D at [2]. however, may yield software that improves the accuracy ANSYS CFX is CFD modelling software developed and speed of complex simulation scenarios such as by ANSYS. ANSYS CFX is based on finite volume transonic or turbulent flows. method. In this method, the region of the interest is divided into small sub-regions, called control volumes. 3. SIMULATION The equations are discretized and solved iteratively for each control volume. As a result an approximation of the Nowadays the fluid flow simulation is an integral part each variable value at specific points throughout the of design and testing. It is used, for example, in aerospace domain can de obtained. In this way, one derives a full (see Fig. 1), casting, coating, microfluidics and water flow picture of the flow behaviour. Simulation by ANSYS CFX simulations. There are several simulation software that is shown in Fig. 3. More about ANSYS CFX at [3]. deal with the issue of fluid flow simulation in the design, development and testing of the new devices. Two of them are Flow-3D [2] and ANSYS CFX [3]. Fig. 1 Simulation of the changing tilt of the rotorcraft’s wings while changing flight modes in ANSYS FLUENT [4] Flow-3D is an advanced CFD model developed by Fig. 3 Wave formation around a ship hull modelled with Flow Science Inc. in Santa Fe, New Mexico. Flow-3D ANSYS CFX software [4] computes the three velocity components (u,v,w) and pressure at the nodes of orthogonal Finite Difference Grid. 4. VISUALIZATION Among the general-purpose CFD programs commercially available in the market, Flow-3D stands out for its Fluid flow visualization process can be divided into capabilities intended for hydraulic engineering two parts: applications: it has excellent capabilities for modelling • virtual model creation, free surface flow; it can read topographic files in (x,y,z) • photorealistic visualization. format; boundary conditions can by specified as a discharge hydrograph or water level hydrograph. Flow-3D Also in visualization, simulation is used for creation of has been used extensively to model structures such as realistic fluid flow model, but the key difference is in the spillways (Fig. 2), stilling basins, water intakes, fish accuracy of simulation which is needed. That is, if a ladders and similar instream structures. human observer is unable to identify by inspection whether a given animation is physically correct, the results are sufficient. 4.1. Fluid flow model creation At present, there are several 3D modelling and visualization programs that allow fluid flow simulation. For example, these programs are: • Autodesk 3ds Max [6], • Autodesk Maya [7], • Autodesk Softimage [8], • Maxon Cinema 4D [9], • NewTek LightWave 3D [10], • Blender [11], • Side Effects Software Houdini [12]. Fig. 2 Dam and spillway flow simulation [5] These programs use various methods for fluid flow simulation. For example Blender uses Lattice Boltzmann As an interesting fact, Flow Science Inc. was founded method. by Dr. C.W. Hirt, who pioneered the Volume Of Fluid There are also several plug-ins that can be used in (VOF) method, a unique free surface tracking. The VOF is mentioned programs. These plug-ins are used in fluid flow at present the best method available to simulate the simulations, where simulation capabilities of 3D movement of rapidly-varying water surfaces and it is used visualization software are insufficient. For example one of ISSN 1335-8243 (print) © 2011 FEI TUKE Unauthenticated | 194.138.39.60 ISSN 1338-3957 (online) www.aei.tuke.sk Download Date | 1/15/14 3:13 AM www.versita.com/aei Acta Electrotechnica et Informatica, Vol. 11, No. 1, 2011 27 these plug-ins is Glu3D developed by 3DAlien [13]. This 4.2. Photorealistic visualization plug-in can be used in 3ds Max and Maya. For solving fluid flow simulations use smoothed particle It is necessary