discretizer-manual

13
Discretizer Manual – Release date 09/01/10 - Side 1 of 13 A Guide to the free mesh program Discretizer with OpenFOAM for CFD (Computational Fluid Dynamics) Homepage: http://www.discretizer.org/ Creator of Discretizer: Bjorn Bergqvist Manual Author: Gerhard Gruber Program and Manual under the GPL license v3 or later

Upload: paulfredric3173

Post on 04-Apr-2015

376 views

Category:

Documents


5 download

TRANSCRIPT

Page 1: Discretizer-manual

Discretizer Manual – Release date 09/01/10 ­ Side 1 of 13

A Guide to the free mesh program Discretizer with OpenFOAM for CFD (Computational 

Fluid Dynamics)

Homepage: http://www.discretizer.org/Creator of Discretizer: Bjorn Bergqvist

Manual Author: Gerhard Gruber

Program and Manual under the GPL license v3 or later

Page 2: Discretizer-manual

Discretizer Manual – Release date 09/01/10 ­ Side 2 of 13

Table of Contents

1. Preface

1.1 Introduction

1.2 Installing OpenFOAM

1.3 Installing Discretizer

1.4 Conventions

1.5 Main Window

2. Example

2.1 Step

Page 3: Discretizer-manual

Discretizer Manual – Release date 09/01/10 ­ Side 3 of 13

1. Preface

1.1 IntroductionDiscretizer is an interactive preprocessing geometry and mesh creation tool. 

It will create geometry and meshes for three dimensional flow simulations (CFD).

It is optimized to work with OpenFOAM as solver and the included post processing program ParaFOAM .

1.2 Installing OpenFOAM

Operating System Binary Compiling

Ubuntu (9.04) openfoam­16­installation OpenFOAM­1.6 install cookbook

Windows Not supported Not supported

1.3 Installing Discretizer

Operating System Binary Compiling

Linux discretizer­32and64bit ­

Windows ­ ­

Starting  Discretizer:

– Start a Terminal

– Change to the “discretizer” Directory

– Start Discretizer by typing “./discretizer32.sh” or “./discretizer64.sh”

1.4 ConventionsThe Discretizer Manual use the following style conventions.

Menu selections, to take orders, are shown in bold. For example: File   New→

Tips have cursive style. For example: Tip: Press the STRG Key

Page 4: Discretizer-manual

Discretizer Manual – Release date 09/01/10 ­ Side 4 of 13

1.5 Main Window

Picture 1: The Main Window of Discretizer

1 Pull­down menu bar 

offers the main commands of Discretizer, explanation in chapter 2

Tip:  BC is the short cut of Boundary Conditions

2 Icon bar 

each picture shows his function in the status line or pop­up help when you put the mouse cursor over it 

3 Item with attribute chart

each command for the geometry is shown in this chart

Tip:  each command can be modified by selecting it's item, pressing the right  mouse button and select properties 

4 Geometry window

shows the geometry model

5 Status line

shows system output

1

2

3

4

5

Page 5: Discretizer-manual

Discretizer Manual – Release date 09/01/10 ­ Side 5 of 13

2. Example

2.1 StepThe Step shows how to create geometry models with Discretizer and make a complete simulation with OpenFOAM.

Tip: The complete geometry model is saved in “discretizer/discretizer/svn/test/t19_step.dtz”

1. Create   Point→

Press the OK Button

Select the created Point

Tip: it can be also selected by selecting the row of the point in the Item chart

Page 6: Discretizer-manual

Discretizer Manual – Release date 09/01/10 ­ Side 6 of 13

2. Create   Cube→

Enter the cube attributes

Tip: “x,y,z mesh points” defines the number of mesh cells

Tip: you can modify the attributes by selecting the row of the cube in the item chart, pressing the right mouse button and selecting “Properties”

Reset the View by pressing the  Reset Button in the Icon bar

Tip: The model  can be 

rotated by pressing the left  mouse Button and moving the mouse inside the geometry window

it can be scaled by scrolling with the mouse wheel

and you can drag it by pressing the right mouse Button

Page 7: Discretizer-manual

Discretizer Manual – Release date 09/01/10 ­ Side 7 of 13

3. Select the right front face of the cube and choose Create   Cube→

Enter the cube attributes

Press the OK Button

Tip: the Create Cube dialogue can also be started by selecting the face, pressing the right mouse button and selecting “Create Cube”

4. Select the upper face of the second cube and choose Create   Cube→

Page 8: Discretizer-manual

Discretizer Manual – Release date 09/01/10 ­ Side 8 of 13

5. Select the left front face of the first cube and choose BC   Create Inlet→

Enter the “Velocity Magnitude” and the Direction, 1 is “yes” 0 is “no”.

Press the OK Button

6. Select the right front face of the second cube and select the right front face of the third cube, choose BC   Create Outlet→

Enter Pressure

Press the OK Button

Tip: at least one velocity inlet and one pressure outlet is recommended for a  simulation

Page 9: Discretizer-manual

Discretizer Manual – Release date 09/01/10 ­ Side 9 of 13

7. File   Run Dialog→

In the Field “Case Info:” you can define some properties

Work Dir: is the directory where the “Case” will be stored

Case Name: Defines the name of this simulation, enter “step”

OpenFOAM Solver: is the solver used by OpenFOAM

Scale Factor: is the scale factor the model will be transformed

(measures in  Discretizer are in mm, measures in  OpenFOAM  are in m)

0.001 don't has to be changed

Tip: the Field “Initial conditions” don't has to be changed because they are defined with the Boundary Conditions at the inlet (see Point 5)

Start the simulation by pressing the “Write and Run” Button

Tip: have a look at the Terminal Window, some output with “Time = “ and data shows the progress of the calculation

The time how long the calculation takes depends on the number of mesh cells you have defined and the power of your computer

If “End” is shown the calculation has finished

Page 10: Discretizer-manual

Discretizer Manual – Release date 09/01/10 ­ Side 10 of 13

8. The result of the simulation can be shown by pressing the “Paraview” Button

Actually nothing is shown

At first press the “Last Frame” Button, or Animation   Last frame→

Now press the highlighted green “Apply” Button

Page 11: Discretizer-manual

Discretizer Manual – Release date 09/01/10 ­ Side 11 of 13

Choose “U” for velocity from the Icon bar

Tip: The model can be 

rotated by pressing the left mouse Button and moving the mouse inside the geometry window

it can be scaled by scrolling with the mouse wheel or pressing the right mouse Button and moving the mouse inside the window up or down

and you can drag it by pressing the mouse wheel

Page 12: Discretizer-manual

Discretizer Manual – Release date 09/01/10 ­ Side 12 of 13

9. Press the “Clip” Button from the Icon bar, press the “Z Normal” Button and select “Inside Out”

Press the “Display” Tab, press the “Edir Color Map...” Button, Press the “Color Legend” Tab and select “Show Color Legend”

Now you can see the velocity range from the step

Page 13: Discretizer-manual

Discretizer Manual – Release date 09/01/10 ­ Side 13 of 13

10. Choose “p” for pressure from the Icon bar

Press the “Display” Tab, press the “Edir Color Map...” Button, Press the “Color Legend” Tab and select “Show Color Legend”

Now you can see the pressure range from the step