Hi Ruth, Thanks for your response. I have indeed worked around the problem by dividing the domain into 2 planes and doing two separate single progressions. I was still curious what the response would be because I would like understand how Bump works even if I can't use it for this purpose.
I will look at the file you recommended I look at. Thanks, Nathan Get Outlook for Android<https://aka.ms/ghei36> ________________________________ From: Ruth Vazquez Sabariego <ruth.sabari...@kuleuven.be> Sent: Wednesday, October 24, 2018 8:27:41 AM To: Nathan J. Neeteson Cc: gmsh@onelab.info Subject: 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 http://www.energyville.be Free software: http://gmsh.info | http://getdp.info | http://onelab.info On 23 Oct 2018, at 22:07, Nathan J. Neeteson <nneete...@rglinc.com<mailto:nneete...@rglinc.com>> 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> nneete...@rglinc.com<mailto:nneete...@rglinc.com> | rglinc.com<http://rglinc.com/> API Q1™ and ISO 9001:2015 certified facilities. NOTE: Email and URL addresses have recently changed Email disclaimer located at http://rglinc.com/disclaimer _______________________________________________ gmsh mailing list gmsh@onelab.info<mailto:gmsh@onelab.info> http://onelab.info/mailman/listinfo/gmsh Email disclaimer located at http://rglinc.com/disclaimer
_______________________________________________ gmsh mailing list gmsh@onelab.info http://onelab.info/mailman/listinfo/gmsh