|
[Sponsors] |
Cavity Tuturial Using gmsh - results not looking quite right |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
June 15, 2018, 15:35 |
Cavity Tuturial Using gmsh - results not looking quite right
|
#1 |
New Member
Stone preston
Join Date: Oct 2017
Posts: 7
Rep Power: 9 |
Hey Everyone,
I just started using OpenFOAM and am still new to CFD in general. I am trying to get the cavity tutorial working using gmsh instead of blockMesh. Here is my .geo file Code:
// Gmsh project created on Fri Jun 15 11:49:11 2018 SetFactory("OpenCASCADE"); //+ //+ // Define variable to control mesh refinement h = .01; Point(1) = {0, 0, 0, h}; //+ Point(2) = {0.1, 0, 0, h}; //+ Point(3) = {0.1, 0.1, 0,h}; //+ Point(4) = {0, 0.1, 0, h}; //+ Line(1) = {1, 2}; //+ Line(2) = {2, 3}; //+ Line(3) = {3, 4}; //+ Line(4) = {4, 1}; //+ Line Loop(1) = {3, 4, 1, 2}; //+ Plane Surface(1) = {1}; //+ Transfinite Line {3, 1, 4, 2} = 21 Using Progression 1; //+ Transfinite Surface {1}; //+ Recombine Surface {1}; //+ //+ //+ Extrude {0, 0, .005} { Surface{1}; Layers{1}; Recombine; } //+ Physical Surface("movingWall") = {2}; //+ Physical Surface("fixedWalls") = {3, 4, 5}; //+ Physical Surface("frontAndBack") = {6, 1}; //+ Physical Volume("fluid") = {1}; I converted the gmsh .msh file to openFoam using Code:
gmshToFoam cavity.msh Code:
FoamFile { version 2.0; format ascii; class polyBoundaryMesh; location "constant/polyMesh"; object boundary; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // 3 ( frontAndBack { type empty; physicalType empty; nFaces 800; startFace 760; } movingWall { type wall; physicalType wall; nFaces 20; startFace 1560; } fixedWalls { type wall; physicalType wall; nFaces 60; startFace 1580; } ) // ************************************************************************* // Code:
icoFoam Any ideas what is going on? Thanks |
|
June 19, 2018, 10:54 |
|
#2 |
Senior Member
|
Hi,
In fact velocity fields are identical for blockMesh and Gmsh generated meshes. Absolute values of pressure are different, but it is difference, that matters/drives flow, and the difference is the same for both simulations (9.2 Pa). In fact, different distributions of pressure are caused by different locations of 0 Pa (which, by default, is in cell with ID = 0). Since it is icoFoam and meshes are slightly different, I would not worry much about these result differences. I ran simulations with OpenFOAM-plus 1806 pre-release. What version did you use? Last edited by alexeym; June 19, 2018 at 13:08. |
|
June 19, 2018, 14:21 |
|
#3 | |
New Member
Stone preston
Join Date: Oct 2017
Posts: 7
Rep Power: 9 |
Quote:
|
||
June 19, 2018, 18:03 |
|
#4 |
Senior Member
|
Well, I do not have 5.0 installed, but still the difference in pressure distributions are caused by different mesh cells numbering (and necessity to solve Poisson equation with pure Neumann BCs).
And as a side-note: it is not quite fair to compare interpolated point fields in ParaView (real velocity, for example, is located in the cell centres, so it is cell data in terms of ParaView). Use sample function object to extract data directly from simulation. |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Problem: Very long "write" time (~2h-3h) for results and transient results | Shawn_A | CFX | 16 | April 12, 2016 21:49 |
Weird results on Cavity and unstructured meshes | x86_64leon | OpenFOAM Running, Solving & CFD | 12 | March 1, 2016 20:44 |
Benchmark Results for Thermally driven cavity flow | mihirmakwana6 | Main CFD Forum | 2 | July 8, 2015 06:16 |
Buoyancydriven cavity results for comparision | kar | OpenFOAM | 0 | April 14, 2008 10:04 |
hx2h Cavity flow results ? | sangrar | Main CFD Forum | 5 | March 15, 2001 08:59 |