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

[Gmsh] Diagonal extrusion in gmsh

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   April 30, 2017, 16:18
Default Diagonal extrusion in gmsh
  #1
Member
 
Declan
Join Date: Oct 2016
Location: Ireland
Posts: 40
Rep Power: 9
decah is on a distinguished road
Hi All

I am trying to extrude a surface (height h1) along the z-direction with:

- the top being extruded horizontally a distance d1, then d2, then d1 again
- the bottom extruded diagonally at an angle θ (see 2D diagram)

Does anyone have any ideas on how to achieve this?

Any help appreciated

Declan


PS I have attempted a solution involving the Translate function but it is messy and doesn't produce a space with contiguous cells. I am looking for a cleaner approach!
Attached Images
File Type: jpg geo.jpg (30.8 KB, 27 views)
decah is offline   Reply With Quote

Old   May 1, 2017, 04:02
Default
  #2
Senior Member
 
Alexey Matveichev
Join Date: Aug 2011
Location: Nancy, France
Posts: 1,938
Rep Power: 38
alexeym has a spectacular aura aboutalexeym has a spectacular aura about
Send a message via Skype™ to alexeym
Hi,

Could you elaborate, why can't you extrude surface (ruled plane in gmsh terms), that you have drawn on the scheme in Y direction (i.e. normal to the screen)?
alexeym is offline   Reply With Quote

Old   May 1, 2017, 04:24
Default
  #3
Member
 
Declan
Join Date: Oct 2016
Location: Ireland
Posts: 40
Rep Power: 9
decah is on a distinguished road
Hi Alexei,
In the y direction normal to the screen there are complicated features in the geometry so I created that plane (xy) first and planned on extruding in the z-direction
decah is offline   Reply With Quote

Old   May 1, 2017, 06:08
Default
  #4
Member
 
Declan
Join Date: Oct 2016
Location: Ireland
Posts: 40
Rep Power: 9
decah is on a distinguished road
For example is it possible to introduce a conditional function in the extrude command? Like Extrude{x,f(y),z}{...}
where f(y) would be given by something like:
If y= h1 then f(y)=h1-(extrudeDepth*Tanθ);
else y=0;
decah is offline   Reply With Quote

Old   May 1, 2017, 07:01
Default
  #5
Senior Member
 
Alexey Matveichev
Join Date: Aug 2011
Location: Nancy, France
Posts: 1,938
Rep Power: 38
alexeym has a spectacular aura aboutalexeym has a spectacular aura about
Send a message via Skype™ to alexeym
No, you can not introduce conditional functions into extrude.

And I still do not understand what you are trying to achieve. Plane, which you extrude, has complex geometry and you would like to extrude and scale at the same time? Here is an example that works in Gmsh 3.0.1:

Code:
Extrude {0, 0, 10} {
  Surface{1};
  
}

Dilate {{0.5, 1, 10}, {0.5, 0.5, 0.5}} {
  Surface{26}; 
}
It produces geometry that resembles what you want.

Could you describe your whole problem? Maybe your are trying to solve it in non-Gmsh way.
alexeym is offline   Reply With Quote

Reply


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
rhoCentralFoam diverges Dorian1504 OpenFOAM Running, Solving & CFD 4 December 10, 2017 14:22
GMSH Error: Degenerated Hexahedron in extrusion of volume hemaditya Mesh Generation & Pre-Processing 0 June 23, 2016 04:51
why divergence occures in these cases immortality OpenFOAM Running, Solving & CFD 2 January 25, 2013 10:21
pisoFoam with k-epsilon turb blows up - Some questions Heroic OpenFOAM Running, Solving & CFD 26 December 17, 2012 03:34
[Gmsh] Import problem ARC OpenFOAM Meshing & Mesh Conversion 0 February 27, 2010 10:56


All times are GMT -4. The time now is 06:49.