|
[Sponsors] |
[Netgen] Import stl file netgen writes segmentation faulterror |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
September 28, 2005, 19:02 |
Import stl file netgen writes segmentation faulterror
|
#1 |
Guest
Posts: n/a
|
Hi,
I've been struggling in order to import a stl-geometry into foam and after what can be read on this forum then netgen should be able to do the task. I tried tetgen with no luck: martin@linux:~/tetgen1.3.4> ./tetgen -pqAz ascii_r50.stl Opening ascii_r50.stl. Constructing Delaunay tetrahedrization. Delaunay seconds: 0.38 Creating surface mesh. Jettisoning redundants points. Perturbing vertices. Delaunizing segments. tetgen: tetgen.cxx:16986: void tetgenmesh::delaunizesegments(): Assertion `0' failed. Aborted Since netgen writes something about a "segmentation fault/error", then I can't convert this stl file I want to convert... zip_compressed_stl.zip Any hints/recommendations? netgen isn't exactly the most user-friendly software package to install I think... Had to compile a lot and download and read a lot of instructions for first installing tcl/tk, setting environment variables etc... Perhaps the windows version is easier to install than the linux version? |
|
September 29, 2005, 06:11 |
I just ran surfaceCheck on you
|
#2 |
Senior Member
Mattijs Janssens
Join Date: Mar 2009
Posts: 1,419
Rep Power: 26 |
I just ran surfaceCheck on your geometry. It consists of three disconnected parts and I guess this is the problem. I can run tetgen on the individual parts without problems.
I suppose netgen has the same constraints. Might have better error messages though ;-) |
|
September 29, 2005, 07:56 |
1) Thanks for the info. I can'
|
#3 |
Guest
Posts: n/a
|
1) Thanks for the info. I can't even start netgen because it comes with this "segmentation fault/error" after I type ./ng, so it has nothing to do with the part being disconnected. I guess something is wrong with the installation of tix-8.1.1.tar.gz...
2) surfaceCheck? Is that from inside netgen? 3) How did you manage to run tetgen on the three individual parts? From inside pro/Engineer it looks to me like if it's one part, but I just got this file from somebody else so I don't know how it was made... |
|
September 29, 2005, 14:11 |
2) OpenFOAM app.
3) check the
|
#4 |
Senior Member
Mattijs Janssens
Join Date: Mar 2009
Posts: 1,419
Rep Power: 26 |
2) OpenFOAM app.
3) check the output of surfaceCheck. Use surfaceConvert to convert back to stl. |
|
September 30, 2005, 14:29 |
Hello, there
Thanks a lot.
|
#5 |
Guest
Posts: n/a
|
Hello, there
Thanks a lot. That was helpful. surfaceCheck and surfaceConvert looks like some really great tools for a lot of extensions: '.ftr', '.stl', '.stlb', '.gts', '.obj', '.vtk', '.off', '.dx', '.smesh', '.ac' and '.tri'? However, now I'm struggling with tetgenToFoam once again... I never found out how one should do the conversion from tetgen to Foam mesh, but I guess I just hoped I would be luckier with this geometry than the last time I tried to convert a geometry from a stl-file to Foam: Exec : tetgenToFoam -startAt0 . r25 /home/martin/OpenFOAM/martin-1.2/run/r25/constant/polyMesh/samlet_indloeb_r25_0. 1 Date : Sep 10 2005 Time : 23:31:11 Host : linux PID : 27614 Root : /home/martin/OpenFOAM/martin-1.2/run Case : r25 Nprocs : 1 Create time Files: nodes : "/home/martin/OpenFOAM/martin-1.2/run/r25/constant/polyMesh/samlet_indloeb_r25_0 .1.node" elems : "/home/martin/OpenFOAM/martin-1.2/run/r25/constant/polyMesh/samlet_indloeb_r25_0 .1.ele" faces : "/home/martin/OpenFOAM/martin-1.2/run/r25/constant/polyMesh/samlet_indloeb_r25_0 .1.face" Reading .file for boundary information Numbering in files starts at 0 Read .node header: nodes : 689 nDims : 3 nAttr : 0 hasRegion : 0 Read .ele header: tets : 2258 pointsPerTet : 4 nAttr : 0 Segmentation fault Did you or anyone else have an easy solution for me in this case, so that I could do a simulation on this geometry? I would appreciate any suggestions for bringing me closer to a solution a lot. For instance: Does a forum for netgen-related installation problems exist, so I perhaps could try to see what netgen can do here, if netgen is able to export the mesh into something usable? |
|
September 30, 2005, 15:04 |
Ok, I inserted a lot of info-s
|
#6 |
Guest
Posts: n/a
|
Ok, I inserted a lot of info-statements and found out that the place where this Segmentation fault occurs, is close to this loop (around line 280-285 in tetgenToFoam.C):
if (startAt1) { --elemI; } for (label i = 0; i < 4; i++) { label nodeI; eleLine >> nodeI; However, I can' t see what's happening here since I don't really understand this program code. |
|
September 30, 2005, 15:18 |
Hi Martin,
last time you ca
|
#7 |
Senior Member
Mattijs Janssens
Join Date: Mar 2009
Posts: 1,419
Rep Power: 26 |
Hi Martin,
last time you came across an error in: cells[elemI] = cellShape(tet, tetPoints); According to the printout you have 2258 tets and 689 points/vertices/nodes in your file. So does your tet numbering in your file go from 0..2257 (0..688 for points) or from 1..2258? If so use the startAt1 flag since all Foam numbering starts at 0. |
|
September 30, 2005, 17:20 |
Hi,
The .ele file:
2258 4
|
#8 |
Guest
Posts: n/a
|
Hi,
The .ele file: 2258 4 0 1 11 292 2 233 --------- cut a lot 2257 44 42 424 285 2258 285 42 424 45 # Generated by /home/martin/tetgen1.3.4/tetgen -f samlet_indloeb_r25_0.stl The .node file: 689 3 0 0 1 3.78254 57.274900000000002 -0.94767500000000005 ------------ cut a lot ------ 688 -3.482773518325156 -25.063109137128237 -0.85637047580471404 689 -3.4406803462507036 -25.06484817786512 -0.94766313573558147 # Generated by /home/martin/tetgen1.3.4/tetgen -f samlet_indloeb_r25_0.stl Just to be sure that the format of the data files are correct: The .face file: 1374 0 1 1 234 233 ------- cut a lot ----- 1374 364 367 689 # Generated by /home/martin/tetgen1.3.4/tetgen samlet_indloeb_r25_0.stl The .smesh file: # samlet_indloeb_r25_0.1.smesh. TetGen's input file. # part 1: node list. 689 3 0 0 1 3.78254 57.274900000000002 -0.94767500000000005 ------ cut a lot ----- 689 -3.4406803462507036 -25.06484817786512 -0.94766313573558147 # part 2: facet list. 1374 0 3 233 234 1 ------- cut a lot ---- 3 364 689 367 # part 3: hole list. 0 # part 4: region list. 0 # Generated by /home/martin/tetgen1.3.4/tetgen samlet_indloeb_r25_0.stl So I guess this would mean that it's correct to start with the startAt1 flag, which should be the default but this doesn't work (and that's why I tried the startat0-option): Exec : tetgenToFoam . r25 /home/martin/OpenFOAM/martin-1.2/run/r25/constant/polyMesh/samlet_indloeb_r25_0. 1 Date : Sep 11 2005 Time : 02:01:44 Host : linux PID : 31733 Root : /home/martin/OpenFOAM/martin-1.2/run Case : r25 Nprocs : 1 Create time Files: nodes : "/home/martin/OpenFOAM/martin-1.2/run/r25/constant/polyMesh/samlet_indloeb_r25_0 .1.node" elems : "/home/martin/OpenFOAM/martin-1.2/run/r25/constant/polyMesh/samlet_indloeb_r25_0 .1.ele" faces : "/home/martin/OpenFOAM/martin-1.2/run/r25/constant/polyMesh/samlet_indloeb_r25_0 .1.face" Reading .file for boundary information Numbering in files starts at 1 Read .node header: nodes : 689 nDims : 3 nAttr : 0 hasRegion : 0 --> FOAM FATAL ERROR : point numbering not consecutive for node 1 or numbering starts at 0 or 1. Perhaps rerun w/o -startAt0 option? I haven't got a clue, since I would assume that Foam is able to read the output from tetgen, but perhaps I need to pass some special arguments to tetgen other than -f (and sometimes I ran it without arguments, still same result). |
|
October 2, 2005, 11:26 |
Solution to the problem - HOWT
|
#9 |
Guest
Posts: n/a
|
Solution to the problem - HOWTO:
1) follow this proposal by Stefan 2) Use: tetgenToFoam <root> <case> <file> -noFaceFile 3) Use: patchTool - if it doesn't show the right geometry, I do a: PatchToolServer <root> <case> and then it works. Result: Then there should be no confusion about importing .stl files anymore, I hope? |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Custom Thermophysical Properties | wsmith02 | OpenFOAM | 4 | June 1, 2023 15:30 |
SparceImage v1.7.x Issue on MAC OS X | rcarmi | OpenFOAM Installation | 4 | August 14, 2014 07:42 |
[swak4Foam] build problem swak4Foam OF 2.2.0 | mcathela | OpenFOAM Community Contributions | 14 | April 23, 2013 14:59 |
"parabolicVelocity" in OpenFoam 2.1.0 ? | sawyer86 | OpenFOAM Running, Solving & CFD | 21 | February 7, 2012 12:44 |
DecomposePar links against liblamso0 with OpenMPI | jens_klostermann | OpenFOAM Bugs | 11 | June 28, 2007 18:51 |