Structured meshing in Gmsh
After some digging online, it appears there are only two ways to generate a structured mesh in Gmsh; extrusion and applying "Recombine Surface" on an unstructured surface.
Here is my simple mesh, that I am trying to mesh structured: cl1 = 0.5; cl2 = 0.002; cl3 = 0.005; Point(1) = {23.5, 0.02, 0, cl1}; Point(2) = {23.5, 10, 0, cl1}; Point(3) = {59.5, 10, 0, cl2}; Point(4) = {59.5, 0.02, 0, cl1}; Point(5) = {0, 0, 0, cl1}; Point(6) = {0, 23.75, 0, cl1}; Point(7) = {24, 23.75, 0, cl1}; Point(8) = {16.052083, 14.122111, 0, cl3}; Point(9) = {24, 14.122111, 0, cl1}; Point(10) = {16.052083, 14.059611, 0, cl1}; Point(11) = {16, 14.025063, 0, cl3}; Point(13) = {23.5, 19, 0, cl1}; Point(14) = {16.017535, 14.111694, 0, cl3}; Line(1) = {2, 1}; Line(2) = {2, 3}; Transfinite Line {2} = 72Using Progression 1; Line(3) = {3, 4}; Line(4) = {4, 1}; Transfinite Line {4} = 72Using Progression 1; Line(5) = {1, 5}; Line(6) = {5, 6}; Line(7) = {6, 7}; Line(8) = {9, 7}; Line(9) = {8, 9}; Transfinite Line {1,3,8} = 45 Using Progression 1.2; Transfinite Line {5,6,7} = 49Using Progression 1.0; Transfinite Line {9} = 55Using Progression 1.1; Circle(10) = {11, 13, 2}; Transfinite Line {10} = 65Using Progression 1.07; Circle(11) = {11, 10, 14}; Transfinite Line {11} = 19Using Progression 1.0; Circle(12) = {14, 10, 8}; Transfinite Line {12} = 9Using Progression 1.0; Line Loop(1) = {-1, 2, 3, 4}; Plane Surface(1) = {1}; Transfinite Surface {1} = {1,2,3,4}; Recombine Surface {1}; Line Loop(2) = {1, 5, 6, 7, -8, -9, -12, -11, 10}; Plane Surface(2) = {2}; Physical Line(13) = {5, 6, 7}; Physical Line(14) = {9, 12, 11, 10}; Transfinite Surface {2} = {1,13,8,14}; Recombine Surface {2}; As you can see, Surface 1 recombines properly into a nice structured domain, but on Surface 2, the Recombine algorithm fails. As far as I can tell, the four entities that make up the boundary of Surface 2 (1,13,8,14) should form a structured half O-mesh around the lip feature, with dimensions 145x45. What am I doing wrong? Thanks P.S.-Structured meshing seems very cumbersome in Gmsh; can anyone recommend a free meshing program that is more conducive to structured meshes? |
Hello Matt,
The surface 2 of your model has 9 lines as boundary. You can create structured mesh only on surfaces defined by 3 or 4 border lines. The only way for you, in that example, is to divide the surface 2 into smaller surfaces, and apply the transfinite/recombine command on them. Yes, you are right: structured meshing is very cumbersome, but that is a general fact. An alternative is the unstructured quadrilateral meshing. For instance, the Q-Morph algorithm provides unstructured quadrilateral meshes with well-aligned rows of quadrilaterals parallel to the boundary of the domain. In my album "Q-Morph example 1" you will find pictures of the application of the Q-Morph algorithm on the surface 2 of your domain. For more informations, see the following thread: http://www.cfd-online.com/Forums/mai...dded-gmsh.html Regards, JB |
I need to simulate an empty Sphere inside a 3D-Box. There is differentiation between these two geometries, 1- Sphere and 2- Box minus Sphere.
How can I define this model in Gmsh? |
Can you post a picture of what are you trying to do?
Cheers, |
1 Attachment(s)
Quote:
grids will be generated for the intersection of these two geometries. One remedy is to differentiate the box and sphere and then generate a grid for the union of this differentiation and sphere. But, there are two disadvantages, 1- the boolean operators in Gmsh is based on Opencasecade kernel. 2- the resulting mesh might be very unstructured. Simply, how I can generate a mesh like attached pic with Gmsh. Best, |
Have you made any attempt?
Cheers, |
Quote:
|
send it. I will have a look at in my spare time.
Cheers, |
1 Attachment(s)
Quote:
|
Hi,
I just found this code. You should work in the same strategy; Here is the code; Code:
Point(1) = {0.000000, 0.000000, 4.400000, 1.0}; |
Quote:
|
Hi,
You needed to put a sphere in a numerical domain. Isn't that right? You are defiantly supposed to follow the structure of what I sent you in order to get it successfully done. Just try to reproduce, Cheers, |
i can create this mesh in gambit with ease.
i know gambit is dead, but it doesn't take much to resurrect it and give it a try |
Quote:
|
well...all i can say is you are not subtracting the region of half sphere. i am not familiar with gmsh.
i sincerely advise you to give it a try in gambit. its fairly simple as far as i can see. |
Quote:
Gambit could generate the STP file? |
here's the link to views of mesh i created in gambit
and the link to step file .STP file u asked... dimensions are 10 x 10 x 10 cube and 8 mm dia shifted 5 units outside. [ i didnt use your dimensions] https://drive.google.com/open?id=0B8...kxldkw3bVVUSDA https://drive.google.com/open?id=0B8...Gx4Zlhua2FvMUE |
Quote:
Best, |
gmsh structured
2 Attachment(s)
Hello, I am a newbie to gmsh. I would like to generate a structured quad mesh of a diamond shaped channel. I have a problem in splitting the geometry into 4 faces. I hope you can assist me please. I attached the pic of the geometry and the mesh I would like to have herewith.
Thank you KabirAttachment 76579 Attachment 76580 |
Hello,
please try this script. Code:
|
All times are GMT -4. The time now is 23:10. |