|
[Sponsors] |
February 21, 2011, 08:15 |
Pipe flow in gmsh / OF
|
#1 |
New Member
Andreas P
Join Date: Sep 2010
Posts: 26
Rep Power: 15 |
Hi everyone!
Actually my problems seem to be quite similar to other discussions in this forum, but since I am completely new to both gmsh and OF I haven't really found answers that help me... In the future I want to use OF to compute steady state flow profiles in rather complex "pipe-like" geometries. For that, I will have to use unstructured meshes in different formats (nastran, icem, ...). So I thought a very simple pipe flow simulation on a gmsh-generated tetra-mesh would be a good start. I am attaching the .geo file (added .txt). To be able to distinguish between different boundaries etc., I have generated physical groups for inlet, outlet, walls, and fluid volume. To me, the mesh looks just fine. Please let me know, if there is already something wrong with the gmsh part. btw. is there a command to do the meshing directly in the .geo file? So far I just load the .geo file and then do the meshing by clicking the 3D button in the gmsh menu... which is somehow a strange hybrid approach. I'd prefer to have the complete procedure scripted. Anyway, I convert the gmsh to polyMesh by Code:
gmshToFoam pipe.msh Code:
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // Create time Found $MeshFormat tag; assuming version 2 file format. Starting to read mesh format at line 2 Read format version 2.2 ascii 0 Starting to read physical names at line 5 Physical names:4 Surface 1 inlet Surface 2 outlet Surface 3 wall Volume 4 fluid Starting to read points at line 12 Vertices to be read:1549 Vertices read:1549 Starting to read cells at line 1564 Cells to be read:8197 Mapping region 1 to Foam patch 0 Mapping region 3 to Foam patch 1 Mapping region 2 to Foam patch 2 Mapping region 4 to Foam cellZone 0 Cells: total:6565 hex :0 prism:0 pyr :0 tet :6565 CellZones: Zone Size 0 6565 Skipping tag at line 9764 Patch 0 gets name inlet Patch 1 gets name wall Patch 2 gets name outlet --> FOAM Warning : From function polyMesh::polyMesh(... construct from shapes...) in file meshes/polyMesh/polyMeshFromShapeMesh.C at line 576 Found 1632 undefined faces in mesh; adding to default patch. Finding faces of patch 0 Finding faces of patch 1 Finding faces of patch 2 FaceZones: Zone Size Writing zone 0 to cellZone fluid and cellSet End Code:
checkMesh -constant Code:
Checking patch topology for multiply connected surfaces ... Patch Faces Points Surface topology inlet 28 21 ok (non-closed singly connected) wall 1576 800 ok (non-closed singly connected) outlet 28 21 ok (non-closed singly connected) defaultFaces 0 0 ok (empty) Code:
defaultFaces { type patch; nFaces 0; startFace 13946; } I have not yet tried to just run a solver, since setting up physical parameters and numerical solution schemes will probably take me some time. And I believe that doesn't really make sense as long as there's still a problem with the mesh...? And another thing: Which solver would you recommend for this application? Basically appropriate to me seem both icoFoam and simpleFoam. Remember, I just want to compute a very simple laminar flow steady state solution (Hagen-Poiseuille). Thanks in advance for any hints! Andreas |
|
February 22, 2011, 12:13 |
|
#2 |
New Member
Andreas P
Join Date: Sep 2010
Posts: 26
Rep Power: 15 |
OK, I figured it out.
As described here I could just delete the defaultFaces, and everything worked! But maybe one more thing: Is there any way to specify a stop criterion for simpleFoam besides a fixed number of steady state solver iterations (i.e. time steps)? I was looking for something like an overall stopping residual, but haven't found that so far. |
|
March 2, 2011, 05:07 |
|
#3 | |
Member
Claudio
Join Date: Mar 2010
Posts: 57
Rep Power: 16 |
Quote:
Dear Andreas, I would like to built a prismatic boundary layer onto the pipe internal surfaces. The result would be an hybrid mesh with a tetrahedral core and a prismatic boundary layer. Have You ever tried it? Can You Help me doing that via a .geo file? Thank You in advance. Claudio Comis |
||
March 2, 2011, 09:33 |
|
#4 |
New Member
Andreas P
Join Date: Sep 2010
Posts: 26
Rep Power: 15 |
Claudio,
I am sorry I have hardly any experience with gmsh. (Just enough to generate trivial tetra meshes for my test cases...) But I'm sure you'll find hints on this googling for things like "gmsh prism layer hybrid meshes" etc... Andreas |
|
March 2, 2011, 18:16 |
|
#5 |
Member
William
Join Date: Feb 2011
Location: Minnesota USA
Posts: 33
Rep Power: 15 |
as for the default faces gmshToFoam always makes that patch. it is convenient if you don't want to define many internal physical surfaces (faces) as walls for instance. it is weird that it said it was putting 1600 some undefined faces there but checkmesh said it was empty. Foam ignores any patches with 0 faces anyways.
Last edited by billynoe; March 2, 2011 at 18:46. |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Setting boundary conditions for simple pipe flow with flow direction changing in time | Sipher | FLUENT | 1 | May 4, 2015 20:05 |
[GAMBIT] meshing in GAMBIT, a flow through a pipe having complex inflow geometry | mazhar1613 | ANSYS Meshing & Geometry | 1 | January 11, 2012 23:18 |
[ASK] Flow in Corrugated Pipe with FLUENT | Primadhani | FLUENT | 1 | May 11, 2011 20:41 |
Pipe Flow | Saima | CFX | 1 | January 10, 2011 16:41 |
Turbulence in a pipe flow | JM | Main CFD Forum | 4 | December 21, 2006 04:04 |