• No results found

Open Source CFD Solver - OpenFOAM

N/A
N/A
Protected

Academic year: 2021

Share "Open Source CFD Solver - OpenFOAM"

Copied!
5
0
0

Loading.... (view fulltext now)

Full text

(1)

1

Open Source CFD Solver - OpenFOAM

Wang Junhong

(HPC, Computer Centre)

1. INTRODUCTION

The OpenFOAM® (OpenField Operation and Manipulation) Computational Fluid Dynamics (CFD) Toolbox is a free, open source CFD software package produced by OpenCFD Ltd (http://www.openfoam.com). It offers users the complete freedom to customise and extend its existing functionality, either by themselves or through support from OpenCFD.

Established in 2004, OpenFOAM is adopted by many users from both commercial and academic organisations. OpenFOAM has an extensive range of features to solve anything from complex fluid flows involving chemical reactions, turbulence and heat transfer, to solid dynamics and electromagnetics. OpenFOAM leads the open source CFD software market and has a large, active user base across the engineering, science and the public sectors, consisting of over 80 solver and 170 utility applications. It is applicable to solve any complex fluid flows involving chemical reactions, turbulence and heat transfer.

2. FEATURES OF OpenFOAM

OpenFOAM is a generic open source CFD solver that supports unstructured meshes of cells of any shape and can be integrated with many third part visualisation software tools for post-processing. The solver can be run in parallel mode using multiple processors on a multiprocessor computer or on many computers across a network. The solver is written in C++ language.

2.1. Solver Capabilities

 Compressible and Incompressible flows

 Multiphase flows , such as bubble flow, cavitation, VOF, Euler and mixing.  Combustion and Chemical Reaction flows

 Buoyancy-driven flows, with consideration of buoyant force for both compressible and incompressible flows

 Conjugate heat transfer, including radiation  Particle methods (DEM, DSMC, MD)

(2)

2

2.2. Mesh Generation and Conversion

OpenFOAM supports unstructured meshes of cells of any shape. Cells in OpenFOAM can have any number of faces and faces can have any number of edges. OpenFOAM provides a few meshing tools according to the complexity of the geometry.

blockMesh for Simple Geometries

The blockMesh is used to generate multi-block hexahedra mesh for simple geometries from a text configuration file. The OpenFOAM distribution contains numerous example configuration files for blockMesh to generate meshes for flows around simple geometries, e.g. a cylinder, a wedge, etc.

snappyHexMesh for Complex Geometries

For complex geometries, snappyHexMesh meshes surfaces from CAD, but also allows the user to define simple geometric entities such as boxes, spheres, planes, etc. The snappyHexMesh utility can run in parallel, generating meshes of hundreds of millions of cells, given a sufficient number of CPUs and memory.

extrudeMesh and polyDualMesh

The extrudeMesh and polyDualMesh are two special meshing tools. The extrudeMesh generates a mesh by extruding cells from a patch of an existing mesh, or from a surface mesh. It can perform a range of extrusions to produce linear, wedge or spherical meshes. The polyDualMesh creates the dual of a polyMesh and can be used to generate a “honeycomb” polyhedral mesh from a tetrahedral mesh.

Mesh Conversion

In addition to the provided meshing tools, OpenFOAM accepts meshes generated by any of the major mesh generators and CAD systems. For example, you can use the mesh created by ANSYS, CFX, Fluent/Gambit, Plot3D, etc, using the specific mesh converters as listed in the table below.

Table 1

Mesh Converters provided by OpenFOAM

Mesh Converters

Details

ansysToFoam

Converts an ANSYS input mesh file, exported from I-DEAS, to

OPENFOAM® format

cfx4ToFoam

Converts a CFX 4 mesh to OPENFOAM® format

fluent3DMeshToFoam

Converts a Fluent mesh to OPENFOAM® format

gambitToFoam

Converts a GAMBIT mesh to OPENFOAM® format

plot3dToFoam

Plot3d mesh (ascii/formatted format) converter

writeMeshObj

For mesh debugging: writes mesh as three separate OBJ files

which can be viewed with e.g. javaview

(3)

3

2.3. Post-Processing Visualisation using ParaView

The open source visualisation application ParaView is integrated and used as the post-processing tool to visualise results for OpenFOAM simulations. ParaView uses the Visualisation Toolkit (VTK) as its data processing and rendering engine, and can therefore read any data in VTK format. OpenFOAM includes the foamToVTK utility to convert data from its native format to VTK format, which means that any VTK-based graphics tools can be used to post-process OPENFOAM® cases.

The

screen

capture below shows the graphics user interface of ParaView. Further details

about ParaView can be found at http://www.paraview.org.

Besides

ParaView, you can export results for OpenFOAM simulations to other third-party

post-processing software such as EnSight, Tecplot, and even Fluent. The data converters

for post-processing with other third party post-processing tools are listed below in

Table 2.

Table 2

Mesh Coventers provided by OpenFOAM

Data Converters

Details

foamDataToFluent

Translates OPENFOAM® data to Fluent format

foamToEnsight

Translates OPENFOAM® data to EnSight format

foamToTecplot360

Tecplot binary file format writer

foamToFieldview9

Write out the OPENFOAM® mesh in Version 3.0

Fieldview-UNS format (binary)

fieldview9Reader

Reader module for Fieldview 9 to read OPENFOAM® mesh

and data

(4)

4

3. ACCESS OpenFOAM ON HPC CLUSTERS

OpenFOAM version 2.0.x, the latest version released in June 2011, is installed on HPC

clusters Atlas5 and Atlas6. You can follow the following steps to run the software.

Step 1, Logon to HPC Portal Run Jobs/Apps

Step 2, Click on “atlas5-c01 cluster (xterm)” or “atlas6-c01 cluster (xterm)” Step 3, Set the OpenFOAM environment by entering the following command at the

xterm command line prompt. You can enter command “blockMesh” to verify Atlas6-c01> . /app1/common/OpenFoam/Atlas6/OpenFOAM/OpenFOAM-2.0.x/etc/bashrc

Step 4, To hands on the tutorials, you need to copy tutorial files to your own working space. The tutorial files are available at:

Atlas6-c01> ls -l /app1/common/OpenFoam/Atlas6/OpenFOAM/OpenFOAM-2.0.x/tutorials/

For example, to practice the first tutorial “Lid-driven cavity flow” on the tutorial documentation (http://www.openfoam.com/docs/user/cavity.php#x5-40002.1), you can copy the whole tutorial folder “cavity” as below:

Atlas6-c01> cp -r /app1/common/OpenFoam/Atlas6/OpenFOAM/OpenFOAM-2.0.x/tutorials/incompressible/icoFoam/cavity .

(5)

5

You can continue to try out the tutorial following the tutorial instruction guide.

4. Useful Links

The following URLs are very helpful for learning and using OpenFOAM. Feel free to contact me at [email protected] should you wish to explore the software or encounter any difficulties in accessing the software.

OpenFOAM webpage: http://www.openfoam.org

OpenFOAM Docs and Tutorials: http://www.openfoam.com/docs/user/

OpenFOAM Online Forum: http://www.cfd-online.com/Forums/openfoam/ ParaView webpage: http://www.paraview.org/

References

Related documents

More specifically, this model pro- poses that autobiographical memory is generated by the interaction of (i) multiple within-modality stimulus-encoding subsystems; (ii)

This project analyzed the change in academic motivation for 200 students from WPI based on data obtained from the Wabash National Study of Liberal Arts Education (WNS).. This

Como referido anteriormente, com o trabalho realizado, pretendia-se desenvolver um framework que incluía diferentes ferramentas, VSM, BPMN e SIPOC, de modo a complementar a

Suffixes V, TR, TA and TK (to MAP) denote the performance on the validation set, the reference transcriptions of test set, ANTS LVCSR and KATS LVCSR transcriptions of test

l ower earnings in new jobs with the time elapsed in the. s earch

The association of Cdc42-GTP with the CRIB- PDZ 130–255 module results in a 10-fold increase in affinity for a C-terminal PDZ ligand peptide, and GTPase-dependent Par-6 binding

We used multivariable logistic regression to determine the odds of BBVs in individuals with severe mental illness, relative to the general population, and to identify independent