CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Meshing & Mesh Conversion (https://www.cfd-online.com/Forums/openfoam-meshing/)
-   -   [blockMesh] No-win situation? (https://www.cfd-online.com/Forums/openfoam-meshing/89108-no-win-situation.html)

dancfd June 4, 2011 17:42

No-win situation?
 
1 Attachment(s)
Hello all,

I am having trouble running the case /simpleFoam/airfoil2D when I replace the default mesh with mine, a NACA 0012 in a C-grid (blockMeshDict attached). The problem is that the results show pressure/velocity fluctuations in the far field, and no characteristic pressure field around the airfoil. I thought this might be due to the mesh, since blockMesh gives me the following warnings:


Code:

Creating block mesh topology
--> FOAM Warning :
    From function cellModel::mag(const labelList&, const pointField&)
    in file meshes/meshShapes/cellModel/cellModel.C at line 128
    zero or negative pyramid volume: -0.000497689 for face 0
--> FOAM Warning :
    From function cellModel::mag(const labelList&, const pointField&)
    in file meshes/meshShapes/cellModel/cellModel.C at line 128
    zero or negative pyramid volume: -1.26062e-08 for face 2
--> FOAM Warning :
    From function cellModel::mag(const labelList&, const pointField&)
    in file meshes/meshShapes/cellModel/cellModel.C at line 128
    zero or negative pyramid volume: -1.26063e-08 for face 3
--> FOAM Warning :
    From function cellModel::mag(const labelList&, const pointField&)
    in file meshes/meshShapes/cellModel/cellModel.C at line 128
    zero or negative pyramid volume: -1.26063e-08 for face 4
--> FOAM Warning :
    From function cellModel::mag(const labelList&, const pointField&)
    in file meshes/meshShapes/cellModel/cellModel.C at line 128
    zero or negative pyramid volume: -1.26063e-08 for face 5
--> FOAM Warning :
    From function blockMesh::createTopology(IOdictionary&)
    in file createTopology.C at line 397
    negative volume block : 0, probably defined inside-out

I tried to resolve the issue by changing the order of the vertex numbering in block 0 from hex (2 4 6 0 3 5 7 1) to hex (3 5 7 1 2 4 6 0), and that yielded only the following:

Code:

Creating block mesh topology
--> FOAM Warning :
    From function cellModel::mag(const labelList&, const pointField&)
    in file meshes/meshShapes/cellModel/cellModel.C at line 128
    zero or negative pyramid volume: -0.000497664 for face 1

The problem is that now simpleFoam will not even run! (log attached) I am not surprised, because the interface between two of the blocks clearly looks inside out. CheckMesh was not kind either (see checkMeshAdjusted). However, checkMesh had no problem with the first mesh (log.checkMesh).

In a nutshell, the problem is this: blockMesh gives me several warnings when building my mesh that runs; blockMesh only gives one error (which I do not know how to fix) when building the mesh that will not run. CheckMesh gives a worse report to the mesh that blockMesh liked best, and simpleFoam will not run the mesh checkMesh does not like, but will run the other one with poor results.

Can anyone tell me what is wrong with this mesh? I would appreciate any advice.

Thank you,

Dan

MartinB June 5, 2011 02:04

1 Attachment(s)
Hi Dan,

I just tested you mesh and although I do get the same warnings the simulation runs fine.

There could be a problem with the polyLine definition: for example in lines 540 and 541 there is the same point defined two times. May be there are other doubles, too... If you want to get rid of the warnings you can try to split the front block (block 0) into two blocks.

In the attachment you can find the running case, tested with OpenFOAM-1.7.x. The only modification to the original airfoil2D case are reduced relaxation factors and a faster solver.

Martin

dancfd June 5, 2011 16:43

Hi Martin,

Thank you for taking the time to look at the problem I am having. I ran the case, and it looks like one issue was that the simulation was not running long enough to reach steady-state. There were two instances where polyLines had two identical points (as you pointed out), but commenting them had no effect. I might try splitting block 0 into two, but I do not understand why this would address the warnings.

Thanks for your help,

Dan


All times are GMT -4. The time now is 13:19.