CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Meshing & Mesh Conversion

[Gmsh] Hybrid Mesh Generation in Gmsh

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   Yesterday, 08:46
Question Hybrid Mesh Generation in Gmsh
  #1
New Member
 
Umut
Join Date: May 2011
Posts: 24
Rep Power: 15
Umut is on a distinguished road
Dear all,

I’m trying to generate a 3D hybrid mesh on a fairly simple geometry using gmsh. I added all images, input and geo files below.

The geometry is a box without a lid with air inside, meaning two concentric boxes. I want structured mesh on box solid and unstructured tetrahedral and pyramid cells in fluid domain (air inside the box).

The mesh visibly generated as expected (please check images below). However gmsh gives warning about 36 ill-conditioned cells. When I export it as .msh and converted to Openfoam polyMesh folder, the mesh metrics are beyond terrible with all sorts of errors.

I would highly appreciate if anyone can help (educate) me if and how I can generate hybrid mesh using gmsh (or in any opensource tool really).

Cheers

Input geometry files:
https://drive.google.com/file/d/1P-S...ew?usp=sharing
https://drive.google.com/file/d/1IVy...ew?usp=sharing

Images:


https://drive.google.com/file/d/1p0g...a2ppq5fKL/view
https://drive.google.com/file/d/1a9Y...fMSeYD6JL/view

Gmsh .geo file:
If you download and try meshing it, don't forget to edit the Merge "Path/to/*.brep"; lines.
Code:
//Hybrid mesh example
SetFactory("OpenCASCADE");

// Merge geometries
Merge "Path/to/outer.brep";
Merge " Path/to/inner.brep";
Coherence;

// *** Structured Region *** //

// Define Transfinite Curves (Ib)
Transfinite Curve {103, 100, 97, 93, 68, 65, 72, 71, 32, 36, 40, 45, 29, 42, 37, 31, 83, 87, 101, 98, 57, 55, 41, 20, 16, 13, 38, 15} = 40 Using Progression 1;
Transfinite Curve {88, 92, 104, 73, 62, 61, 46, 28, 24, 21, 43, 23, 76, 81, 96, 67, 53, 48, 35, 10, 6, 1, 30, 3, 91, 86, 80, 79, 51, 52, 63, 56, 8, 12, 19, 27, 2, 22, 14, 4} = 5 Using Progression 1;

// Transfinite and Recombination for Surfaces 
For s In {1:74}
  Transfinite Surface{s};
  Recombine Surface{s};
EndFor

// Transfinite and Recombination for Volumes
For v In {1:17}
  Transfinite Volume{v};
  Recombine Volume{v};
EndFor

// *** Un-Structured Region *** //
//surface 75 and volume 18 should be unstructured (pyramid & tetrahedral cells)

Mesh.OptimizeNetgen = 3;  // or 2, 3
Mesh 3;
Umut is offline   Reply With Quote

Reply

Tags
gmsh, hybrid mesh, meshing, openfoam, preprocess


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
flow over cylinder in openFoam saeed jamshidi OpenFOAM Pre-Processing 3 August 11, 2023 16:16
[snappyHexMesh] SnappyHexMesh/splitMeshRegion : region1 in zone "-1" GuiMagyar OpenFOAM Meshing & Mesh Conversion 3 August 4, 2023 13:38
how to set periodic boundary conditions Ganesh FLUENT 15 November 18, 2020 07:09
[ICEM] Bad Quality Hybrid Mesh External Flow tim13 ANSYS Meshing & Geometry 0 March 8, 2020 03:22
How to control Minximum mesh space? hung FLUENT 7 April 18, 2005 10:38


All times are GMT -4. The time now is 21:13.