|
[Sponsors] |
[mesh manipulation] stitchMesh Not Working Properly |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
July 22, 2020, 13:09 |
stitchMesh Not Working Properly
|
#1 |
New Member
Semih Batuhan Candir
Join Date: Feb 2020
Posts: 3
Rep Power: 6 |
Hello everyone,
I'm trying to create a model to study damBreak case, but I want to refine my mesh manually where it is needed. I tried using refineMesh, but was not able to refine my mesh the way I wanted. So, I decided using stitchMesh, but I'm facing a problem this time. I've created 4 simple blocks to understand how it works, general structure of the model is one block is placed on top of another one and then, two identical blocks are placed just next to them. I've managed to merge top and bottom faces of the blocks using mergePatchPairs in blockMesh file and created a boundary layer between two block pairs namely right1 and left1. I'm trying to make these two layers internal so that water can freely pass through these faces, but even though there is no errors in the process, I'm getting an error in ParaView that my mesh and field points doesn't match. I've looked up for stitchMesh a bit and figured out I should see nFaces as 0 in boundary file, but this is not the case for me. If you could help me figure out what is the problem or any kind of advice that you think might be useful is very much appreciated. I'm attaching a screenshot to visualize my intention. Here is my blockMesh file; Code:
/*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | | \\ / O peration | Version: v1912 | | \\ / A nd | Website: www.openfoam.com | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ FoamFile { version 2.0; format ascii; class dictionary; object blockMeshDict; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // scale 1.000; x1 0.00; x2 5; x3 10; y1 0.00; y2 5; y3 10; z1 0.00; z2 5; z3 10; vertices ( ($x1 $y1 $z1) // 0 ($x2 $y1 $z1) // 1 ($x2 $y2 $z1) // 2 ($x1 $y2 $z1) // 3 ($x1 $y1 $z2) // 4 ($x2 $y1 $z2) // 5 ($x2 $y2 $z2) // 6 ($x1 $y2 $z2) // 7 // block0 ($x1 $y1 $z2) // 8 ($x2 $y1 $z2) // 9 ($x2 $y2 $z2) // 10 ($x1 $y2 $z2) // 11 ($x1 $y1 $z3) // 12 ($x2 $y1 $z3) // 13 ($x2 $y2 $z3) // 14 ($x1 $y2 $z3) // 15 // block1 ($x2 $y1 $z1) // 16 ($x3 $y1 $z1) // 17 ($x3 $y2 $z1) // 18 ($x2 $y2 $z1) // 19 ($x2 $y1 $z2) // 20 ($x3 $y1 $z2) // 21 ($x3 $y2 $z2) // 22 ($x2 $y2 $z2) // 23 // block2 ($x2 $y1 $z2) // 24 ($x3 $y1 $z2) // 25 ($x3 $y2 $z2) // 26 ($x2 $y2 $z2) // 27 ($x2 $y1 $z3) // 28 ($x3 $y1 $z3) // 29 ($x3 $y2 $z3) // 30 ($x2 $y2 $z3) // 31 // block3 ); blocks ( hex (0 1 2 3 4 5 6 7) (10 10 10) simpleGrading (1 1 1) // 0 hex (8 9 10 11 12 13 14 15) (20 20 20) simpleGrading (1 1 1) // 1 hex (16 17 18 19 20 21 22 23) (20 20 20) simpleGrading (1 1 1) // 2 hex (24 25 26 27 28 29 30 31) (10 10 10) simpleGrading (1 1 1) // 3 ); edges ( ); boundary ( leftWall { type wall; faces ( (0 3 7 4) (8 11 15 12) ); } rightWall { type wall; faces ( (21 22 18 17) (29 30 26 25) ); } lowerWall { type wall; faces ( (0 1 2 3) (16 17 18 19) ); } sideWall { type wall; faces ( (3 2 6 7) (11 10 14 15) (19 18 22 23) (27 26 30 31) ); } symmetry { type symmetryPlane; faces ( (4 5 1 0) (12 13 9 8) (20 21 17 16) (28 29 25 24) ); } atmosphere { type patch; faces ( (12 15 14 13) (28 31 30 29) ); } // ************************************************************************* // // Internal Boundaries internal1 { type patch; faces ( (4 7 6 5) ); } internal2 { type patch; faces ( (8 9 10 11) ); } internal3 { type patch; faces ( (20 23 22 21) ); } internal4 { type patch; faces ( (24 25 26 27) ); } // ************************************************************************* // // Internal Faces that cannot be merged right1 { type wall; faces ( (5 6 2 1) (13 14 10 9) ); } left1 { type wall; faces ( (16 19 23 20) (24 27 31 28) ); } ); mergePatchPairs ( (internal1 internal2) (internal3 internal4) ); // ************************************************************************* // Code:
/*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | | \\ / O peration | Version: v1912 | | \\ / A nd | Website: www.openfoam.com | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ FoamFile { version 2.0; format ascii; class dictionary; object stitchMeshDict; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // right1 { match perfect; // partial | integral | perfect master right1; slave left1; } // ************************************************************************* // |
|
August 11, 2020, 20:58 |
|
#2 |
Senior Member
Claudio Boezio
Join Date: May 2020
Location: Europe
Posts: 137
Rep Power: 7 |
Hello leuthar,
I propose the following:
|
|
November 30, 2020, 08:30 |
|
#3 |
New Member
Join Date: Jun 2020
Location: UK
Posts: 22
Rep Power: 6 |
Hi,
Stitching/merging patches can be tricky for this case. Either it is a bug or a limitation with the application (see the threads below for more details): Post#5: Face reduced to less than 3 points (simple cubic blocks) Post#9 and Post#25: when can stitchMesh be used? I renamed (and re-arranged) the patches in your blockMeshDict (just minor changes), and managed to remove the internal boundaries between different regions by performing: Code:
blockMesh stitchMesh -partial part1and2_to_part3and4 part3and4_to_part1and2 -overwrite Cheers |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
potentialFoam not working properly | GAlava | OpenFOAM Running, Solving & CFD | 7 | March 9, 2021 12:34 |
Is there any institutions still working on solving N-S equations? | sharonyue | Main CFD Forum | 2 | November 11, 2015 09:23 |
what "If" condition means in rebound | brbbhatti | OpenFOAM Programming & Development | 0 | August 12, 2014 10:18 |
Slip BC not working properly | lfbarcelo | OpenFOAM | 3 | July 15, 2010 10:53 |
Sample utility not working properly | titio | OpenFOAM | 2 | June 9, 2010 11:45 |