Netgen Elmer export causes Elmer trouble

Mesh generators, CAD programs, and other tools
Post Reply
hazelsct
Posts: 153
Joined: 05 Oct 2009, 17:02
Location: Boston, MA, USA
Contact:

Netgen Elmer export causes Elmer trouble

Post by hazelsct » 21 Jun 2010, 02:06

Hi, I'm running into a bug in either Netgen or Elmer and wanted to bring it to this forum. Here's my workflow:

[*]Create geometry in FreeCAD, e.g. box with 1/8 sphere cut out of the corner (attached .step file)
[*]Load .step file in NETGEN, generate mesh (result image attached), choose Elmer export format, export.
[*]Elmer File -> Load mesh, specify the directory.
[*]Model -> Setup, any other modifications
[*]File -> Save project (same directory), result is fine
[*]Sif -> Generate *crash*
netgen-boxcut.png
Image from NETGEN after meshing.
netgen-boxcut.png (20.84 KiB) Viewed 2709 times
Here's the console output:

Code: Select all

SifGenerator: Body index out of bounds

Program received signal SIGSEGV, Segmentation fault.
0x00000000004c46b9 in SifGenerator::makeBoundaryBlocks() ()
This is with Elmer 4262 in Ubuntu Lucid or 4298 (I know, kinda old, I'll update soon) and Netgen 4.9.12.dfsg-3 from Debian unstable (in Opennovation repository).

I'll work on debugging and report back. In the meantime, any ideas?
Attachments
box-sphere.step
Box minus 1/8 sphere in STEP format
(20.33 KiB) Downloaded 104 times

raback
Site Admin
Posts: 3305
Joined: 22 Aug 2009, 11:57
Antispam: Yes
Location: Espoo, Finland
Contact:

Re: Netgen Elmer export causes Elmer trouble

Post by raback » 21 Jun 2010, 11:19

Hi, You might try to run the mesh through ElmerGrid with the -autoclean flag i.e.

Code: Select all

ElmerGrid 2 2 mesh -autoclean -out newmesh
This renumbers the entities, if that's the problem. You may try also just '-bulkorder' and '-boundorder' flags to renumber either bulk elements or boundary elements. Of course ElmerGUI should be able to handle all indexes but perhaps that's not the case.

-Peter

hazelsct
Posts: 153
Joined: 05 Oct 2009, 17:02
Location: Boston, MA, USA
Contact:

Re: Netgen Elmer export causes Elmer trouble

Post by hazelsct » 21 Jun 2010, 14:33

Thanks Peter, I'm afraid it didn't work though, same error:

Code: Select all

% ElmerGrid  2 2 boxcut -autoclean -out boxcut-clean

Starting program Elmergrid
Elmergrid reading in-line arguments
Lower dimensional boundaries will be removed
Materials and boundaries will be renumbered
Nodes that do not appear in any element will be removed
Output will be saved to file boxcut-clean.

Elmergrid loading data:
-----------------------
Loading mesh in ElmerSolver format from directory boxcut.
Loading Elmer header from mesh.header
Allocating for 43 knots and 96 elements.
Loading 43 Elmer nodes from mesh.nodes
Loading 96 Elmer elements from mesh.elements
Loading 76 Elmer boundaries from mesh.boundary

Elmergrid creating and manipulating meshes:
-------------------------------------------
Removing lower dimensional boundaries
Maximum elementtype is 504 and dimension 3
Removed 0 (out of 76) less than 3D boundary elements
All 43 nodes were used by the mesh elements
Materials ordered continously between 1 and 1

Elmergrid saving data:
----------------------
Saving mesh in ElmerSolver format to directory boxcut-clean.
Saving 43 coordinates to mesh.nodes.
Saving 96 element topologies to mesh.elements.
Saving boundary elements to mesh.boundary.
Saving header info to mesh.header.

Thank you for using Elmergrid!
Send bug reports and feature wishes to peter.raback@csc.fi
% % sh -c 'PATH=/usr/bin:$PATH LD_LIBRARY_PATH=/usr/lib:$LD_LIBRARY_PATH ELMER_HOME=/usr ELMERGUI_HOME=/usr/share/ElmerGUI ElmerGUI'
Load /usr/share/ElmerGUI/edf/egini.xml... done
Load tetgen plugin... not found
Tetgen functionality unavailable
Constructing ElmergridAPI... done
Load /usr/share/ElmerGUI/edf/edf.xml... done
Load /usr/share/ElmerGUI/edf/navier-stokes.xml... done
Load /usr/share/ElmerGUI/edf/statcurrent.xml... done
Load /usr/share/ElmerGUI/edf/linearelasticity.xml... done
Load /usr/share/ElmerGUI/edf/advection-diffusion.xml... done
Load /usr/share/ElmerGUI/edf/savescalars.xml... done
Load /usr/share/ElmerGUI/edf/k-epsilon.xml... done
Load /usr/share/ElmerGUI/edf/meshdeform.xml... done
Load /usr/share/ElmerGUI/edf/resultoutput.xml... done
Load /usr/share/ElmerGUI/edf/heatequation.xml... done
Load /usr/share/ElmerGUI/edf/helmholtz.xml... done
Initialize GL
Vendor: Tungsten Graphics, Inc
Renderer: Mesa DRI Intel(R) 965GM GEM 20091221 2009Q4 
Version: 2.1 Mesa 7.7.1
Loading from directory /home/hazelsct/Documents/boxcut-clean
Loading elmer mesh files
Summary:
Nodes: 43
Point elements: 0
Edge elements: 0
Surface elements: 76
Volume elements: 96
Found 114 edges on boundary
Bcs/materials on surface elements: 7
Bcs/materials on edge elements: 0
Bcs/materials on point elements: 0
Generating  lists to display
Generated 16 lists
Ready
Project directory /home/hazelsct/Documents/boxcut-clean
Saving mesh files...
Saving elmer mesh files
Saving 43 nodes
Saving 96 elements
Saving 76 boundary elements
Ready
Copying: ./..
Copying: ./.
Saving menu contents... 
Ready
SifGenerator: Body index out of bounds
Segmentation fault
I'll investigate further, including trying a newer version, and see what I come up with.

hazelsct
Posts: 153
Joined: 05 Oct 2009, 17:02
Location: Boston, MA, USA
Contact:

Re: Netgen Elmer export causes Elmer trouble

Post by hazelsct » 21 Jun 2010, 15:16

Side note: this .step file opens just fine in Elmer, and generates a nice mesh. The .sif file generation works fine, and I can run a working simulation.

Post Reply