CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   Mesh Generation & Pre-Processing (https://www.cfd-online.com/Forums/mesh-generation/)
-   -   [gmsh] How to create a 3D volume mesh using a existing surface mesh?! (https://www.cfd-online.com/Forums/mesh-generation/190707-gmsh-how-create-3d-volume-mesh-using-existing-surface-mesh.html)

RobertHB July 20, 2017 08:12

[gmsh] How to create a 3D volume mesh using a existing surface mesh?!
 
Dear all,

i try to create a 3D volume mesh above a preexisting surface mesh for the later use in an OpenFOAM simulation. I've generate a .stl file containing my topography and used the gmsh "Reclassify 2D" command to create a suitable .msh file. I merge this new .msh file in gmsh and create the outline of my domain above this mesh. To do this i use the following code:
Code:

Mesh.RemeshAlgorithm=1;
Mesh.CharacteristicLengthFactor=1.00;//0.05;
Merge "cube.msh";
//RefineMesh;
CreateTopology;

lc = 1;

// ++++++++++++++++++++++++++++++++++++++++
// +++++++++ Box above topography +++++++++
// ++++++++++++++++++++++++++++++++++++++++
Point(14) = {29, 20, 2, lc};
Point(15) = {29, 24, 2, lc} ;
Point(16) = {31, 24, 2, lc} ;
Point(17) = {31, 20, 2, lc} ;

Line(40) = {7, 17};
Line(41) = {2, 14};
Line(42) = {1, 15};
Line(43) = {5, 16};
Line(44) = {16, 15};
Line(45) = {15, 14};
Line(46) = {14, 17};
Line(47) = {17, 16};
Line(48) = {5, 1};
Line(49) = {2, 1};
Line(50) = {2, 7};
Line(51) = {7, 5};

Line Loop(2) = {45, 46, 47, 44};
Plane Surface(11) = {2};
Line Loop(3) = {46, -40, -50, 41};
Plane Surface(12) = {3};
Line Loop(4) = {47, -43, -51, 40};
Plane Surface(13) = {4};
Line Loop(5) = {44, -42, -48, 43};
Plane Surface(14) = {5};
Line Loop(7) = {42, 45, -41, 49};
Plane Surface(16) = {7};

Physical Surface("Inlet") = {12};
Physical Surface("Outlet") = {14};
Physical Surface("Front") = {13};
Physical Surface("Back") = {16};
Physical Surface("Top") = {11};
Physical Surface("Surface") = {2};

The result is depicted in the following image.

https://www.dropbox.com/s/3hlsarzvfw...%3A57%3A56.pnghttp://imgur.com/a/6oGqRhttp://imgur.com/a/6oGqRhttp://i.imgur.com/5gY91OA.png
As you can see i'm able to create (physical) surfaces defining my domain above my surface, which itself is defined as a physical surface.

Problem:
I'm unable to create a meshed representation of what i've got so far. Can anybody suggest a solution for my problem?

With kind regards
Robert
https://www.dropbox.com/s/3hlsarzvfw...%3A57%3A56.png


All times are GMT -4. The time now is 12:43.