|
[Sponsors] |
[Technical] [solved] Neighbour cellId as "-1" |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
May 2, 2019, 08:39 |
[solved] Neighbour cellId as "-1"
|
#1 |
Member
Ashish Magar
Join Date: Jul 2016
Location: Mumbai, India
Posts: 81
Rep Power: 9 |
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:
461199 ( 1 2 3 4 56786 4 5 7 56788 57202 ..... -1 -1 -1 -1 -1 -1 -1 -1 -1 ) Any suggestions are welcome. Thanks. PS: I did checkMesh, it didn't throw any error related to this. |
|
May 5, 2019, 10:12 |
|
#2 |
Retired Super Moderator
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,975
Blog Entries: 45
Rep Power: 128 |
Quick request: Please elaborate on how exactly you converted the Star-CCM+ mesh to OpenFOAM mesh, because this looks like a problem with the conversion.
__________________
|
|
May 6, 2019, 01:45 |
|
#3 |
Member
Ashish Magar
Join Date: Jul 2016
Location: Mumbai, India
Posts: 81
Rep Power: 9 |
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:
labelList m_nei( mesh.neighbour() ); for( label i=0; i < m_nei.size(); i++) { OS1 << m_nei[i] << nl; } Exmaple: neighbour file from polyMesh/ Code:
1184680 ( 1 2 87465 5 7 6 7 ... 357970 357971 357971 357972 357972 -1 -1 ... -1 ) Code:
992701 ( 1 2 87465 5 7 ... 357970 357971 357971 357972 357972 ) Surprisingly, it has skipped all the "-1" values. |
|
May 6, 2019, 19:26 |
|
#4 |
Retired Super Moderator
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,975
Blog Entries: 45
Rep Power: 128 |
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. |
|
May 7, 2019, 00:21 |
|
#5 |
Senior Member
Sandeep Menon
Join Date: Mar 2009
Location: Amherst, MA
Posts: 403
Rep Power: 25 |
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.
|
|
May 7, 2019, 03:54 |
|
#6 |
Member
Ashish Magar
Join Date: Jul 2016
Location: Mumbai, India
Posts: 81
Rep Power: 9 |
Thank you @deepsterblue and @wyldcat, for helping out.
@wyldcat, please mark this thread as solved. Thanks a lot. |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
area does not match neighbour by ... % -- possible face ordering problem | St.Pacholak | OpenFOAM | 10 | February 7, 2024 21:50 |
problem "face 0 area does not match neighbour by xxx%" in parallel run | Aleigus | OpenFOAM | 0 | July 2, 2017 12:10 |
[snappyHexMesh] sHM layer process keeps getting killed | MBttR | OpenFOAM Meshing & Mesh Conversion | 4 | August 15, 2016 03:21 |
access the information of the neighbour cell across a processor boundary? | sophie_l | OpenFOAM Programming & Development | 4 | August 9, 2016 14:05 |
pimpleDyMFoam,parallel,area does not match neighbour | KangX1 | OpenFOAM Running, Solving & CFD | 1 | May 31, 2016 03:04 |