|
For our master's project, Brian Schlatter and I implemented a fluid flow simulation using the smoothed particle hydrodynamics (SPH) method. Our implementation runs in parallel on distributed memory machines using the MPI message passing libraries. The user can specify various simulation parameters and place cylinders and rectangles into a two-dimensional flow. The flow accelerates under a constant force specified by the user. We use periodic boundary conditions (particles flowing off the right side wrap around to the left) and no slip conditions (friction is exhibited along the surface of boundary shapes). Here is an example of a velocity plot of fluid flow around Benny the Beaver: Our simulator consists of a server side and a client side. The server is written in C++ and performs all the number crunching. The client side is written in Java and can be used to initialize the server and visualizes the resulting data. Communication between the client and server is carried out by a socket connection using classes we developed during the project. This allows the client to be run virtually anywhere that has a Java Virtual Machine and an internet connection. Alternatively, the server can be run without the client, writing data files to disk. These data files can be read in by the client application at a later time. The data can be viewed as a positional plot of the free and bound particles. It can also be viewed as a color contour plot of pressure, density, or speed. The contour plot is created by coloring each pixel according to the relevant attribute of its nearest free particle neighbor. We have made all of our source code available here. It is our hope that others will use and extend our work. For more details about the physics and implementation, see the papers listed below.
A Parallel Implementation of a Fluid Flow Simulation using Smoothed Particle Hydrodynamics Master's thesis, Oregon State University, 1999. A Pedagogical Tool Using Smooth Particle Hydrodynamics to Model Fluid Flow Past a System of Cylinders Master's thesis, Oregon State University, 1999.
|