# [snappyHexMesh] Create Cylinder (HOLLOW NO MESH OR CAVITY) inside a Cuboid

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

August 5, 2017, 10:25
Create Cylinder (HOLLOW NO MESH OR CAVITY) inside a Cuboid
#1
Senior Member

sandy
Join Date: Feb 2016
Location: .
Posts: 117
Rep Power: 10
hello foamers
i have an interesting problem to discuss with you all.
1. i am having a cuboid of 10 cmx 10 cmx 10cm...which i can easily make in blockmesh.
2. i have to create a cylinder which lies entirely inside the cuboid close to the bottom. its dia is 1 cm and length 6 cm so it lies inside the cuboid.
3.i have to give boundary condition to this cylinder surface. so its a wall here

how do i delete the mesh of this cylinder, the cylinder is not supposed to have mesh inside
how do i define a patch of cylindrical surface, so i can give bc in 0 folder

the issue is: i cannot do so using blockmesh which is very tiring and prone to mistakes

i am trying to use cell set by deleting the cells using cylinder to cell
and define a patch using cylinder to cell
but i don't know exactly how to write this procedure using toposet dict
i really need to get this done
Attached Images
 geometry.JPG (30.0 KB, 82 views)

August 6, 2017, 06:10
#2
Senior Member

sandy
Join Date: Feb 2016
Location: .
Posts: 117
Rep Power: 10
i'm so glad i did it...
however i ran into another minute issue
when i create the cylinder
the mesh around it is irregular and nott a perfect circle.
how ca i smooth these faces to get the smooth circle...not exactly..but how can i improve this??
collapse edges or what??
image is attached here
Attached Images
 Screenshot from 2017-08-06 15-25-42.jpg (201.1 KB, 102 views)

 August 6, 2017, 14:08 #3 Senior Member   sandy Join Date: Feb 2016 Location: . Posts: 117 Rep Power: 10 i tried more refinement but still the circumference of circle contues to be irregular my conclusion is: it can't be done using refinement or toposet or blockmesh only way is use .stl file of cylinder inside a cuboid next use snapphexmesh to get the job done will keept his thread updated

 August 7, 2017, 21:19 #4 Senior Member   Join Date: Aug 2013 Posts: 407 Rep Power: 15 Hi, If you know there is going to be cylinder in your geometry, then you can use blockMesh to create a mesh that has a cylinder. That way you can avoid the issue with irregular cells. Cheers, Antimony

August 8, 2017, 10:15
#5
Senior Member

sandy
Join Date: Feb 2016
Location: .
Posts: 117
Rep Power: 10
Quote:
 Originally Posted by Antimony Hi, If you know there is going to be cylinder in your geometry, then you can use blockMesh to create a mesh that has a cylinder. That way you can avoid the issue with irregular cells. Cheers, Antimony
i know can be done using blockmesh. but there is a problem. to get a cylinder completely inside the cube. you have to create different regions and write their numbering and its a whole lot tedious. job and once you get your numbering wrong/mistype. blockmesh will kill you with flurry of errors.
i am thinking about using snappy hex mesh using .stl file
if u have any simple beginner tutorials using a cylinder, could you point me in that direction???

 August 8, 2023, 07:10 #6 New Member   Atefeh T Join Date: Jan 2023 Posts: 6 Rep Power: 3 Hi, can you please explain how did you extract the mesh inside the cylinder from your general mesh?

 Tags cellsets, cylinder domain, mesh manipulation, toposetdict