CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Meshing & Mesh Conversion

[Gmsh] Boundary Layer Excluded Face in Gmsh

Register Blogs Members List Search Today's Posts Mark Forums Read

Like Tree2Likes
  • 1 Post By Flowkersma

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   May 15, 2020, 12:55
Default Boundary Layer Excluded Face in Gmsh
  #1
New Member
 
doruk
Join Date: Apr 2018
Posts: 5
Rep Power: 8
cfdoruk is on a distinguished road
Hi everybody,

I'm trying to have boundary layer for a very simple geometry by using Gmsh. I can construct the layers; however, I want to exclude one of the faces from the boundary layer list. Although I tried ExcludedFaceList, it still produces layer there.

My surface and curve tags are shown in "Tags.png".
What I want to have is shown in "Desired.png".
What I get in Gmsh is shown in "Result.png".

The script is as follows:

// Gmsh project created on Fri May 15 18:00:20 2020
SetFactory("OpenCASCADE");
//+
Point(1) = {0.5, 0.5, 0, 1.0};
//+
Point(2) = {0, 1, 0, 1.0};
//+
Point(3) = {0.5, 1, 0, 1.0};
//+
Point(4) = {0, 0.5, 0, 1.0};
//+
Line(1) = {2, 3};
//+
Line(2) = {3, 1};
//+
Line(3) = {1, 4};
//+
Line(4) = {4, 2};
//+
Curve Loop(1) = {1, 2, 3, 4};
//+
Plane Surface(1) = {1};
//+
Extrude {0, 0, 0.1} {
Surface{1}; Layers{5}; Recombine;
}

Field[1] = BoundaryLayer;
//+
Field[1].AnisoMax = 1000;
//+
Field[1].EdgesList = {1, 2, 3, 4};
//+
Field[1].ExcludedFaceList = {4};

//+
Field[1].IntersectMetrics = 0;
//+
Field[1].Quads = 1;
//+
Field[1].hfar = 0.75;
//+
Field[1].hwall_n = 0.001;
//+
Field[1].ratio = 1.300000;
//+
Field[1].thickness = 0.025;

BoundaryLayer Field = 1;

Thank you.
Attached Images
File Type: png Tags.PNG (22.9 KB, 45 views)
File Type: png Desired.PNG (49.9 KB, 83 views)
File Type: png Result.PNG (67.0 KB, 79 views)
cfdoruk is offline   Reply With Quote

Old   May 19, 2020, 05:01
Default
  #2
Senior Member
 
Mikko
Join Date: Jul 2014
Location: The Hague, The Netherlands
Posts: 243
Rep Power: 12
Flowkersma is on a distinguished road
Hi Doruk,

The boundary layers in GMSH are not working very well in 3D. So I would first create a 2D mesh with the boundary layer and then extrude that. Here is an example:
Code:
SetFactory("OpenCASCADE");
Rectangle(1) = {0, 0, 0, 1, 1, 0}; 

Field[1] = BoundaryLayer;
Field[1].EdgesList = {2, 3, 4}; 
Field[1].NodesList = {1, 2, 3, 4}; 
Field[1].hwall_n = 0.01;
Field[1].thickness = 0.1;
Field[1].ratio = 1.2;
Field[1].Quads = 1;
BoundaryLayer Field = 1;
Extrude {0, 0, 0.1} { Surface{1}; Layers{10}; Recombine; }
Best, Mikko
cfdoruk likes this.
Flowkersma is offline   Reply With Quote

Old   May 19, 2020, 06:27
Default
  #3
New Member
 
doruk
Join Date: Apr 2018
Posts: 5
Rep Power: 8
cfdoruk is on a distinguished road
Hi Mikko,

This works, thank you.

Regards
Doruk
cfdoruk is offline   Reply With Quote

Old   March 3, 2022, 03:47
Default
  #4
Senior Member
 
Arijit Saha
Join Date: Feb 2019
Location: Singapore
Posts: 132
Rep Power: 7
ari003 is on a distinguished road
Quote:
Originally Posted by Flowkersma View Post
Hi Doruk,

The boundary layers in GMSH are not working very well in 3D. So I would first create a 2D mesh with the boundary layer and then extrude that. Here is an example:
Code:
SetFactory("OpenCASCADE");
Rectangle(1) = {0, 0, 0, 1, 1, 0}; 

Field[1] = BoundaryLayer;
Field[1].EdgesList = {2, 3, 4}; 
Field[1].NodesList = {1, 2, 3, 4}; 
Field[1].hwall_n = 0.01;
Field[1].thickness = 0.1;
Field[1].ratio = 1.2;
Field[1].Quads = 1;
BoundaryLayer Field = 1;
Extrude {0, 0, 0.1} { Surface{1}; Layers{10}; Recombine; }
Best, Mikko
I have a small question and that is why you didnt include hfar or farfield size? Does it become redundant?
ari003 is offline   Reply With Quote

Old   March 7, 2022, 05:12
Default
  #5
Senior Member
 
Mikko
Join Date: Jul 2014
Location: The Hague, The Netherlands
Posts: 243
Rep Power: 12
Flowkersma is on a distinguished road
Indeed it becomes redundant. You can calculate the number of cells and largest cell size from geometric series.
Flowkersma is offline   Reply With Quote

Old   March 7, 2022, 12:16
Default
  #6
Senior Member
 
Arijit Saha
Join Date: Feb 2019
Location: Singapore
Posts: 132
Rep Power: 7
ari003 is on a distinguished road
Quote:
Originally Posted by Flowkersma View Post
Indeed it becomes redundant. You can calculate the number of cells and largest cell size from geometric series.
Thanks for your response. Maybe it is a very lame question to ask atm but is it that hfar is the last boundary cell or the very adjacent region outside the boundary layer?
ari003 is offline   Reply With Quote

Reply

Tags
boundary layer, gmsh, openfoam, prism layer

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
My radial inflow turbine Abo Anas CFX 27 May 11, 2018 01:44
Question about adaptive timestepping Guille1811 CFX 25 November 12, 2017 17:38
[snappyHexMesh] No layers in a small gap bobburnquist OpenFOAM Meshing & Mesh Conversion 6 August 26, 2015 09:38
[Gmsh] Import problem ARC OpenFOAM Meshing & Mesh Conversion 0 February 27, 2010 10:56
fluent add additional zones for the mesh file SSL FLUENT 2 January 26, 2008 11:55


All times are GMT -4. The time now is 16:51.