|
[Sponsors] |
[OpenFOAM] Surface normals inverted in paraFoam |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
August 25, 2011, 17:25 |
Surface normals inverted in paraFoam
|
#1 |
Member
Ivor Clifford
Join Date: Mar 2009
Location: Switzerland
Posts: 94
Rep Power: 17 |
Hi all,
I am trying to use paraFoam to view some simulation results and have noticed that the lighting on many of the faces is wrong. After playing with the backface culling options and applying the Normals Glyphs filter I realized that the surface normals have somehow been inverted on at least half of the faces resulting in very bad looking renderings. I do not get this problem with the native paraview reader, only with paraFoam... and I need this to extract cellZones correctly. Does anyone have any suggestions? I'm guessing this has something to do with the triangular mesh decomposition that happens internally in the vtkPV3Foam reader. Thanks in advance Ivor |
|
August 26, 2011, 05:34 |
|
#2 | |
Assistant Moderator
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51 |
Quote:
Can't help you with the immidiate problem. Two hints: - have you tried foamToVTK to just write the zones (I think it can do that. at least it can do sets) - one other thing: is it possible that this is a "the boundary of the internal field and the cellZone are in the same place. Sometimes the numerics favours one and then the other"-problem? I found that "Extract Block" the cellZone and then going to the Display tab and scaling it a little bit (1.0001 or so) helps Bernhard |
||
August 26, 2011, 12:52 |
|
#3 | |
Member
Ivor Clifford
Join Date: Mar 2009
Location: Switzerland
Posts: 94
Rep Power: 17 |
Thanks for the hints Bernhard. I also thought it might be overlapping models but I'm pretty certain this is not the case. It only happens for polyhedral cells, so I went into the source for both the native paraview reader and paraFoam. The native reader, when decomposing polyhedral cells, reverses the node ordering depending on whether the face is the owner or not. ParaFoam doesn't do this so I went ahead and made changes to the source code and it fixed the problem... sort of. It works fine on the original model, but as soon as I apply any clip, extract region or cutplane filter, the problem reappears.
Quote:
|
||
August 31, 2011, 17:40 |
|
#4 |
Member
Ivor Clifford
Join Date: Mar 2009
Location: Switzerland
Posts: 94
Rep Power: 17 |
If anyone is interested, I've found a workaround to this problem. Use paraFoam to import the data from the case and then export it from paraview in .vtm (VTK multiblock data) format. The windows version of Paraview will read and display these files without any problems. You will lose the names of the meshes, patches, sets and zones though.
Last edited by cliffoi; September 21, 2011 at 11:47. |
|
September 21, 2011, 10:40 |
|
#5 |
New Member
Alistair Everett
Join Date: Aug 2011
Posts: 8
Rep Power: 15 |
Hi Ivor,
I'm having a similar problem to you, I tried the solution you mentioned ie. exporting to .vtm, as you say when I reopen the file I lose the names of patches etc but the same faces are still lit incorrectly. Did you do anything else? Or am I missing something? I posted some screen shots of the problems I'm having here. It looks pretty similar to yours. Thanks in advance for your help! Alistair |
|
September 21, 2011, 11:46 |
|
#6 | |
Member
Ivor Clifford
Join Date: Mar 2009
Location: Switzerland
Posts: 94
Rep Power: 17 |
Hi Alistair,
I forgot to mention in my last post that I made changes to one of the paraFoam source files as well (see my 2nd post). Quote:
Not ideal but it worked in my case. |
||
September 21, 2011, 12:46 |
|
#7 |
New Member
Alistair Everett
Join Date: Aug 2011
Posts: 8
Rep Power: 15 |
Thanks Ivor, I'll give it a whirl!
|
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Scale Surface | CellZone | OpenFOAM Post-Processing | 1 | September 2, 2016 09:29 |
[Gmsh] Error : Self intersecting surface mesh, computing intersections & Error : Impossible | velan | OpenFOAM Meshing & Mesh Conversion | 3 | October 22, 2015 12:05 |
[ICEM] Automatic mesh generation script surface intersection problem | stuart23 | ANSYS Meshing & Geometry | 0 | May 13, 2011 02:10 |
solid edge problem....can you help? | cindy | Main CFD Forum | 3 | April 5, 2004 14:43 |
free convection heat transfer from a heated horizontal surface through a liquid to a thin cooled fin | Kaushik | FLUENT | 1 | May 8, 2000 07:47 |