CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   ParaView (https://www.cfd-online.com/Forums/paraview/)
-   -   [OpenFOAM] How to display badFaces from surfaceCheck in paraview (https://www.cfd-online.com/Forums/paraview/149114-how-display-badfaces-surfacecheck-paraview.html)

pizzaspinate February 26, 2015 03:37

How to display badFaces from surfaceCheck in paraview
 
Hi FOAMers,

I have a question regarding surfaceCheck:
Unfortunately OpenFOAM doesn't like my geometry according to surfaceCheck. It creates in the triSurface folder several subfolders such as badfaces, illegalFaces and problemFaces.
My question is:
How can I display the faces in paraview so that I know how to improve this faces?

Thank you very much in advance for your help.

Tobi February 26, 2015 07:55

Hi,

you can visualize them using:
  1. setSet
  2. foamToVTK
With the first one, you can create a new faceSet and insert the faces to that set. This can be visualized with paraview. The easier way is to use the second command with the argument "-faceSet <faceSet>".

pizzaspinate February 26, 2015 08:33

Hi Tobias,

thanks for the quick response. I tried the 2nd approach but it gives me the following error:
Code:

--> FOAM FATAL IO ERROR:
problem while reading header for object problemFaces

file: /home/localuser/OpenFOAM/localuser-2.3.1/run/Straight_Wing_3d_Mesh9/constant/polyMesh/sets/problemFaces at line 1.

    From function regIOobject::readStream()
    in file db/regIOobject/regIOobjectRead.C at line 95

Do I have to copy the problemFaces out of the triSurface folder to another location?

Tobi February 26, 2015 08:44

As you see in your error message:
Code:

file: /home/localuser/OpenFOAM/localuser-2.3.1/run/Straight_Wing_3d_Mesh9/constant/polyMesh/sets/problemFaces at line 1.
Its searching for the file in the given folder.
Copy it to that place!

alexeym February 26, 2015 08:51

Hi,

You can (or should) use surfaceSubset to write results of surfaceCheck. In fact it states it explicitly (here's an example for badFaces):

Code:

            if (!problemFaces.empty())
            {
                OFstream str("badFaces");

                Info<< "Dumping bad quality faces to " << str.name() << endl
                    << "Paste this into the input for surfaceSubset" << nl
                    << nl << endl;

                str << problemFaces;
            }

You can find surfaceSubsetDict in $FOAM_APP/utilities/surface/surfaceSubset folder. Here's how surfaceSubset should be used:

Code:

surfaceSubset [OPTIONS] <surfaceSubsetDict> <surfaceFile> <output surfaceFile>
Output surface file format can be: stl, stlb (binary stl), gts, obj, off, tri, ac, nas, vtk. Guess you can go with STL or VTK.

pizzaspinate February 26, 2015 09:03

I have tried both ways now:
for the FoamToVTK I get:
Code:

--> FOAM FATAL IO ERROR:
problem while reading header for object problemFaces

and for the surfaceSubset i get:
Code:

surfaceSubset [OPTIONS] <surfaceSubsetDict> <surfaceFile> <output surfaceFile>
in fact my problem faces file looks only like this:
4(174 175 386 387)

pizzaspinate February 26, 2015 09:25

uuups, for the surfaceSubset i get:
--> FOAM FATAL IO ERROR:
Istream not OK for reading dictionary

sorry for that!

Tobi February 26, 2015 10:02

Oh you are using STL :)
I did not get that ... thought you have this faces with "checkMesh". Sorry...
Once I figured it out but its long time ago because now I know how to generate beautfilul CFD STL files ;)

Anyway. Maybe this will help you: http://www.cfd-online.com/Forums/ope...d-surface.html


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