Export Calculix results

About the development of the FEM module/workbench.

Moderator: bernd

Brzo
Posts: 8
Joined: Thu Jul 23, 2020 9:49 am

Export Calculix results

Post by Brzo »

Hello everyone. This is my first post here. I have a problem with exporting results after FEA calculation. I would like to export nodes cooridnates after FEA. Is it possible ? When I use export function I got .dat files but nodes locations are look the same. My goal is to get nodes coordinations before FEA and node cooridnations after FEA. Thank you.
User avatar
bernd
Veteran
Posts: 12849
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland
Contact:

Re: Export Calculix results

Post by bernd »

open the cantilever 3D from Start WB

Code: Select all

doc = App.ActiveDocument
resnodes_notdeformed = list(doc.ResultMesh.FemMesh.Nodes.values())
displacements = doc.CCX_Results.DisplacementVectors
sum = [a + b for a, b in zip(resnodes_notdeformed, displacements)]
Brzo
Posts: 8
Joined: Thu Jul 23, 2020 9:49 am

Re: Export Calculix results

Post by Brzo »

Thank you for your response. I opened this cantilever 3d example and I tried to used your code, but I obtained an error : App.Document object has no attribute 'ResultMesh'. Do you know where the problem is ?
User avatar
bernd
Veteran
Posts: 12849
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland
Contact:

Re: Export Calculix results

Post by bernd »

delete results and rerun analysis.
Brzo
Posts: 8
Joined: Thu Jul 23, 2020 9:49 am

Re: Export Calculix results

Post by Brzo »

Ok, I found where the problem is. In my version I have diffrent names.
When I use code like this :

Code: Select all

doc = App.ActiveDocument
FreeCAD.Console.PrintMessage(doc)
resnodes_notdeformed = list(doc.Result_mesh.FemMesh.Nodes.values())
displacements = doc.CalculiX_static_results.DisplacementVectors
sum = [a + b for a, b in zip(resnodes_notdeformed, displacements)]

App.Console.PrintMessage("\n Before deformation \n")

App.Console.PrintMessage(resnodes_notdeformed)

App.Console.PrintMessage("\n After deformation \n")

App.Console.PrintMessage(sum)

App.Console.PrintMessage("\n Displacement \n")

App.Console.PrintMessage(displacements)
I could export nodes but I have another problem:

This is my simple model.
https://ibb.co/M5v50TQ
I would like to get nodes position after deformation, like on this image
https://ibb.co/C79jLKR
but the displacement values are close to zero and they not change when i choose different step. Could you tell how I can solve this problem ?
User avatar
bernd
Veteran
Posts: 12849
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland
Contact:

Re: Export Calculix results

Post by bernd »

you should use FreeCAD 0.19 for FEM to run the code I posted. Which version did you use? See https://forum.freecadweb.org/viewtopic.php?f=18&t=12212
Brzo
Posts: 8
Joined: Thu Jul 23, 2020 9:49 am

Re: Export Calculix results

Post by Brzo »

Ok, I have FreeCAD 0.18. Where I can find 0.19 ? On the FreeCAD website i see that current stable version is 0.18.4
david69
Veteran
Posts: 1773
Joined: Wed Jan 01, 2014 7:48 pm

Re: Export Calculix results

Post by david69 »

on this page, you have information about development versions

https://www.freecadweb.org/downloads.php
User avatar
bernd
Veteran
Posts: 12849
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland
Contact:

Re: Export Calculix results

Post by bernd »

david69 wrote: Wed Aug 05, 2020 8:35 am on this page, you have information about development versions

https://www.freecadweb.org/downloads.php
no, this will download 0.18.4 ... find 0.19 here https://github.com/FreeCAD/FreeCAD/rele ... g/0.19_pre I would use ... x64_LP_12.1.6_PY3QT5-WinVS2015.7z if you are on windows.
david69
Veteran
Posts: 1773
Joined: Wed Jan 01, 2014 7:48 pm

Re: Export Calculix results

Post by david69 »

i've put the homepage because i think anybody who wants to install freecad has more chances to land on on this page.

first mid of the page is dedicated to stable version and half second part we read: development versions. then we have a button "FREECAD release page" and if we click on it, we get https://github.com/FreeCAD/FreeCAD/rele ... g/0.19_pre

the wiki page is also giving details that we don't find on the above page, for ex if we are in debian, the possibility to add repository (which is IMO interesting too)
https://wiki.freecadweb.org/Getting_started#Installing
Post Reply