Pre-processing in openfoam, mesh generation. OpenFOAM kurs 2013 Håkan Nilsson Olivier Petit



Similar documents
THE CFD SIMULATION OF THE FLOW AROUND THE AIRCRAFT USING OPENFOAM AND ANSA

How To Create A Cdf Optimisation System

LSCFD: Meshing Tools for Open Source CFD A Practical Point of View

Open Source CFD Solver - OpenFOAM

CastNet: GUI environment for OpenFOAM

How To Run A Steady Case On A Creeper

CastNet: Modelling platform for open source solver technology

Multiphase Flow - Appendices

Auxiliary Processing swak4foam and PyFoam

OpenFOAM Opensource and CFD

Tutorial: 3D Pipe Junction Using Hexa Meshing

Introduction to ANSYS

f o r d e m a n d i n g C F D pre- & post-processing ANSA μετα p i o n e e r i n g software systems

HowTo Rhino & ICEM. 1) New file setup: choose Millimeter (automatically converts to Meters if imported to ICEM)

Getting started with CFD packages. OpenFOAM R and FLUENT R

ME6130 An introduction to CFD 1-1

How To Draw In Autocad

STUDY OF MESH DEFORMATION FEATURES OF AN OPEN SOURCE CFD PACKAGE AND APPLICATION TO A GEAR PUMP SIMULATION

Simulating Wind Over Terrain: How to Build an OpenFOAM Case from GRASS GIS Digital Elevation Models

OpenFOAM open source CFD on ANSELM

TVM 4155 Numerical modelling and hydraulics 10. March OpenFOAM homework

OpenFOAM Workshop. Yağmur Gülkanat Res.Assist.

Computational Modeling of Wind Turbines in OpenFOAM

Customer Training Material. Lecture 4. Meshing in Mechanical. Mechanical. ANSYS, Inc. Proprietary 2010 ANSYS, Inc. All rights reserved.

A simplefoam tutorial

bluecape s Official Website

Introduction to ANSYS ICEM CFD

OpenFOAM postprocessing and advanced running options

Self Financed One Week Training

SpaceClaim Introduction Training Session. A SpaceClaim Support Document

GAMBIT Demo Tutorial

Customer Training Material. Shell Meshing Stamped Part ICEM CFD. ANSYS, Inc. Proprietary 2010 ANSYS, Inc. All rights reserved. WS3.

tutorial U N S T R U C T U R E D G R I D S F O R O P E N F O A M W I T H B L E N D E R A N D E N G R I D paul.bomke@hs-bremen.de

Introduction to CFD Analysis

CFD with OpenSource software

ANSA. ANSA for demanding CFD pre-processing. for demanding CFD pre-processing. Model setup. software systems. Morphing & optimization

ANSYS Meshing User's Guide

This offering is not approved or endorsed by OpenCFD Limited, the producer of the OpenFOAM software and owner of the OPENFOAM and OpenCFD trade marks.

Lecture 7 - Meshing. Applied Computational Fluid Dynamics

DANSIS 2007 New Trends in CFD. OpenFOAM and STAR-CD. Integration, Interoperability and Symbiosis. Dr. Mark Olesen.

Incorporation of OpenFOAM software into Computational Fluid Dynamics process in Volvo Technology

Volumetric Meshes for Real Time Medical Simulations

Fully Automatic Hex Dominant Mesher. Paul Gilfrin Sharc Ltd

Use of OpenFoam in a CFD analysis of a finger type slug catcher. Dynaflow Conference 2011 January , Rotterdam, the Netherlands

Set up and solve a transient problem using the pressure-based solver and VOF model.

Pro/ENGINEER Wildfire 4.0 Basic Design

CFD: What is it good for?

SOFTWARE FOR 3D IMAGE VISUALISATION, ANALYSIS AND MODEL GENERATION

Steady Flow: Laminar and Turbulent in an S-Bend

Tutorial: 2D Pipe Junction Using Hexa Meshing

TUTORIAL MOVE : 3D MODEL CONSTRUCTION FROM SURFACE GEOLOGICAL DATA

COMPUTATIONAL FLUID DYNAMICS USING COMMERCIAL CFD CODES

Customer Training Material. Lecture 2. Introduction to. Methodology ANSYS FLUENT. ANSYS, Inc. Proprietary 2010 ANSYS, Inc. All rights reserved.

POLITECNICO DI MILANO Department of Energy

Learning Module 4 - Thermal Fluid Analysis Note: LM4 is still in progress. This version contains only 3 tutorials.

O.F.Wind Wind Site Assessment Simulation in complex terrain based on OpenFOAM. Darmstadt,

CFD software overview comparison, limitations and user interfaces

ANSYS ICEM CFD User's Manual

User Manual. 275 Technology Drive ANSYS, Inc. is Canonsburg, PA (T) (F)

Coupling micro-scale CFD simulations to meso-scale models

Composite Surfaces Tutorial

McNeel Miami. Preparing Rhino files for 3D Printing. Index:

OpenFOAM Optimization Tools

OpenFOAM. The Open Source CFD Toolbox. User Guide

STL GENERATION INTRODUCTION TO STL. Written by Greta D Angelo

AN EFFECT OF GRID QUALITY ON THE RESULTS OF NUMERICAL SIMULATIONS OF THE FLUID FLOW FIELD IN AN AGITATED VESSEL

Understand the Sketcher workbench of CATIA V5.

Draft Version. For personal use. c Copyright Máté Márton LOHÁSZ. Tutorial for Channel Flow by LES using Open Source CFD

Introduction to ANSYS ICEM CFD

An introduction to 3D draughting & solid modelling using AutoCAD

Essay 5 Tutorial for a Three-Dimensional Heat Conduction Problem Using ANSYS Workbench

Trace Layer Import for Printed Circuit Boards Under Icepak

CCTech TM. ICEM-CFD & FLUENT Software Training. Course Brochure. Simulation is The Future

Generative Shape Optimizer

The influence of mesh characteristics on OpenFOAM simulations of the DrivAer model

Tetrahedral Mesh Generation

OZEN ENGINEERING, INC.

Fully Automatic In-cylinder Workflow Using HEEDS / es-ice / STAR-CD

This week. CENG 732 Computer Animation. Challenges in Human Modeling. Basic Arm Model

CATIA Drafting TABLE OF CONTENTS

Technical What s New. Autodesk Alias Product Line

Basic controls of Rhinoceros 3D software

Modeling of Earth Surface Dynamics and Related Problems Using OpenFOAM

CFD modelling of floating body response to regular waves

OpenFOAM: Year in Review

This tutorial provides a recipe for simulating L

Sweet Home 3D user's guide

Using Map Topology Editing Tools

Introduction to Autodesk Inventor for F1 in Schools

Making natural looking Volumetric Clouds In Blender 2.48a

Introduction to CFD Analysis

Piston Ring. Problem:

FDOT Roadway Design and 3D Modeling

Technology Update: Workbench, Geometry, Meshing, Workflow. ANSYS Users Group Meeting Prague, 2011

Model of a flow in intersecting microchannels. Denis Semyonov

Eu-NORSEWInD - Assessment of Viability of Open Source CFD Code for the Wind Industry

Model Repair. Leif Kobbelt RWTH Aachen University )NPUT $ATA 2EMOVAL OF TOPOLOGICAL AND GEOMETRICAL ERRORS !NALYSIS OF SURFACE QUALITY

Meshing of a detailed DrivAer Body with ANSYS Meshing and ANSYS ICEM CFD

Tutorials from CAD through CFD for Beginners

RHINO TO STL BEST PRACTICES

Transcription:

Pre-processing in openfoam, mesh generation. OpenFOAM kurs 2013 Håkan Nilsson Olivier Petit

Different ways of creating the mesh. Outline Using SnappyHexMesh, an OpenFOAM mesh generation tool. Using blockmesh, m4 and python. Importing the mesh from external software.

A tutorial for snappyhexmesh. SnappyHexMesh generates a 3D mesh from a.stl file. ( triangulated surface geometry) For this tutorial, a simplified pump geometry is chosen. For more simplicity in computations, the symmetry of the geometry is used, and only one quarter of the pump is meshed.

A tutorial for snappyhexmesh. Download the tutorial from Håkan s webpage. Source OpenFOAM 2.2.x with alias OF22x or export FOAM_INST_DIR=/chalmers/sw/unsup64/OpenFOAM;. $FOAM_INST_DIR/OpenFOAM-2.2.x/etc/bashrcHani To check if the right OpenFOAM was called: which SimpleFoam It should point to simplefoam in OpenFOAM-2.2.x In the tutorial case, you should find: 1. The.stl file located in constant/trisurface. 2. A dictionnary called snappyhexmeshdict in system/.

A tutorial for snappyhexmesh. Requirement for snappyhexmesh to work: snappyhexmeshdict in /system/ Geometry data in constant/trisurface Hexahedral base mesh (decomposed if running in parallel) decomposepardic file in /system/ All system dictionaries (e.g. controldict, fvschems, fvsolutions)

A tutorial for snappyhexmesh. 5 simple steps: Create base mesh Refine base mesh Rmove unused cells Snap mesh to surface Add layers

snappyhexmesh: step 1 Creation of a grid surrounding the stl surface. Characteristics of the grid: The aspect ratio of the grid cells should be around 1. More than one cell in the z direction. At least on cell s edge should intersect the surface. There can not be empty patches, it is a 3D mesher.

SnappyHexMesh: step 2 Refine the base mesh. Start the splitting from locationinmesh feature. This edge must be inside the region to be meshed and must no coincide with a cell face. Splitting the cells around the surface according to : refinementsurfaces { file.stl { level (2 2); // default (min max) refinement for surface } }

Snappyhexmesh: step 3 Remove unused cells. Keep the side of the mesh defined by locationinmesh. Remove all cells that have above 50% of their volumes in the meshed region. This first step is saved into the time folder 1. The region refined is specified by: inside: inside the volume region. outside: outside the volume region. distance: according to distance to the surface. The region is defined first as geometry.

Snappyhexmesh: step 4 Snapping to surface. The steps to snap to surface are: 1. Snap the vertices onto the STL surface. 2. Solve for relaxation of the internal mesh. 3. Iterate using the snapcontrols in SnappyHexMeshDict. This second step is saved into the time folder 2.

Snappyhexmesh: step 5 Boundary layer addition. The boundary are applied on patches, not on surface!! Mesh projection back from the surface using a specified thickness normal to the surface. Solve for relaxation of the internal mesh with the latest projected boundary vertices. Check if validation criteria are validated. If the validation criteria can be satisfied, insert mesh layers. This last step is saved into the time folder 3.

Snappyhexmesh: pros and cons. Possibilities of multiple refinements that make it very robust. It runs in parallel. Need of a good quality STL surface, with more than one region/patch. The feature line is now available. SurfaceFeatureExtract A Boundary Layer mesh is not easy to obtain, it requires experience and trial and error method.

SurfaceFeatureExtract Need a dictionary in system/ called ExtractFeatureDict. In the test case, the executable is surfacefeatureextract. Create a *.emesh in constant/trisurface, and a new folder in constant/ called extendedfeatureedgemesh if the option writeobj is selected in surfaceextractfeaturedict. In the snappyhexmeshdict dictionary, specify in features: { } file "pump_simplified.emesh"; level 3; // level of refinement

SurfaceFeatureExtract

EXTERNAL LINKS FOR SNAPPYHEXMESH http://www.openfoam.org/docs/user/snappyh exmesh.php http://openfoamwiki.net/images/f/f0/final- AndrewJacksonSlidesOFW7.pdf

blockmesh/m4 m4: allow a parametrization of the case, easy to change. Let us take an example. Simple geometry: a pipe. The m4 file is found in m4_python/mesh/2d.m4. a4t a3t Front quad a1t a2t z y x a1b a4b Back quad a2b a3b

blockmesh/m4: pros and cons. Very easy way to create an simple geometry. The parametrization with m4 allows to create different geometries from the same m4 file. Not enough precision in the meshing parameters. Easy to go wrong on the orientation of the faces and blocks.

Python Python is a general-purpose, high-level programming language. It emphasizes code readabilty. Like other dynamic languages, Python is often used as a scripting language. Commonly coupled with OpenFOAM, very useful to execute, analyse, manipulate parameters/simulations in OpenFOAM. Most commonly used python library in OpenFOAM is pyfoam.

Using Python to create a test case Main script:./chooseshape.py Needs 2 arguments. To know which one:./chooseshape.py h arg1 is (2D, 3D, symmetry), arg2 is (rectangle, cylinder) Call an other script in pythonscript folder: geometrysetup.py The script generates the chosen geometry, changes the m4 file, and do blockmesh

Using Python Many different useful applications pyfoam is a very useful compilation of library. http://openfoamwiki.net/index.php/contrib_pyfoam Interesting tutorial by Eric Paterson, http://www.personal.psu.edu/egp11/eric_paterson/blog/entries/2009/2/2_pytho n_scripting_for_gluing_cfd_applications A_Case_Study_Demonstrating_Automati on_of_grid_generation%2c_parameter_variation%2cflow_simulation%2c_analysis %2C_and_Plotting.html. It can also be found at http://www.tfd.chalmers.se/~hani/kurser/os_cfd_2009/ post-processing example for turbomachinery can be found at http://openfoamwiki.net/index.php/sig_turbomachinery_/_timisoara_swirl_genera tor#post-processing_using_python

Import the mesh: pros and cons Need of an other software to create the mesh. Few converters: fluentmeshtofoam, fluent3dmeshtofoam for Gambit mesh types. startofoam for STAR-CD mesh types. ideastofoam for I-DEAS mesh types cfx4tofoam for CFX mesh types. CGNSToFoam for CGNS files (can import more than meshes), developped by users.