CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > OpenFOAM Native Meshers: blockMesh

Struggling to stitch or merge these blocks

Register Blogs Members List Search Today's Posts Mark Forums Read

Like Tree1Likes
  • 1 Post By alexeym

Reply
 
LinkBack Thread Tools Display Modes
Old   November 3, 2014, 20:51
Default Struggling to stitch or merge these blocks
  #1
New Member
 
James Guthrie
Join Date: Sep 2014
Posts: 16
Rep Power: 4
Jabo is on a distinguished road
Hi

So I'm trying to use blockMesh and create one cylinder on top of another fatter cylinder, resembling a tube going into a chamber. I'll be simulating spray going through the tube into the cylinder using sprayFoam.

Here's my blockMeshDict:

Code:
convertToMeters 0.001;

vertices
(
    (-5 0 0)
    (-5 0 0)
    (5 0 0)
    (5 0 0)
    (-5 100 0)
    (-5 100 0)
    (5 100 0)
    (5 100 0)
    (-2.5 100 0)
    (-2.5 100 0)
    (2.5 100 0)
    (2.5 100 0)
    (-2.5 109 0)
    (-2.5 109 0)
    (2.5 109 0)
    (2.5 109 0)
);

blocks
(
    hex (0 1 2 3 4 5 6 7) (20 20 80) simpleGrading (1 1 1)
    hex (8 9 10 11 12 13 14 15) (4 4 16) simpleGrading (1 1 1)
);

edges
(
    arc 0 3 (0 0 -5)
    arc 1 2 (0 0 5)
    arc 4 7 (0 100 -5)
    arc 5 6 (0 100 5)
    arc 8 11 (0 100 -2.5)
    arc 9 10 (0 100 2.5)
    arc 12 15 (0 109 -2.5)
    arc 13 14 (0 109 2.5)
);

patches
(
    wall walls
    (
        (2 6 5 1)
        (0 4 7 3)
        (0 1 5 4)
        (4 5 6 7)
        (7 6 2 3)
        (3 2 1 0)
    )
    wall inlet
    (
        (10 14 13 9)
        (8 12 15 11)
        (8 9 13 12)
        (12 13 14 15)
        (15 14 10 11)
        (11 10 9 8)
    )
);

mergePatchPairs
(
);
and checkMesh:

Code:
Mesh stats
    points:           32770
    faces:            97184
    internal faces:   93024
    cells:            32256
    faces per cell:   5.89683
    boundary patches: 2
    point zones:      0
    face zones:       0
    cell zones:       0

Overall number of cells of each type:
    hexahedra:     28928
    prisms:        3328
    wedges:        0
    pyramids:      0
    tet wedges:    0
    tetrahedra:    0
    polyhedra:     0

Checking topology...
    Boundary definition OK.
    Cell to face addressing OK.
    Point usage OK.
    Upper triangular ordering OK.
    Face vertices OK.
   *Number of regions: 2
    The mesh has multiple regions which are not connected by any face.
  <<Writing region information to "0/cellToRegion"
  <<Writing region 0 with 32000 cells to cellSet region0
  <<Writing region 1 with 256 cells to cellSet region1

Checking patch topology for multiply connected surfaces...
    Patch               Faces    Points   Surface topology                  
    walls               4000     3962     ok (closed singly connected)      
    inlet               160      154      ok (closed singly connected)      

Checking geometry...
    Overall domain bounding box (-0.005 0 -0.005) (0.005 0.109 0.005)
    Mesh (non-empty, non-wedge) directions (1 1 1)
    Mesh (non-empty) directions (1 1 1)
    Boundary openness (-2.59514e-17 4.45753e-18 -1.07301e-16) OK.
    Max cell openness = 1.11667e-15 OK.
    Max aspect ratio = 406.119 OK.
    Minimum face area = 2.40746e-09. Maximum face area = 1.8861e-06.  Face area magnitudes OK.
    Min volume = 3.00932e-12. Max volume = 1.06093e-09.  Total volume = 7.98082e-06.  Cell volumes OK.
    Mesh non-orthogonality Max: 85.0024 average: 28.873
   *Number of severely non-orthogonal (> 70 degrees) faces: 5120.
    Non-orthogonality check OK.
  <<Writing 5120 non-orthogonal faces to set nonOrthoFaces
    Face pyramids OK.
    Max skewness = 1.04775 OK.
    Coupled point location match (average 0) OK.

Mesh OK.

End
I'm doing something wrong as running 'stitchMesh walls inlet' or using mergePatchFaces gives:

--> FOAM FATAL ERROR:
Zero length edge detected. Probable projection error: slave patch probably does not project onto master. Please switch on enriched patch debug for more info

From function void enrichedPatch::calcCutFaces() const
in file slidingInterface/enrichedPatch/enrichedPatchCutFaces.C at line 263.

FOAM aborting

I don't know where I'm going wrong, please advise.

Thanks

Last edited by Jabo; November 3, 2014 at 20:52. Reason: Tidy up, remove commented out code
Jabo is offline   Reply With Quote

Old   November 7, 2014, 05:39
Default
  #2
Senior Member
 
Alexey Matveichev
Join Date: Aug 2011
Location: Nancy, France
Posts: 1,436
Rep Power: 25
alexeym will become famous soon enoughalexeym will become famous soon enough
Hi,

during stitching process vertexes of slave patch are projected onto master patch, after new edges and faces are created. Success of the operation depends on the quality of the mesh. Your blockMeshDict produces rather low-quality mesh (or should I say no-quality), so stitching operation fails.

I've attached archive of a case where stitchMesh operation finishes successfully. You'll need gmsh to generate initial mesh.
Attached Files
File Type: gz two-cylinders.tar.gz (7.7 KB, 15 views)
Jabo likes this.
alexeym is offline   Reply With Quote

Reply

Thread Tools
Display Modes

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 On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
dsmcInitialise - dsmcFoam archymedes OpenFOAM Pre-Processing 94 July 15, 2016 16:14
converting Fluent mesh to openfoam standard mesh deepesh OpenFOAM Other Meshers: ICEM, Star, Ansys, Pointwise, GridPro, Ansa, ... 25 June 27, 2016 00:58
[ICEM] Two boxes connected by a cylinder, blocks merge where I don't want them to merge. Polarbear ANSYS Meshing & Geometry 4 April 30, 2014 15:21
fluent3DMeshToFoam bego OpenFOAM 27 May 29, 2013 13:08
[ICEM] Edges in Merge Blocks tool FJSJ ANSYS Meshing & Geometry 8 April 24, 2013 07:11


All times are GMT -4. The time now is 09:51.