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

[Gmsh] Creating a mesh for a flow across an obstacle with Gmsh

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

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   January 8, 2019, 13:33
Default Creating a mesh for a flow across an obstacle with Gmsh
  #1
New Member
 
Vitor Heitor Cardoso
Join Date: Jan 2019
Location: Rio de Janeiro
Posts: 10
Rep Power: 7
heitorvitorc is on a distinguished road
Dear community;

I started to work with OpenFOAM 2 months ago, and I feel like I can handle many things by myself right now. However I can't figure out how to create a mesh file using Gmsh. Here is my case:

I must simulate a laminar flow of a compressible fluid (gas - Reservoir) in a porous media. But before that, I need to create a development curve, hence, I must create simpler cases and evolve as times goes by. The first case was just as the cavity example in OpenFOAM tutorials directory. Now I must simulate the flow considering 2 obstacles (2 cylinders ). The idea is to simplify the porous media as a flow across several cylinders, in 2D (which means: first 2 cylinders, then 4, then 8 ,then ....). But here is the problem.

Ok, I define the geometry easily,

Point(1) = {0,0,0};
Point(2) = {1,0,0};
Point(3) = {1,1,0};
Point(4) = {0,1,0};

Point(5) = {0.25, 0.15,0};
Point(6) = {0.25, 0.25,0};
Point(7) = {0.25, 0.35,0};

Point(8) = {0.25, 0.65,0};
Point(9) = {0.25, 0.75,0};
Point(10) = {0.25, 0.85,0};

Line(11) = {1,2};
Line(12) = {2,3};
Line(13) = {3,4};
Line(14) = {4,1};

Circle(15) = {5,6,7};
Circle(16) = {7,6,5};

Circle(17) = {8,9,10};
Circle(18) = {10,9,8};

Line Loop(19) = {11,12,13,14};

Curve Loop(20) = {15,16};
Curve Loop(21) = {17,18};

Plane Surface(22) = {19,20,21};

Transfinite Line{11,12,13,14,15,16,17,18} = 21;
Transfinite Surface{21};

Recombine Surface{22};

Until here, everything seems fine, i suppose. But when I try to Extrude the geometry in order to adapt the file for OpenFOAM by using

new[] =
Extrude{0,0,1/20}
{
Surface{22};
Layers{1};
Recombine;
}

The cylinders (the obstacles) don't extrude, and I get the message:
"Error: Unknown curve in extruded faces"

I wonder if someone could help me with this. I basicly need to know how to generate a 3d file with the "hole" left by the cylinders. Since I must evolve the problem for a more complex geometry, and also the flow will become turbulent, I need to find out how to solve this first task soon. How can I generate the .geo file with the correct geometry and dimensions?


I am very sorry if this question turns out to be a stupid one, but since I am new in CFD, I need to learn everything I can in order to improve my skills and become a better professional.
heitorvitorc is offline   Reply With Quote

Reply

Tags
flow across a cylinder, gmsh, porous media

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
Issues on the simulation of high-speed compressible flow within turbomachinery dowlee OpenFOAM Running, Solving & CFD 11 August 6, 2021 06:40
decomposePar problem: Cell 0contains face labels out of range vaina74 OpenFOAM Pre-Processing 37 July 20, 2020 05:38
periodic straight tube flow, no mesh independent solution for pressure gradient thijs1909 FLUENT 5 May 16, 2018 09:04
[mesh manipulation] Importing Multiple Meshes thomasnwalshiii OpenFOAM Meshing & Mesh Conversion 18 December 19, 2015 18:57
[Gmsh] gmshToFoam problem: not the same mesh in Gmsh vs. paraview zhernadi OpenFOAM Meshing & Mesh Conversion 8 July 7, 2011 02:28


All times are GMT -4. The time now is 05:36.