missing stress values Sxy, Syz, Szy

About the development of the FEM module/workbench.

Moderator: bernd

User avatar
bernd
Posts: 8238
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland

missing stress values Sxy, Syz, Szy

Postby bernd » Mon Jan 28, 2019 1:56 pm

according issue #2918 3 stress values are missing. But we gone read them, we just do not expose them to the result obj. https://github.com/FreeCAD/FreeCAD/blob ... em.py#L260 and https://github.com/FreeCAD/FreeCAD/blob ... #L436-L437

The question is what is best used to save them in the FreeCAD result object. Here are all available properties https://www.freecadweb.org/wiki/index.p ... properties

How about the stress vectors (Sxx, Syy, Szz). It does not make sense to save them twice.

bernd
User avatar
HarryvL
Posts: 1042
Joined: Sat Jan 06, 2018 7:38 pm

Re: missing stress values Sxy, Syz, Szy

Postby HarryvL » Mon Jan 28, 2019 5:32 pm

Bernd, storing/displaying sxx, syy, szz without sxy, szx, szy makes little sense. I would say it is either none or all.
EkaitzEsteban
Posts: 98
Joined: Wed Sep 12, 2018 1:31 pm

Re: missing stress values Sxy, Syz, Szy

Postby EkaitzEsteban » Mon Jan 28, 2019 5:55 pm

Hello!

Be careful with the shear stresses. Sxy, Syz, Szy...

Calculix .frd file contains stress components per node.
Calculix .dat file contains stress components per element.

But the order of them is different (different indexes...) !

This is discussed here...

https://forum.freecadweb.org/viewtopic. ... 10#p240408

https://forum.freecadweb.org/viewtopic. ... 30#p275562

Just as Harry says, Store all of them or none of them...
User avatar
bernd
Posts: 8238
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland

Re: missing stress values Sxy, Syz, Szy

Postby bernd » Tue Jan 29, 2019 11:22 pm

HarryvL wrote:
Mon Jan 28, 2019 5:32 pm
Bernd, storing/displaying sxx, syy, szz without sxy, szx, szy makes little sense. I would say it is either none or all.
this seams not easy there is not real aray or matrix property in FreeCAD ATM. See https://forum.freecadweb.org/viewtopic.php?f=10&t=33806
User avatar
HarryvL
Posts: 1042
Joined: Sat Jan 06, 2018 7:38 pm

Re: missing stress values Sxy, Syz, Szy

Postby HarryvL » Wed Jan 30, 2019 4:38 am

Bernd, I see sxx, syy and szz are stored in a FreeCAD.Vecor:

https://github.com/FreeCAD/FreeCAD/blob ... #L427-L437

but I see no engineering-physical or code reason to do so. What use is the vecor (sxx, syy, szz)? I would therefore say that we simply store sxx, syy, szz as a list and append sxy, sxz and syz? In fact this list already exists as mode_stress[elem] in importCcxFrdResults.py (see above). What benefit would we get from storing the full stress tensor as a matrix?

Anyway, if the result object cannot handle a list of lists, then you can always store the 6 lists separately.
User avatar
bernd
Posts: 8238
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland

Re: missing stress values Sxy, Syz, Szy

Postby bernd » Wed Jan 30, 2019 6:30 am

thanks for your input

HarryvL wrote:
Wed Jan 30, 2019 4:38 am
but I see no engineering-physical or code reason to do so. What use is the vecor (sxx, syy, szz)?
+1 here except the vector is used at lots of other parts in FreeCAD code. All these needs to be changed.

HarryvL wrote:
Wed Jan 30, 2019 4:38 am
In fact this list already exists as mode_stress[elem] in importCcxFrdResults.py (see above).
I know, it is what is used to calculate von Mises and principal stress etc. I have some code where I store Sxy, Syz, Szy in a second FreeCAD.Vector, but I am not happy with this at all.

HarryvL wrote:
Wed Jan 30, 2019 4:38 am
What benefit would we get from storing the full stress tensor as a matrix?
good question ... One would be a small tree view for each stress in the property editor like.

HarryvL wrote:
Wed Jan 30, 2019 4:38 am
Anyway, if the result object cannot handle a list of lists, then you can always store the 6 lists separately.
might be the best to go for this, because it is easy to code. More than ever if we have in mind to extend the vkt result object and more and more use this on. There we do not have this problem. The vtk result supports scalar lists and list of lists.


How about EXY, EYZ and EZX ? We should save them too ?!?

In frd file there is furthermore some error. Does someone know what this is?

Code: Select all

    1PSTEP                         4           1           1          
  100CL  101 1.000000000         228                     0    1           1
 -4  ERROR       1    1
 -5  STR(%)      1    1    0    0
 -1         1 1.62174E+01
User avatar
HarryvL
Posts: 1042
Joined: Sat Jan 06, 2018 7:38 pm

Re: missing stress values Sxy, Syz, Szy

Postby HarryvL » Wed Jan 30, 2019 7:39 am

Exact same story for strains. But even less application for this.
User avatar
bernd
Posts: 8238
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland

Re: missing stress values Sxy, Syz, Szy

Postby bernd » Wed Jan 30, 2019 8:21 am

OK ...

BTW: a App::PropertyMap does not work either because it only supports stings as keys and values.
User avatar
HarryvL
Posts: 1042
Joined: Sat Jan 06, 2018 7:38 pm

Re: missing stress values Sxy, Syz, Szy

Postby HarryvL » Wed Jan 30, 2019 9:55 am

As discussed here: https://forum.freecadweb.org/viewtopic. ... 20#p282583 and here: https://forum.freecadweb.org/viewtopic. ... 14#p283044, the freeCAD data structure is not ideal (and perhaps/because not intended) for handling FEM information. Rather than force-fitting and ending up with work-arounds of the type:

Code: Select all

E = float(App.Units.Quantity(object['Object'].Material['YoungsModulus']).getValueAs('MPa'))
to extract a simple float for use in a calculation, I would say it might be worth setting up some parallel, traditional data structures (as discussed in the first link). It may consume some storage space and upset OOP purists, but would make coding for FEM workbench a lot more intuitive, efficient and enjoyable.
Jee-Bee
Posts: 1942
Joined: Tue Jun 16, 2015 10:32 am
Location: Netherlands

Re: missing stress values Sxy, Syz, Szy

Postby Jee-Bee » Wed Jan 30, 2019 1:43 pm

would numpy help?