Hi Alessandro,

If I am understanding you correctly, you can already accomplish this yourself 
as a user by calculating the number of nodes you need to specify for a given 
progression to get a desired first element size.

From a CFD perspective, what would make the most sense intuitively would be to 
be able to specify the length of the first element and the growth rate / 
progression and let gmsh calculate the total number of nodes. Of course in an 
ideal world if you could choose from any of the options for a given geometry 
would be best, but development time is limited, and these are all 
algorithmically equivalent to each other and can currently be accomplished with 
only a few extra lines of code in the .geo file.

In terms of actually adding functionality what would be the most useful would 
be the ability to specify the first element length at both ends of a line 
segment and the growth rate from each end and have gmsh distribute points along 
the line segment smoothly to obey these progressions. Currently there is a bit 
of added work for a user to have to construct 2 line segments to accomplish 
this and then also have to do some additional algebra to ensure that the grid 
spacing is relatively smooth where the unconstrained ends of the line segments 
meet.

Thanks,

Nathan J. Neeteson, M.Sc.
Flow Control Research Engineer
RGL Reservoir Management Inc.
Engineering & Design Group
P. 403.930.0371 (ext. 8371) | C. 613.929.6283
[email protected]<mailto:[email protected]> | rglinc.com
API Q1™ and ISO 9001:2015 certified facilities.
NOTE: Email and URL addresses have recently changed

From: Alessandro Vicini [mailto:[email protected]]
Sent: October 25, 2018 3:14 AM
To: Ruth Vazquez Sabariego <[email protected]>; Nathan J. Neeteson 
<[email protected]>
Cc: [email protected]
Subject: R: [Gmsh] Question about Progression and Bump


It might be useful having the possibility to specify the number of intervals 
and the length of the first element, rather than the progression…

A.


Da: gmsh [mailto:[email protected]] Per conto di Ruth 
Vazquez Sabariego
Inviato: mercoledì 24 ottobre 2018 16:28
A: Nathan J. Neeteson
Cc: [email protected]<mailto:[email protected]>
Oggetto: Re: [Gmsh] Question about Progression and Bump

Dear Nathan,

As you have noticed, the Bump does not do a double geometrical progression.
The formula used is a bit more complicated, you can see what it actually does 
in the code (meshGEdge.cpp).

A double progression is not (yet?) available.
Work around by dividing your second region in two?

Regards,
Ruth


—
Prof. Ruth V. Sabariego
KU Leuven
Dept. Electrical Engineering ESAT/Electa, EnergyVille
http://www.esat.kuleuven.be/electa<https://urlsand.esvalabs.com/?u=http%3A%2F%2Fwww.esat.kuleuven.be%2Felecta&e=69b77ccd&h=6f8d0521&f=y&p=y>
http://www.energyville.be<https://urlsand.esvalabs.com/?u=http%3A%2F%2Fwww.energyville.be&e=69b77ccd&h=5cdb1935&f=y&p=y>

Free software: 
http://gmsh.info<https://urlsand.esvalabs.com/?u=http%3A%2F%2Fgmsh.info&e=69b77ccd&h=ec49fb48&f=y&p=y>
 | 
http://getdp.info<https://urlsand.esvalabs.com/?u=http%3A%2F%2Fgetdp.info&e=69b77ccd&h=0e857c64&f=y&p=y>
 | 
http://onelab.info<https://urlsand.esvalabs.com/?u=http%3A%2F%2Fonelab.info&e=69b77ccd&h=e3a8f919&f=y&p=y>





On 23 Oct 2018, at 22:07, Nathan J. Neeteson 
<[email protected]<mailto:[email protected]>> wrote:

Hello,

I have a question about using Progression and Bump in neighboring blocks in a 
block-structured mesh. What I want is for the two blocks to have cells of the 
same height where they meet. I know the thickness of the first cell from the 
wall (dx0), the length of each line (L), and the progression I want (r), so 
when I’m using Progression I can calculate the number of nodes to use as N = 
log(1+(L*(r-1))/(dx0)) / log(r) – 1. Then I can set the appropriate lines to 
Transfinite and assign them N Using Progression r and it works as expected.

However, in one of my blocks I want to refine towards both the top and bottom, 
so I need to use the Bump option. The problem is that I have no idea what “r” 
value to use after Bump (using the same r value as is used for Progression does 
not give me the results I want) and I also have no idea how to calculate the 
number of points to use along this line. MY first instinct was to calculate the 
number of points needed as double the number of points for a single progression 
with half of the length (two progressions end to end). I think this is right, 
but when I use r after Bump I get no refinement. What value am I supposed to 
use for number of points and the rate of growth when using the Bump function so 
that I get the equivalent of the product of two Progressions end to end?

Here is a zoomed in look at where I want the first cells to match heights:

The bottom block uses single progression and the upper block you are seeing the 
lower end of the double progression.
<image001.png>

Here is my .geo file:
-------------------------------------------------------------------------------------------
// orifice properties
orificeLength = 0.03;
orificeRadius = 0.002;

// pipe properties
pipeRadius = 0.05;

// distance from orifice to inlet
inletDist = 5*pipeRadius;

// distance from orifice to outlet
outletDist = 5*pipeRadius;

// grid size parameters
r = 1.1; // growth parameter
dx0 = 1*10^(-4); // first wall dist for y+=1

upstreamNx = (Log(1 + ((inletDist*(r-1))/(dx0))) / Log(r)) - 1; // number of 
elements in x direction upstream
downstreamNx = (Log(1 + ((outletDist*(r-1))/(dx0))) / Log(r)) - 1; // number of 
elements in x direction upstream
orificeNx = orificeLength/dx0; // number of elements in x direction inside 
orifice

upstreamOrificeNy = orificeRadius/dx0;
upstreamPipeNy = 2*((Log(1 + ((((pipeRadius-orificeRadius)/2)*(r-1))/(dx0))) / 
Log(r)) - 1);


// element index
i = 1;

// ~~-------------------------~~ POINTS ~~-------------------------~~
// order of point definition doesn't matter, just give descriptive names

inletCenterPoint = i;
Point(i) = {-orificeLength-inletDist,0,0,1};
i=i+1;

inletPipeWallPoint = i;
Point(i) = {-orificeLength-inletDist,pipeRadius,0,1};
i=i+1;

inletOrificeWallPoint = i;
Point(i) = {-orificeLength-inletDist,orificeRadius,0,1};
i=i+1;

upOrificeCenterPoint = i;
Point(i) = {-orificeLength,0,0,1};
i=i+1;

upOrificePipeWallPoint = i;
Point(i) = {-orificeLength,pipeRadius,0,1};
i=i+1;

upOrificeOrificeWallPoint = i;
Point(i) = {-orificeLength,orificeRadius,0,1};
i=i+1;


// ~~-------------------------~~ LINES ~~-------------------------~~
// all lines should be defined going up and/or to the right for consistency

inletOrificeLine = i;
Line(i) = {inletCenterPoint,inletOrificeWallPoint};
i=i+1;

inletPipeLine = i;
Line(i) = {inletOrificeWallPoint,inletPipeWallPoint};
i=i+1;

upstreamPipeWallLine = i;
Line(i) = {inletPipeWallPoint,upOrificePipeWallPoint};
i=i+1;

upstreamCenterLine = i;
Line(i) = {inletCenterPoint,upOrificeCenterPoint};
i=i+1;

upstreamOrificeLine = i;
Line(i) = {inletOrificeWallPoint,upOrificeOrificeWallPoint};
i=i+1;

upstreamOrificePlateLine = i;
Line(i) = {upOrificeOrificeWallPoint,upOrificePipeWallPoint};
i=i+1;

upstreamOrificeEntryLine = i;
Line(i) = {upOrificeCenterPoint,upOrificeOrificeWallPoint};
i=i+1;

// ~~-------------------------~~ LINE LOOPS ~~-------------------------~~
// all line loops should be oriented clockwise

upstreamPipeLoop = i;
Line Loop(i) = 
{inletPipeLine,upstreamPipeWallLine,-upstreamOrificePlateLine,-upstreamOrificeLine};
i=i+1;

upstreamOrificeLoop = i;
Line Loop(i) = 
{inletOrificeLine,upstreamOrificeLine,-upstreamOrificeEntryLine,-upstreamCenterLine};
i=i+1;



// ~~-------------------------~~ PLANE SURFACES ~~-------------------------~~

upstreamPipePlane = i;
Plane Surface(i) = upstreamPipeLoop;
i=i+1;

upstreamOrificePlane = i;
Plane Surface(i) = upstreamOrificeLoop;
i=i+1;



// ~~-------------------------~~ MAKE STRUCTURED ~~-------------------------~~

// the x-oriented lines upstream of the orifice
Transfinite 
Line{-upstreamCenterLine,-upstreamOrificeLine,-upstreamPipeWallLine} = 
upstreamNx Using Progression r;

// the x-oriented lines in the orifice


// the x-oriented lines downstream of the orifice


// the y-oriented lines from the centerline to the orifice radius
Transfinite Line{inletOrificeLine,upstreamOrificeEntryLine} = upstreamOrificeNy;

// the y-oriented lines from the orifice radius to the pipe radius
Transfinite Line{inletPipeLine,upstreamOrificePlateLine} = upstreamPipeNy Using 
Bump 0.05;



Transfinite Surface{upstreamOrificePlane};
Recombine Surface{upstreamOrificePlane};

Transfinite Surface{upstreamPipePlane};
Recombine Surface{upstreamPipePlane};
-------------------------------------------------------------------------------------------

Thanks,

Nathan J. Neeteson, M.Sc.
Flow Control Research Engineer
RGL Reservoir Management Inc.
Engineering & Design Group
P. 403.930.0371 (ext. 8371)<tel:403.930.0371;8371> | C. 
613.929.6283<tel:613.929.6283>
[email protected]<mailto:[email protected]> | 
rglinc.com<https://urlsand.esvalabs.com/?u=http%3A%2F%2Frglinc.com%2F&e=69b77ccd&h=eaebd207&f=y&p=y>
API Q1™ and ISO 9001:2015 certified facilities.
NOTE: Email and URL addresses have recently changed

Email disclaimer located at 
http://rglinc.com/disclaimer<https://urlsand.esvalabs.com/?u=http%3A%2F%2Frglinc.com%2Fdisclaimer&e=69b77ccd&h=36c78614&f=y&p=y>
 _______________________________________________
gmsh mailing list
[email protected]<mailto:[email protected]>
http://onelab.info/mailman/listinfo/gmsh<https://urlsand.esvalabs.com/?u=http%3A%2F%2Fonelab.info%2Fmailman%2Flistinfo%2Fgmsh&e=69b77ccd&h=f5c42a45&f=y&p=y>

Email disclaimer located at http://rglinc.com/disclaimer
_______________________________________________
gmsh mailing list
[email protected]
http://onelab.info/mailman/listinfo/gmsh

Reply via email to