CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   OpenFOAM Mesh Utilities (http://www.cfd-online.com/Forums/openfoam-meshing-utilities/)
-   -   MergeMeshes and stitchMesh problem (http://www.cfd-online.com/Forums/openfoam-meshing-utilities/61503-mergemeshes-stitchmesh-problem.html)

flo July 29, 2008 03:26

Hi, Despite all messages abou
 
Hi,
Despite all messages about mergeMeshes and stitchMesh in this forum, I am still not able to use correctly these commands with openfoam 1.4.1. I always obtain the same error using mergeMeshes:

--> FOAM FATAL ERROR : polyTopoChange was constructed with a mesh with 3 patches. The mesh now provided has a different number of patches 6 which is illegal…

Is someone able to write exact procedure about how to use mergeMeshes and stitchMesh?

For example, I prepared two meshes that I want to combine to model a poiseuille flow: from each blockMeshDict, I used separately blockMesh into 2 different directories but after that, using mergeMeshes . poiseuille2 . poiseuille3 lead to the error: what am I doing wrong?
Here are the two blockMeshDict:

http://harmonie-massongex.ch/tmp/blo...ct_poiseuille2

http://harmonie-massongex.ch/tmp/blo...ct_poiseuille3


Thanks a lot,
Flo

hsieh August 15, 2008 17:40

Hi, Flo, let's say you have
 
Hi, Flo,

let's say you have two case directories, test1 and test2.

run blockMesh on both test1 and test2 to generate the mesh.

Now, modify test1/constant/polyMesh/boundary to the following:

/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \ / O peration | Version: 1.4.1 |
| \ / A nd | Web: http://www.openfoam.org |
| \/ M anipulation | |
\*---------------------------------------------------------------------------*/

FoamFile
{
version 2.0;
format ascii;

root "/home/phsieh/OpenFOAM/phsieh-1.4.1/run";
case "test1";
instance "constant";
local "polyMesh";

class polyBoundaryMesh;
object boundary;
}

// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

6
(
inlet2
{
type patch;
nFaces 400;
startFace 57600;
}

outlet2
{
type patch;
nFaces 400;
startFace 58000;
}

tube2
{
type wall;
nFaces 4000;
startFace 58400;
}

inlet3
{
type patch;
nFaces 0;
startFace 62400;
}

outlet3
{
type patch;
nFaces 0;
startFace 62400;
}

tube3
{
type wall;
nFaces 0;
startFace 62400;
}
)

// ************************************************** *********************** //

Then, do (this is for OF-1.4.1): "mergeMeshes . test1 . test2"

You will get a merged mesh. The merged mesh will be saved to a new time directory. Move boundary, faces, owner, neighbour, and points to constant/polyMesh.

I will assume that you will want to remove the overlapped patches. Do "stitchMesh . test1 inlet2 inlet3".

Pei

flo August 22, 2008 03:38

Thank you Pei, mergeMeshes wor
 
Thank you Pei, mergeMeshes works well on 1.4 and 1.5 but stitchMesh still doesn't work on 1.5 (but works well on 1.4) : does someone know why ?

bahrmann September 5, 2008 03:56

Hi All The solution, presen
 
Hi All

The solution, presented obove, works. But I have a problem with pairs of Interfaces wich are "touching" each other. I have two pairs of Interfaces, wich are building an angle of 90°. One pair I can stitch. But until now, it is impossible for me to stitch the other pair.

what I already tried:

- removing "Cellzones" etc
- foamMeshToFluent, and then fluent3DMeshToFoam

Thanks a lot, Rüdiger

waterboy January 14, 2009 11:07

Hi, I would like to combine t
 
Hi,
I would like to combine to meshes created with snappyHexmesh to be used with GGI. So the resulting mesh would consist of two parts but not be connected or overlap or anything of that kind. every single mesh seems to be OK when running checkMesh but mergeMeshes in OpenFOAM 1.5 results in:

/*---------------------------------------------------------------------------*\
| ========= | |
| \ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \ / O peration | Version: 1.5 |
| \ / A nd | Web: http://www.OpenFOAM.org |
| \/ M anipulation | |
\*---------------------------------------------------------------------------*/
Exec : mergeMeshes . Propelllerdemo . Propelllerdemo2
Date : Jan 14 2009
Time : 16:01:04
Host : luhe-02
PID : 17621
Case : /data/tmp/pasch
nProcs : 1

// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
Master: "." "Propelllerdemo"
mesh to add: "." "Propelllerdemo2"

Create Times
Reading master mesh for time = 0.01
Create mesh

Reading mesh to add for time = 0.01
Create mesh

Writing combined mesh to 0.02


Patch face has got a neighbour. Patch ID: 2. This is not allowed.
Face: 4(86765 86764 86766 86767) masterPointID:-1 masterEdgeID:-1 masterFaceID:-1 patchID:2 owner:64693 neighbour:58193#0 Foam::error::printStack(Foam:http://www.cfd-online.com/OpenFOAM_D...part/proud.gifstream&) in "/usr/local/fgtools/OpenFOAM/OpenFOAM-1.5/lib/linuxGccDPOpt/libOpenFOAM.so"
#1 Foam::error::abort() in "/usr/local/fgtools/OpenFOAM/OpenFOAM-1.5/lib/linuxGccDPOpt/libOpenFOAM.so"
#2 Foam::polyAddFace::polyAddFace(Foam::face const&, int, int, int, int, int, bool, int, int, bool) in "/usr/local/fgtools/OpenFOAM/OpenFOAM-1.5/applications/bin/linuxGccDPOpt/mergeMe shes"
#3 Foam::mergePolyMesh::addMesh(Foam::polyMesh const&) in "/usr/local/fgtools/OpenFOAM/OpenFOAM-1.5/applications/bin/linuxGccDPOpt/mergeMe shes"
#4 main in "/usr/local/fgtools/OpenFOAM/OpenFOAM-1.5/applications/bin/linuxGccDPOpt/mergeMe shes"
#5 __libc_start_main in "/lib/tls/libc.so.6"
#6 Foam::regIOobject::write() const in "/usr/local/fgtools/OpenFOAM/OpenFOAM-1.5/applications/bin/linuxGccDPOpt/mergeMe shes"


From function polyAddFace
(
const face& f,
const label owner, const label neighbour,
const label masterPointID,
const label masterEdgeID,
const label masterFaceID,
const bool flipFaceFlux,
const label patchID,
const label zoneID,
const bool zoneFlip
)
in file /home/dm2/henry/OpenFOAM/OpenFOAM-1.5/src/dynamicMesh/lnInclude/polyAddFace.H at line 246.

FOAM aborting

Is mergeMeshes supposed to work in this case? Is it still necessary to change the boundary file of the master? I tried and get the same error.
Does it really read the timesteps' polyMesh as indicated in the output?
Thanks in advance...
Cheers,
Pal

srikara May 5, 2009 03:57

patch face has got a neighbour
 
Hi,
I get the same message "Patch face has got a neighbour. This is not allowed" everytime I run stitchMesh on OF-1.5.
Does anybody know the solution to this error?

Thank you,
Srikara

timo_IHS May 10, 2010 10:40

Hello,

I also have a problem, I think, with mergeMeshes.
I want to create a rotor-stator calculation. I do my setup like in the Ercoftac Centrifugal Pump case. So, importing the cgns-meshes of rotor and stator (separately) is no Problem. I also can watch them in Paraview.
But if I want to merge them into one case (mergeMeshes) and then want to watch in Paraview, I get following error message that I can't interpret:

/*---------------------------------------------------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 1.5-dev |
| \\ / A nd | Revision: 1615 |
| \\/ M anipulation | Web: http://www.OpenFOAM.org |
\*---------------------------------------------------------------------------*/
Exec : foamToVTK
Date : May 10 2010
Time : 16:26:57
Host : amiga
PID : 14302
Case : /mnt/fs2/home/Volllast/OpenFoam
nProcs : 1

// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
Create time

Create mesh for time = 0



Unknown functionEntry

Valid functionEntries are :

3
(
include
remove
inputMode
)


From function functionEntry::execute(const word& functionName, dictionary& parentDict, Istream&)
in file db/dictionary/functionEntries/functionEntry/functionEntry.C at line 84.

FOAM exiting

Does anybody know, what to do with this errror message?


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