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

[mesh manipulation] MergedMesh StitchMesh Tool

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

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   July 9, 2019, 12:31
Default MergedMesh StitchMesh Tool
  #1
New Member
 
Mohammad
Join Date: Aug 2018
Location: Yorkshire/UK
Posts: 5
Rep Power: 3
Mohammadja is on a distinguished road
Hi dear friends
Hopefully you are doing well.
As a matter of fact, I generated a mesh with mergeMeshes and stitchmesh tools and I used Integral mode to couple the corresponding patches.
The masterMesh was generated by blockMesh with around 7 million cells and the slaveMesh was generated by snappyHexMesh with around 6 million cells as the geometry of slaveMesh was complex and also the enough layers were not generated in the boundary layer, (I played with parameters but unfortunately only a few layers is generated by snappyHexMesh tool and this is the reason that I decided to get the best features of both blockMesh and snappyHexMesh by mergeMesh and stitchmesh tools. In addition, because the cell is refined in all directions then the number of cells greatly is increased in case of mesh generation by snappyHexMesh tool.
The size of start cell on the wall is .04 mm in both x and y directions, for mastermesh the size of cell in span wise direction is .8 mm.
The slaveMesh contains a cavity and 3 orifices with 1.2 mm orifice diameter which is embedded in the second quarter of semi-cylinder part of the masterMesh.
When I stitch corresponding patches, some patches with a few faces are remained in the boundary while ideally the number of faces should be zero.
Because I did not know how to get rid of them then I simply defined the boundary condition on these patches as all of them are in between main patches with zeroGradient boundary condition. Then I defined the zeroGradient boundary condition for these patches.
The average and maximum non orthogonality of the generated mesh is 9 and 43 degrees with skewness of 3.7 and maximum and aspect ratio of 373.
After running the code, the required time for first iteration with HPC is 5 minutes and both iteration time and courant number continuously are decreased as well as the residuals.Now it is being run with 18 seconds per iteration.
Now I see the velocity changes is very slow in the boundary layer and and the recirculation region behind the cylinder is not formed yet after 0.44 s while I ran this case without embedded mesh (in case we only have a cylinder ) and that re circulation region nicely was formed after 0.2s and it is in good agreement with experiment.
I am worried that maybe the solver is not ok with this mergedmesh and this manipulation? I use pisoFoam solver. However, this re circulation region was formed in another mergedmesh case with less cells in the boundary layer but the flow was not stable.
In previous mesh I had 44 cells from y=0 (on the surface) to y= 44 mm, while in this case I have 108 cells in this distance and it is quite dense.
If non zero faces can create problem? of course I checked all of the on paraview and as I mentioned all of them are between main patches and their boundary conditions are zeroGradient.
The maximum courant number was stated from 11 and not it is 4 with average courant number of 0.07.
The attached pictures show the geometry and the embedded mesh in x-y plane.
It is appreciated if you have any advice.
Thanks
Mohammad
Attached Images
File Type: png mesh.png (33.6 KB, 15 views)
File Type: png mesh2.png (67.4 KB, 14 views)
Mohammadja is offline   Reply With Quote

Old   July 25, 2019, 19:25
Default
  #2
Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,942
Blog Entries: 42
Rep Power: 121
wyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to all
Quick answers:
  1. The images you've provided are showing the decomposed mesh... instructions on how to properly visualize the internal mesh are provided here: https://openfoamwiki.net/index.php/F...is_in_ParaView
  2. I've had to copy the text you wrote into a text editor and then introduce line breaks at each paragraph, so that it was easier for me to read...
  3. From what I can figure out from your description and from what I can see in the second image you attached:
    1. The mesh should not be so refined in the interface between the masterMesh and slaveMesh.
    2. These refinement transitions there can result in problematic vortexes that are not real.
  4. It would be good to be able to see the patches that you refer to here:
    Quote:
    When I stitch corresponding patches, some patches with a few faces are remained in the boundary while ideally the number of faces should be zero.

    Because I did not know how to get rid of them then I simply defined the boundary condition on these patches as all of them are in between main patches with zeroGradient boundary condition. Then I defined the zeroGradient boundary condition for these patches.
  5. I didn't understand if these 2 meshes are in 3D or pseudo-2D (1 cell thick along the 3rd direction). If the two meshes are in 2D, there might be another way to mesh this...
  6. I really would like to be able to see the second image without the cell decomposition, so that it's easier to understand what is happening with the mesh.
  7. The other part I'm having difficulty understanding is where the 3 orifices are located...
__________________
wyldckat is offline   Reply With Quote

Old   July 28, 2019, 16:15
Default
  #3
New Member
 
Mohammad
Join Date: Aug 2018
Location: Yorkshire/UK
Posts: 5
Rep Power: 3
Mohammadja is on a distinguished road
Quote:
Originally Posted by wyldckat View Post
Quick answers:
  1. The images you've provided are showing the decomposed mesh... instructions on how to properly visualize the internal mesh are provided here: https://openfoamwiki.net/index.php/F...is_in_ParaView
  2. I've had to copy the text you wrote into a text editor and then introduce line breaks at each paragraph, so that it was easier for me to read...
  3. From what I can figure out from your description and from what I can see in the second image you attached:
    1. The mesh should not be so refined in the interface between the masterMesh and slaveMesh.
    2. These refinement transitions there can result in problematic vortexes that are not real.
  4. It would be good to be able to see the patches that you refer to here:
  5. I didn't understand if these 2 meshes are in 3D or pseudo-2D (1 cell thick along the 3rd direction). If the two meshes are in 2D, there might be another way to mesh this...
  6. I really would like to be able to see the second image without the cell decomposition, so that it's easier to understand what is happening with the mesh.
  7. The other part I'm having difficulty understanding is where the 3 orifices are located...
Hi dear Bruno
Many thanks for your attention and your supports and sorry for the inconvenience with the text.

Regarding the first item, please find the attached pictures (in 2 zip files), which are relevant to the mid plane of the mesh (XY-plane,z=0). Also in the document "sketch", you can see the location of patches which have been stitched.

Regarding the refinement of mesh in the interface, indeed this refinement is relevant to the embedded mesh generated by snappyHexmesh, if we don't do the refinement on patches "inlet1" and "outlet1", the non orthogonality and skewness are increased and the quality of mesh is compromised.

In another try, I re-Ran the case by smaller time step( 10^-6), the max Courant number is around 0.70, however (after 0.04 seconds) I see the re circulations formed behind the hump but it is not stable and I guess it is relevant to a mistake that I have done unfortunately.

As you know, when we stitch the corresponding patches of the masterMesh and slaveMesh, the number of faces of these patches should be zero ideally.

For my case, after stitching process, patches "top1" and "inlet1" have 0 faces while the patches inlet0, top1, outlet0 and outlet1 have some faces and they have remained in the boundary file.

The mesh is 3 dimensional (with 40 mm thickness in span-wise direction (z)), and as you see from the pictures "inlet0", "top1" and "outlet0", these patches are located in planes Z=-0.02 m and Z=0.02m.

On these side planes, the boundary condition for all fields are zeroGradient and also I defined the same BC for inlet0, top1 and outlet0 patches correctly but as you see from the image "outlet1", it is not located in side planes (Z=-0.02 m and Z=0.02m) with zeroGradient BC, and it is located in the spanwise direction, while on the hump surface we have no slip boundary condition for velocity (while I have defined it zeroGradient on patch outlet1 as I mistakenly thought it is located in the planes z=-0.02m and 0.02m). Probably this is the reason that re circulation region is formed and vanished continuously.
Now I need to either define the proper BC on this patch or somehow manipulate it to get rid of it (of course, I don't know how to manipulate it).


What is your opinion please?
(BTW, those orifices are in the span wise direction, you see just one of them as the pictures are in x-y planes.)
Many thanks again for your supports.
Regards
MJ
Attached Files
File Type: zip resultmaster.zip (177.0 KB, 0 views)
File Type: zip resultmaster2.zip (190.0 KB, 0 views)
Mohammadja is offline   Reply With Quote

Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
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
[mesh manipulation] stitchMesh: multiple meshes GerhardHolzinger OpenFOAM Meshing & Mesh Conversion 3 August 25, 2017 12:43
[mesh manipulation] StitchMesh sigFpe / bad point liquidspoon OpenFOAM Meshing & Mesh Conversion 2 November 29, 2015 14:19
Tool to download: SU2 post-processing Combas SU2 2 June 5, 2014 14:55
Modeling of a Forging Tool. hydro CFX 1 May 19, 2010 18:35
[mesh manipulation] ScalePoints tool cedric_duprat OpenFOAM Meshing & Mesh Conversion 6 September 19, 2008 03:15


All times are GMT -4. The time now is 00:59.