FEM Reporting

About the development of the FEM module/workbench.

Moderator: bernd

Post Reply
User avatar
sgrogan
Veteran
Posts: 6503
Joined: Wed Oct 22, 2014 5:02 pm

FEM Reporting

Post by sgrogan »

Based on this workviewtopic.php?f=10&t=12762
I've begun looking at a spreadsheet template that would serve as a FEM "Report"
In the property view there is "Displacement Lengths". Is this the magnitude and is there an underlying direction vector that is not accessible?
This is a python list, so element1 is array[0]?
This is not a feature request, I'm just experimenting with what is/might be accessible and seeing how to exploit it.
"fight the good fight"
Jee-Bee
Veteran
Posts: 2569
Joined: Tue Jun 16, 2015 10:32 am
Location: Netherlands

Re: FEM Reporting

Post by Jee-Bee »

sgrogan wrote:This is a python list, so element1 is array[0]?
According to python tutorial yes
User avatar
PrzemoF
Veteran
Posts: 3515
Joined: Fri Jul 25, 2014 4:52 pm
Contact:

Re: FEM Reporting

Post by PrzemoF »

You have to have a valid active analysis (I'm skipping checks) and then:

Code: Select all

>>> import FemTools
>>> a= FemTools.FemTools()
>>> a.run()
>>> a.load_results()
>>> a.result_object.DisplacementVectors
[Vector (0.0, 0.0, 0.0), Vector (0.0, 0.0, 0.0), Vector (0.0,......... [..]
>>> a.result_object.PropertiesList
['DisplacementLengths', 'DisplacementVectors', 'ElementNumbers', 'ExpressionEngine', 'Label', 'Mesh', 'Stats', 'StressValues'] 
I think there is no code that can display a list of vectors in the properties list that's why it's not shown, but I could be wrong here.

You might want to use Stats for a FEM report:

Code: Select all

            results.Stats = [x_min, x_avg, x_max,
                             y_min, y_avg, y_max,
                             z_min, z_avg, z_max,
                             a_min, a_avg, a_max,
                             s_min, s_avg, s_max]
a is absolute displacement, s Von Mises stress. All "averages" are arithmetic means.

P.S. Everything should be accessible from python down to calculated values for a given node. If you have a problem accessing something let me know or check ccxFrdReader.py
User avatar
sgrogan
Veteran
Posts: 6503
Joined: Wed Oct 22, 2014 5:02 pm

Re: FEM Reporting

Post by sgrogan »

Stats I get, already useful.
The property stuff isn't even in master yet. It's just the power of FreeCAD that I'm exploring.
PrzemoF wrote:If you have a problem accessing something let me know or check ccxFrdReader.py
Thanks for this. If I get that far I will.
PrzemoF wrote: a is absolute displacement, s Von Mises stress. All "averages" are arithmetic means.
Thanks again, +1, that answers my immediate question.
"fight the good fight"
Post Reply