[solved] Neighbour cellId as "-1"
Hello,
I am trying to convert an OpenFOAM mesh from binary to ascii. The binary mesh was previously generated from StarCCM. However, on conversion to ascii, the neighbour cellIds are shown as "-1" for most of the end part. Here is the neighbour file: Code:
Any suggestions are welcome. Thanks. PS: I did checkMesh, it didn't throw any error related to this. |
Quote:
|
I don't know exactly how the mesh was converted, I was only given the OF mesh. (There is another team working on it, I will see and ask them how they converted to OF).
However, I noted that when I write the neighbors from the code Code:
Exmaple: neighbour file from polyMesh/ Code:
1184680 Code:
992701 Surprisingly, it has skipped all the "-1" values. |
Quick answer: Then the -1 values might be a bug from the mesh export tool that the other team used.
And if OpenFOAM was able to ignore the -1 values, I guess it shouldn't be a problem. But this is meant to be a fairly rare problem, because I don't remember ever seeing this before. I can only guess that the -1 values appeared because the mesh exporter was being literal about an interface, for example, a baffle where the faces that were once shared between cells, where split into two sides and the cells were uncoupled, leaving behind a loose -1 indication of the neighbour cell that used to have. |
OpenFOAM meshes place boundary faces at the end of the face list (after all interior faces), and since boundary faces do not possess a neighbor cell, the neighbor value was automatically assigned a value of -1, to keep the owner / neighbor list lengths equal. I believe this practice was abandoned sometime circa OF-1.4, presumably due to storage considerations. But for backwards compatibility, such meshes are still supported in current versions. The polyMesh code simply truncates the list to the number of interior faces.
|
Thank you @deepsterblue and @wyldcat, for helping out.
@wyldcat, please mark this thread as solved. Thanks a lot. |
All times are GMT -4. The time now is 08:40. |