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

[mesh manipulation] Problem with mesh quality after using mergeMesh and stitchMesh

Register Blogs Community New Posts Updated Threads Search

Like Tree2Likes
  • 2 Post By joshm

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   May 19, 2014, 05:52
Default Problem with mesh quality after using mergeMesh and stitchMesh
  #1
New Member
 
Join Date: Mar 2014
Posts: 11
Rep Power: 12
julianschl is on a distinguished road
Hey there,

for improving my IC engine simulations I want to connect a block structured cylinder mesh with a cylinderhead mesh created by snappy.

My situation is the following:

So far I'm doing my simulation with a mesh created by snappy and the deforming strategy for piston and valve motion.
The problem is that the mesh quality decreases fast and I have to create a lot of meshes which needs a lot of computing time.

My idea to improve this is to combine a block structured cylinder mesh with the cylinderhead mesh createdy with snappy. This approach would be only suitable for closed valves but it would decrease my computing time significantly beacause I could use the layer addition and removal strategy for the piston motion.

What I've done so far:

I created my meshes. The block structured cylinder with a patch for merging and the snapped cylinderhead mesh with the corresponding patch for merging. (screenshots)

I merged these meshes with mergeMesh and stitched them with stitchMesh.

For using stitchMesh I've tried several options. Default, -partial, -perfect, -toleranceDict and different values in the toleranceDict.
But no matter which options I used the result contained some bad cells according to checkMesh ( non-Ortho, skewness).

So I'm looking for a method to connect these two meshes without changing any of their vertices.
Anyone got some idea for that? I dont know much about sliding interfaces or GGI I just heard about them. Would be one of them a possibility to solve my problem?

Thanks in advance!

With best regards
Julian
CylHead.jpg

liner.jpg

Last edited by julianschl; May 19, 2014 at 17:13.
julianschl is offline   Reply With Quote

Old   May 20, 2014, 02:28
Default
  #2
Senior Member
 
Hrvoje Jasak
Join Date: Mar 2009
Location: London, England
Posts: 1,905
Rep Power: 33
hjasak will become famous soon enough
mergeMesh basically catenates all points, faces, cells from two pieces to make a single mesh. If yo built your mesh in pieces, this is the first step.

stitchMesh will connect all non-matching interfaces using the sliding interface, just like you need it.

Non-orthogonality and mesh quality loss is minimal: in your case, cell size across the interface is very similar. I am happily running 50:1 cell interfaces and it works just fine.

Enjoy,

Hrv
__________________
Hrvoje Jasak
Providing commercial FOAM/OpenFOAM and CFD Consulting: http://wikki.co.uk
hjasak is offline   Reply With Quote

Old   May 20, 2014, 05:07
Default
  #3
New Member
 
Join Date: Mar 2014
Posts: 11
Rep Power: 12
julianschl is on a distinguished road
Thanks for your reply.

Thats what I've done it so far.

I used
mergeMeshes liner_case cylinderhead_cyse

and

stitchMesh -overwrite -partial masterpatch_liner slavepatch_cylhead

It works without any error!

However checkMesh shows an increased number of highly skew faces (20 to be exactly) and in paraview the mesh doesnt look like I expect it to be.

I attached two screenshots. One with activated decompose polyhedra option in paraview and one without decomposing.

It looks like the vertices are stitched which is what I expect that stitchMesh does. But I dont want it to stitch the vertices.

Do I have to set really low tolerance values in a toleranceDict to solve my problem?

/edit:
The default tolerance values:

pointMergeTol : 0.05
edgeMergeTol : 0.01
nFacesPerSlaveEdge : 5
edgeFaceEscapeLimit : 10
integralAdjTol : 0.05
edgeMasterCatchFraction : 0.4
edgeCoPlanarTol : 0.8
edgeEndCutoffTol : 0.0001

I'm getting errors when I try to use low values for point- and edgeMergeTol with the other values as default.


Stitched1.jpgStitched2.jpg
julianschl is offline   Reply With Quote

Old   May 20, 2014, 22:55
Default
  #4
New Member
 
Josh
Join Date: Jun 2013
Posts: 19
Rep Power: 12
joshm is on a distinguished road
Quote:
Originally Posted by julianschl View Post
Apologies for being off topic, but they look like the top of some ultra-modern sky scrapers. You'd have to pay architects millions to come up with designs like those!
sharonyue and nanavati like this.
joshm is offline   Reply With Quote

Old   May 28, 2014, 10:50
Default
  #5
New Member
 
Join Date: Mar 2014
Posts: 11
Rep Power: 12
julianschl is on a distinguished road
I managed to solve my problem.

It seems that the patch of the slave mesh has to be within the patch of the master mesh.
As you can see in the screenshots above the Cylinderhead (slave mesh) had a slightly bigger diameter than my liner mesh (the master mesh). Changing this solved my problem. No more skew faces created by stitchMesh.
julianschl is offline   Reply With Quote

Old   June 2, 2014, 01:59
Default
  #6
New Member
 
Join Date: Mar 2014
Posts: 11
Rep Power: 12
julianschl is on a distinguished road
Seems like I should have had a closer look inside my mesh before reporting about a success..

enginetopomesher aborted with thousands of skew and non-ortho faces in the last part of the deforming phase.
It looks like stitchMesh still connects some of the verties inside my mesh like the screenshot shows.

Any idea which tolerance values help me avoiding this?

Stitched3.jpg
julianschl is offline   Reply With Quote

Old   September 16, 2014, 10:22
Default
  #7
Member
 
Pratik Nanavati
Join Date: May 2014
Location: Munich, Germany
Posts: 40
Rep Power: 11
nanavati is on a distinguished road
Quote:
Originally Posted by joshm View Post
Apologies for being off topic, but they look like the top of some ultra-modern sky scrapers. You'd have to pay architects millions to come up with designs like those!
haha, nice one buddy..
nanavati is offline   Reply With Quote

Old   May 23, 2015, 12:42
Default
  #8
Senior Member
 
Dongyue Li
Join Date: Jun 2012
Location: Beijing, China
Posts: 838
Rep Power: 17
sharonyue is on a distinguished road
lamo,

usually I feel monotonous, tedious when I read some threads with no feelings. Then u made me spray rice out of my month into the screen. I really need to simulate how to spray those tiny rices elegantly.
sharonyue 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
MergeMesh and stitchMesh lr103476 OpenFOAM Running, Solving & CFD 42 September 10, 2020 07:31
[mesh manipulation] stitchMesh -perfect - tolerance error of 2 identical faces Hanno OpenFOAM Meshing & Mesh Conversion 1 November 21, 2013 05:41
[mesh manipulation] stitchMesh problems along patch edges ribe OpenFOAM Meshing & Mesh Conversion 2 March 5, 2013 15:25
[mesh manipulation] Mesh Manipulation Issues vishalsacharya OpenFOAM Meshing & Mesh Conversion 2 November 23, 2012 23:36


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