Professional Documents
Culture Documents
OpenFOAM
Hasret Türkeri
9 December 2016
OpenFOAM
• Computer software
• Solves equation for flows
• Momentum
• Pressure
• Energy
• …
• Developed for Linux
• No graphic interface
• Run with commands
The Concepts
• CFD : Computational Fluid Dynamics
• Initial and boundary conditions
• Mesh - Grid
• Numerical Methods
•…
Steps in CFD
• Pre-Processing
• Preparation of grid
• Setting initial and boundary conditions
• Selecting numerical schemes
• Processing
• Solving the equation using computer software, OpenFOAM
• Post-Processing
• Plotting and analyzing the results
Pre-Processing in OpenFOAM
Case directory
•0
• U, p, rho,…
• Constant
• System
• blockMesh
• fvSchemes, fvSolutions
Pre-Processing in OpenFOAM
blockMesh
vertices
(
( -5 -4 0)
(15 -4 0)
(15 4 0)
( -5 4 0)
( -5 -4 8)
(15 -4 8)
(15 4 8)
( -5 4 8)
);
blocks
(
hex (0 1 2 3 4 5 6 7) (20 8 8) simpleGrading (1 1 1)
);
Pre-Processing in OpenFOAM
Setting the motorbike velocity
Setting the motorbike velocity
0.org/U => fixedValues => initialConditions -> flowVelocity (20 0 0)
• C:/OpenFOAM/16.10/Faruk-3.0.x/run
How to Start OpenFOAM on Windows
• Copy motorBike case dir
• From
• C:\OpenFOAM\16.10\cygwin64\opt\OpenFOAM\OpenFOAM-
3.0.x\tutorials\incompressible\simpleFoam
• To
• C:/OpenFOAM/16.10/Faruk-3.0.x/run
How to Start OpenFOAM on Windows
• Open 0.org/initialConditions and set the flow velocity
• flowVelocity (20 0 0) Important: The dimension here is m/s
• Open system/blockMesh change the values in green box
blocks
(
hex (0 1 2 3 4 5 6 7) (20 8 8) simpleGrading (1 1 1)
);
The number of cells in x, y, z,
direction respectively
How to Start OpenFOAM on Windows
• In terminal, change your directory into motorBike
cd motorBike