CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Meshing & Mesh Conversion (https://www.cfd-online.com/Forums/openfoam-meshing/)
-   -   [Gmsh] Diagonal extrusion in gmsh (https://www.cfd-online.com/Forums/openfoam-meshing/187189-diagonal-extrusion-gmsh.html)

decah April 30, 2017 16:18

Diagonal extrusion in gmsh
 
1 Attachment(s)
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!

alexeym May 1, 2017 04:02

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)?

decah May 1, 2017 04:24

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 May 1, 2017 06:08

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;

alexeym May 1, 2017 07:01

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.


All times are GMT -4. The time now is 13:02.