This repository was created to gather a collection of OpenFOAM tips, tricks and their evaluation. These experiments were performed during the author's dissertation project at the University of Edinburgh and the EU Horizon 2020 project HiDALGO, more specifically the Urban air pollution pilot. Take into account that these tips aim to get the highest execution efficiency possible and thus can sometimes sacrifice accuracy. Please, feel free to leave any comments, suggestions or corrections in the form of pull requests, issue, Telegram message (https://t.me/MandM_Mario) or email (m.martreq@gmail.com).
- The
system/controlDict
file defines the execution iterations, write and time formats, among other parameters.runTimeModifiable
, variable that defines if the program keeps checkingcontrolDict
for changes at the begining of each iteration. It should always be leftoff
as it can potentially increase execution time in distributed executions.- Writting output files is another topic that can increase innecesarily the execution time, and it should be reduced to the minimum required. This can be done by tweaking
writeControl
andwriteInterval
. If no output is required, setting them totimeStep
and a bigger value thanendTime
will reduce output to the first and last iterations. - In addition to changing output exporting rate,
writeFormat
specifies the format of the output data files (ascii
orbinary
). If the contrary is not required, output format should be left asbinary
. - Lastly,
writeCompression
should be leftoff
unless storage is scarce.
-
József Nagy suggests in this YouTube video to check a detalied overview at fvSchemes and fvSolution by Gavin Tabor that can be found in this PDF that includes tips obtained by its author during his fifteen years of experience in OpenFOAM.
-
Joel Guerrero, author of some courses/material in Wolf dynamics, has an interesting document covering general OpenFOAM tips, including the use of
checkMesh
andrenumberMesh
, two computationally inexpensive tools that can assure mesh quality and improve simulation bandwith.
-
Wolf dynamics has a collection of tutorials that cover basic and advanced OpenFOAM functionalities in its webpage. The beginner tutorials go over some of OpenFOAM base examples. In addition, this website/organization offers basic and advanced training courses.
-
OpenFOAM official tutorials.