CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Meshing & Mesh Conversion

[blockMesh] mergePatchPairs problem when migrating from OFext1.6 to OFext3.1

Register Blogs Community New Posts Updated Threads Search

Like Tree1Likes
  • 1 Post By ma-tri-x

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   October 27, 2015, 12:36
Default mergePatchPairs problem when migrating from OFext1.6 to OFext3.1
  #1
Member
 
Join Date: Sep 2013
Posts: 46
Rep Power: 13
ma-tri-x is on a distinguished road
Hi Community!

I encounter a strange phenomenon... when I take my old mesh I used to calculate on with OFext1.6, now with OFext3.1, mergePatchPairs inside the blockMeshDict seems to not work properly anymore. When I open the Mesh with paraFoam (paraview version 4.4.0, thirdparty built-in), I get the error that faces and owners do not match:

Code:
Warning: In /home/kitware/Dashboards/buildbot/paraview-debian4dash-linux-shared-release_qt4_superbuild/source-paraview/VTK/IO/Geometry/vtkOpenFOAMReader.cxx, line 4744
vtkOpenFOAMReaderPrivate (0x4a9e3c0): Numbers of faces in faces 257521 and owner 256973 does not match
can anyone tell me why this is the case?
I can view the mesh when I do not apply mergePatchPairs, but of course I the cannot do calculations. Here's a minimal example:

Code:
/*--------------------------------*- C++ -*----------------------------------*\
| =========                 |                                                 |
| \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
|  \\    /   O peration     | Version:  2.0.0                                 |
|   \\  /    A nd           | Web:      www.OpenFOAM.com                      |
|    \\/     M anipulation  |                                                 |
\*---------------------------------------------------------------------------*/

FoamFile
{
    version         2.0;
    format          ascii;
 
    root            "";
    case            "";
    instance        "";
    local           "";
 
    class           dictionary;
    object          blockMeshDict;
}
 
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

convertToMeters 1;

vertices
(
(0 0  0)         // Vertex lfb = 0 
(1 0  0)         // Vertex rfb = 1 
(1 0 -1)         // Vertex rrb = 2 
(0 0 -1)         // Vertex lrb = 3 

(0 1  0)         // Vertex lft = 4 
(1 1  0)         // Vertex rft = 5 
(1 1 -1)         // Vertex rrt = 6 
(0 1 -1)         // Vertex lrt = 7 

(1 0  0)         // Vertex LFB = 8 
(2 0  0)         // Vertex RFB = 9 
(2 0 -1)         // Vertex RRB = 10 
(1 0 -1)         // Vertex LRB = 11 

(1 1  0)         // Vertex LFT = 12 
(2 1  0)         // Vertex RFT = 13 
(2 1 -1)         // Vertex RRT = 14 
(1 1 -1)         // Vertex LRT = 15 
);
 
blocks
(
  hex (0 1 2 3   4 5 6 7) (10 10 10) simpleGrading (2 1 1)
  hex (8 9 10 11   12 13 14 15) (10 20 10) simpleGrading (1 1 1)
);


edges                  
(
);
 
patches
(
    patch wall
    (
        (0 1 2 3)
        (11 8 9 10)
        
        (7 4 5 6)
        (15 12 13 14)
        
        (3 2 6 7)
        (11 10 14 15)
        
        (0 1 5 4)
        (8 9 13 12)
        
        (3 0 4 7)
        (10 9 13 14)
    )
    
    patch left
    (
        (1 2 6 5)
    )
    patch right
    (
        (8 12 15 11)
    )
);


mergePatchPairs
(
    (right left)
);
For the minimal example I could fix the problem when using stitchMesh instead of mergePatchPairs. However for the bigger example, I do not know how to apply stitchMesh repeatedly to different patch pairs.

Thanks for any suggestions!!!

Max
ma-tri-x is offline   Reply With Quote

Old   October 29, 2015, 10:01
Default work around
  #2
Member
 
Join Date: Sep 2013
Posts: 46
Rep Power: 13
ma-tri-x is on a distinguished road
A colleage of mine found a work-around solution:

- decompose the mesh with decomposePar (if necessary only one domain)
- copying the parts processor*/0/polyMesh into processor*/constant
- loading the 'decomposed' case in paraview

in bash:
Code:
#! /bin/bash

for dir in `ls -d processor*`;
do
  cd $dir
  mkdir constant/
  cp -rp 0/polyMesh constant/
  cd ../
done
indeed that works. I consider this is an OFext3.1 bug. Does anyone know why this happens?

Best regards,
Max
bigorange likes this.
ma-tri-x is offline   Reply With Quote

Old   January 12, 2021, 05:23
Default Manage to solve the same problem when mergePatchPair but don't understand why
  #3
New Member
 
anaspauzi's Avatar
 
Anas Muhamad Pauzi
Join Date: Nov 2019
Posts: 16
Rep Power: 7
anaspauzi is on a distinguished road
Thank you, this solve my problem in OF4-0
just put this code into my Allrun

Could anyone explain why this work and any other alternatives

Thank you


Quote:
Originally Posted by ma-tri-x View Post
A colleage of mine found a work-around solution:

- decompose the mesh with decomposePar (if necessary only one domain)
- copying the parts processor*/0/polyMesh into processor*/constant
- loading the 'decomposed' case in paraview

in bash:
Code:
#! /bin/bash

for dir in `ls -d processor*`;
do
  cd $dir
  mkdir constant/
  cp -rp 0/polyMesh constant/
  cd ../
done
indeed that works. I consider this is an OFext3.1 bug. Does anyone know why this happens?

Best regards,
Max
anaspauzi is offline   Reply With Quote

Reply


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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Mesh& steptime independant: conduction-convection problem Fati1 Main CFD Forum 1 October 28, 2018 14:52
natural convection problem for a CHT problem Se-Hee CFX 2 June 10, 2007 07:29
Adiabatic and Rotating wall (Convection problem) ParodDav CFX 5 April 29, 2007 20:13
Periodic flow boundary condition problem sudha FLUENT 3 April 28, 2004 09:40
extremely simple problem... can you solve it properly? Mikhail Main CFD Forum 40 September 9, 1999 10:11


All times are GMT -4. The time now is 16:04.