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

[Gmsh] Gmsh: finer mesh on lower and upper wall of a channel

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   November 19, 2017, 19:48
Default Gmsh: finer mesh on lower and upper wall of a channel
  #1
New Member
 
Ewald
Join Date: Nov 2017
Posts: 2
Rep Power: 0
CFDeProjekt is on a distinguished road
Hi all,

i try to create a channel with Gmsh with a finer mesh resolution on the upper and lower wall. Then i obviously try to get this mesh work with OpenFoam via gmshToFoam.
The mesh itself in Gmsh looks good, just as i want it to be. Unfortunately i get a bunch of these error messages after hitting gmshToFoam.

examples:

-FOAM Warning :
From function polyMesh:olyMesh(... construct from shapes...)
in file meshes/polyMesh/polyMeshFromShapeMesh.C at line 627
Found 29002 undefined faces in mesh; adding to default patch.
Finding faces of patch 0

-FOAM Warning : Not using gmsh face 3(16630 11393 12381) since zero vertex is not on boundary of polyMesh

-FOAM Warning :
From function gmshToFoam
in file gmshToFoam.C at line 972
Could not match gmsh face 3(16630 11393 12381) to any of the interior or exterior faces that share the same 0th point

This is my code for the .geo file:

a = 0.01;
b = 0.1;

Point(1) = {0, 0, 0, a};
Point(2) = {10, 0, 0, a};
Point(3) = {10, 0, 0.5, b};
Point(4) = {0, 0, 0.5, b};

Line(1) = {1, 4};
Line(2) = {1, 2};
Line(3) = {2, 3};
Line(4) = {3, 4};

Point(5) = {0, 0, 1, a};
Point(6) = {10, 0, 1, a};

Line(5) = {3, 6};
Line(6) = {5, 6};
Line(7) = {4, 5};

Line Loop(8) = {2, 3, 4, -1};
Line Loop(9) = {5, -6, -7, -4};

Plane Surface(10) = {8};
Plane Surface(11) = {9};

Extrude {0, 0.1, 0}
{
Surface{10,11};
Layers{1};
Recombine;
}

Physical Volume(1) = {1};


Physical Surface("auslass") = {13, 17};
Physical Surface("einlass") = {15, 19};
Physical Surface("obenundunten") = {12, 18};
Physical Surface("vornundhinten") = {10, 11, 16, 20};

I guess the problem might be the middle plane which i constructed to get the finer resolution on the edges, because i don't know how to handle it otherwise.

with middle plane i mean this line, which is extruded to become a plane:

Line(4) = {3, 4};


Does anyone have an idea what i am doing wrong? Is it due to this middle plane? Does it have to be an physical entity?

Looking forward for any kind of help!
Thanks and Regards
CFDeProjekt is offline   Reply With Quote

Old   November 20, 2017, 09:12
Default
  #2
Senior Member
 
louisgag's Avatar
 
Louis Gagnon
Join Date: Mar 2009
Location: Stuttgart, Germany
Posts: 338
Rep Power: 18
louisgag is on a distinguished road
Send a message via ICQ to louisgag
Hi Ewald,

Without trying the conversion myself I cannot tell whether the midplane is the issue, but if you get no error when the midplane is absent that would be a big hint for you ;-)

I looked at your mesh and you would be much better off using the
Code:
Field[expression]
options of Gmsh instead of a midplane to refine it. I use fields successfully for meshes that I then convert to OpenFOAM and experience no issues, apart from the default patch warning, with is usually nothing to worry about.

See the Gmsh manual here: http://gmsh.info/doc/texinfo/gmsh.ht...-element-sizes for more info and specifically look at the Attractor, Threshold, Min, etc. field types.

Hope this helps,


-Louis
louisgag is offline   Reply With Quote

Reply


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
Upper Boundary condition for a mesh split at half channel height RobertHB OpenFOAM Running, Solving & CFD 0 December 2, 2016 04:23
Multiphase flow - incorrect velocity on inlet Mike_Tom CFX 6 September 29, 2016 02:27
[snappyHexMesh] upper and lower patch for a 0_thick Membrane in a wind tunnel hfs OpenFOAM Meshing & Mesh Conversion 7 October 15, 2013 17:41
How to mesh the wall in middle of space dokeun FLUENT 0 February 15, 2011 06:34
[Gmsh] Import problem ARC OpenFOAM Meshing & Mesh Conversion 0 February 27, 2010 11:56


All times are GMT -4. The time now is 22:14.