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

[Gmsh] Meshing of a cone with Gmsh didn't quite work

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

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   April 26, 2018, 09:53
Unhappy Meshing of a cone with Gmsh didn't quite work
  #1
New Member
 
Eric
Join Date: Apr 2018
Posts: 3
Rep Power: 7
ehofgen is on a distinguished road
Hi there everyone,

I tried meshing a cone with more or less random dimensions to be meshed by Gmsh and couldn't quite figure out how I could get it right. I tried to have a nice cone, but one of the sides in my Gmsh looks like it is more cut up and a bit unshaped.

The code I came up with looks like this:
cl__1 = 1;
boxdim = 1;
gridsize = boxdim/10;
Point(1) = {0, 0, 3, 1};
Point(2) = {0, 0, 0, 1};
Point(3) = {0, 3, 0, 1};
Point(4) = {3, 0, 0, 1};
Point(5) = {0, -3, 0, 1};
Point(6) = {-3, 0, 0, 1};

Circle(1) = {4, 2, 3};
Circle(2) = {3, 2, 6};
Circle(3) = {6, 2, 5};
Circle(4) = {5, 2, 4};

Line(6) = {1, 4};
Line(7) = {1, 3};
Line(8) = {1, 6};
Line(9) = {1, 5};
Line Loop(10) = {4, 1, 2, 3};
Plane Surface(11) = {10};
Line Loop(12) = {-9, 6, -4};
Ruled Surface(13) = {12};
Line Loop(14) = {-9, 8, 3};
Ruled Surface(15) = {14};
Line Loop(16) = {-6, 7, -1};
Ruled Surface(17) = {16};
Line Loop(18) = {8, 2, -7};
Ruled Surface(19) = {18};


If anyone has an idea what went wrong I'd very much appreciate it. I tried looking at the other ones which worked and the base arc line is always at the end, I tried rewritting it in such a way, but didn't lead to the desired outcome either...

As said, help is much apprecaited.
Thanks,
Eric
ehofgen is offline   Reply With Quote

Old   April 30, 2018, 05:24
Default
  #2
New Member
 
Eric
Join Date: Apr 2018
Posts: 3
Rep Power: 7
ehofgen is on a distinguished road
I realised I should have probably specified it a bit more. Below is an image of the cone I am trying to model.

somehow it doesn't work to embed the picture on this page so please follow the link... just realised that I wouldn't click that link either... damn! How can I upload it properly?

https://ibb.co/dcrA8c
ehofgen is offline   Reply With Quote

Old   April 30, 2018, 09:15
Default
  #3
Senior Member
 
Mikko
Join Date: Jul 2014
Location: The Hague, The Netherlands
Posts: 243
Rep Power: 12
Flowkersma is on a distinguished road
Hi Eric,

I would create a line and revolve it to create a cone.

Here is an example script:
Code:
Point(1) = {0, 0, 1, 0.01};
Point(2) = {0.2, 0, 0, 0.1};
Line(1) = {1, 2};
Extrude {{0, 0, 1}, {0, 0, 0}, Pi} {Line{1};} // Axis direction, coordinate of an axis point, angle in radians
Regards, Mikko
Flowkersma is offline   Reply With Quote

Old   May 1, 2018, 21:42
Default
  #4
New Member
 
Eric
Join Date: Apr 2018
Posts: 3
Rep Power: 7
ehofgen is on a distinguished road
Thanks Mikko for your response, I tried using your approach yesterday, but couldn't quite figure out how to revolve the cone and generate the surface. I'll look into it again tonight.

Do you have any idea why my approach didn't work by any chance?

Regards,
Eric
ehofgen is offline   Reply With Quote

Old   May 2, 2018, 16:45
Default
  #5
Senior Member
 
Mikko
Join Date: Jul 2014
Location: The Hague, The Netherlands
Posts: 243
Rep Power: 12
Flowkersma is on a distinguished road
The script should be complete. The extrude command is revolving the line and creates a segment of cone's lateral surface.
Flowkersma is offline   Reply With Quote

Reply

Tags
cone, gmsh

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
[ANSYS Meshing] Face Meshing Doesn't Work ordinary ANSYS Meshing & Geometry 0 November 4, 2017 09:20
[Gmsh] GMSH: Meshing a cylinder with a HUGE number of points HelplessWanderer OpenFOAM Meshing & Mesh Conversion 1 August 10, 2017 14:17
[Gmsh] Extruded Meshing fails (Linear search / could not find extruded vertex) Ijazu OpenFOAM Meshing & Mesh Conversion 1 March 18, 2015 07:15
[Gmsh] Gmsh 3d meshing problem rafamusura OpenFOAM Meshing & Mesh Conversion 2 March 20, 2013 04:31
[GAMBIT] 3D hollow cone spray meshing problem adsl17754 ANSYS Meshing & Geometry 3 April 13, 2012 22:56


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