|
[Sponsors] |
December 15, 2018, 16:50 |
merging mesh
|
#1 |
New Member
Cham Yang Han
Join Date: Dec 2018
Posts: 14
Rep Power: 8 |
doing a structure of "T", i made 4 blocks and with mergepatchPairs done, there is still error exist. The following is my blockMeshdict:
Code:
/*--------------------------------*- C++ -*----------------------------------*\ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org \\ / A nd | Version: 6 \\/ M anipulation | \*---------------------------------------------------------------------------*/ FoamFile { version 2.0; format ascii; class dictionary; object blockMeshDict; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // convertToMeters 0.1; vertices ( (1 0 0) (2 0 0) (2 1 0) (1 1 0) (1 0 0.1) (2 0 0.1) (2 1 0.1) (1 1 0.1) (0 1 0) (1 1 0) (1 2 0) (0 2 0) (0 1 0.1) (1 1 0.1) (1 2 0.1) (0 2 0.1) (1 1 0) (2 1 0) (2 2 0) (1 2 0) (1 1 0.1) (2 1 0.1) (2 2 0.1) (1 2 0.1) (2 1 0) (3 1 0) (3 2 0) (2 2 0) (2 1 0.1) (3 1 0.1) (3 2 0.1) (2 2 0.1) ); blocks ( hex (0 1 2 3 4 5 6 7) (10 10 1) simpleGrading (1 1 1) hex (8 9 10 11 12 13 14 15) (10 10 1) simpleGrading (1 1 1) hex (16 17 18 19 20 21 22 23) (10 10 1) simpleGrading (1 1 1) hex (24 25 26 27 28 29 30 31) (10 10 1) simpleGrading (1 1 1) ); edges ( ); patches ( patch i1 ( (3 7 6 2) ) patch i2 ( (16 20 21 17) ) patch i3 ( (9 13 14 10) ) patch i4 ( (19 23 20 16) ) patch i5 ( (18 22 21 17) ) patch i6 ( (27 31 28 24) ) ); mergePatchPairs ( (i1 i2) (i3 i4) (i5 i6) ); // ************************************************************************* // Code:
Adding point and face zones Creating attachPolyTopoChanger" was: --> FOAM FATAL ERROR: Face 730 reduced to less than 3 points. Topological/cutting error B. Old face: 2(484 605) new face: 2(252 373) From function void Foam::slidingInterface::coupleInterface(Foam::polyTopoChange&) const in file slidingInterface/coupleSlidingInterface.C at line 1768. FOAM aborting #0 Foam::error::printStack(Foam::Ostream&) at ??:? #1 Foam::error::abort() at ??:? #2 Foam::slidingInterface::coupleInterface(Foam::polyTopoChange&) const at ??:? #3 Foam::slidingInterface::setRefinement(Foam::polyTopoChange&) const at ??:? #4 Foam::polyTopoChanger::topoChangeRequest() const at ??:? #5 Foam::polyTopoChanger::changeMesh(bool, bool, bool, bool) at ??:? #6 Foam::attachPolyTopoChanger::attach(bool) at ??:? #7 ? in "/opt/openfoam6/platforms/linux64GccDPInt32Opt/bin/blockMesh" #8 __libc_start_main in "/lib/x86_64-linux-gnu/libc.so.6" #9 ? in "/opt/openfoam6/platforms/linux64GccDPInt32Opt/bin/blockMesh" Aborted (core dumped) Thanks and appreciate your time. Sincerely, yh Last edited by wyldckat; December 30, 2018 at 14:59. Reason: Added [CODE][/CODE] markers |
|
December 30, 2018, 15:11 |
|
#2 | |
Retired Super Moderator
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,981
Blog Entries: 45
Rep Power: 128 |
Quick answer: I came here following a PM you sent me, from which I'll also quote part of it here:
Quote:
Code:
paraFoam -block As for the second mesh, namely the one you sent me via PM, it's the same problem: there are duplicated vertices. There is a tutorial case in OpenFOAM that demonstrates how a T shape should be meshed, it's the tutorial case "incompressible/pimpleFoam/RAS/TJunction".
__________________
|
||
December 30, 2018, 18:01 |
|
#3 |
New Member
Cham Yang Han
Join Date: Dec 2018
Posts: 14
Rep Power: 8 |
Hi, Thanks for the reply.
I try with the multiple vertices definition from this 2nd post in this blog : https://www.cfd-online.com/Forums/op...9-21-20-a.html Code:
/*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | | \\ / O peration | Version: 1.6 | | \\ / A nd | Web: http://www.OpenFOAM.org | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ FoamFile { version 2.0; format ascii; class dictionary; object blockMeshDict; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // convertToMeters 1; vertices ( (0 0 0) //a (2 0 0) (2 1 0) (0 1 0) (0 0 1) (2 0 1) (2 1 1) (0 1 1) (0 1 0) //b (2 1 0) (2 2 0) (0 2 0) (0 1 1) (2 1 1) (2 2 1) (0 2 1) (2 1 0) //c (3 1 0) (3 2 0) (2 2 0) (2 1 1) (3 1 1) (3 2 1) (2 2 1) (3 1 0) //d (5 1 0) (5 2 0) (3 2 0) (3 1 1) (5 1 1) (5 2 1) (3 2 1) (3 0 0) //e (5 0 0) (5 1 0) (3 1 0) (3 0 1) (5 0 1) (5 1 1) (3 1 1) ); blocks ( hex (0 1 2 3 4 5 6 7) (10 4 4) simpleGrading (1 1 1) hex (8 9 10 11 12 13 14 15) (10 4 4) simpleGrading (1 1 1) hex (16 17 18 19 20 21 22 23) (5 4 4) simpleGrading (1 1 1) hex (24 25 26 27 28 29 30 31) (10 4 4) simpleGrading (1 1 1) hex (32 33 34 35 36 37 38 39) (10 4 4) simpleGrading (1 1 1) ); edges ( ); patches ( patch inlet ( (0 4 7 3) (8 12 15 11) ) patch outlet ( (25 26 30 29) (33 34 38 37) ) wall upper ( (11 15 14 10) (19 23 22 18) (27 31 30 26) ) wall lower ( (0 1 5 4) (1 2 6 5) (16 17 21 20) (32 33 37 36) (32 36 39 35) ) wall front ( (4 5 6 7) (12 13 14 15) (20 21 22 23) (28 29 30 31) (36 37 38 39) ) wall back ( (0 3 2 1) (8 11 10 9) (16 19 18 17) (24 27 26 25) (32 35 34 33) ) patch i1 ( (3 7 6 2) ) patch i2 ( (8 9 13 12) ) patch i3 ( (9 10 14 13) ) patch i4 ( (16 20 23 19) ) patch i5 ( (17 18 22 21) ) patch i6 ( (24 28 31 27) ) patch i7 ( (24 25 29 28) ) patch i8 ( (35 39 38 34) ) ); mergePatchPairs ( (i2 i1) (i3 i4) (i6 i5) (i7 i8) ); // ************************************************** *********************** // I will try with the non-repeating vertices... thank you many thanks, yh Last edited by wyldckat; January 1, 2019 at 11:25. Reason: added [CODE] markers |
|
January 1, 2019, 07:46 |
mesh merging
|
#4 |
New Member
Cham Yang Han
Join Date: Dec 2018
Posts: 14
Rep Power: 8 |
well i made a few blockMeshdict and still unable to make a ''I'' shaped blocks (comprises of 7 separate blocks)
looking from tutorial case: "incompressible/pimpleFoam/RAS/TJunction", the blockMeshdict doesn't have mergePatchpairs needed, but the mesh are well presented and in smooth transition. 1.i tried with this method, no duplicating vertices definition: Code:
vertices ( (0.0 0.0 0.0) //bottom (0.4 0.0 0.0) (0.5 0.0 0.0) (0.9 0.0 0.0) (0.9 0.75 0.0) //bottom mid (0.5 0.75 0.0) (0.4 0.75 0.0) (0.0 0.75 0.0) (0.0 2.25 0.0) //upper mid (0.4 2.25 0.0) (0.5 2.25 0.0) (0.9 2.25 0.0) (0.9 3.0 0.0) //top (0.5 3.0 0.0) (0.4 3.0 0.0) (0.0 3.0 0.0) //Z (0.0 0.0 0.7) //bottom (0.4 0.0 0.7) (0.5 0.0 0.7) (0.9 0.0 0.7) (0.9 0.75 0.7) //bottom mid (0.5 0.75 0.7) (0.4 0.75 0.7) (0.0 0.75 0.7) (0.0 2.25 0.7) //upper mid (0.4 2.25 0.7) (0.5 2.25 0.7) (0.9 2.25 0.7) (0.9 3.0 0.7) //top (0.5 3.0 0.7) (0.4 3.0 0.7) (0.0 3.0 0.7) Code:
blocks ( hex (0 1 6 7 16 17 22 23) (2 2 2) simpleGrading (1 1 1) hex (1 2 5 6 17 18 21 22) (8 8 8) simpleGrading (1 1 1) ); Code:
--> FOAM FATAL ERROR: Inconsistent number of faces between block pair 0 and 1 From function void Foam::blockMesh::calcMergeInfo() in file blockMesh/blockMeshMerge.C at line 221. FOAM exiting --------------------------------------------------------------------- 2.and i come up with another definition, learned from this 2nd post in this website: https://www.cfd-online.com/Forums/op...9-21-20-a.html extracting important part: Code:
vertices ( (0 0 0) //a (2 0 0) (2 1 0) (0 1 0) (0 0 1) (2 0 1) (2 1 1) (0 1 1) (0 1 0) //b (2 1 0) (2 2 0) (0 2 0) (0 1 1) (2 1 1) (2 2 1) (0 2 1) (2 1 0) //c (3 1 0) (3 2 0) (2 2 0) (2 1 1) (3 1 1) (3 2 1) (2 2 1) (3 1 0) //d (5 1 0) (5 2 0) (3 2 0) (3 1 1) (5 1 1) (5 2 1) (3 2 1) (3 0 0) //e (5 0 0) (5 1 0) (3 1 0) (3 0 1) (5 0 1) (5 1 1) (3 1 1) ); blocks ( hex (0 1 2 3 4 5 6 7) (10 4 4) simpleGrading (1 1 1) hex (8 9 10 11 12 13 14 15) (10 4 4) simpleGrading (1 1 1) hex (16 17 18 19 20 21 22 23) (5 4 4) simpleGrading (1 1 1) hex (24 25 26 27 28 29 30 31) (10 4 4) simpleGrading (1 1 1) hex (32 33 34 35 36 37 38 39) (10 4 4) simpleGrading (1 1 1) ); patches ( patch i1 ( (3 7 6 2) ) patch i2 ( (8 9 13 12) ) patch i3 ( (9 10 14 13) ) patch i4 ( (16 20 23 19) ) patch i5 ( (17 18 22 21) ) patch i6 ( (24 28 31 27) ) patch i7 ( (24 25 29 28) ) patch i8 ( (35 39 38 34) ) ); mergePatchPairs ( (i2 i1) (i3 i4) (i6 i5) (i7 i8) ); so i come up with my version : Code:
vertices ( (0.4 0 0) //bottom mid (0.5 0 0) (0.5 0.75 0) (0.4 0.75 0) (0.4 0 8) (0.5 0 8) (0.5 0.75 8) (0.4 0.75 8) (0.4 0.75 0) //mid (0.5 0.75 0) (0.5 2.25 0) (0.4 2.25 0) (0.4 0.75 8) (0.5 0.75 8) (0.5 2.25 8) (0.4 2.25 8) (0.4 2.25 0) //upper mid (0.5 2.25 0) (0.5 3 0) (0.4 3 0) (0.4 2.25 8) (0.5 2.25 8) (0.5 3 8) (0.4 3 8) (0 0 0) //bottom left (0.4 0 0) (0.4 0.75 0) (0 0.75 0) (0 0 8) (0.4 0 8) (0.4 0.75 8) (0 0.75 8) (0.5 0 0) //bottom right (0.9 0 0) (0.9 0.75 0) (0.5 0.75 0) (0.5 0 8) (0.9 0 8) (0.9 0.75 8) (0.5 0.75 8) (0.5 2.25 0) //upper right (0.9 2.25 0) (0.9 3 0) (0.5 3 0) (0.5 2.25 8) (0.9 2.25 8) (0.9 3 8) (0.5 3 8) ); blocks ( hex (0 1 2 3 4 5 6 7) (6 2 6) simpleGrading (1 1 1) hex (8 9 10 11 12 13 14 15) (6 8 6) simpleGrading (1 1 1) hex (16 17 18 19 20 21 22 23) (18 2 6) simpleGrading (1 1 1) hex (24 25 26 27 28 29 30 31) (6 8 6) simpleGrading (1 1 1) hex (32 33 34 35 36 37 38 39) (6 8 6) simpleGrading (1 1 1) hex (40 41 42 43 44 45 46 47) (6 8 6) simpleGrading (1 1 1) ); patch i1 ( (3 7 6 2) ) patch i2 ( (8 12 13 9) ) patch i3 ( (11 15 14 10) ) patch i4 ( (16 20 21 17) ) patch i5 ( (25 29 30 26) ) patch i6 ( (0 4 7 3) ) patch i7 ( (1 5 6 2) ) patch i8 ( (32 36 39 35) ) patch i9 ( (17 21 22 18) ) patch i10 ( (40 44 47 43) ) ); mergePatchPairs ( (i1 i2) (i3 i4) (i6 i5) (i7 i8) (i9 i10) ); Code:
--> FOAM FATAL ERROR: Face 1028 reduced to less than 3 points. Topological/cutting error A. Old face: 2(739 738) new face: 2(739 738) From function void Foam::slidingInterface::coupleInterface(Foam::polyTopoChange&) const in file slidingInterface/coupleSlidingInterface.C at line 1461. FOAM aborting any suggestion or idea for the block? Im new to OpenFOAM and wish to learn from anyone, thank you for your patience...sorry for long winding messages Last edited by wyldckat; January 1, 2019 at 17:58. Reason: added [CODE] markers |
|
January 1, 2019, 18:19 |
|
#5 |
Retired Super Moderator
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,981
Blog Entries: 45
Rep Power: 128 |
Quick answers:
Regarding the first block mesh, here you only have 2 blocks and no duplicate vertices, you have to use the following block resolution: Code:
blocks ( hex (0 1 6 7 16 17 22 23) (2 2 2) simpleGrading (1 1 1) hex (1 2 5 6 17 18 21 22) (8 2 2) simpleGrading (1 1 1) ); As for the second block mesh, the problem is that it looks like you are trying to do something that blockMesh was not designed to be used for. ---- The problem here is that you're asking how to make something work, without explaining what you are trying to do. What came to my mind for an analogy, was that it seemed like you are trying to attach 4 wheels to a rocket and expect it to behave as a motorbike but instead, you are getting a rocket that wobbles until it hits a wall... although perhaps your original intent was to have a fast motorbike and not a rocket with wheels... If you are trying to create a mesh that has blocks that move along a side of a patch, then the tutorial case "incompressible/pimpleFoam/RAS/oscillatingInletACMI2D" comes to mind, where they did create 2 independent blocks, but do not have duplicate vertices. And there was no need to use "mergePairs", because they are not meant to be merged in this example. On the other hand, if you are trying to create blocks with different levels of resolution, then you must first have a consistent mesh resolution between blocks and in another step, use topoSet+refineMesh to do the additional increase in refinement. The tutorial case "mesh/refineMesh/refineFieldDirs" has an advanced example of this being done.
__________________
Last edited by wyldckat; January 1, 2019 at 18:20. Reason: added a bit more to the analogy... |
|
January 1, 2019, 19:31 |
|
#6 | |
New Member
Cham Yang Han
Join Date: Dec 2018
Posts: 14
Rep Power: 8 |
Quote:
Im curious tho, why does the 2nd post in this website: FATAL ERROR: face 6 in patch 2 does not have neighbour cell face: 4(8 9 21 20) fails for my case? anyway, thank you one more time for solving the first block mesh. |
||
January 2, 2019, 20:30 |
|
#7 | |
Retired Super Moderator
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,981
Blog Entries: 45
Rep Power: 128 |
Quote:
|
||
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
[snappyHexMesh] Add Mesh Layers doesnt work on the whole surface | Kryo | OpenFOAM Meshing & Mesh Conversion | 13 | February 17, 2022 08:34 |
[snappyHexMesh] Creating multiple multiple cell zones with snappyHexMesh - a newbie in deep water! | divergence | OpenFOAM Meshing & Mesh Conversion | 0 | January 23, 2019 05:17 |
[snappyHexMesh] SnappyHexMesh no layers and no decent mesh for complex geometry | pizzaspinate | OpenFOAM Meshing & Mesh Conversion | 1 | February 25, 2015 08:05 |
[ICEM] Generating Mesh for STL Car in Windtunnel Simulation | tommymoose | ANSYS Meshing & Geometry | 48 | April 15, 2013 05:24 |
[snappyHexMesh] Layers:problem with curvature | giulio.topazio | OpenFOAM Meshing & Mesh Conversion | 10 | August 22, 2012 10:03 |