FEM crash when trying to write calculix input file

About the development of the FEM module/workbench.

Moderator: bernd

wmayer
Founder
Posts: 20243
Joined: Thu Feb 19, 2009 10:32 am
Contact:

Re: FEM crash when trying to write calculix input file

Post by wmayer »

Today night I improved the abaqus import to get more or less the same output as this reference application.

Currently the volume types C3D4 and C3D10 are supported: https://github.com/FreeCAD/FreeCAD_sf_m ... 747ee4f35b
User avatar
bernd
Veteran
Posts: 12849
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland
Contact:

Re: FEM crash when trying to write calculix input file

Post by bernd »

Wow cool thanks for adding support for the C3D4 elements. Something is wrong with the node order. Don't askt me why. As Juergen stated in the code before "// neuer Versuch"

Attached the changes for C3D4 and C3D10 which gone work with current FreeCAD-CalculiX for me. The files provided in earlier posts run with this code.

branch:
https://github.com/berndhahnebach/FreeC ... riteabaqus

commit:
https://github.com/berndhahnebach/FreeC ... 84c5cd3e3d
wmayer
Founder
Posts: 20243
Joined: Thu Feb 19, 2009 10:32 am
Contact:

Re: FEM crash when trying to write calculix input file

Post by wmayer »

Wow cool thanks for adding support for the C3D4 elements. Something is wrong with the node order. Don't askt me why. As Juergen stated in the code before "// neuer Versuch"
When you visit the Salome forum from the given link you'll find the source for a program to convert from UNV to INP files. The source code includes everything it needs, i.e. no 3rd party library.

So, as reference I used the output of the created inp files. What actually happens when the order is different?

Further question:
From the source code there exists these types:
Volume: C3D4, C3D6, C3D8, C3D10, C3D15, C3D20

Faces: S3, S6, S4R, S8R

Edges: B31, B32

Do you have some examples of UNV files and their corresponding INP files with the above element types?
wmayer
Founder
Posts: 20243
Joined: Thu Feb 19, 2009 10:32 am
Contact:

Re: FEM crash when trying to write calculix input file

Post by wmayer »

Can you try the latest changes again?
User avatar
bernd
Veteran
Posts: 12849
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland
Contact:

Re: FEM crash when trying to write calculix input file

Post by bernd »

wmayer wrote:Can you try the latest changes again?
:D both C3D4 and C3D10

What did you do according node order? There are lots of changes inside writeAbaqus?
wmayer
Founder
Posts: 20243
Joined: Thu Feb 19, 2009 10:32 am
Contact:

Re: FEM crash when trying to write calculix input file

Post by wmayer »

What did you do according node order? There are lots of changes inside writeAbaqus?
I changed the code to easily add support for further volume/face/edge types.
User avatar
bernd
Veteran
Posts: 12849
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland
Contact:

Re: FEM crash when trying to write calculix input file

Post by bernd »

Wow, that looks great. We'll just a few steps away from supporting all these elements types :D
wmayer wrote:...
Volume: C3D4, C3D6, C3D8, C3D10, C3D15, C3D20

Faces: S3, S6, S4R, S8R

Edges: B31, B32
...
If I have a minute I'll try to create meshes and get the right node orders for writeAbaqus() for exporting !
wmayer
Founder
Posts: 20243
Joined: Thu Feb 19, 2009 10:32 am
Contact:

Re: FEM crash when trying to write calculix input file

Post by wmayer »

There are basically two information I need:
* the order of the element types
* Should be "ELSET" written out for faces/edges and if yes is its value also "Eall"

From the link you posted earlier there were mentioned elements like F3D4, ... which are called "fluid" elements. Do we have to support them, too?
User avatar
bernd
Veteran
Posts: 12849
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland
Contact:

Re: FEM crash when trying to write calculix input file

Post by bernd »

Played a bit with 8-node hexahedron (C3D8) and was able to export to CalculiX and make a calculation. Thanks to your comments in FemMesh.cpp it is easy to release new Elements !

I created the mesh py hand in python. But what I found was writeAbaqus() uses the node order provided be the mesh software (means in my case by my hand ...) Means the node order is something which relies on the mesh software?! Do they use all the same standard ? I'm gone try to test with netgen and gmsh.
User avatar
bernd
Veteran
Posts: 12849
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland
Contact:

Re: FEM crash when trying to write calculix input file

Post by bernd »

Made some tests with gsmh. A Problem raised. Find attached a file which includes C3D4, C3D10 (both work fine allready), S3, S6, B31 and B32 FemMeshes. I attached the unv-files as well. The 1D and 2D meshs have no ViewProvider. All meshes could be used to make a MechanicalAnalysis. Since we have Support for Edge- and Vertexloads and -fixes a MechanicalAalysis could be created and the Calculix file be written. The Calculix file needs to be edited to run smoothly (which works great using brand new syntax highligter in FreeCAD.

Code: Select all

*BOUNDARY 
...
and
*SOLID SECTION, Elset=Eall, Material=CalculiX
needs adaptions. The result file gets read and the min-, max, values are displayed. So everything looks great. We just need to define all the 1D and 2D stuff in MechanicalAnalysis later on.

Long speach short what's the problem:
see commit https://github.com/berndhahnebach/FreeC ... aed9166d18
If a C3D4 or C3D10 is written by writeAbaqus() all S3, S6 and B31 and B32 elements are written as well but they do not need to be written. Same for S3 an S6. If they are written by writeAbaqus() B31 and B32 elements are written as well. This seams due to a C3D4 volume element consits of faces and edges in the mesh but they should not be written as elements. Only the hightest "shape degree" shoud be written as element type by writeAbaqus().
My C++ is to smal to fix this.
Attachments
Cube-Plane-Line--FEM-Mesh.zip
(298.05 KiB) Downloaded 78 times
Post Reply