CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > OpenFOAM Running, Solving & CFD

MergeMesh and stitchMesh

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

Like Tree2Likes

Reply
 
LinkBack Thread Tools Display Modes
Old   February 20, 2008, 07:27
Default I use the default, which is in
  #21
Senior Member
 
Frank Bos
Join Date: Mar 2009
Location: The Netherlands
Posts: 340
Rep Power: 10
lr103476 is on a distinguished road
I use the default, which is integral if I'm not mistaken. I just noticed that everything works with stitching insideSlider and outsideSlider patches in the mixer2D, which is similar to my problem.

So it has to do with my mesh setup. I just converted 2 gambit meshes to openfoam, ran mergeMeshes and stitching goes wrong. Possibly something wrong with the conversion?

Frank
__________________
Frank Bos
lr103476 is offline   Reply With Quote

Old   February 20, 2008, 08:14
Default Solved! at least for now :-)
  #22
Senior Member
 
Frank Bos
Join Date: Mar 2009
Location: The Netherlands
Posts: 340
Rep Power: 10
lr103476 is on a distinguished road
Solved! at least for now :-)

I did import both (gridpro) meshes in gambit and exported as 1 mesh instead of two (rootCase and addCase). So I didn't have to use mergeMeshes and stitchMesh did its job perfectly.

Now the result of the stitching is 2 interface patches with 0 faces, so I can simply remove them, which was my initial goal :-)

Thanks for the ideas,
Frank
__________________
Frank Bos
lr103476 is offline   Reply With Quote

Old   March 5, 2008, 07:29
Default Hi Frank, I have studied this
  #23
jdk
New Member
 
Jens Dahl Kunoy
Join Date: Mar 2009
Location: Denmark
Posts: 12
Rep Power: 9
jdk is on a distinguished road
Hi Frank,
I have studied this thread quite close, because I'm having problems with stichMesh even though I believe I follow the same procedure as you use in the end. My procedure is as follows:
- Mesh a simple pipe in Gambit 2.4.6 with a non-conformal interface with perfect alignment. See picture
- Declare an inlet and outlet boundary in Gambit and 2 interface boundaries: int1 and int2.
- Export the mesh from Gambit as a single mesh for Fluent 5/6 solver
- import the single mesh using fluent3DMeshToFoam: "fluent3DMeshToFoam . Test mesh.msh"
- tries to merge and remove the 2 internal patches using: "stichMesh . test int1 int2 -perfect" This gives me a fatal error stating something with "... FOAM FATAL ERROR : point, face or cell zone already exists#0..."

Any ideas on what i'm doing wrong here??

Jens
jdk is offline   Reply With Quote

Old   March 5, 2008, 07:57
Default Hi Jens, Just remove the p
  #24
Senior Member
 
Frank Bos
Join Date: Mar 2009
Location: The Netherlands
Posts: 340
Rep Power: 10
lr103476 is on a distinguished road
Hi Jens,

Just remove the pointZones / faceZones and cellZones files from the /constant/polyMesh dir.....

Btw, I only use fluentMeshToFoam (for me it works for 3D too)....

Frank
vonboett likes this.
__________________
Frank Bos
lr103476 is offline   Reply With Quote

Old   March 5, 2008, 09:31
Default Frank, Thank you very much, n
  #25
jdk
New Member
 
Jens Dahl Kunoy
Join Date: Mar 2009
Location: Denmark
Posts: 12
Rep Power: 9
jdk is on a distinguished road
Frank,
Thank you very much, now it works fine. Do you know why the xxZones files are put there in the first place by fluent3DMeshToFoam? I guess they can not be part of the fundamental mesh definition but rather a convient grouping of mesh elements for different utilities? Do you know of any utility that might not work because they have been deleted?

Jens
jdk is offline   Reply With Quote

Old   March 5, 2008, 09:53
Default no :-)
  #26
Senior Member
 
Frank Bos
Join Date: Mar 2009
Location: The Netherlands
Posts: 340
Rep Power: 10
lr103476 is on a distinguished road
no :-)
__________________
Frank Bos
lr103476 is offline   Reply With Quote

Old   March 5, 2008, 12:19
Default At least cell zones are used w
  #27
Member
 
Kati Laakkonen
Join Date: Mar 2009
Location: Espoo, Finland
Posts: 36
Rep Power: 9
kati is on a distinguished road
At least cell zones are used with porous zones, or MRF model.

fluentMeshToFoam can't handle baffles etc., whereas fluent3DMeshToFoam can. The latter came to 1.4.1, there is something about it in the Release Notes.
kati is offline   Reply With Quote

Old   March 6, 2008, 02:18
Default Thank you for your inputs.
  #28
jdk
New Member
 
Jens Dahl Kunoy
Join Date: Mar 2009
Location: Denmark
Posts: 12
Rep Power: 9
jdk is on a distinguished road
Thank you for your inputs.

Jens
jdk is offline   Reply With Quote

Old   April 2, 2008, 13:05
Default Hi guys, I have a problem w
  #29
Senior Member
 
Frank Bos
Join Date: Mar 2009
Location: The Netherlands
Posts: 340
Rep Power: 10
lr103476 is on a distinguished road
Hi guys,

I have a problem with stitchMesh. My mesh has 2 coinciding patches which need to be stitched.

When I use stitchMesh . case interface1 interface2, this leads to a lot of non-orthogonal faces and some concave angles.......

Is this a common problem???

Regards, Frank
__________________
Frank Bos
lr103476 is offline   Reply With Quote

Old   April 4, 2008, 05:00
Default Hi Frank, I have had this
  #30
Member
 
Andrew King
Join Date: Mar 2009
Location: Perth, Western Australia, Australia
Posts: 82
Rep Power: 9
andersking is on a distinguished road
Hi Frank,

I have had this problem before. Usually when points on the two patches are very close, but not close enough to be merged and/or when two boundaries don't quite line up, resulting in small poorly defined faces.

I solved it by remeshing, though there may be better ways...

Cheers,
Andrew
__________________
Dr Andrew King
Fluid Dynamics Research Group
Curtin University
andersking is offline   Reply With Quote

Old   June 25, 2008, 23:43
Default hi everyone, i need to gene
  #31
New Member
 
nikhil babu madduri
Join Date: Mar 2009
Posts: 17
Rep Power: 9
nikhilmadduri is on a distinguished road
hi everyone,

i need to generate a mesh around a cylnder. i have started with
quarter of it. now how to complete it? i tried with filter>Reflection
in paraview. it was working but i have a doubt that paraview being
just a viewing tool, if i take the reflection, is it really going to
change my computational domain physically??

this is a kind of urgent. reply will be greatly appreciated.

regards,
nike
nikhilmadduri is offline   Reply With Quote

Old   February 19, 2009, 03:42
Default Hi All, As geometry is symm
  #32
Member
 
Velan
Join Date: Mar 2009
Location: India
Posts: 50
Rep Power: 9
velan is on a distinguished road
Hi All,

As geometry is symmetric, mesh generated only half of the domain. I solved the symmetric flow using this mesh. Now i need to solve the non symmetric flow. For that i need full mesh. I mirrored the mesh for 180degree. Now i have two mesh in different directories (name by pos and neg ). When i tried stitchMesh, it giving me error

Create Times
Reading master mesh for time = 0
Create mesh

Reading mesh to add for time = 0
Create mesh

Writing combined mesh to 9e-07


Face owner and neighbour are identical. This is not allowed.
Face: 4(98934 98956 98957 98935) masterPointID:-1 masterEdgeID:-1 masterFaceID:-1 patchID:0 owner:90180 neighbour:90180#0 Foam::error::printStack(Foam:stream&) in "/home/vc/OpenFOAM/OpenFOAM-1.5/lib/linuxGccDPOpt/libOpenFOAM.so"
#1 Foam::error::abort() in "/home/vc/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 "/home/vc/OpenFOAM/OpenFOAM-1.5/applications/bin/linuxGccDPOpt/mergeMeshes"
#3 Foam::mergePolyMesh::addMesh(Foam::polyMesh const&) in "/home/vc/OpenFOAM/OpenFOAM-1.5/applications/bin/linuxGccDPOpt/mergeMeshes"
#4 main in "/home/vc/OpenFOAM/OpenFOAM-1.5/applications/bin/linuxGccDPOpt/mergeMeshes"
#5 __libc_start_main in "/lib/libc.so.6"
#6 Foam::regIOobject::write() const in "/home/vc/OpenFOAM/OpenFOAM-1.5/applications/bin/linuxGccDPOpt/mergeMeshes"


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/vc/OpenFOAM/OpenFOAM-1.5/src/dynamicMesh/lnInclude/polyAddFace.H at line 217.

FOAM aborting

Aborted

Suggestions are appreciated

Velan
velan is offline   Reply With Quote

Old   February 19, 2009, 03:46
Default Hi, Apologize for given wro
  #33
Member
 
Velan
Join Date: Mar 2009
Location: India
Posts: 50
Rep Power: 9
velan is on a distinguished road
Hi,

Apologize for given wrong information, I used mergeMeshes for previous mail.


When i used stitchMesh, i got the following error,



stitchMesh -perfect ../neg ../pos/
/*---------------------------------------------------------------------------*\
| ========= | |
| \ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \ / O peration | Version: 1.5 |
| \ / A nd | Web: http://www.OpenFOAM.org |
| \/ M anipulation | |
\*---------------------------------------------------------------------------*/
Exec : stitchMesh -perfect ../neg ../pos/
Date : Feb 19 2009
Time : 13:15:12
Host : scram
PID : 8116
Case : /home/vc/P_10/stitch
nProcs : 1

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

Create mesh for time = 0

word::stripInvalid() called for word ..neg
For debug level (= 2) > 1 this is considered fatal
Aborted
velan is offline   Reply With Quote

Old   February 19, 2009, 10:20
Default Hi Velan, If you have used
  #34
Member
 
olivier Petit
Join Date: Mar 2009
Location: Göteborg, Sweden
Posts: 67
Rep Power: 9
olivier is on a distinguished road
Hi Velan,

If you have used mergeMeshes previously on your case, you should have obtained a 1/ folder within you get a new polymesh. If you take this 1/polymesh and replace it instead of your old constant/polymesh, then you have the right setup to do stitchMesh.

StitchMesh command is using patches, not folders, so the command should be something like

stitchMesh patchMaster patchSlave.

I think the command you are using may not be correct.

Olivier
vonboett likes this.
olivier is offline   Reply With Quote

Old   February 23, 2009, 05:46
Default Hi Olivier, Thanks for your
  #35
Member
 
Velan
Join Date: Mar 2009
Location: India
Posts: 50
Rep Power: 9
velan is on a distinguished road
Hi Olivier,

Thanks for your reply. I got the error message while doing mergeMeshes (Face owner and neighbour are identical. This is not allowed....), which i posted the error in previous mail.

May be the command which i am using was wrong. Can you please clarify few problems ?

* I have two meshes which having one symmetric half body mesh and another which is exactly rotated about 180 degree (mirror mesh)
* I have two directories by name orig and mirr
* I have the boundary name as Out, In, Top

Can you please tell me the exact command for merging mesh for my case?. Is there any separate Dict file for it ?

Similarly i not understand the option of mergeMesh

master root
master case
root to add
case to add


Where i can find the details about this option ?
velan is offline   Reply With Quote

Old   August 10, 2009, 18:33
Default stitch mesh error
  #36
New Member
 
simon
Join Date: Aug 2009
Posts: 1
Rep Power: 0
simon19 is on a distinguished road
Hi

I am using an axi-symmetric mesh something likes in the below image,I want to mesh this domain with two size: coarse and fine(like in the second image) then I tried to make a change in polyMesh dictionary and made 2 blocks and two patches by name of patch right and patch left like this:

convertToMeters 0.001;

vertices
(
(0 0 0)//0
(0.43661 0 10)//1
(0.43661 44 10)//2
(0 44 0)//3
(-0.43661 0 10)//4
(-0.43661 44 10)//5
(0 44 0)//6
(0.43661 44 10)//7
(0.43661 75 10)//8
(0 75 0)//9
(-0.43661 44 10)//10
(-0.43661 75 10)//11
);

blocks
(
hex (0 1 2 3 0 4 5 3) (30 44 1) simpleGrading (1 1 1)
hex (6 7 8 9 6 10 11 9) (15 31 1) simpleGrading (1 1 1)
// hex (6 7 10 9 6 8 11 9) (15 31 1) simpleGrading (1 1 1)
);

edges
(
);

patches
(
wall walls
(
(9 8 11 9)
(0 4 1 0)
(1 4 5 2)
(7 10 11 8)
)
symmetryPlane axis
(
(0 3 3 0)
(6 9 9 6)
)
patch left
(
(6 7 10 6)
)
patch right
(
(3 5 2 3)
)
wedge back
(
(3 5 4 0)

(9 11 10 6)
)
wedge front
(
(0 1 2 3)

(6 7 8 9)

)
);

blockMesh worked fine to create this mesh(like in the second image) but I need to delete to patches(right & left) That I created in the previous stage,so I try to use stitchMesh utility but I faced error like this:

Create time

Create mesh for time = 0

Coupling patches right and left
Resulting (internal) faces will be in faceZone rightleftCutFaceZone

Note: the overall area covered by both patches should be identical ("integral" interface).
If this is not the case use the -partial option

Adding point and face zones
Reading all current volfields


Patch face has got a neighbour This is not allowed.
Face: 5(905 926 2838 927 906) faceID:4201 owner:862 neighbour:137 patchID:5#0 Foam::error:rintStack(Foam::Ostream&) in "/home/openfoam1.5/OpenFOAM/OpenFOAM-1.5/lib/linuxGccDPOpt/libOpenFOAM.so"
#1 Foam::error::abort() in "/home/openfoam1.5/OpenFOAM/OpenFOAM-1.5/lib/linuxGccDPOpt/libOpenFOAM.so"
#2 Foam:olyModifyFace:olyModifyFace(Foam::face const&, int, int, int, bool, int, bool, int, bool) in "/home/openfoam1.5/OpenFOAM/OpenFOAM-1.5/lib/linuxGccDPOpt/libdynamicMesh.so"
#3 Foam::slidingInterface::coupleInterface(Foam:oly TopoChange&) const in "/home/openfoam1.5/OpenFOAM/OpenFOAM-1.5/lib/linuxGccDPOpt/libdynamicMesh.so"
#4 Foam::slidingInterface::setRefinement(Foam:olyTo poChange&) const in "/home/openfoam1.5/OpenFOAM/OpenFOAM-1.5/lib/linuxGccDPOpt/libdynamicMesh.so"
#5 Foam:olyTopoChanger::topoChangeRequest() const in "/home/openfoam1.5/OpenFOAM/OpenFOAM-1.5/lib/linuxGccDPOpt/libdynamicMesh.so"
#6 Foam:olyTopoChanger::changeMesh(bool, bool, bool, bool) in "/home/openfoam1.5/OpenFOAM/OpenFOAM-1.5/lib/linuxGccDPOpt/libdynamicMesh.so"
#7 main in "/home/openfoam1.5/OpenFOAM/OpenFOAM-1.5/applications/bin/linuxGccDPOpt/stitchMesh"
#8 __libc_start_main in "/lib/libc.so.6"
#9 Foam::regIOobject::readIfModified() in "/home/openfoam1.5/OpenFOAM/OpenFOAM-1.5/applications/bin/linuxGccDPOpt/stitchMesh"


From function polyModifyFace:olyModifyFace
(
const face& f,
const label faceID,
const label owner,
const label neighbour,
const bool flipFaceFlux,
const label patchID,
const bool removeFromZone,
const label zoneID,
const bool zoneFlip
)
in file lnInclude/polyModifyFace.H at line 221.

FOAM aborting

Aborted

What is my mistake?
Attached Images
File Type: jpg face.jpg (41.0 KB, 70 views)
File Type: jpg s.jpg (52.3 KB, 98 views)
simon19 is offline   Reply With Quote

Old   September 17, 2009, 06:51
Default Hi I am using an axi-symmetric mesh something likes in the below image,I want to mes
  #37
Member
 
Pramod
Join Date: Jul 2009
Posts: 30
Rep Power: 9
pramodopen4foam is on a distinguished road
Hi,
I am also facing same kind of problem, I am testing rotating propeller, I have merged Rotar which includes propeller with Tank, stiching tank and rotor mesh results in the same error as mentioned above,
My questions were
1) Is it possible to run command stitchMesh in OF-1.5,
2) if yes , could you please specify the cause for this error,

Thanks in advance,
Pramod
pramodopen4foam is offline   Reply With Quote

Old   December 25, 2012, 04:51
Default
  #38
Senior Member
 
Dongyue Li
Join Date: Jun 2012
Location: Torino, Italy
Posts: 742
Rep Power: 9
sharonyue is on a distinguished road
Quote:
Originally Posted by lr103476 View Post
I use the default, which is integral if I'm not mistaken. I just noticed that everything works with stitching insideSlider and outsideSlider patches in the mixer2D, which is similar to my problem.

So it has to do with my mesh setup. I just converted 2 gambit meshes to openfoam, ran mergeMeshes and stitching goes wrong. Possibly something wrong with the conversion?

Frank
Hi Frank,
Does stitck mesh mean merge nodes? but afaik MRF do not need merge nodes, it can deal with the interface problem. About MRF's interface in OpenFOAM. u give me any hints? Thanks in advance.
sharonyue is offline   Reply With Quote

Old   March 28, 2013, 05:20
Default mergeMeshes doesn't work for arbitrary patch names
  #39
New Member
 
Join Date: Dec 2012
Posts: 1
Rep Power: 0
reini is on a distinguished road
Hello all,

I'm trying to merge to cubic meshes. It works fine if the 6 patch names for each mesh are the same. However this makes it difficult to distinguish different patches in the merged grid. If I give different patch names for each grid mergeMeshes gives the following error message:

.
.
.
Copying old patches
Adding new patches.

--> FOAM FATAL ERROR:
Illegal neighbourPatch name
Valid patch names are
12
(
master0_half0
master0_half1
master1_half0
master1_half1
master2_half0
master2_half1
help0_half0
help0_half1
help1_half0
help1_half1
help2_half0
help2_half1
)


From function cyclicPolyPatch::neighbPatchID() const
in file meshes/polyMesh/polyPatches/constraint/cyclic/cyclicPolyPatch.C at line 825.

FOAM exiting

I'm pretty confused since I have not specified any neighborPatch with "name" like stated in the error message. Did anybody have the same problem or does anybody have a hint for solving it?

Thank you in advance

Reini
reini is offline   Reply With Quote

Old   April 17, 2013, 08:14
Default
  #40
Member
 
Dogan
Join Date: Nov 2012
Location: Bochum/Germany
Posts: 42
Rep Power: 5
dogan is on a distinguished road
Hi everyone,
I am working on a centrifugal pump simulation, and i am trying to stitch two interfaces byusing stitchMesh command. i post a thread explaining the situation in the link as followed:

stitchMesh problem

if you have any idea to solve this problem, could you please help me.
Thanks in advance, and regards
Dogan
dogan 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
StitchMesh on two patches anita OpenFOAM Native Meshers: blockMesh 31 April 4, 2013 11:51
MergeMeshes and stitchMesh problem flo OpenFOAM Mesh Utilities 6 May 10, 2010 10:40
StitchMesh on OF15 error any fix flo OpenFOAM Bugs 0 August 20, 2008 10:27
Using stitchMesh for two pairs of patches kati OpenFOAM Mesh Utilities 4 May 24, 2006 02:04
Using stitchMesh for two pairs of patches kati OpenFOAM Mesh Utilities 0 March 17, 2006 13:04


All times are GMT -4. The time now is 13:56.