|
[Sponsors] |
October 13, 2020, 05:10 |
Foam Fatal Error with blockMesh
|
#1 |
New Member
Valencia
Join Date: Sep 2020
Posts: 8
Rep Power: 5 |
Hi, I am trying to create a mesh as such:
blockMeshDict: scale 1; vertices ( (0 0 0) (4 0 0) (5.5 0.5 0) (6 0.5 0) (6 0 0) (10 0 0) (0 0.5 0) (4 0.5 0) (10 0.5 0) (0 10 0) (4 10 0) (6 10 0) (10 10 0) (0 0 0.1) (4 0 0.1) (5.5 0.5 0.1) (6 0.5 0.1) (6 0 0.1) (10 0 0.1) (0 0.5 0.1) (4 0.5 0.1) (10 0.5 0.1) (0 10 0.1) (4 10 0.1) (6 10 0.1) (10 10 0.1) ); blocks ( hex (0 1 7 6 13 14 20 19) (16 2 1) simpleGrading (1 1 1) wedge (1 2 7 1 14 15 20 14) (6 2 1) simpleGrading (1 1 1) hex (4 5 8 3 17 18 21 16) (16 2 1) simpleGrading (1 1 1) hex (6 7 10 9 19 20 23 22) (16 38 1) simpleGrading (1 1 1) hex (7 3 11 10 20 16 24 23) (12 38 1) simpleGrading (1 1 1) hex (3 8 12 11 16 21 25 24) (16 38 1) simpleGrading (1 1 1) ); edges ( ); boundary ( leftWall { type wall; faces ( (0 13 19 6) (6 19 22 9) ); } rightWall { type wall; faces ( (5 18 21 8) (8 21 25 12) ); } lowerWall { type wall; faces ( (0 1 14 13) (1 2 15 14) (2 3 16 15) (3 4 17 16) (4 5 18 17) ); } atmosphere { type patch; faces ( (9 22 23 10) (10 23 24 11) (11 24 25 12) ); } ); mergePatchPairs ( ); // ************************************************** ****** // but is met with foam fatal error when trying to run blockMesh: Create time Creating block mesh from "system/blockMeshDict" Creating block edges No non-planar block faces defined Creating topology blocks Creating topology patches Creating block mesh topology --> FOAM FATAL ERROR: face 1 in patch 2 does not have neighbour cell face: 4(1 2 15 14) From Foam::labelList Foam:olyMesh::facePatchFaceCells(const faceList&, const labelListList&, const faceListList&, Foam::label) const in file meshes/polyMesh/polyMeshFromShapeMesh.C at line 119. FOAM aborting #0 Foam::error:rintStack(Foam::Ostream&) at ??:? #1 Foam::error::exitOrAbort(int, bool) at ??:? #2 Foam:olyMesh::facePatchFaceCells(Foam::List<Foam ::face> const&, Foam::List<Foam::List<int> > const&, Foam::List<Foam::List<Foam::face> > const&, int) const at ??:? #3 Foam:olyMesh::setTopology(Foam::List<Foam::cellS hape> const&, Foam::List<Foam::List<Foam::face> > const&, Foam::List<Foam::word> const&, Foam::List<int>&, Foam::List<int>&, int&, int&, Foam::List<Foam::cell>&) at ??:? #4 Foam:olyMesh:olyMesh(Foam::IOobject const&, Foam::Field<Foam::Vector<double> >&&, Foam::List<Foam::cellShape> const&, Foam::List<Foam::List<Foam::face> > const&, Foam::List<Foam::word> const&, Foam::PtrList<Foam::dictionary> const&, Foam::word const&, Foam::word const&, bool) at ??:? #5 Foam::blockMesh::createTopology(Foam::IOdictionary const&, Foam::word const&) at ??:? #6 Foam::blockMesh::blockMesh(Foam::IOdictionary const&, Foam::word const&, Foam::blockMesh::mergeStrategy) at ??:? #7 ? at ??:? #8 __libc_start_main in /lib/x86_64-linux-gnu/libc.so.6 #9 ? at ??:? Aborted (core dumped) Am I doing something wrong here? Would appreciate some help thank you! |
|
October 13, 2020, 06:33 |
|
#2 |
Senior Member
Mark Olesen
Join Date: Mar 2009
Location: https://olesenm.github.io/
Posts: 1,706
Rep Power: 40 |
Try writing your wedge as a hex with collapsed points. This might help.
As the message indicates, your face definition might be wrong. |
|
October 13, 2020, 11:54 |
|
#3 |
New Member
Valencia
Join Date: Sep 2020
Posts: 8
Rep Power: 5 |
Hi olesen, I'm new to coding so I don't really understand what it means by neighbour cell face? Does it mean I numbered the points wrongly?
|
|
November 1, 2020, 08:05 |
|
#4 |
Member
Rohit George Sebastian
Join Date: May 2017
Posts: 41
Rep Power: 9 |
You have made a mistake when specifying the faces. Faces are specified by the points on the face, and maybe you got the numbering of the points wrong, or you accidentally wrote the wrong numbers when defining the points for the face. For instance, maybe you accidentally typed 11 instead of 1. Points are numbered in the order that you define them, and numbering starts from 0. The same applies for faces.
If you are still confused about numbering, go through this page: https://openfoam.com/documentation/u.../blockMesh.php |
|
November 7, 2020, 18:49 |
|
#5 |
Senior Member
Claudio Boezio
Join Date: May 2020
Location: Europe
Posts: 137
Rep Power: 7 |
Hello shv.al,
As I understand you are trying to create a domain with multiple blocks. OpenFOAM's support for that is somewhat limited. blockMesh supports two techniques, Face Matching and Face Merging to join multiple blocks. They work well in simple cases where you stack one block above the other, ie. as long as the faces to be merged have no common edges e.g. opposite faces. However, in your case you would have blocks on top of each other and at the same time also blocks next to each other. Thus you would need to join subsequently faces that share an edge. This might not be possible with Face Matching. With Face Merging it might or might not work. This great extensive Tutorial by Wolfdynamics explains blockMesh in great detail and teh two techniques I mentioned: http://www.wolfdynamics.com/wiki/mes..._blockmesh.pdf If you don't need grading, you might try making one large top block instead of 3 individual ones. In that way, you could first horizontally stack the lower blocks one next to another with Face Matching and at the end add the large block on top with Face Merging. Should you need refinements, try add them later on instead of using several blocks that ar difficult to join. If it doesn't work, you might also want to look into stitchMesh. Hope this helps. Cheers, Claudio |
|
November 16, 2020, 22:54 |
|
#6 |
Senior Member
Claudio Boezio
Join Date: May 2020
Location: Europe
Posts: 137
Rep Power: 7 |
Hello shv.al,
The problem lies within the order of how the vertices are defined, which has to conform to the sequence of how the x, y and z axes are defined. The first to vertices you define, determine the x-axis. The others follow then the right hand rule. I chose the vertices so that the z-axis points vertically towards the atmosphere and y is the depth. I also strongly recommend to label the vertices, it greatly improves readability (note also my formatting to this end) and is helpful to track mistakes. Inside the hex list, you either use the labels or their cardinal number as you did to reference them. Here's a working example, now you just need to define the faces accordingly. I left the vertex numbering unchanged. To merge the blocks I recommend merging the wedge to the block above with mergePatchPairs () and then the remaining three blocks with two calls of stitchMesh. Hope this helps. Cheers, Claudio Code:
vertices ( name V0 ( 0 0 0 ) name V1 ( 4 0 0 ) name V2 ( 5.5 0 0.5) name V3 ( 6 0 0.5) name V4 ( 6 0 0 ) name V5 (10 0 0 ) name V6 ( 0 0 0.5) name V7 ( 4 0 0.5) name V8 (10 0 0.5) name V9 ( 0 0 10) name V10 ( 4 0 10) name V11 ( 6 0 10) name V12 (10 0 10) name V13 ( 0 0.1 0) name V14 ( 4 0.1 0) name V15 ( 5.5 0.1 0.5) name V16 ( 6 0.1 0.5) name V17 ( 6 0.1 0) name V18 (10 0.1 0) name V19 ( 0 0.1 0.5) name V20 ( 4 0.1 0.5) name V21 (10 0.1 0.5) name V22 ( 0 0.1 10) name V23 ( 4 0.1 10) name V24 ( 6 0.1 10) name V25 (10 0.1 10) ); blocks ( hex (0 1 14 13 9 10 23 22) (16 1 40) simpleGrading (1 1 1) wedge (1 2 15 14 7 2 15 20) ( 6 1 2) simpleGrading (1 1 1) hex (7 3 16 20 10 11 24 23) ( 8 1 38) simpleGrading (1 1 1) hex (4 5 18 17 11 12 25 24) (16 1 40) simpleGrading (1 1 1) ); |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
"Failed Starting Thread 0" | ebringley | OpenFOAM Running, Solving & CFD | 2 | April 26, 2019 05:45 |
[mesh manipulation] refineMesh Error | mohsen.boojari | OpenFOAM Meshing & Mesh Conversion | 3 | March 1, 2018 22:07 |
[OpenFOAM] Take derivative of mean velocity in paraFoam | hiuluom | ParaView | 13 | April 26, 2016 06:44 |
Derivative of velocity and mean velocity | hiuluom | OpenFOAM Post-Processing | 1 | May 29, 2015 23:42 |
channelFoam for a 3D pipe | AlmostSurelyRob | OpenFOAM | 3 | June 24, 2011 13:06 |