CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > OpenFOAM Mesh Utilities

when can stitchMesh be used?

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

Reply
 
LinkBack Thread Tools Display Modes
Old   February 28, 2013, 04:15
Default when can stitchMesh be used?
  #1
Member
 
Eloïse
Join Date: Jul 2012
Location: Trondheim, Norway
Posts: 49
Rep Power: 2
Eloise is on a distinguished road
Hello,

I'm trying to stitch different meshes together. Here is what I found:
- internal mesh is a cylinder: no problem.
- internal mesh is a block: not possible (see here).
- internal mesh is a sphere: not possible (I did not succeeded).

Am I right? Or did one of you managed to stitch a block or a sphere inside another mesh?

Thanks for your feedback!
Eloïse
Attached Images
File Type: jpg InnerCylinder.jpg (98.2 KB, 26 views)
File Type: jpg InnerSphere.jpg (97.8 KB, 22 views)
Eloise is offline   Reply With Quote

Old   March 2, 2013, 10:00
Default
  #2
Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 4,228
Blog Entries: 31
Rep Power: 45
wyldckat has a spectacular aura aboutwyldckat has a spectacular aura about
Greetings Eloïse,

I can only guess that it really depends on the meshes you've got to be stitched! Can you share simple case examples of what you're trying to do?

Best regards,
Bruno
wyldckat is offline   Reply With Quote

Old   March 2, 2013, 12:42
Default
  #3
Member
 
Eloïse
Join Date: Jul 2012
Location: Trondheim, Norway
Posts: 49
Rep Power: 2
Eloise is on a distinguished road
Hello Bruno,

Here are some test cases:
1) for a Cylinder: run .\Allrun_Cylinder. You can see that is works by looking at the log.checkMesh where the two internal patches have no faces.
2) for a Sphere: run .\Allrun_Sphere. The stitchMesh ends with an error.
3) for a Block: no test case, but I'd suggest to simply replace the sphere by a box in the Sphere test case.

Thanks for your interest in this case
Eloïse
Attached Files
File Type: gz Cylinder.tar.gz (2.7 KB, 10 views)
File Type: gz Sphere.tar.gz (16.9 KB, 6 views)
Eloise is offline   Reply With Quote

Old   March 2, 2013, 19:47
Default
  #4
Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 4,228
Blog Entries: 31
Rep Power: 45
wyldckat has a spectacular aura aboutwyldckat has a spectacular aura about
Hi Eloïse,

These are awesome test cases !
But you forgot to mention that for the box and the sphere you were using snappyHexMesh!
And it's easily solved! The missing magic step if this after mergeMeshes:
Code:
rm 0/cc* 0/*Level
Those files are generated by snappyHexMesh for future reference, in case you want to do some advanced mesh manipulation and diagnosing.

In addition, you can use the "-overwrite" option in mergeMeshes as well (I'm using OpenFOAM 2.1.x and I haven't checked with 2.1.1):
Code:
#!/bin/sh
# Source tutorial run functions
. $WM_PROJECT_DIR/bin/tools/CleanFunctions
. $WM_PROJECT_DIR/bin/tools/RunFunctions
                          
cd IntDom_Sphere/
cleanCase
runApplication blockMesh  
runApplication snappyHexMesh -overwrite 

cd ../ExtDom_Sphere/
cleanCase
runApplication blockMesh 
runApplication snappyHexMesh -overwrite 
runApplication mergeMeshes -overwrite . ../IntDom_Sphere/  
rm 0/cc* 0/*Level
runApplication stitchMesh -partial -toleranceDict toleranceDict -overwrite sphere_ext_region0 sphere_int_region0
Best regards,
Bruno
wyldckat is offline   Reply With Quote

Old   March 3, 2013, 07:35
Default
  #5
Member
 
Eloïse
Join Date: Jul 2012
Location: Trondheim, Norway
Posts: 49
Rep Power: 2
Eloise is on a distinguished road
Hi Bruno,

Thanks for your fast answer! The sphere is indeed created with snappyHexMesh and this additional line solves it all . I haven't had time yet to work on the sphere creation in blockMesh, it will probably come soon.

It is already very good news that the stitching can work with spherical and cubic internal meshes when using snappyHexMesh!

I'm actually working with 2.0.x, so the -overwrite option is not available for mergeMeshes.

Regards,
Eloïse
Eloise is offline   Reply With Quote

Old   Today, 05:21
Default
  #6
New Member
 
Join Date: Mar 2010
Posts: 17
Rep Power: 5
cutter is on a distinguished road
Hi,

thanks for your test cases. I've tried them with OF 2.2.x, they're working without any problems.

Did you make any progress with the block case?! Occasionally I have similar problems that could only be resolved by preparing the whole mesh in an external tool. I therefore modified your Cylinder test case to create a Cube case by removing the arcs within the blockMesh files (see below). This causes stitchMesh to fail with the following error:
Code:
--> 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.
This is really strange since the two patches should match even perfectly. Can this be resolved by modifying the toleranceDict? Maybe it's even worth a bug report...

The same error has also been observed in StitchMesh on two patches and creating interface in openfoam.

Cutter
Attached Files
File Type: gz Cube.tar.gz (2.5 KB, 0 views)
cutter 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 problems along patch edges ribe OpenFOAM Mesh Utilities 2 March 5, 2013 15:25
stitchMesh perfect vs partial Eloise OpenFOAM Mesh Utilities 1 February 22, 2013 11:25
stitchMesh question? vishalsacharya OpenFOAM Native Meshers: blockMesh 0 December 9, 2012 23:41
stitchMesh dhruv OpenFOAM Mesh Utilities 13 February 23, 2012 17:14
stitchMesh marine OpenFOAM Mesh Utilities 1 April 27, 2010 10:59


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