Stress Result in Shells

About the development of the FEM module/workbench.

Moderator: bernd

User avatar
bernd
Veteran
Posts: 12849
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland
Contact:

Re: Stress Result in Shells

Post by bernd »

We would need such a node numbering sheme from FreeCAD (med) to vtk like we did for CalculiX FEM_Mesh_CalculiX
User avatar
bernd
Veteran
Posts: 12849
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland
Contact:

Re: Stress Result in Shells

Post by bernd »

yep, some volumes are not yet supported at all (penta15) and some do not work (penta6, hexa8 and hexa20) . Since we are before the release I deactivated them ATM. Thus FreeCAD should not crash anymore. It will need some further development.

https://github.com/FreeCAD/FreeCAD/pull/1362
User avatar
bernd
Veteran
Posts: 12849
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland
Contact:

Re: Stress Result in Shells

Post by bernd »

bernd wrote: Tue Mar 13, 2018 2:21 pm We would need such a node numbering sheme from FreeCAD (med) to vtk like we did for CalculiX FEM_Mesh_CalculiX
@HarryvL:
We need the node assignments for VTK. Best would be some table how to convert from FreeCAD to vtk. Something like this FEM_Mesh_CalculiX Do you know any resource for this.
UR_
Veteran
Posts: 1354
Joined: Tue Jan 03, 2017 8:42 pm

Re: Stress Result in Shells

Post by UR_ »

Shell elements expanded to C3D15 are shown correctly in paraview.

Translation .frd->.vtk done with: https://forum.freecadweb.org/viewtopic. ... &hilit=vtk

Please see source available in this thread (file: "Eksporty.cs")

Code: Select all

.
.
.
	// determine main nodes total number
	// elements ccx no.5 (15 node wedge) as they are not supported in VTK
	// has to be exported as type ccx type 2 (VTK typ 13)
	// additional nodes has to be ommited
	int nn = 0;
	foreach (KeyValuePair<int, tNode> KVP in NodeTab)
		if (KVP.Value.IsFirst)
			nn++;
	// total number of elements
.
.
.
User avatar
bernd
Veteran
Posts: 12849
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland
Contact:

Re: Stress Result in Shells

Post by bernd »

does it mean penta15 in frd = penta15 in vtk ?

BTW: I assume conversion from tetra10 in FreeCAD to vtk is wrong, thus we gone get all the black models. see hint of werner https://forum.freecadweb.org/viewtopic. ... 30#p125688
UR_
Veteran
Posts: 1354
Joined: Tue Jan 03, 2017 8:42 pm

Re: Stress Result in Shells

Post by UR_ »

bernd wrote: Wed Mar 14, 2018 12:36 am does it mean penta15 in frd = penta15 in vtk ?
I think not.

mamah uses vtk file version 2.0, and there is no 2nd order wedge available, so he uses a 1st order wedge and drops additional nodes
frd elem no 5 -> vtk cell type 13

Meanwhile we are using vtk file version 4.0. I think now there is a 2nd order wedge.

Please see here:
https://www.vtk.org/doc/nightly/html/vt ... ource.html

Code: Select all

typedef enum {
   // Linear cells
   VTK_EMPTY_CELL       = 0,
   VTK_VERTEX           = 1,
   VTK_POLY_VERTEX      = 2,
   VTK_LINE             = 3,
   VTK_POLY_LINE        = 4,
   VTK_TRIANGLE         = 5,
   VTK_TRIANGLE_STRIP   = 6,
   VTK_POLYGON          = 7,
   VTK_PIXEL            = 8,
   VTK_QUAD             = 9,
   VTK_TETRA            = 10,
   VTK_VOXEL            = 11,
   VTK_HEXAHEDRON       = 12,
   VTK_WEDGE            = 13,
   VTK_PYRAMID          = 14,
   VTK_PENTAGONAL_PRISM = 15,
   VTK_HEXAGONAL_PRISM  = 16,
 
   // Quadratic, isoparametric cells
   VTK_QUADRATIC_EDGE                   = 21,
   VTK_QUADRATIC_TRIANGLE               = 22,
   VTK_QUADRATIC_QUAD                   = 23,
   VTK_QUADRATIC_POLYGON                = 36,
   VTK_QUADRATIC_TETRA                  = 24,
   VTK_QUADRATIC_HEXAHEDRON             = 25,
   VTK_QUADRATIC_WEDGE                  = 26,
   VTK_QUADRATIC_PYRAMID                = 27,
   VTK_BIQUADRATIC_QUAD                 = 28,
   VTK_TRIQUADRATIC_HEXAHEDRON          = 29,
   VTK_QUADRATIC_LINEAR_QUAD            = 30,
   VTK_QUADRATIC_LINEAR_WEDGE           = 31,
   VTK_BIQUADRATIC_QUADRATIC_WEDGE      = 32,
   VTK_BIQUADRATIC_QUADRATIC_HEXAHEDRON = 33,
   VTK_BIQUADRATIC_TRIANGLE             = 34,
User avatar
bernd
Veteran
Posts: 12849
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland
Contact:

Re: Stress Result in Shells

Post by bernd »

ahh ... found this https://www.vtk.org/data-model/ and https://www.vtk.org/wp-content/uploads/ ... ormats.pdf page 9 and 10, so no quadratic wedge ...
User avatar
HarryvL
Veteran
Posts: 1284
Joined: Sat Jan 06, 2018 7:38 pm
Location: Netherlands

Re: Stress Result in Shells

Post by HarryvL »

@Bernd, that's where I got my picture for a "VTK WEDGE (=13)" from.
@UR_, yes that's what I proposed - only export the first 6 of the 15 nodes.
User avatar
HarryvL
Veteran
Posts: 1284
Joined: Sat Jan 06, 2018 7:38 pm
Location: Netherlands

Re: Stress Result in Shells

Post by HarryvL »

@ UR_: VTK_BIQUADRATIC_QUADRATIC_WEDGE = 32, indeed seems to indicate the required VTK cell for a 15-noded wedge is implemented, but in Schroeder's book for version 4.0 there is only mention of 14 linear cell types. Perhaps the quadratic cells are still under development?
fandaL
Posts: 440
Joined: Thu Jul 24, 2014 8:29 am

Re: Stress Result in Shells

Post by fandaL »

bernd wrote: Wed Mar 14, 2018 1:43 am ahh ... found this https://www.vtk.org/data-model/ and https://www.vtk.org/wp-content/uploads/ ... ormats.pdf page 9 and 10, so no quadratic wedge ...
Check actual vtk user's guide https://www.vtk.org/vtk-users-guide/ directly https://www.kitware.com/products/books/ ... sGuide.pdf around page 481 (legacy formatting starts few pages above). There is quadratic wedge, but when I was implementing this to my optimizer I skipped quadratic wedge, probably I had an old manual. That time I didn't care about node ordering - in the same order I read nodes from inp file I print them to vtk file.

I checked it quickly by comparison of https://www.freecadweb.org/wiki/FEM_Mesh_CalculiX and VTK users guid mentioned above. VTK node order is same as in CalculiX but VTK is 0 based, which makes practically no difference.
EDIT: only 1D quadratic element is an exception.
Post Reply