Design of CFD code using high level programming paradigms: Free surface flows with arbitrarily moving rigid bodies
OLeg I. Gubanov, M.Sc. Thesis, Memorial University (2007)
Abstract -
The objective of this thesis is to design and develop a numerical
simulation tool for the class of unsteady free surface flows with
arbitrarily moving rigid bodies. The major technical issue
encountered in the solution of free surface problems is the
appearance of numerical instabilities that arise due to the
description of the mesh movement to track the moving boundaries,
nonlinearity of the governing equations and boundary conditions
implementation at the free surface and rigid body surface.
In the present computational model, fluid flow governed by full
Navier-Stokes equations is only modeled within a two-dimensional
computational domain. The motion of the air is neglected and the
effect of the ambient pressure exerted on the fluid by the air is
taken into consideration. The method of solution is based on a
finite volume discretization of unsteady Navier-Stokes equations in
their pressure-velocity formulation on a fixed Cartesian grid. A
special integral form of governing equations is derived by extending
the Reynolds transport theorem and then applying it to control
volumes containing fluid interface for the first time. The combined
volume of fluid and fractional area/volume obstacle representation
method, and the cut cell method are employed to track fluid-air and
fluid-body interfaces. This combined method is based on techniques
used in the commercial fluid dynamics simulation package
FLOW-3D developed by Flow Science, Inc. A sparse linear system
in pressure and velocity components is solved by using the
generalized minimal residual method with incomplete LU
preconditioner to advance the simulation of unsteady flow in time.
Creative use of object oriented programming, data abstraction and
template metaprogramming paradigms enables us to implement principle
computational fluid dynamics concepts, directly, into the computer
code developed in the present thesis. This results in a computer
program that is easier to understand and maintain. The C++
programming language is chosen as the implementation language since
it provides direct support of these modern programming paradigms.
Automatic generation of the program code from templates augmented
with compile time optimizations and function inlining reduces the
size of a manually written code up to four times and meets the high
level code efficiency requirements at the Fortran level.
This numerical simulation tool is applied to the problem of
unsteady, laminar, two dimensional flow of a viscous incompressible
fluid past transversely oscillating circular cylinder in the
presence of a free surface. The results of this thesis represent the
first comprehensive numerical study conducted on this problem to
date. The code validations are presented in special cases and good
comparisons with previous experimental and numerical results are
obtained.