Choose a more precise object name: vonMises instead of StressValues
Moderator: bernd
Forum rules
and Helpful information for the FEM forum
and Helpful information for the FEM forum
Choose a more precise object name: vonMises instead of StressValues
Disturbed for a long time by diffuse object naming, like
instead of "von Mises equivalent stress".
There are many stress definitions out there, e.g. von Mises, Tresca, Coulomb, Saint-Venant, Guest, Rankine, Burzyński-Yagn, Huber, Mao-Hong Yu, Altenbach-Bolchoun-Kolupaev
(some of them from wikipedia, and unkown for myself )
But we should try (at least) to be more precise in naming.
Branch can be found here: https://github.com/UR-0/FreeCAD/commit/ ... 66b165d015
But there is of a drawback. Oldstyle result objects have to be reloaded or recalculated.
What to you think about this?
instead of "von Mises equivalent stress".
There are many stress definitions out there, e.g. von Mises, Tresca, Coulomb, Saint-Venant, Guest, Rankine, Burzyński-Yagn, Huber, Mao-Hong Yu, Altenbach-Bolchoun-Kolupaev
(some of them from wikipedia, and unkown for myself )
But we should try (at least) to be more precise in naming.
Branch can be found here: https://github.com/UR-0/FreeCAD/commit/ ... 66b165d015
But there is of a drawback. Oldstyle result objects have to be reloaded or recalculated.
What to you think about this?
Re: Choose a more precise object name: vonMises instead of StressValues
git commit 8b68ab7 hopefully no regression somewhere. I had not have the time to test befor merge ... Nevermind we will fix any regression.
The result objects of the start wb examples needs to be updated ... !
The result objects of the start wb examples needs to be updated ... !
Re: Choose a more precise object name: vonMises instead of StressValues
Ahh forgot to say it's a valuable change !
Re: Choose a more precise object name: vonMises instead of StressValues
I'm not opposed to the change, but doesn't this break the Results object? You cannot just rename a property like that because you won't be able to load the "StressValues" property from older files. Is that not a problem?
To avoid breaking older files, I think we should migrate the property through some code inside onDocumentRestored. This is mentioned in this thread, Migrating and upgrading old scripted objects.
Always add the important information to your posts if you need help. Also see Tutorials and Video tutorials.
To support the documentation effort, and code development, your donation is appreciated: liberapay.com/FreeCAD.
To support the documentation effort, and code development, your donation is appreciated: liberapay.com/FreeCAD.
Re: Choose a more precise object name: vonMises instead of StressValues
Yes, old result objects get broken.
bernd wrote:
To patch old result object we need to add to femobjects\_FemResultMechanical.py line 304:
Code: Select all
def onDocumentRestored(self, obj):
if hasattr(obj, "StressValues") == True:
obj.addProperty(
"App::PropertyFloatList",
"vonMises",
"NodeData",
"",
True
)
obj.vonMises = obj.StressValues
obj.removeProperty("StressValues")
Should this really be done, or is this to much effort.
IIRC, result and other objects gets broken on regular bases in past
Re: Choose a more precise object name: vonMises instead of StressValues
I think in FEM it's not very critical to break the result object because if the problem is well defined, the user can just re-run the solver to obtain the results again. Still, it's just a small thing to consider.
In other workbenches it's possibly more important to maintain compatibility and be able to access and re-edit the older objects.
Always add the important information to your posts if you need help. Also see Tutorials and Video tutorials.
To support the documentation effort, and code development, your donation is appreciated: liberapay.com/FreeCAD.
To support the documentation effort, and code development, your donation is appreciated: liberapay.com/FreeCAD.
Re: Choose a more precise object name: vonMises instead of StressValues
git commit f192ac8 great. We should have started whith such migrate code much earlier.