You are on page 1of 21

OpenFlower CFD Software R EFERENCE M ANUAL

Version 0.1 Edited on July 10, 2004

Contents
I OpenFlower: A Free Open-Source CFD Software
1 Getting started 1.1 Retrieve the source les of OpenFlower . . . . . . . . . . . . . . . . . . . . . . 1.2 Starting with the provided example les . . . . . . . . . . . . . . . . . . . . . .

7
9 9 9

II Numerical and Physical Overview of OpenFlower


2 Choices made in OpenFlower and objectives 2.1 Governing equations . . . . . . . . . . . 2.1.1 Mass conservation . . . . . . . . 2.1.2 Navier-Stokes equation . . . . . . 2.1.3 Temperature equation . . . . . . . 3 Physical modeling 4 Numerical overview 4.1 Diffusive uxes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . References . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

11
13 13 13 13 14 15 17 17 21

CONTENTS

Introduction
OpenFlower development was rst launched on february 2004 by some CFD research engineers, willing to encourage common effort in research and developments in the area of Computational Fluid Dynamics. The main reason for this was (among other things) to federate the work of a multitude of PhD students and scientists who develop their own specic and effective codes, but which one day or the other will vanish as they change area of interest, or become unusable as time passes by... Moreover, the general trend shows that only some (expensive) commercial codes are available to treat complex geometries, whereas scientists in research labs can only mainly rely on these to accomplish research contracts with industry, when their home applications can only solve specic academic applications. The objective of an open-source CFD software 1 such as OpenFlower becomes clear then : provide in a give & ask basis a reliable CFD platform to develop models, numerical techniques and be available to respond to the increase of industrial needs in the eld of CFD. OpenFlower development will mainly rely on: the maintainment and developments integration of contributions coming from private institutes, research labs, PhD students... by the project administrators, who also provide the main development guidelines and starting basis; the feedback of OpenFlower users, such as bug reports, patches, code development and optimisations The scientic exchange of thousands of researchers and students of numerous elds of interest and skills can only be benec in such an open-source code development environment, which surely will become an interesting way around closed commercial CFD codes. The main strength of OpenFlower will not only be its open-source community working and hacking on it, but also a reliable colloborative framework and a well documented source of information for the fast development in the code and understanding its basic concepts and implemented physical modelings. OpenFlower (litteraly Open Source Flow Solver) is a free open-source nite volume Computational Fluid Dynamics software, mainly devoted to the resolution of the turbulent incompressible Navier-Stokes equations, with scalar transport. It can deal with arbitrary complex geometries with hybrid meshes (supporting tetrahedrals, prisms, pyramids and hexahedrals), and is mainly devoted to the Large Eddy Simulation of turbulent ows, an area which is being greatly supported and has received all the attention of the CFD community for the past 20 years. It is likely that this will be the most interesting approach for the simulation of turbulent ows, as computers are being faster year after year with their prices being more and more affordable for industries and universities.

see the argument (english) made by St phane Zaleski for the open sourcing of CFD codes @ e http://www.lmm.jussieu.fr/ zaleski/OpenCFD.html

CONTENTS

Part I

OpenFlower: A Free Open-Source CFD Software

Chapter 1

Getting started
1.1 Retrieve the source les of OpenFlower
If you have cvs version 1.10 or higher installed, you should do the following to get the initial copy of the repository: % mkdir OpenFlower % cd OpenFlower % cvs -d:pserver:anonymous@cvs.sourceforge.net:/cvsroot/openower login % cvs -z3 -d:pserver:anonymous@cvs.sourceforge.net:/cvsroot/openower co openower-v0.1.1 Youll have to hit return at the password prompt after cvs login. (If you cannot login, check if you really have cvs version 1.10 or higher!) After that you can use : % cvs co openower-v0.1.1 % cd openower-v0.1.1 % ./rst construction % make To force a fresh release after an earlier check-out do: % make distclean % cvs update -d -P % ./congure % make from the OpenFlower directory to update your working copy. After the binaries have been built, you can use: % make install to install them. It is not possible to commit changes unless you are a member of the OpenFlower development team, but you can send us patches and well include them in the next release of the project. Or you can post a request for ofcially joining the project in the proper Forum 1 .

1.2 Starting with the provided example les


Example les are available in the /examples/ directory.
1

http://sourceforge.net/forum/?group id=104134

10

CHAPTER 1. GETTING STARTED

OpenFlower input les are denoted by *.w (eg. prisms and hexas.w). These contain several instructions concerning all the necessary instructions for creating and running a CFD simulation. Before explaining the content of the input les format, the user needs to create the geometry and the related mesh of the conguration. As for now, only the Gmsh 2 format is available as an OpenFlower input. Gmsh is a three-dimensional unstructured mesh generator, with some built-in post-processing facilities. It can generate multi-element meshes (tetrahedral, hexahedral, prism and pyramids) and it is freely downloadable from the web-site of C. Geuzaine. OpenFlower already provides several *.geo les (the Gmsh format for CAD and meshing directives), in order for the beginner to quickly create a rst mesh (eg. prisms and hexas.geo). Launch Gmsh with the selected .geo le: % gmsh prisms and hexas.geo select the Mesh item from the drop-down menu of the Gmsh interface, then generate the mesh by clicking and choosing a 3D mesh: the generated mesh is then displayed in the visaulization window. Save the mesh by clicking in the Save button: a *.msh le will be created containing all the mesh characteristics (see Gmsh Reference Manual for details concerning the mesh le format). The le (eg. prisms and hexas.msh) can now be used by the OpenFlower interface (via the input .w le) for solving a problem. Then, to launch OpenFlower on a test case, simply type: % openower le.w 1>out 2>err The parser of OpenFlower then reads the input .w le and eventually outputs some information in the out and err les (or other post-processing les if any).

see Gmsh website maintained and developped by Christophe Geuzaine @ http://www.geuz.org/gmsh

Part II

Numerical and Physical Overview of OpenFlower

11

Chapter 2

Choices made in OpenFlower and objectives


OpenFlower is intended to solve the incompressible Navier-Stokes equations in their conservative form and on unstructured meshes. The governing equations are solved with a nite-volume approach and a co-located arrangement of the variables (velocity, pressure, and temperature).

2.1 Governing equations


2.1.1
as: ui =0 xi (2.1)

Mass conservation

The mass conservation equation, assuming an incompressible ow at constant density , reads

2.1.2

Navier-Stokes equation

The Navier-Stokes equation, in its conservative form reads as: ui 1 p + (ui uj ) = + (2Sij ) + fi t xj xi xj where: ui is the velocity component in the ith direction; p denotes the pressure eld; fi relates to a source term (buoyancy force, mass ow-rate conservation term...); is the cinematic viscosity (= /) and Sij is the strain rate tensor given by: Sij = 1 2 uj ui + xj xi 13 (2.3) (2.2)

14

CHAPTER 2. CHOICES MADE IN OPENFLOWER AND OBJECTIVES

2.1.3

Temperature equation

The temperature (or scalar transport) equation is given by: T + (uj T ) = t xj xj T xj +Q (2.4)

where = /Cp is the (thermal) diffusivity and Q is a source (or sink) term.

Chapter 3

Physical modeling

15

16

CHAPTER 3. PHYSICAL MODELING

Chapter 4

Numerical overview
The discretized set of governing equations is written in its integral form, and following the Gauss theorem, as: ui dV + t 1 p dV + xi

uj ui nj dS =
V V

2( + t )Sij nj dS
V

(4.1) (4.2)

ui ni dS = 0
V

T dV + t

ui T ni dS =
V V

(f + t )

T ni dS xi

(4.3)

n being the outward normal unit surface vector of control volume V centered on point E.

4.1 Diffusive uxes


The diffusion term appears in the discretized governing equations as: 1 D= V 1 ni dS = xi V
N eibrs(E)

f
f

ni xi

Sf
f

(4.4)

where is the total diffusivity. For example = ( + t ) for a scalar eld. Consider a scalar eld , located at CV centroids (center of elements) E and P . E represents the center of the element for which we want to calculate diffusion, P is one of its neighbours (see gure 4.1). We dene point I as the intersection between the face f (with neighbours E and P ) and the straight line between E and P . Note that in non-orthogonal meshes, point I differs from the center of the face f . We also dene points E and P which are obtained by projecting E and P orthogonally on the line normal to face f and passing through point f . V is the volume of cell E and Sf is the surface of the face centered on f between cells E and P . Consider a scalar eld , located at CV centroids (center of elements). E denotes the present CV and P one of its neighbor elements sharing face i (see gure 4.1). The objective is to determine the diffusive ux going out of element E. Given these notations, the gradient normal to the face at f between E and P is then given by [1]: ni xi P E dE P 17 (4.5)

18

CHAPTER 4. NUMERICAL OVERVIEW

P
       

Figure 4.1: Notations for the estimation of the diffusive uxes and gradients dE P being the distance between points E and P . The values of P and E are determined using a second order approximation: E = E + EE (4.6)

Gradient of the scalar eld at control volume centers are given by: xi 1 = V
N eibrs(E)

The evaluation of the face center value f at f can not be a simple linear interpolation between points E and P since it would provide an evaluation of at point I: I = f E + (1 f ) P where: f = dIP dEP (4.9) (4.8)

A second order approximation for f is given by the following expression, where the gradient used to correct the estimation at point f is given at the previous time step old: f = I +
old I

Gradient at the center of element E is evaluated following (similar reasoning for element P ): E = 1 VE i Si n
i

PSfrag replacements

1 2

old E

I
         

E
 

f
       

n
       

     

f ni S f

(4.7)

old I

If

(4.10)
old P

(4.11)

(4.12)

4.1. DIFFUSIVE FLUXES

19

Now, i is approximated using the previous value (at the previous time step) of the gradient of by: i = F + F .d F i
old

(4.13)

20

CHAPTER 4. NUMERICAL OVERVIEW

Bibliography
[1] F ERZIGER , J., AND P ERIC , M. Computational Methods for Fluid Dynamics. Springer, 1997.

21

You might also like