OpenFOAM/C2/Creating-curved-geometry-in-OpenFOAM/English

From Script | Spoken-Tutorial
Revision as of 18:28, 27 November 2012 by Chandrika (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Title of script: Creating curved geometry in OpenFOAM

Author: Rahul Ashok Joshi

Keywords: Video Tutorial,Computational Fluid Dynamics (CFD),Curved geometry,Flow over cylinder.

Visual Cue Narration
Slide 1

Hello and welcome to the spoken tutorial on creating curved geometry in OpenFOAM.

Slide 2: Learning Objective In this tutorial I will show you

How to create a curved geometry

How to view the results in paraview

Slide 3: System Requirement To record this tutorial

I am using Linux Operating system Ubuntu 10.04

OpenFOAM version 2.1.0

ParaView version 3.12.0


Slide 4: .

We will create a geometry for flow over cylinder.

Note that this is an example case for explanation.

The cylinder is in a form of a semi circle.

Meshing is a body fitted grid.

The entire geometry is divided into blocks.

We break the semi circle into equal number of parts


Open up a blockMeshDict file of the previous tutorial

I have already opened it

Scroll down, for simple geometries you can see that edges is kept empty

Create a new blockMeshDict file

Right click > create document and new file and name it as blockMeshDict.

Now you can copy the initial few lines from the lid driven cavity upto convertTometers


leave space and enter 1 and semicolon, press enter


After this you need to enter the value of the points in vertices.

Note that the points should be in an ordered way starting from 0,1,2,3 etc. as shown in the figure

After vertices press enter and put the open bracket

Press enter

Now enter the co-ordinates of points as shown in the diagram.

For explanation I will use the right half of the semi-circle.

Enter the values for the points in the figure starting from 0 enter (0.5 0 0)

point 1 (1 0 0)

leave two vertical spaces and enter value for the point 4 (0.707 0.707 0)

enter point 5 (0.353 0.353 0)

again leave 4 vertical spaces and enter point 9 (0 1 0)

point 10 (0 0.5 0)

Similarly enter the values for the remaining points.


Close the bracket and put a semi-colon

Press enter


Type blocks

In the next line put the open bracket and press enter

There are more number of blocks in this example Blocks are circled in the figure in previous slide.

In blocks enter the type of block i.e. Hex and points of the block

For creating the blocks please refer to the tutorial on creating simple geometry in OpenFOAM.

Close the bracket and put semi-colon and press enter

in the next line type edges,

Put the open bracket and press enter

In the next line type arc and leave some space

Type the points which are the end points of the arc

again leave some space insert open close bracket

In brackets enter the co-ordinate value of any intermediate point in between the two arc points.

Let me switch back to slides.

In the figure you can see that you have to pick up a point in between the two points.

In this geometry I have picked up right half of the circle

Using simple trignometric relation you can find the co-ordinates of the intermediate point shown in the circle.

Similarly you can repeat the procedure for rest of the semi-circle geometry.

Close the bracket and put a semi-colon and press enter

Enter the boundary patches after arcs

Refer to the tutorial on Simple geometry in OpenFOAM for entering the boundary patches

In the file type mergePatchPairs

put the parenthesis and put a semi-colon and press enter

As there no patches to be merged it can be kept empty Similarly enter the co-ordinate points for the points in the front face of unit thickness as shown in the figure.

Open Command terminal

In the command terminal type the path for the case file.



I have already set the path for the tutorial case of flow over cylinder.

In the command terminal type blockMesh and press enter

blocking is done

Type paraFoam in the terminal and press enter to view the geometry.

On the left side of object menu click Apply

The geometry created will be the one seen in the paraview window.

Scroll down the properties panel of Object inspector.

Check and uncheck the Mesh field box

You can see different regions of the geometry.

You can also see the wire frame of the geometry

On top of active variable control menu in the drop down menu

Change from Surface to wireframe.


Slide 6:

In this tutorial we learnt: Creating a curved geometry.

How to enter co-ordinates for edges in OpenFOAM

This brings us to the end of the tutorial


Slide :7

As an Assignment

Create a geometry with inner semi-circle of radius 2 and outer circle of radius 4

View the results in paraview

Slide 8:Summary In this tutorial we learnt:

File structure of Lid Driven cavity Solved lid driven cavity. Post-processing of solution Validation.

Slide 9: As as Assignment,

Change some parameters in the lid driven cavity the velocity magnitude in the '0' folder and transport properties in the 'constant' folder and plot the result of u/U and y/L velocity. This brings us to the end of the tutorial.

Slide10: The video available at this URL:

The video available at this URL: http://spoken-tutorial.org/What_is_a_Spoken_Tutorial It summarizes the Spoken Tutorial project. If you do not have good bandwidth, you can download and watch it.

Slide 11:

The Spoken Tutorial Project Team -Conducts workshops using spoken tutorials -Gives certificates to those who pass an online test -For more details, please write to

contacts@spoken-tutorial.org
Slide 12:Acknowledgement

The Spoken Tutorials are part of Talk to a Teacher project, It is supported by the National Mission on Education through ICT, MHRD, Government of India. More information on the same is available at the following URL link http://spoken-tutorial.org/NMEICT-Intro

About the Author This is Rahul Joshi from IIT BOMBAY signing off.

Thanks for joining.

Contributors and Content Editors

Chandrika, DeepaVedartham, Nancyvarkey, Rahuljoshi