|
[Sponsors] |
[Gmsh] Using Bump with Extrude, layers in GMSH?? |
![]() |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
![]() |
![]() |
#1 |
Senior Member
ArielJ
Join Date: Aug 2015
Posts: 127
Rep Power: 11 ![]() |
Hi there,
I have been building a basic wave tank in GMSH and used the extrude command to create the 3d volume. I now want to "bump" the vertical lines to coarsen the cells towards the top and bottom (towards +z and -z) and refine the mesh towards the centre of the z axis (where the free surface would be if the vertical mesh is divided evenly between fluid and air). Using, for example, this snippet of code (not an mwe but hopefully gives enough info): Code:
Physical Volume("water") = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10}; // volume numbers Extrude{0,0,10} { Surface{11, 12, 13, 14, 15, 16, 17, 18, 19, 20}; Layers{10}; Recombine: } Transfinite Line{Line connecting +z point of surfaces to -z point} = 10 Using Bump 5.00; Any advice would be greatly appreciated, thank you in advance! |
|
![]() |
![]() |
![]() |
![]() |
#2 | |
Senior Member
CFD
Join Date: Nov 2010
Location: United States
Posts: 243
Rep Power: 16 ![]() |
Quote:
Example Extrude {0, 0, 1} { Surface{12, 14, 16}; Layers{1}; Recombine; } Transfinite Line {1, 2, 3, 4, 5, 6} = 10 Using Bump 0.4; Transfinite Surface "*"; Recombine Surface "*"; Best, |
||
![]() |
![]() |
![]() |
![]() |
#3 |
Senior Member
ArielJ
Join Date: Aug 2015
Posts: 127
Rep Power: 11 ![]() |
Hi tareqkh,
Thanks for your reply, somehow I missed this so sorry for the delay... Ok so I tried your suggestion but oddly it didn't seem to do anything at all? Here's the full .geo code: Code:
// Gmsh project created on Wed Oct 26 18:11:53 2016 L = 50; Lx = 2.5*50; Ly = L; depth = -15; Nx = 100; Rx = 1.00; Ny = 40; Ry = 1.00; Point(1) = {-Lx, -Ly, depth, 1.0}; Point(2) = { Lx, -Ly, depth, 1.0}; Point(3) = { Lx, Ly, depth, 1.0}; Point(4) = {-Lx, Ly, depth, 1.0}; Line(1) = {1, 2}; Line(2) = {4, 3}; Line(3) = {1, 4}; Line(4) = {2, 3}; Transfinite Line {1} = Nx Using Progression Rx; Transfinite Line {2} = Nx Using Progression Rx; Transfinite Line {3} = Ny Using Progression Ry; Transfinite Line {4} = Ny Using Progression Ry; Line Loop(5) = {3, 2, -4, -1}; Plane Surface(6) = {5}; Transfinite Surface {6}; Recombine Surface{6}; Physical Volume("water") = {1}; Extrude {0, 0, 25} { Surface{6}; Layers{20}; Recombine; } Geometry.LineNumbers =1 ; Transfinite Line {13,14,22,18} = 10 Using Bump 0.4; Transfinite Surface "*"; Recombine Surface "*"; Physical Surface("inlet") = {15}; //inlet Physical Surface("outlet") = {23}; // outlet Physical Surface("topAndBottom") = {27, 19}; // topAndBottom Physical Surface("atmosphere") = {28}; // atmosphere Physical Surface("seaFloor") = {6}; // seaFloor |
|
![]() |
![]() |
![]() |
![]() |
#4 |
Senior Member
CFD
Join Date: Nov 2010
Location: United States
Posts: 243
Rep Power: 16 ![]() |
Try this;
Code:
L = 50; Lx = 2.5*50; Ly = L; depth = -15; Nx = 100; Rx = 1.00; Ny = 40; Ry = 1.00; Point(1) = {-Lx, -Ly, depth, 1.0}; Point(2) = { Lx, -Ly, depth, 1.0}; Point(3) = { Lx, Ly, depth, 1.0}; Point(4) = {-Lx, Ly, depth, 1.0}; Line(1) = {1, 2}; Line(2) = {4, 3}; Line(3) = {1, 4}; Line(4) = {2, 3}; Transfinite Line {1,2} = Nx Using Progression Rx; Transfinite Line {3,4} = Ny Using Progression Ry; Transfinite Line {3,4} = 10 Using Bump 0.4; Line Loop(5) = {3, 2, -4, -1}; Plane Surface(6) = {5}; Extrude {0, 0, 25} { Surface{6}; Layers{20}; Recombine; } Transfinite Surface "*"; Recombine Surface "*"; Physical Surface("inlet") = {15}; //inlet Physical Surface("outlet") = {23}; // outlet Physical Surface("topAndBottom") = {27, 19}; // topAndBottom Physical Surface("atmosphere") = {28}; // atmosphere Physical Surface("seaFloor") = {6}; // seaFloor Physical Volume("water") = {1}; Best, |
|
![]() |
![]() |
![]() |
![]() |
#5 |
Senior Member
|
@ArielJ
You can just remove Layers and Recombine from Extrude command; determine new lines IDs using, for example, GUI and then make them Transfinite. There is an example Code:
Point(1) = {0, 0, 0}; Point(2) = {1, 0, 0}; Point(3) = {1, 1, 0}; Point(4) = {0, 1, 0}; Line(1) = {1, 2}; Line(2) = {4, 3}; Line(3) = {1, 4}; Line(4) = {2, 3}; Line Loop(5) = {3, 2, -4, -1}; Plane Surface(6) = {5}; Extrude {0, 0, 1} { Surface{6}; } Transfinite Line {1, 2, 3, 4} = 11; // New lines due to extrusion in the new surface Transfinite Line {8, 9, 10, 11} = 11; // New vertical lines due to extrusion Transfinite Line {13, 14, 18, 22} = 51 Using Bump 0.1; Transfinite Surface "*"; Recombine Surface "*"; |
|
![]() |
![]() |
![]() |
![]() |
#6 | |
Member
|
Quote:
This script seems to produce the desired result only on the surface (structured quadrilaterals). The domain is meshed using tetrahedrals. Can you please confirm this or am I missing something?
__________________
Jibran Haider |
||
![]() |
![]() |
![]() |
![]() |
#7 | |
New Member
Flyer
Join Date: Apr 2017
Posts: 13
Rep Power: 9 ![]() |
Quote:
I wonder how did you come with the number 0.1 for 51 nodes? Could you please give a little explanation? Thank you, |
||
![]() |
![]() |
![]() |
![]() |
#8 | |
Member
Hilbert
Join Date: Aug 2015
Location: Australia
Posts: 50
Rep Power: 11 ![]() |
Quote:
Just a small message for anybody who finds this thread: Adding Transfinite Volume "*"; to the script means that the volume is meshed correctly as well. |
||
![]() |
![]() |
![]() |
Tags |
bump, extrude, gmsh, layers, transfinite surface |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
[Gmsh] Gmsh bump functionn.. | OpenFoam12 | OpenFOAM Meshing & Mesh Conversion | 2 | March 3, 2021 02:49 |
GMSH extrude a boundary layer from an unstructured Mesh | Hillie | Mesh Generation & Pre-Processing | 2 | July 7, 2017 03:38 |
[Gmsh] 2D Mesh Generation Tutorial for GMSH | aeroslacker | OpenFOAM Meshing & Mesh Conversion | 12 | January 19, 2012 03:52 |
[Gmsh] Cannot get the right mesh from gmsh | JinBiao | OpenFOAM Meshing & Mesh Conversion | 2 | August 31, 2010 04:51 |
[Gmsh] Import problem | ARC | OpenFOAM Meshing & Mesh Conversion | 0 | February 27, 2010 10:56 |