|
[Sponsors] |
[surface handling] Visualizing badFaces via surfaceSubsetDict |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
November 12, 2017, 12:27 |
Visualizing badFaces via surfaceSubsetDict
|
#1 |
New Member
Moe Alams
Join Date: May 2017
Posts: 13
Rep Power: 9 |
Hi All,
I am working with an STL file. I used surfaceCheck to evaluate the quality of the surface. The surfaceCheck utility produced badFaces file. The file has 7 bad faces. The goal is that I want to visualize those bad faces so I can fix them therefore I used surfaceSubset to generate a new STL of those faces as shown in the code below. However, I am getting the following error after executing: Code:
surfaceSubset badFaces edited_pore_scaled_Zflow.stl badface.stl Code:
/*---------------------------------------------------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | | \\ / O peration | Version: v1706 | | \\ / A nd | Web: www.OpenFOAM.com | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ Build : v1706 Arch : Date : Time : Host : PID : Case : nProcs : 1 sigFpe : Enabling floating point exception trapping (FOAM_SIGFPE). fileModificationChecking : Monitoring run-time modified files using timeStampMaster (fileModificationSkew 10) allowSystemOperations : Allowing user-supplied system call operations // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // Reading dictionary "badFaces" ... --> FOAM FATAL IO ERROR: Expected a '(' or a '{' while reading List, found on line 5 the label 75112 file: badFaces at line 5. From function char Foam::Istream::readBeginList(const char*) in file db/IOstreams/IOstreams/Istream.C at line 134. FOAM exiting Code:
/*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | | \\ / O peration | Version: 2.1.x | | \\ / A nd | Web: www.OpenFOAM.org | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ FoamFile { version 2.0; format ascii; class dictionary; object surfaceSubsetDict; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // Select triangles by label faces #include "badFaces"; // Select triangles using given points (local point numbering) localPoints ( ); // Select triangles using given edges edges (); // Select triangles (with face centre) inside box zone ( /* (0 -10000 -10000) (0 10000 10000)*/ ); // Select triangles (with face centre) inside or outside of another surface. // (always selects triangles that are 'on' other surface) surface { name "edited_pore_scaled_Zflow.stl"; outside yes; } // Extend selection with edge neighbours addFaceNeighbours no; // Invert selection invertSelection false; // when true-it will remove badfaces and write the good part only // ************************************************************************* // |
|
November 14, 2017, 05:52 |
|
#2 |
Senior Member
|
Hi,
Command should be Code:
surfaceSubset surfaceSubsetDict edited_pore_scaled_Zflow.stl bad_faces.stl Code:
FoamFile { version 2.0; format ascii; class dictionary; object surfaceSubsetDict; } faces #include "badFaces"; localPoints (); edges (); zone (); addFaceNeighbours no; invertSelection false; |
|
June 24, 2019, 05:43 |
|
#3 |
Member
Owais Shabbir
Join Date: May 2019
Posts: 48
Rep Power: 7 |
Hi,
I want to know after finding and visualizing these badFaces, how could I get rid of them? Thanks. |
|
June 24, 2019, 08:33 |
|
#4 |
Senior Member
|
Hi,
It depends on available tools. For example, MeshLab is quite good at removing bad faces. If you need to just remove these badFaces, you can edit STL with Gmsh (this way it is just select and press delete). Or you can use less picky mesher to create tetrahedral mesh from the surface with badFaces and then save outer surface of generated mesh. |
|
June 24, 2019, 09:24 |
|
#5 |
Member
Owais Shabbir
Join Date: May 2019
Posts: 48
Rep Power: 7 |
Hi Alexey,
I have tried LabMesh. When I try the 'repair/clean' filter; there is no option for precisely badFaces. Could you guide me which faces in Labmesh represent badFaces? I also have GMSH but again I lack the knowledge of how to select the badFaces. |
|
June 26, 2019, 09:46 |
|
#6 |
Senior Member
|
You visualize your badFaces with let's say ParaView and then select them in Gmsh with a mouse? Or there are thousands of such faces? IIRC there is a possibility to select faces using IDs, so you can select them using values from badFaces file.
In MeshLab you can not supply your badFaces, yet there are software's own criteria for selection of low quality faces. Also it is not quite clear what do you mean by "get rid of them"? |
|
June 27, 2019, 03:07 |
|
#7 |
Member
Owais Shabbir
Join Date: May 2019
Posts: 48
Rep Power: 7 |
Hi Alexey,
To my understanding (which is basic) badFaces, illegalFaces and problemFaces lead to bad results of simulations. Or I understood it wrong? That's why I thought of deleting or getting rid of them. Thanks |
|
June 27, 2019, 05:48 |
|
#8 |
Senior Member
|
Well...
Initial question was about STL surface, which was used to generate mesh. Those badFaces lead to difficulties during mesh generation. And has (almost) nothing to do with simulation per se. Now to the question of "getting rid". Face is just a connectivity. OK, you have deleted a face, now you have got a hole in your surface (maybe not if the face was, for example, internal extra-face, or erroneously generated face with zero area). There are many different types of bad faces. Certain you can simply delete. For certain you need to modify points of you surface. It would be easier if you create new post with illustrations (your surface with coloured badFaces). |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
[OpenFOAM] How to display badFaces from surfaceCheck in paraview | pizzaspinate | ParaView | 7 | February 26, 2015 10:02 |
Visualizing mesh regions with high courant number? | Endel | OpenFOAM | 2 | August 20, 2013 03:57 |
Rothalpy good for visualizing losses? | eRzBeNgEl | Lounge | 0 | August 12, 2011 04:40 |
[OpenFOAM] Visualizing in Paraview | Kvadar | ParaView | 5 | July 25, 2011 03:36 |
visualizing control volumes (not elements) | dvolkind | ANSYS Meshing & Geometry | 0 | March 24, 2010 10:40 |