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 »

related issue #2873 in case of the reason of the renumbering.
UR_
Veteran
Posts: 1354
Joined: Tue Jan 03, 2017 8:42 pm

Re: Stress Result in Shells

Post by UR_ »

I think, vtk isn't the problem at 1st place.
Please run ccx and generate a new Calculix_static_results object.
Have a look at plot of max principal stresses. They are looking good.
But after saving and reloading, same plot looks weird. :shock:

EDIT: exporting "weird" looking result object to vtk, looks good in paraview ;)


Maybe heap corruption is done while producing result object.
With saving and reloading bad allocs are cleaned out.
Unfortunately vtk runs into this mess if done otherwise.
User avatar
HarryvL
Veteran
Posts: 1283
Joined: Sat Jan 06, 2018 7:38 pm
Location: Netherlands

Re: Stress Result in Shells

Post by HarryvL »

bernd wrote: Sun Mar 25, 2018 8:28 pm it chrashes here too.

BUT there is a workaround. Export the result to vtk file and import the vtk file as vtk pipline (or use the exported vtk file in paraview) will work :D

Neverless I will have a look at the crash.

bernd
If I re-run my original file (posted earlier) and try to export the Result as VTK then FC crashes. No different from trying to create a VTK Pipeline
User avatar
HarryvL
Veteran
Posts: 1283
Joined: Sat Jan 06, 2018 7:38 pm
Location: Netherlands

Re: Stress Result in Shells

Post by HarryvL »

bernd wrote: Sun Mar 25, 2018 8:37 pm would you guys do my a favor an try this ...

- load file https://forum.freecadweb.org/download/file.php?id=55290
- recalculate the analysis
- save the file
- close the file
- reopen the file
- create a vtk pipeline from the result object
- it works :o :shock: at least it does for me :mrgreen:
This indeed doesn't crash, but the results are wrong:

Test56_Bernd_PS_Max.png
Test56_Bernd_PS_Max.png (439.59 KiB) Viewed 1027 times

Then closing and opening the CalculiX_static_results object again, FreeCAD started to misbehave. :twisted: Part of the model was gone and zooming out to fit on screen did not work (froze for a while and came back with an empty screen). Could there be something wrong with an array index - trying to access beyond array bounds?
User avatar
HarryvL
Veteran
Posts: 1283
Joined: Sat Jan 06, 2018 7:38 pm
Location: Netherlands

Re: Stress Result in Shells

Post by HarryvL »

Here an example of mis-behaviour:

Test56_Bernd_Misbehaving.png
Test56_Bernd_Misbehaving.png (208.8 KiB) Viewed 1024 times
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 »

the resultmesh is renumbered at save and reload, but the node numbers attribute in result object has still the old not renumbered numbers ...
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 »

Poisson ratio fix is in master. git commit 8717edb98
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 »

To export to vtk or to create a vtk pipeline the mesh nodes should not have gaps. Attached simple mesh will crash freecad:

Code: Select all

import Fem
path = '/home/hugo/Desktop/'

nodes = Fem.FemMesh()
nodes.addNode( 0,  0, 0, 1)
nodes.addNode( 6, 12, 0, 3)
nodes.write(path + 'nodes.vtk')


https://github.com/FreeCAD/FreeCAD/blob ... #L446-L455



OS: Debian GNU/Linux 9.4 (stretch)
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.17.13470 (Git)
Build type: Debug
Branch: master
Hash: 656a669cb0dc3d2d3becf20a5330531233b56834
Python version: 2.7.13
Qt version: 4.8.7
Coin version: 4.0.0a
OCC version: 7.0.0
Locale: German/Switzerland (de_CH)
wmayer
Founder
Posts: 20241
Joined: Thu Feb 19, 2009 10:32 am
Contact:

Re: Stress Result in Shells

Post by wmayer »

I can confirm the crash but I have no idea why. It happens inside exportFemMeshFaces where it tries to destroy the grid. However, the ref counter is set to three at this point and it shouldn't try to delete it.
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 »

wmayer wrote: Sun Apr 01, 2018 4:03 pm I can confirm the crash but I have no idea why. It happens inside exportFemMeshFaces where it tries to destroy the grid. However, the ref counter is set to three at this point and it shouldn't try to delete it.
It somehow seams to crash here: https://github.com/FreeCAD/FreeCAD/blob ... s.cpp#L453 If all other following code in exportVTKMesh() is commented ( this one: https://github.com/FreeCAD/FreeCAD/blob ... #L455-L461 ) FreeCAD still crashes ...

https://github.com/berndhahnebach/FreeC ... fb6934c967
Post Reply