Additional results plot

About the development of the FEM module/workbench.

Moderator: bernd

User avatar
makkemal
Posts: 395
Joined: Wed Apr 29, 2015 12:41 pm
Location: South Africa
Contact:

Additional results plot

Postby makkemal » Wed Feb 17, 2016 4:22 pm

I have added some additional result plots, Principal stresses etc
Please test and deliver comments

Oswald uplooded it to git to help me :)
https://github.com/ovginkel/FreeCAD/tre ... ltstresses
stress.PNG
stress.PNG (324.77 KiB) Viewed 1321 times
Thanks
Michael
User avatar
PrzemoF
Posts: 2660
Joined: Fri Jul 25, 2014 4:52 pm
Contact:

Re: Additional results plot

Postby PrzemoF » Wed Feb 17, 2016 5:19 pm

I didn't test the code yet, but I have some minor comments:

Code: Select all

+    ADD_PROPERTY_TYPE(PrinsMax,(0), "Fem",Prop_None,"List of First Pricipal stress values");
+    ADD_PROPERTY_TYPE(PrinsMed,(0), "Fem",Prop_None,"List of Second Pricipal stress values");
+    ADD_PROPERTY_TYPE(PrinsMin,(0), "Fem",Prop_None,"List of Third Pricipal stress values");
variables PrinsMa and prinstress1for First Pricipal stress - can we have a better, more consistent naming? Also full names are OK and it's easier to read the code. Same for the remaining Med/Min variables.

UserDef is a bad name for me. It can be anything and grepping code for it might be a nightmare. Please use UserDefinedFormula or something better along that line.

What's the status of numpy on windows/mac? Do we need something installed separately or it's included in python?

Von Mises calcs - should we switch to numpy or not? The code is commented out. Did you do any speed tests?

In importFrd we should use temporary variables, especially that "(sum(results.PrinsMax)/l)" is't obvious. Please don't use "l" as variable name - I was sure it's 1! "l" looks almost identical as "1" on github.

src/Mod/Fem/_TaskPanelResultControl.py line 52: "#extra functions" - it doesn't mean anything, please remove. When included in the master, thay are not "extra" anymore.

I'm really glad to see so many people working on the FEM wb! :D Thank you!
User avatar
sgrogan
Posts: 5528
Joined: Wed Oct 22, 2014 5:02 pm

Re: Additional results plot

Postby sgrogan » Wed Feb 17, 2016 5:48 pm

PrzemoF wrote:What's the status of numpy on windows/mac? Do we need something installed separately or it's included in python?
On Windows numpy is in the Libpack and included in the release and snapshot bundles. On Mac I suppose the user would have to add it to their python installation. As far I know it's not of a dependency of FreeCAD (It is for some of the add-on WB's) so it would need to be added as a dependency in the Ubuntu PPA control file.
PrzemoF wrote: I'm really glad to see so many people working on the FEM wb! :D Thank you!
+1
User avatar
bernd
Posts: 8724
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland

Re: Additional results plot

Postby bernd » Thu Feb 18, 2016 6:34 am

compiles and runs on Debian Jessie. What are principal stresses ? +1 for Przemos hints.

I'm missing the user defined results in the task widget. Are they included in the branch you posted, means should I have them in task view as well?

attached my screen:
screen.jpg
screen.jpg (157.01 KiB) Viewed 1254 times
User avatar
makkemal
Posts: 395
Joined: Wed Apr 29, 2015 12:41 pm
Location: South Africa
Contact:

Re: Additional results plot

Postby makkemal » Thu Feb 18, 2016 2:49 pm

https://github.com/ovginkel/FreeCAD/tre ... ltstresses
Updated with Prezmo comments on variables and comments
PrzemoF wrote:
What's the status of numpy on windows/mac? Do we need something installed separately or it's included in python?
If we are heading toward a CAE workbecnh I think numpy scipy, matplotlib is a must.
Von Mises calcs - should we switch to numpy or not? The code is commented out. Did you do any speed tests?
I did no see any speed improvements maybe if we can handle bigger problems once the inputwriter is updated
I removed this for now

Bernd please recheck I did a few small fixes to UI
User avatar
PrzemoF
Posts: 2660
Joined: Fri Jul 25, 2014 4:52 pm
Contact:

Re: Additional results plot

Postby PrzemoF » Thu Feb 18, 2016 2:58 pm

makkemal wrote:If we are heading toward a CAE workbecnh I think numpy scipy, matplotlib is a must.I
I'm more than OK with it - we just have make sure that it works out-of-the box on linux/mac/win. Any opinions from the core devs about including numpy, scipy and matplotlib in the FreeCAD requirements?
User avatar
bernd
Posts: 8724
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland

Re: Additional results plot

Postby bernd » Thu Feb 18, 2016 5:12 pm

makkemal wrote:Bernd please recheck I did a few small fixes to UI
OK, I see this user defined plot text box now :) , but what does it do? What I'm intended to put in there. Could you give an example?
User avatar
makkemal
Posts: 395
Joined: Wed Apr 29, 2015 12:41 pm
Location: South Africa
Contact:

Re: Additional results plot

Postby makkemal » Thu Feb 18, 2016 5:27 pm

Bernd wrote; OK, I see this user defined plot text box now :) , but what does it do? What I'm intended to put in there. Could you give an example?
Lets say I want to know what my safety factor on my design is. I can divide the maximum Principal stress by the yield of the material.
P1/ Yield
Loads of failure criteria exist in term of principal stresses
https://en.wikipedia.org/wiki/Material_failure_theory
Personally I use maximum deformation energy frequently. But no-one else cares about it.
Putting all these feature in a button is a waste of time, support the basics and let the user do something out of the ordinary himself
This is a feature that wil draw a number of advanced users !
User avatar
PrzemoF
Posts: 2660
Joined: Fri Jul 25, 2014 4:52 pm
Contact:

Re: Additional results plot

Postby PrzemoF » Thu Feb 18, 2016 5:32 pm

The list of options is getting long, which is good, but we might think about some way of controlling what is shown in the UI using FEM preferences. A multi select list maybe?
User avatar
makkemal
Posts: 395
Joined: Wed Apr 29, 2015 12:41 pm
Location: South Africa
Contact:

Re: Additional results plot

Postby makkemal » Thu Feb 18, 2016 5:49 pm

The list of options is getting long, which is good, but we might think about some way of controlling what is shown in the UI using FEM preferences. A multi select list maybe?
We expect to complete coupled temperature displacement analysis implementation next week. This will add temperature as a result.
So yes having a plan for results may be good