introduction to openfoam - lth · turbulence - theory and modeling mvk140/mmv010f introduction to...
TRANSCRIPT
Turbulence - Theory and Modeling MVK140/MMV010F
Introduction to OpenFOAM
Piero Iudiciani, Holger GrosshansDivision of Fluid Mechanics, 15.11.11
Lund University / Division of Fluid Mechanics / 25.3.2011
Computer Exercises
• Introduction to OpenFOAM
• Computer Exercise 1 * 17.11.11 15:15 – 17:00
• Computer Exercise 2 * 24.11.11 13:15 – 15:00
* if you cannot join the exercises, write a short report an send it to :
Lund University / Division of Fluid Mechanics / Piero Iudiciani, Holger Grosshans / 15.11.1011
How to get OpenFOAM
Unix/Linux version 1.7 :www.opencfd.co.uk
MS Windows version 1.5 (used in this lab) :http://sourceforge.net/projects/openfoam-mswin/
DOCUMENTATION version 1.7 :http://foam.sourceforge.net/doc/Guides-a4/UserGuide.pdf
DOCUMENTATION version 1.5 :C:\win32app\cfd\OpenFOAM-1.5\doc\Guides-a4\UserGuide.pdf
Lund University / Division of Fluid Mechanics / Piero Iudiciani, Holger Grosshans / 15.11.1011
Tree structure
Lund University / Division of Fluid Mechanics / Piero Iudiciani, Holger Grosshans / 15.11.1011
Tree structure
• OpenFOAM is a C++ library of applications
Lund University / Division of Fluid Mechanics / Piero Iudiciani, Holger Grosshans / 15.11.1011
Tree structure
Lund University / Division of Fluid Mechanics / Piero Iudiciani, Holger Grosshans / 15.11.1011
Tree structure
Input files for solving equationse.g. discretization schemes, used solver, timestep, …
Input files for the physical properties-> blockMeshDict = Input file for creating the meshFiles which define the mesh. Created by blockMeshDict
Initial conditions input files in 0. Results created in other folders
Lund University / Division of Fluid Mechanics / Piero Iudiciani, Holger Grosshans / 15.11.1011
The pitzDaily case
• Create a folder turb_labOF in your local directory
• Copy the pitzDaily case
C:\win32app\cfd\OpenFOAM-1.5\tutorials\simpleFoam\pitzDaily
in this folder.
• Open OpenFOAM Designer and do File -> OpenCase to open your pitzDaily case
Lund University / Division of Fluid Mechanics / Piero Iudiciani, Holger Grosshans / 15.11.1011
OpenFOAM Designer
Input files for the case Editor for the input
files
OpenFOAM applications
Lund University / Division of Fluid Mechanics / Piero Iudiciani, Holger Grosshans / 15.11.1011
Create the Mesh
• Look into the constant/polyMesh folder
• Do MeshUtilities -> Generation -> blockMesh -> right click, start
• View → refresh
• Look into the constant/polyMesh folder to see that the mesh was created
Lund University / Division of Fluid Mechanics / Piero Iudiciani, Holger Grosshans / 15.11.1011
Look at the mesh in Paraview
• Create an empty file pitzDaily/pitzDaily.OpenFOAM in OpenFOAM Designer (File-> New)
• Open paraview
• Add the pluggins as instructed
• Don't close paraView anymore !
Lund University / Division of Fluid Mechanics / Piero Iudiciani, Holger Grosshans / 15.11.1011
Look at the mesh in ParaviewFile → open → ….pitzDaily.OpenFOAM
Lund University / Division of Fluid Mechanics / Piero Iudiciani, Holger Grosshans / 15.11.1011
check controlDict
Lund University / Division of Fluid Mechanics / Piero Iudiciani, Holger Grosshans / 15.11.1011
check boundary conditions
Lund University / Division of Fluid Mechanics / Piero Iudiciani, Holger Grosshans / 15.11.1011
check turbulence model
Lund University / Division of Fluid Mechanics / Piero Iudiciani, Holger Grosshans / 15.11.1011
Run Case pitzDaily
• run solver → incompressible → 'simpleFoam'
• Check the results in paraView : load the new time steps by clicking the box ’update GUI’ and ’Apply’.
Lund University / Division of Fluid Mechanics / Piero Iudiciani, Holger Grosshans / 15.11.1011
Check the results in paraview
• contourplot
• streamlines
• vectorplot
• plot over line