|
[Sponsors] |
[mesh manipulation] Combining multiple mesh blocks |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
August 11, 2014, 20:10 |
Combining multiple mesh blocks
|
#1 |
New Member
Ingo Jahn
Join Date: Aug 2014
Location: Australia
Posts: 1
Rep Power: 0 |
Hi,
I am currently trying to write a simple mesh converter from our in-house grid generator e3prep to OpenFoam. e3prep, is a multi-block meshing tools, that generates the mesh as a multitude hexahedra, each of which has its own internal mesh structure. These blocks are then linked at the interfaces, through face matching. Now I want to create the ability to convert these multi-block meshes into an OpenFoam mesh. What I have done so far: (and this works) For a mesh consisting of a single block, I have written an output function (in python) for our meshing tool, which directly writes files in the /Polymesh folder (boundary, faces, owner, points, neighbour). Boundaries are automatically defined as North, South, East, West, Top, Bottom. What i want to do: Now if I have a multi-block mesh, I want to combine all the blocks into a single OpenFoam mesh. Option 1: (this works, but becomes tedious as number of blocks increases) I run the following sequence of commands (bnnnn are names of respective blocks) mergeMeshes b0000 b0001 -overwrite createPatch (together with createPatchDict, to combine respective patches on the blocks) stitchMesh internal1 internal2 -perfect -overwrite Repeat the above until I have added all the blocks. Obviously this works for 2-3 blocks and could be scripted, but once you start to add 20-30 blocks this becomes tedious and error prone Option 2: (not tried yet) Rather than writing the individual files within the /PolyMesh folder, I could write a script to create a "blockMeshDict" file. Effectively I would turn each individual cell from each of my block into an individual hex e.g.[hex (0 1 2 3 4 5 6 7)(1 1 1) simpleGrading(1 1 1)]. Then use the mergePatchPairs to connect the internal faces. At the moment I am leaning towards option 2, as this is more universal. However before proceeding, I just wanted to check that I haven't overlooked some obvious solution. Thanks for your help. |
|
August 18, 2014, 04:19 |
|
#2 |
Senior Member
Gerhard Holzinger
Join Date: Feb 2012
Location: Austria
Posts: 342
Rep Power: 28 |
I followed option 2 for my meshes, for which I did the deconstruction into blocks manually with pencil and paper. For domains with some sort of regularity this works pretty well, e.g. a largely axi-symmetric 3d domain.
|
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
[Commercial meshers] COnvert FLuent MEsh to openfoam with interface | manuc | OpenFOAM Meshing & Mesh Conversion | 1 | July 25, 2017 04:13 |
Mesh motion with Translation & Rotation | Doginal | CFX | 2 | January 12, 2014 07:21 |
[ICEM] Generating Mesh for STL Car in Windtunnel Simulation | tommymoose | ANSYS Meshing & Geometry | 48 | April 15, 2013 05:24 |
[snappyHexMesh] snappyHexMesh won't work - zeros everywhere! | sc298 | OpenFOAM Meshing & Mesh Conversion | 2 | March 27, 2011 22:11 |
Icemcfd 11: Loss of mesh from surface mesh option? | Joe | CFX | 2 | March 26, 2007 19:10 |