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

[snappyHexMesh] Unable to create patches while using snappyHexMesh

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

Like Tree3Likes
  • 1 Post By RobertHB
  • 1 Post By RobertHB
  • 1 Post By RobertHB

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   June 29, 2018, 07:00
Default Unable to create patches while using snappyHexMesh
  #1
Member
 
Ashish Vinayak
Join Date: Mar 2015
Location: Wuppertal, Germany
Posts: 50
Rep Power: 11
ashish.vinayak is on a distinguished road
Hi,

I am trying to create a mesh where I have placed two cylinders of different diameters on to one another (Fig1).
There will be a simple inlet and outlet patch and the lateral surfaces will be in a wall patch. However, I am unable to select the patches (Fig2)

geometry and refinementSurfaces definitions are as follows:

geometry
{
testObject
{
type triSurfaceMesh;
file "testObject.stl";
regions
{
topSurface_lateral
{
name topSurface_lateral;
}
topInlet
{
name topInlet;
}
bottomSurface_lateral
{
name bottomSurface_lateral;
}
}
}
}
************************************************** *******
refinementSurfaces
{
testObject
{
// Surface-wise min and max refinement level
level (1 2); // was (2 2)
regions
{
topSurface_lateral
{
level (1 3);
patchInfo
{
type wall;
}
}
topInlet
{
level (1 3);
patchInfo
{
type wall;
}
}
bottomSurface_lateral
{
level (1 3);
patchInfo
{
type patch;
}
}
}
}
*************************
I have tried quite a bit of things but I am unable to understand why creating patches is such a difficult task. Can someone help me figure this out?
Attached Images
File Type: jpg Screenshot from 2018-06-29 13-04-14.jpg (72.6 KB, 22 views)
File Type: jpg Screenshot from 2018-06-29 13-04-33.jpg (88.5 KB, 19 views)

Last edited by ashish.vinayak; June 29, 2018 at 07:05. Reason: Changed photos, corrected title
ashish.vinayak is offline   Reply With Quote

Old   June 29, 2018, 07:19
Default
  #2
Senior Member
 
Robert
Join Date: May 2015
Location: Bremen, GER
Posts: 292
Rep Power: 11
RobertHB is on a distinguished road
If i understand your post correctly, your stl contains both the smaller cylinder as well as the larger on. And the meshing process doesn't correctly represent the out shape of your domain?
What i did in a similar situation was to use two stl. files. One for each cylinder. That worked for me.
ashish.vinayak likes this.
__________________
If you liked my answer to your question, please consider leaving a "Like" in return
RobertHB is offline   Reply With Quote

Old   June 29, 2018, 07:36
Default
  #3
Member
 
Ashish Vinayak
Join Date: Mar 2015
Location: Wuppertal, Germany
Posts: 50
Rep Power: 11
ashish.vinayak is on a distinguished road
Quote:
Originally Posted by RobertHB View Post
If i understand your post correctly, your stl contains both the smaller cylinder as well as the larger on. And the meshing process doesn't correctly represent the out shape of your domain?
What i did in a similar situation was to use two stl. files. One for each cylinder. That worked for me.
You mean to say that instead of using a single closed stl I should use 2 closed stl files (one for each cylinder) ?
ashish.vinayak is offline   Reply With Quote

Old   June 29, 2018, 07:50
Default
  #4
Senior Member
 
Robert
Join Date: May 2015
Location: Bremen, GER
Posts: 292
Rep Power: 11
RobertHB is on a distinguished road
Exactly. In my case i connected three single, same diameter, cylinders to form a tube because i needed a single patch in the middle of the domain. Still looks and behaves like on big cylinder though.
ashish.vinayak likes this.
__________________
If you liked my answer to your question, please consider leaving a "Like" in return
RobertHB is offline   Reply With Quote

Old   June 29, 2018, 09:08
Default
  #5
Member
 
Ashish Vinayak
Join Date: Mar 2015
Location: Wuppertal, Germany
Posts: 50
Rep Power: 11
ashish.vinayak is on a distinguished road
Brilliant ! Your idea works.


The surfaces are behaving in a better way now. However, if I use two separate cylinders, SHM thinks that I want to cut one cylinder with the second one. The end result is only one cylinder and some kind of weird patchy hole. I'm wondering if I'm facing some kind of numerical error at the interface? Any ideas?

PS. I know it is patchy because my blockMesh is coarse at the moment. But I am certain it is not causing this error.
Attached Images
File Type: jpg Screenshot from 2018-06-29 15-05-00.jpg (70.0 KB, 23 views)
ashish.vinayak is offline   Reply With Quote

Old   June 29, 2018, 09:14
Default
  #6
Member
 
Ashish Vinayak
Join Date: Mar 2015
Location: Wuppertal, Germany
Posts: 50
Rep Power: 11
ashish.vinayak is on a distinguished road
Switched on debug mode:

The upper cylinder disappears during the castellation steps. (see images)
Attached Images
File Type: jpg Screenshot from 2018-06-29 15-12-55.jpg (101.4 KB, 22 views)
File Type: jpg Screenshot from 2018-06-29 15-13-02.jpg (90.3 KB, 17 views)
ashish.vinayak is offline   Reply With Quote

Old   June 29, 2018, 09:47
Default
  #7
Senior Member
 
Robert
Join Date: May 2015
Location: Bremen, GER
Posts: 292
Rep Power: 11
RobertHB is on a distinguished road
Strange. Since both cylinders show up in the first step of sHM (right?) your setup should be correct until then.

What is the value of the tolerance <value>; setting? Maybe the points from the lower cylinder do not connect to the upper one?


I'm not at work anymore, but i could send you my sHM dict on Monday if you don't figure out your problem until then.
ashish.vinayak likes this.
__________________
If you liked my answer to your question, please consider leaving a "Like" in return
RobertHB is offline   Reply With Quote

Old   June 30, 2018, 09:40
Default
  #8
Member
 
Ashish Vinayak
Join Date: Mar 2015
Location: Wuppertal, Germany
Posts: 50
Rep Power: 11
ashish.vinayak is on a distinguished road
I don't think the points connecting together is a problem. While making the stl I take care to see that the top face of the lower cylinder and bottom face of upper cylinder match.

I was working with a tolerance of 1.0. I now set it to 3.0 and set debug to 1.

I was inspecting the time directories. During the initial stages I see that the patches from the upper cylinder are recognised (nFaces >> 0) However, after time = 0.07 it just sets nFaces = 0 on all the upper cylinder patches. Could you please help me solve this?


Thanks for your help Schönes Wochenende.

Last edited by ashish.vinayak; June 30, 2018 at 09:42. Reason: added more information
ashish.vinayak is offline   Reply With Quote

Old   July 2, 2018, 02:58
Default
  #9
Senior Member
 
Robert
Join Date: May 2015
Location: Bremen, GER
Posts: 292
Rep Power: 11
RobertHB is on a distinguished road
Hey,
i think i promised to much. My case that i had in mind does not consist of two stl files and my snappyHexMeshDict doesn't work for connecting two stl's - just tested it.
__________________
If you liked my answer to your question, please consider leaving a "Like" in return
RobertHB is offline   Reply With Quote

Old   July 2, 2018, 03:07
Default
  #10
Member
 
Ashish Vinayak
Join Date: Mar 2015
Location: Wuppertal, Germany
Posts: 50
Rep Power: 11
ashish.vinayak is on a distinguished road
Another weird thing I've noticed today. Looking at the Clip in Paraview one sees that SHM recognizes the bottom cylinder as a solid shape but the top cylinder as a hollow shape with no internal mesh. Really weird.


@Robert That sucks for me. :/ But thanks anyway!
Attached Images
File Type: jpg Screenshot from 2018-07-02 09-05-34.jpg (98.1 KB, 15 views)
ashish.vinayak is offline   Reply With Quote

Reply

Tags
cylinder, patches, shm, snappyhexmesh

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 Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
[snappyHexMesh] On which patches to set BC's for snappyHexMesh ? Talder OpenFOAM Meshing & Mesh Conversion 0 November 8, 2015 18:25
Cyclic boundaries in OF 21x morard OpenFOAM 25 May 13, 2013 22:35
[blockMesh] Include list of points Hikachu OpenFOAM Meshing & Mesh Conversion 0 June 20, 2011 09:03
[snappyHexMesh] snappyHexMesh with cyclic patches? Axel_T OpenFOAM Meshing & Mesh Conversion 1 October 12, 2010 10:03
[snappyHexMesh] SnappyHexMesh large number of patches written prapanj OpenFOAM Meshing & Mesh Conversion 0 July 15, 2009 08:11


All times are GMT -4. The time now is 08:05.