|
[Sponsors] |
[Gmsh] Gmsh: Structured variation in gridsize |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
October 11, 2017, 20:56 |
Gmsh: Structured variation in gridsize
|
#1 |
Member
Anders Utnes
Join Date: May 2017
Location: Norway
Posts: 34
Rep Power: 9 |
Greetings!
While I have a rudimentary understanding of how to use the Transfinite Surface and Recombine Surface functions to make a structured mesh, I'm more confused on getting them to make a structured mesh whos mesh density varies. Problem description: I have a channel. Inside, on the bottom of the channel, there is a series of complex geometries. I want to make the inlet, outle, and both sides cyclic. As such, I need to make those (perfectly rectangular) surfaces structured (the kind of structure is irrelevant, as long as it matches the opposing side). I manage to do this when I use the same gridsize everywhere on the surface, but I want to make the bottom part much denser than the top. Anyone know how to do this or can link me to a good tutorial for this? I can seem to find any that deal with this issue. |
|
October 12, 2017, 07:02 |
|
#2 |
Senior Member
Mikko
Join Date: Jul 2014
Location: The Hague, The Netherlands
Posts: 243
Rep Power: 13 |
Hi Anders,
There are basically two different stretching functions available for a line in GMSH. One applies the stretching to one end of the line and another to both ends of the line (Progression and Bump). The GMSH documentation has a tutorial which shows how to use them. Regards, Mikko |
|
June 12, 2019, 02:29 |
How to calculate grid size when Progression or Bump is used?
|
#3 |
Member
Dokeun, Hwang
Join Date: Apr 2010
Location: Korea, Republic of
Posts: 98
Rep Power: 16 |
Dear Mikko and other Gmsh users.
Is there formulation to calculate grid size when progression or bump is used in gmsh? Thank you in advance |
|
June 12, 2019, 08:38 |
|
#4 |
Senior Member
Mikko
Join Date: Jul 2014
Location: The Hague, The Netherlands
Posts: 243
Rep Power: 13 |
||
June 20, 2019, 09:14 |
|
#5 |
Member
Dokeun, Hwang
Join Date: Apr 2010
Location: Korea, Republic of
Posts: 98
Rep Power: 16 |
Thank you for your link, Mikko.
I need to scrutinize the page and search for other resources. I’ll post when I get some info. |
|
July 10, 2019, 20:19 |
|
#6 | |
Member
Mondal
Join Date: Sep 2018
Location: Canberra ACT
Posts: 68
Rep Power: 8 |
Quote:
Did you find your answer about progression and Bump? I am also looking for a clarity of progression and Bump in Gmsh. If you got it, Can you please share it for me? Cheers Razon |
||
July 12, 2019, 12:23 |
|
#7 | |
Member
Dokeun, Hwang
Join Date: Apr 2010
Location: Korea, Republic of
Posts: 98
Rep Power: 16 |
Quote:
Sorry for late reply. Actually I didn't think about this problem so much. But I studied to reply to your question and I have the answer for 'progression' for now. The progression is geometric sequence(https://www.mathsisfun.com/algebra/s...geometric.html) For a given curve, let the length of it as 'l' and this is the sum of a geometric series. When you transfinite the curve with the number of points(np) and progression(r). Then the relationship among the first distance(a), total curve length(l), number of points(np) and progression(r) in the viewpoint of geometric series, np is to be replaced with number of 1D elements(n = np-1, ex: if there is 11 points then number of 1D elements are 10) Then, according to the formula for the sum of geometric series... Code:
l=a(r^n - 1)/(r-1) Code:
a=l*(r-1)/(r^n - 1) simple code is as below Code:
Point(1) = {0, 10, 0, 1e-1}; Point(2) = {100, 10, 0, 1e-1}; Line(1) = {1, 2}; Transfinite Curve {1} = 11 Using Progression 2; Actually you can find a explantion for progress in gmsh guide Code:
(Progression 2 meaning for example that each line element in the series will be twice as long as the preceding one). https://gitlab.onelab.info/gmsh/gmsh.../meshGEdge.cpp It's not easy to understand but you might calculate the first point with your setting at least. Good luck Last edited by dokeun; July 12, 2019 at 12:49. Reason: grammer |
||
July 18, 2019, 00:23 |
|
#8 | |
Member
Mondal
Join Date: Sep 2018
Location: Canberra ACT
Posts: 68
Rep Power: 8 |
Quote:
Fantastic explanation. It does make sense to me. First of all, sorry for my late reply as I was not at my office. I understood your explanation about progression. Now lets be a bit more realistic about whats happening in the Gmsh screen when playing with progression. Please have a look at the attachment. I made a simple square cube with 10x10 cells using Gmsh. Lets say, I would like to keep more dense cells close to the left wall (line 1) using progression. I played with changing progression value but no luck so far. Could you please tell how can I do that? Cheers Razon |
||
July 18, 2019, 10:28 |
|
#9 | |
Member
Dokeun, Hwang
Join Date: Apr 2010
Location: Korea, Republic of
Posts: 98
Rep Power: 16 |
Quote:
you have to choose 2 curves for transfinite. The left and the right. if the grids are not even after transfinite, then Probably you can fix it just change the sign for one side of the curves If the curve numbers are 1 ,2 then From Transfinite curve {1, 2} To Transfinite curve {1, -2} Good luck~ |
||
Tags |
cyclic, gmsh, mesh density, structured mesh |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
[Gmsh] Structured meshing in Gmsh | the_phew | OpenFOAM Meshing & Mesh Conversion | 19 | August 24, 2022 04:19 |
[Gmsh] Gmsh: Unstructured to Structured Mesh geometry | ChasingNeutrons | OpenFOAM Meshing & Mesh Conversion | 0 | November 22, 2016 13:55 |
structured and unstructured grids | user | Main CFD Forum | 6 | November 25, 2010 02:14 |
Structured Mesh in GMSH | vitor | Main CFD Forum | 4 | April 28, 2010 09:15 |
[Gmsh] Import problem | ARC | OpenFOAM Meshing & Mesh Conversion | 0 | February 27, 2010 11:56 |