LSCFD: Meshing Tools for Open Source CFD A Practical Point of View Juha Kortelainen <juha.kortelainen@vtt.fi>
Report: Meshing Tools for Open Source CFD A Practical Point of View LSCFD Tools for Large Scale Computational Fluid Dynamics The main objectives of the project: Demonstrate and document the full chain of large scale CFD from mesh generation to visualization using best available open source tools. Remove some bottle-necks in the utilization of the tools for large scale computing. The bottle-necks are related, for example, to large scale mesh generation, use of parallel preconditioners, and treatment of massively parallel data. Implement Variational Multiscale Method (VMS) to massively parallel framework. The natural coding environment for the project will be the Elmer finite element software which has also been mainly developed at CSC. Transfer know-how to CFD community in general and special user groups in particular. The means of knowledge transfer will be courses, seminars and reports. Most happenings will be organized around some particular software but also generic large scale CFD theme will be considered. Increase the use of supercomputing for computational fluid dynamics in Finland. Mainly it is hoped that the academic community would start using the large scale methods and this would eventually result also to increased use of large scale CFD in the industry. http://www.csc.fi/english/pages/lscfd/goals 2
Introduction and Scope Survey on open source or low cost tools for CFD pre-processing - Target CFD solver: OpenFOAM (version 1.5) Tested software: - SALOME version 3.2.6 - SALOME version 4.1.4 (shortly) - Gmsh - OpenFOAM SnappyHexMesh Focus on industrial applications - Strategy: Use inexpensive computational tools for massive computations - No limits in number of simultaneous licenses - Short calendar time for computations 3
Where is the Beef in Using Open Source Tools? Design Design study study Case Case #1 #1 Case Case #2 #2 Case Case #... #... Case Case #N #N Results Results Optimisation Parameter comparison Case Case #1 #1 Case Case #1 #1 Case Case #2 #2 Case Case #... #... Case Case #N #N Results Results Many Computational cases Computational constraint: simultaneous licenses Time saving Time 4
Meshing and Mesh Types Mesh types and the process in general - For CFD structured hexahedral mesh is beneficial in general often difficult to create, manual meshing - Unstructured tetrahedral mesh can be generated automatically, but mesh is usually not optimal for CFD fast to create and relatively robust, possible computational problems Most of the meshers produce unstructured tetrahedral mesh Question of overall process time - Automatic meshing: Is the time that is lost in solving won in pre-processing? - Mesh quality and convergence? 5
How did We Test? Industrial test case was selected - Wärtsilä W20V32SG engine, part of exhaust manifold All the preparations were done with tested tools Objective: to mesh the test case so that it is usable for CFD simulation with OpenFOAM 6
Simplified Process Flow for Industrial CFD Pre-Processing Design geometry in CAD system Mesh processing Geometry import Design geometry in CFD pre-processing system Simplified and healed geometry in pre-processing Structured mesh Mesh topology design Unstructured mesh Geometry manipulation Grid density (global/local) Meshing Use of AMR Geometry processing Computational mesh Computations Results Final production computational mesh 7
SALOME http://www.salome-platform.org/ Tested version 3.2.6; shortly introduced version 4.1.4 The most extensive pre-processor of tested tools - Geometry import in ACIS, SALOME native BREP, IGES, and STEP (uses Open CASCADE) - Geometry creation and manipulation - Meshing in principle for structured and unstructured mesh types; structured mesh creation very difficult so only unstructured tetrahedral mesh was tested - Mesh quality checking and visualisation - Export in DAT (ASCII table format), MED, I-deas UNV, and STL (surface mesh only) Version 3.2.6 had many annoying bugs and features, most of them were fixed in version 4.1.4 The created default tetrahedral mesh was not very suitable for CFD (optimised for FEM) Massive and complex software, available only for Linux (and UNIX) License: GNU Lesser General Public License (LGPL) 8
9
Gmsh http://geuz.org/gmsh/ Tested version 2.3.0 (not mentioned in the report) A lightweight pre-processor compared to SALOME - Geometry import in IGES, STEP, BREP, and gmsh native GEO format (uses Open CASCADE) - Only limited geometry creation and manipulation capabilities; imported CAD geometries could not be modified in gmsh - Meshing only for unstructured tetrahedral mesh (netgen and tetgen routines) - Mesh quality checking and visualisation - Mesh export in I-deas UNV, VTK, MED, Medit, Nastran bulk data, Plot3D structured mesh, STL (surface mesh), VRML (surface mesh), DIFFPACK 3D mesh format Imported 3D solid geometry handling was still unstable and buggy The created default tetrahedral mesh was relatively suitable for CFD Software is available for Linux (UNIX) and Windows systems License: GNU General Public License (GPL) 10
VTT TECHNICAL RESEARCH CENTRE OF FINLAND 11
OpenFOAM SnappyHexMesh http://www.opencfd.co.uk/openfoam/ Functionality included into OpenFOAM package, tested version 1.5 Different approach to meshing - Automatic meshing of given geometry using unstructured mesh with hexahedral cells - Geometry import in STL surface models - Mesh refinement on surfaces - Many options to control the quality of the created mesh difficult for a beginner - Mesh is created using a batch run (command line) - The routine can not handle well sharp corners and edges method is not suitable for all industrial or research cases Routine and tools seemed robust and relatively fast Mesh modifications (e.g. mesh density) are quite easy to do Available for Linux (UNIX) systems License: GNU General Public License (GPL) (part of OpenFOAM) 12
Level 0 Level 1 Level 2 13
Original geometry SnappyHexMesh geometry 14
Conclusions and Summary Pre-processing is still very time consuming phase in CFD and FEM process Step of getting started quite high, limited documentation and tutorials None of the tested software separately were successful in the whole preprocessing process SALOME and gmsh together offered relatively good results for CFD preprocessing; still geometry manipulation is difficult Creation of structured hexahedral mesh is far too difficult OpenFOAM SnappyHexMesh is very promising method but not yet ready for industrial use (problems with edge and corner meshing) Integration to industrial design systems and design process? Still more work is needed to have an industrial strength open source pre-processor for CFD and FEM 15
What Next? What is the industry s interest in open source computational tools? What should be done? What is the priority for tasks? Co-operation? Forum for co-operation? Partners? Funding? How to integrate into a industrial design and development process? Who will catch the ball? 16