# Locally refining mesh over cylinder in Gmsh

 User Name Remember Me Password
 Register Blogs Members List Search Today's Posts Mark Forums Read

 LinkBack Thread Tools Search this Thread Display Modes
 November 3, 2020, 23:34 Locally refining mesh over cylinder in Gmsh #1 New Member   Deepak Join Date: Nov 2020 Posts: 2 Rep Power: 0 I want to mesh a cylinder in Gmsh with a finer mesh at a particular circular location along its height. I have succeeded partially with the code below: -------------------------------------------------------------------------------- SetFactory("OpenCASCADE"); //Create a circle Circle(1) = {0, 0, 6, 1, 0, 2*Pi}; Curve Loop(1) = {1}; Plane Surface(1) = {1}; //Extrude into a cylinder 4 units along Z-direction and 6 units along -Z direction Extrude {0, 0, 4} { Surface{1}; } Extrude {0, 0, -6} { Surface{1}; } //Convert Circle 1 into transfinite line so that a fine mesh can be obtained in its vicinity Transfinite Line{1}=100; -------------------------------------------------------------------------------------- The mesh is coming out fine (when I do a 2D or 3D mesh) except at the location where the generator of the extruded cylinder intersects the circle (here the mesh is coarse). Any ideas on how to overcome the problem and obtain a uniformly fine mesh at Circle(1)?

 November 5, 2020, 13:55 #2 Senior Member   Mikko Join Date: Jul 2014 Location: The Hague, The Netherlands Posts: 243 Rep Power: 11 At the moment, you are only defining the cell size along the line. You should also define the cell size elsewhere. For instance, define the cell sizes at the points: Characteristic Length {1} = 0.1; Characteristic Length {2, 3} = 1;

 November 6, 2020, 01:02 #3 New Member   Deepak Join Date: Nov 2020 Posts: 2 Rep Power: 0 Your solution worked Thanks a lot. But what do points 1,2,3 correspond to? Are they the three points at which cylinder's generator-line intersects the three circles?

 November 6, 2020, 01:40 #4 Senior Member   Mikko Join Date: Jul 2014 Location: The Hague, The Netherlands Posts: 243 Rep Power: 11 You are welcome. If you visually look at the geometry, it contains only 3 points. The points are the start/end points of each circle.

 Tags gmsh 4.5.4, mesh 2d, refine mesh

 Thread Tools Search this Thread Search this Thread: Advanced Search Display Modes Linear Mode

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

 Similar Threads Thread Thread Starter Forum Replies Last Post Lloyd Sullivan CFX 5 August 7, 2018 08:11 Althea FLUENT 22 January 4, 2017 03:19 [snappyHexMesh] Layers:problem with curvature giulio.topazio OpenFOAM Meshing & Mesh Conversion 10 August 22, 2012 09:03 [snappyHexMesh] snappyHexMesh won't work - zeros everywhere! sc298 OpenFOAM Meshing & Mesh Conversion 2 March 27, 2011 21:11 lr103476 OpenFOAM Running, Solving & CFD 30 November 19, 2007 14:09

All times are GMT -4. The time now is 09:43.

 Contact Us - CFD Online - Privacy Statement - Top