Skip to content

Instantly share code, notes, and snippets.

@aerosayan
Created November 15, 2023 07:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save aerosayan/33afd89fec9b61302324aa701759cd82 to your computer and use it in GitHub Desktop.
Save aerosayan/33afd89fec9b61302324aa701759cd82 to your computer and use it in GitHub Desktop.
3D Compression Corner Ramp GMSH Generator File
//
// L2-->
// P5 P4
// +------------------+
// ^ | | L3
// | | | |
// L1 | + v
// | L4 . P3
// | .
// +----------+
// P1 P2
// <--L5
//
lc = 1E-1;
lcsmall = 1E-1;
// Set of points to define the ramp's shape
Point(1) = {0, 0, 0, lc};
Point(2) = {0.5, 0, 0, lc};
Point(3) = {1.5, 0.2309, 0, lc};
Point(4) = {1.5, 0.9342, 0, lc};
Point(5) = {0, 0.9342, 0, lc};
// Set of lines to define the grid's boundary
Line(1) = {1, 5};
Line(2) = {5, 4};
Line(3) = {4, 3};
Line(4) = {3, 2};
Line(5) = {2, 1};
// Create the surface edge loop
Curve Loop(1) = {1, 2, 3, 4, 5};
// Create the surface
Plane Surface(1) = {1};
// Extrude
Extrude{0,0,1} {
Surface{1};
}
// Set boundary markers
Physical Surface("1") = {15}; // INLET
Physical Surface("2") = {23}; // OUTLET
Physical Surface("3") = {1,32,19,31,27}; // WALL
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment