Research Group of Prof. Dr. M. Griebel
Institute for Numerical Simulation
maximize
Title Development of CFD Code NaSt3D\GP
Participant Frank Koster , Michael Griebel
Keywords Chorin projection method, staggered mesh, finite differences
Description In this project we develop a sufficiently fast and accurate CFD code. NaSt3D\GP is a C++ implementation of a Chorin type projection method. For the spatial discretization finite differences on a non-uniform, rectangular mesh are employed. The temporal discretization bases a first order forward Euler scheme (see also: current work). Much emphasize is laid on the point that even complex problems, such as flows around complicated geometries, can be defined in a very clear and easy way, to rapidly obtain numerical results. Our approach rests on two concepts. First, there is a simple macro-language with a few but powerful and meaningful key-words to describe the flow configuration. This allows the user to
  • build complex geometries by union, intersection, subtraction of CSG (Constructive Solid Geometry) primitives using shape parameters independent on the discretization
  • describe the computational mesh in a simple way
  • define various parameters, e.g. Reynolds number, stopping value for iterative solver, upwind parameter
To supplement the features of this macro language some special tools are available (see: tools).

The second concept is the clear and open structure of the code itself. This should allow for easy and save modifications of NaSt3D\GP for problems which are not yet covered, e.g. time-dependent inflow conditions.

NaSt3D\GP is fully parallelized, but can be compiled in a single processor version if no message passing library is installed in the users environment.

You may obtain a licensed copy of the complete code on request.

Features of NaSt3D\GP The following list summarizes basic properties of NaSt3D\GP:
  • 2nd order finite differences on rectangular, non-uniform, staggered mesh
  • blending of 2nd order and first order upwind discretization for convective terms available
  • 1st order forward Euler scheme for temporal discretization
  • various boundary conditions, e.g. periodic, natural outflow, implemented
  • (S)SOR iterative solver for pressure Poisson equation
  • (optional) calculation of temperature or concentration fields
  • (optional) parallelization using MPI
  • macro language for problem description
  • architecture independent export/import of calculated data

Tools Although the macro language is powerful, it does not contain solutions to some frequent problems. First of all the generation of non-uniform grids usually requires some interaction and iteration to obtain an appropriate grid. Therefore a special grid generator (GridGen) was written to simplify this process. The second tool opens the door to the VRML world. A parser (vrml2nav) was developed to translate VRML descriptions of objects to our macro language.

Complicated Geometry parsed by the vrml2nav Tool

Current Work Currently we validate the code. Furthermore we have implemented a 2nd order Adams-Bashforth scheme to improve the temporal discretization. This also has to be tested.

Numerical Examples A diffusion process:

This problem comes from a joint work with the Department for Pharmaceutical Technology of the university of Bonn. To quantify the effectiveness of insect repellents the correlation between position of midges and concentration in a rectangular box is determined. At the left side the concentration of the repellent is kept constant, while on the right side a slight flow from top to the bottom provides an almost vanishing concentration. A video system on top of the box detects the instantaneous positions of the midges and computes the statistics. Without the effects of the flow a linear decrease of the concentration from the left to the right side without any dependency on the height would develop. The task of the simulation was to determine the effects of the flow and to give estimates for the time, required to reach the steady state.

Concentration after 2.5 hours

Backward facing step:

We compared a full upwind discretization of the convective terms with a second order central difference. The simulation was run on a fairly coarse mesh of 96x40x59 points with a Reynolds number of 3000 with respect to the step height and the inflow velocity. In reality this flow becomes turbulent after the step. Obviously, the numerical diffusion introduced by the upwinding scheme is much larger than the diffusion and thus leads to an almost laminar flow. Note, the initial condition for upwind simulation was a turbulent field whose disturbances are not completely smoothed out.

central differences upwind

Acknowledgements NaSt3D\GP bases on the 3D CFD code NaSt3D originally developed in Munich. It was completely rewritten and restructured using C++. The most significant changes are non-uniform grids, new boundary conditions and parallelization with MPI. The grid generator is an improved version of a code written by H.J. Kaltenbach.