|
[Sponsors] |
August 7, 2023, 11:44 |
magSf return twice the area size
|
#1 |
New Member
|
Hi Foamers,
I am trying to use and understand magSf() function to calculate the individual surface area of a cell. I am constructed a simple code like this to understand the face area; Code:
for (label cellI = 0;cellI < mesh.C().size(); cellI++) { if (cellI == 321) { for (label faceI = 0; faceI < mesh.Cf()[cellI].size(); faceI++) { Info << "The surface area for the faces of number " << mesh.Cf()[cellI].size() << " at face " << faceI << " on " << " cell "<< cellI <<" is: " << mesh.magSf()[faceI] << endl; Info << "Cell connectivity: " << mesh.cellCells()[cellI] << endl; } } } For your information, the domain size is 0.1m x 0.1m and is discretized into (20 20 1). Taking one cell, the cell size is 5e-3m x 5e-3m, which means the area is 2.5e-5m2. However, magSf returned 5e-5m2 for the face pointed, which is essentially twice the face area. Anyway, I tried this for 3D case and the area returned is correct, although the size() function still return 3 faces although mesh connectivity return 6 mesh surrounding cells pointed. I am really confused with this behavior and hope someone can help me to understand it. Thanks, |
|
Tags |
area, openfoam |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Error in enabling the python wrapper | Jinn | SU2 Installation | 2 | April 23, 2022 14:52 |
solver crashing | hrishikeshsivanandan | OpenFOAM | 7 | March 6, 2021 02:18 |
Warning:no return statement in function returning non-void [-Wreturn-type] | 3014214149 | OpenFOAM Programming & Development | 1 | January 19, 2021 12:40 |
Issues with poor performance in faster CPU | gian93 | Hardware | 9 | October 29, 2018 14:34 |
fluent add additional zones for the mesh file | SSL | FLUENT | 2 | January 26, 2008 12:55 |