|
[Sponsors] |
July 22, 2017, 16:41 |
Gmsh bump functionn..
|
#1 |
New Member
Flyer
Join Date: Apr 2017
Posts: 13
Rep Power: 9 |
Hi,
I am trying to understand the double progression (Bump) in gmsh, but I can't wrap my head around it. I have searched on-line and came to the following code; Code:
Point(1) = {0,0,0,1}; Point(2) = {1,0,0,1}; Point(3) = {3,0,0,1}; Point(4) = {7,0,0,1}; Point(5) = {15,0,0,1}; n = 4; // number of intervals r = 2; // progression // progression using transfinite mesh Point(6) = {0,0.4,0,1}; Point(7) = {15,0.4,0,1}; Line(1) = {6,7}; Transfinite Line {1} = n+1 Using Progression r; // progression using extruded mesh a = (r - 1) / (r^n - 1); one[0] = 1; layer[0] = a; For i In {1:n-1} one[i] = 1; layer[i] = layer[i-1] + a * r^i; EndFor Point(10) = {0,0.8,0,1}; Extrude {15,0,0} { Point{10}; Layers{one[], layer[]}; } For some reason, I could not understand what they were trying to explain in the above code, which creates node map using layers to represent a transfinite line using bump. The discussion was about how to use Bump function, but it wasn't clear how to calculate it. There are so many tools for single progression on-line. However, this Bump function isn't clear. Example, if I had the same line and same number of nodes, how would we calculate bump to maintain the same cell size in different blocks. Any help would be appreciated. Thanks, Last edited by OpenFoam12; July 22, 2017 at 19:37. |
|
August 8, 2017, 21:05 |
|
#2 |
New Member
Flyer
Join Date: Apr 2017
Posts: 13
Rep Power: 9 |
I was wondering if anyone knows how to calculate grades when using the bump in Gmsh. I have gone through the source code but still unable to get the right grade when the number of nodes as well as the length and first cell height are knowns. So the formula in Gmsh is as follows;
Code:
case 2: // Bump { double a; if(coef > 1.0) { a = -4. * sqrt(coef - 1.) * atan2(1., sqrt(coef - 1.)) / ((double)nbpt * length); } else { a = 2. * sqrt(1. - coef) * log(fabs((1. + 1. / sqrt(1. - coef)) / (1. - 1. / sqrt(1. - coef)))) / ((double)nbpt * length); } double b = -a * length * length / (4. * (coef - 1.)); val = d / (-a * SQU(t * length - (length) * 0.5) + b); } Code:
Transfinite Line {1, 3} = 10 Using Bump 0.8; Thanks, |
|
March 3, 2021, 02:49 |
|
#3 |
New Member
Ze Shao
Join Date: Apr 2019
Posts: 4
Rep Power: 7 |
Hi,
Have you worked out how to use Bump to calculate the mesh size? I have tried to specify the first layer mesh size (a), the number of points(nbpt) and the length of the line (L). Then, the coefficient can be derived. However, it is incorrect when I use the calculated coefficient and the number of points, as the first layer size is not what I need. If you have worked out, would you please give some hints to me. Thanks. |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
[Gmsh] Converting gmsh to OpenFoam | Friendly | OpenFOAM Meshing & Mesh Conversion | 3 | June 26, 2018 05:46 |
[Gmsh] Using Bump with Extrude, layers in GMSH?? | arieljeds | OpenFOAM Meshing & Mesh Conversion | 7 | June 14, 2018 23:22 |
GMSH - Very strange effect - Mesh elements deleted when saving | Araist | Mesh Generation & Pre-Processing | 3 | July 15, 2015 06:03 |
[Gmsh] 2D Mesh Generation Tutorial for GMSH | aeroslacker | OpenFOAM Meshing & Mesh Conversion | 12 | January 19, 2012 03:52 |
[Gmsh] Import problem | ARC | OpenFOAM Meshing & Mesh Conversion | 0 | February 27, 2010 10:56 |