Meaning of stress and strain vectors

About the development of the FEM module/workbench.

Moderator: bernd

fandaL
Posts: 440
Joined: Thu Jul 24, 2014 8:29 am

Re: Meaning of stress and strain vectors

Post by fandaL »

I see there 3 possibilities what to show a user in postprocessing:
1) Voigt notation
2) Mandel notation
3) just use numbers from output file of a solver

1) and 2) means that we should get same results from all solvers implemented in FC but potentially different results from its native postprocessor (e.g. if we transform native Mandel notation into FreeCAD Voigt notation)

3) means that FC do not transform results, so user will get the same results as in native postprocessor of given solver but different between 2 solvers used in FC if they use different notation.

I personally see 3rd variant the least confusing – same solver, same results in all postprocessors; but if I try different solvers I would expect that results can differ for whatever reason.
sodelo
Posts: 73
Joined: Tue Jan 24, 2017 9:20 am

Re: Meaning of stress and strain vectors

Post by sodelo »

This is a good question and I am not sure what I prefer.
For example, within ABAQUS there 2 different solvers:
- standard for classical FE (static analyses, modal analyses, thermal),
- explicit for impact and forming.
Some problems can be treated with one solver or the other.

Probably for historical reasons they do not follow the same conventions internally (not the same definition of shear and not the same order!). However things are corrected in the post-processor so that everything looks consistent to the user.

In our case, even if we read for the numbers out of the resullt file, we should at least know in which order the shear stress and strains are placed and resort them for display.
hdbondt
Posts: 27
Joined: Fri Jul 07, 2017 12:05 pm

Re: Meaning of stress and strain vectors

Post by hdbondt »

I would be interested in retrieving the full strain and stress tensor. Is this possible from the python API?
If not, could someone point me to how I could read those from the result file?
User avatar
bernd
Veteran
Posts: 12849
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland
Contact:

Re: Meaning of stress and strain vectors

Post by bernd »

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

Re: Meaning of stress and strain vectors

Post by bernd »

hdbondt wrote: Tue Oct 17, 2017 1:57 pm I would be interested in retrieving the full strain and stress tensor. Is this possible from the python API?
If not, could someone point me to how I could read those from the result file?
- start FreeCAD
- load Fem 3D example
- run code

Code: Select all

res = App.ActiveDocument.CalculiX_static_results
res.PropertiesList  # this is all what you can access from Python

# example
res.StressVectors
the output for CalculiX is generated here, if you need more results in frd or dat file you change it here https://github.com/FreeCAD/FreeCAD/blob ... 1022-L1050 You can test this by manually editing the CalculiX input file before solving.

the reading is done in these modules:
https://github.com/FreeCAD/FreeCAD/blob ... Results.py
and
https://github.com/FreeCAD/FreeCAD/blob ... Results.py

you do not need to make an analysis to test these modules. Just open an frd result file with FreeCAD and a result mesh with results will be created.

happy coding :-)
fandaL
Posts: 440
Joined: Thu Jul 24, 2014 8:29 am

Re: Meaning of stress and strain vectors

Post by fandaL »

Reading stresses and strains are done here
https://github.com/FreeCAD/FreeCAD/blob ... #L378-L402
Seems that mode_stress already contains stress tensor data. Shear strains are commented.

In the frd file it looks like this (for strains scroll down more):
https://github.com/FreeCAD/FreeCAD/blob ... #L842-L854

Stresses and strains (currently used by FreeCAD or cgx) from .frd file are nodal, averaged from adjacent elements. Whereas stresses and strains in .dat file are from integration points (inside element). FreeCAD asks ccx to write them to output file, but they are not loaded.
Post Reply