0% found this document useful (0 votes)
52 views

OpenFoam Introduction

Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
52 views

OpenFoam Introduction

Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 20

Introductory OpenFOAM® Course

From 2nd to 6th July, 2012

University of Genoa, DICAT


Dipartimento di Ingegneria delle Costruzioni, dell'Ambiente e del Territorio
Introductory OpenFOAM® Course

Do you happen to know how much a


polar bear weighs?
Introductory OpenFOAM® Course

Do you happen to know how much a


polar bear weighs?

Well, it’s enough to break the ice.

Hi, I’m Joel and I will be your


Lecturer today
Your Lecturer

Joel GUERRERO

[email protected]

 
 
[email protected]
 
Acknowledgements

These slides are mainly based upon personal experience, OpenFOAM®


user guide, OpenFOAM® programmer’s guide, and presentations from
previous OpenFOAM® training sessions and OpenFOAM® workshops.

We gratefully acknowledge the following OpenFOAM® users for their


consent to use their training material:
• Hrvoje Jasak. Wikki Ltd.
• Hakan Nilsson. Department of Applied Mechanics, Chalmers
University of Technology.
• Eric Paterson. Applied Research Laboratory Professor of Mechanical
Engineering, Pennsylvania State University.
• Tommaso Lucchini. Department of Energy, Politecnico di Milano.
Before we begin

Who does not have a working installation of


OpenFOAM?
• Tomorrow session will be dedicated to OpenFOAM installation issues
(version 2.1.0 or 2.1.x and version 1.6-ext).
• The easiest way to install OpenFOAM is by downloading a
precompiled binary (Ubuntu Deb Pack and Suse RPM pack are
available).
• The ideal way is to compile the latest source code release from the
Git repository.
• To install OpenFOAM, just follow the instructions given in
http://www.openfoam.org/ and http://www.extend-project.de/.
Before we begin

Who does not have a working installation of


OpenFOAM?
• If for any reason the instructions given in http://www.openfoam.org/
and http://www.extend-project.de/ do not work for you, I am going to
give you mine instructions, they work fine in OpenSUSE 11.4 or newer
version (I tested the instructions on 23/06/2012).
• It is possible to install OpenFOAM in Windows and Mac OS X, but we
will not discuss it. The easiest way is by using a virtual machine (such
as VirtualBox https://www.virtualbox.org/).
• For windows and Mac users, you can also check the following
websites:
http://www.paratools.com/OpenFOAM
http://www.ifd.mavt.ethz.ch/education/Lectures/openfoam/of-macosx
Before we begin

For those who do not have a working


installation of OpenFOAM, you can
remotely run it in dagobah:

• ssh –X –l cfdofuser dagobah


• Password: cfdof1234
• cd OpenFOAM
• There are 6 cfd user directories, namely:
cfd1, cfd2, cfd3, cfd4, cfd5, cfd6.
Choose one, this will be your personal directory.

Note: the account will be working until next Tuesday.


Note: you can only access dagobah within the department domain
(dicat.unige.it).
Where can you get the course’s handouts and tutorials?

You can download the course’s handouts and


tutorials from the following link

www.dicat.unige.it/guerrero/
OpenFOAM_course2012.html

www.dicat.unige.it/guerrero/OpenFOAM_course2012.html

You can extract the files wherever you want.


However, I highly recommend you to extract them
in your OpenFOAM user directory, this directory
will become $path_to_openfoamcourse.
Before we begin
!

Provisional timetable
nd rd th th th
Monday 2 Tuesday 3 Wednesday 4 Thursday 5 Friday 6

• Introduction - Overview of
OpenFOAM® • Basics of C++ programming
• Setting boundary and initials • OpenFOAM® library • Turbulence modeling
conditions NO LECTURES organization, code structure (RANS and LES) • OpenFOAM® extend project
and compilation advanced physical modeling
• Selecting models and • Advanced Physical
Morning Session • OpenFOAM® installation • Programming and modifying capabilities
setting parameters Modeling capabilities
• Solution monitoring and issues OpenFOAM® solvers and
• Running in parallel • Wrap-up session
(9:30 am – 12:00 am) boundary conditions • Open Forum: Questions,
control • Open Forum: Questions, • Extending OpenFOAM®
doubts and attendees own • Finite Volume Discretization: doubts and attendees own
• Physical Modeling capabilities
cases theoretical background for cases
capabilities
OpenFOAM® • Hands-on tutorials
• Post-processing
• Hands-on tutorials
• Hands-on tutorials

• Basic meshing and mesh


conversion in OpenFOAM® NO LECTURES
• Geometry generation, mesh NO LECTURES NO LECTURES NO LECTURES
generation and post-
Afternoon Session processing using Open • OpenFOAM® installation
issues • Open Forum: Questions, • Open Forum: Questions, • Open Forum: Questions,
(2:00 pm – 5:30 pm) Source tools
• Data analysis, sampling, • Open Forum: Questions, doubts and attendees own doubts and attendees own doubts and attendees own
graphing and post- doubts and attendees own cases cases cases
processing. cases
• Hands-on tutorials

Note: the above course outline is a guide only and every attempt will be made to adjust
the course content to suit your needs.
Before we begin
Additional Tools
As we will be working in the CFD simulation lifecycle (from geometry generation,
to mesh generation, to governing equations solution, to post-processing) by
using open source tools, the following additional tools might come in handy:

• SALOME (http://www.salome-platform.org/).
• Blender (http://www.blender.org/).
• Google SketchUp (http://sketchup.google.com/).
• Free-CAD (http://sourceforge.net/apps/mediawiki/free-cad/).
• Engrid (http://engits.eu/en/engrid).
• GMSH (http://www.geuz.org/gmsh/).
• VISIT (https://wci.llnl.gov/codes/visit/).
• Discretizer (http://www.discretizer.org/).
• and of course OpenFOAM® (http://www.openfoam.com/).

Note: precompiled binaries are available for all the applications.


Course objectives

• Introduce OpenFOAM.
• Introduce the CFD simulation lifecycle by using open source tools.
“From geometry generation, to mesh generation, to governing
equations solution, to post-processing”.
• Help you to become an out-of-the-box user of OpenFOAM.
• But also, help you to become an OpenFOAM user at a developer level
(introductory level).
• Empower you to learn more about OpenFOAM.
• To increase the use of OpenFOAM in our community.
Prerequisites

• No prior knowledge of OpenFOAM®, C++ or Linux is required, but a basic


knowledge of Linux is beneficial.
• A basic knowledge in CFD is also desirably.
• For hands-on examples, you are required to bring your own laptop with a
working installation of Linux and OpenFOAM® (version 2.1.0 or 2.1.x
preferable).
• For those not able to install OpenFOAM® on their laptops, a full day will be
dedicated to OpenFOAM® installation issues.

What I will try to keep to a minimum


• This is not a C++ course, so I will try to keep C++ programming to a minimum.
• This is not a course on Finite Volume Methods - Computational Fluid
Dynamics, so I will keep the theory to a minimum.
• This is not a Linux system administration course, so I will try to keep Linux
system administration issues to a minimum.
What I need from you

• Ask questions (feel free to interrupt me at anytime).


• Tell me if you do not understand.
• Tell me if an example does not work.
• Let me know if you have any specific requirement.
• Bring your own cases.
• Suggest better tutorials.
• Based on this course, I am trying to write some lectures notes on CFD
and related topics, a help is needed and much appreciated. The
lectures notes are available in the course’s tutorial folder.
To help me, take a look at the lectures notes and let me know if you
find errors. Suggestions for better wording, figures or new material are
also welcome.
• Follow-up problems, questions and suggestions at
[email protected].
How to learn more after this course

• Learn by doing.
• User manual, programmer manual and source code.
• Exchange knowledge with other OpenFOAM users at the forum
(http://www.cfd-online.com/Forums/openfoam/).
• The Doxygen manual (http://www.openfoam.org/docs/cpp/).
• OpenFOAM wiki (http://www.openfoamwiki.net).
• OpenFOAM website (http://www.openfoam.com/).
• OpenFOAM extend project (http://www.extend-project.de).
Where can I get Help?

Remember, you have the source code so take


some time and explore it.

The lack of maintained documentation makes it


difficult for new users.

The user and programmer’s guide do not


provide sufficient details, making the learning
curve steep.

But before complaining about the lack of


documentation,
Where can I get Help?

… read carefully and digest all the information


contained in the user guide and programmer’s
guide. It might not be much, but it is enough to
get you started.

Try to do all the tutorials available in the


OpenFOAM installation (or at least those that
interest you), and dig into each one to learn
more about all the applications and utilities
available.
Where can I get Help?

OpenFOAM Internet Resources


• OpenFOAM web pages (http://www.openfoam.org).
• OpenFOAM user discussion group.
(http://www.cfd-online.com/Forums/openfoam/).
• OpenFOAM community pages (Wiki) (http://www.openfoamwiki.net).
• OpenFOAM research resources (news, presentation slides, papers,
running projects, user contributions) (http://www.foamcfd.org).

CFD Resources on the Internet


• There exists a number of CFD discussion sites, depending on your
interest feel free to explore them.
• General CFD discussion, commercial software discussion forum,
popular jobs database (http://www.cfd-online.com).
CFD/FVM/C++ Bibliographical references
• An Introduction to Computational Fluid Dynamics.
H. K. Versteeg, W. Malalasekera. 2007, Prentice Hall.
• Computational Methods for Fluid Dynamics.
J. H. Ferziger, M. Peric. 2001, Springer.
• Computational Fluid Dynamics: Principles and Applications.
J. Blazek. 2006, Elsevier Science.
• Error analysis and estimation in the Finite Volume method
with applications to fluid flows.
H. Jasak. PhD Thesis, 1996. Imperial College, London.
• A Finite Volume Method for the Prediction of Three-Dimensional
Fluid Flow in Complex Ducts.
M. Peric. PhD Thesis, 1985. Imperial College, London.
• The C++ Programming Language: Special Edition.
B. Stroustrup. 2000, Addison-Wesley.
• The C++ Standard Library.
N. Josuttis. 1999, Addison-Wesley.
• C++ for Engineers and Scientists.
G. J. Bronson. 2009, Course Technology.
Thank you for your attention

You might also like