FEM Pipeline units on last dev versions

About the development of the FEM module/workbench.

Moderator: bernd

mac_the_bike
Posts: 42
Joined: Sun Jun 30, 2019 12:56 pm

Re: FEM Pipeline units on last dev versions

Post by mac_the_bike »

I have just found this post:
Concerning the change to the SI system, I thought I made clear why. We need a way to display any kind of results. The problem was eminent when support for electrostatics was added. ...
(I have no experience of electrostatic analysis - so I don't know what this problem is.)

I have expressed my opinion about scaling of units in:
https://forum.freecad.org/viewtopic.php?f=18&t=69423

The results should be presented in the "Unit System" chosen.
So if you have chosen "Standard", the output should be in terms of mm/kg/s/degree.
(At this point I have to say that you should not use the word degree - you should use the actual degree unit, e.g. Kelvin or Celsius.)
The "Unit System" data then specifies the units of the results
If your displacements are very small, say, the "Calculate and Plot" function can be used to scale the values; the scale is then in your control.

"SI is THE standard almost everyone uses/understands" - try telling the Americans.
When I was doing FEA, my models were in mms.

The volt has units:
volt = kg .m^2 /(A . sec^3)
A - ampere - is a base unit (not derived.)

As a matter of interest, if you were performing an electrostatic analysis would the model be defined in metres?

You need to add the ampere to the lists in "Unit System" panel and make all the other systems consistent. Including Building Euro's units.

USER DEFINED UNIT SYSTEM:
Perhaps there needs to be an entry in "Unit System" for user defined. The only requirement is that the system be consistent.

The FEA uses the values that it is supplied, e.g. it doesn't know the units of length.
If the units are consistent, then any forces on the model will generate stresses in the consistent unit.

PROBLEMS WITH THE DISPLAY OF THE SCALE:
1 - try g format for the numbers.
2 - put numbers on the left of the scale.
3 - allow the scale to be translated.
User avatar
uwestoehr
Veteran
Posts: 4961
Joined: Sun Jan 27, 2019 3:21 am
Location: Germany
Contact:

Re: FEM Pipeline units on last dev versions

Post by uwestoehr »

mac_the_bike wrote: Wed Jun 22, 2022 12:54 pm (I have no experience of electrostatic analysis - so I don't know what this problem is.)
See my post:
https://forum.freecadweb.org/viewtopic. ... 87#p597987
mac_the_bike wrote: Wed Jun 22, 2022 12:54 pm "SI is THE standard almost everyone uses/understands" - try telling the Americans.
...
The volt has units:
volt = kg .m^2 /(A . sec^3)
And that's the point. As result of a simulation where you give a e.g. a plate a constant voltage of "1V", the result must show you also "1" and not something different depending on your unit system.
For a mechanical unit line e.g. the bending you will at least get that the result is in feet, when your unit system uses feet. However, this is only true when you share e.g. an image of your simulation result and inform the reader what unit system was used.
But for combined units like the electric permittivity (F/m) using as length unit e.g "feet" would lead to results hard to understand. And then you send the file to a colleague/customer/project partner using another unit system and he gets a different result -> a NoGo for practical work.
mac_the_bike wrote: Wed Jun 22, 2022 12:54 pm As a matter of interest, if you were performing an electrostatic analysis would the model be defined in metres?
As you like. Only the results are in meters since this is the SI unit.
mac_the_bike wrote: Wed Jun 22, 2022 12:54 pm You need to add the ampere to the lists in "Unit System" panel and make all the other systems consistent. Including Building Euro's units.
This is a unit system for buildings/architecture. Therefore it does not make sense to incorporate the ampere to it.
mac_the_bike wrote: Wed Jun 22, 2022 12:54 pm The FEA uses the values that it is supplied, e.g. it doesn't know the units of length.
What do you mean with "the FEA"? For Electrostatics we currently only support Elmer and when you look into its input file, you see that it is unit-aware.
mac_the_bike wrote: Wed Jun 22, 2022 12:54 pm PROBLEMS WITH THE DISPLAY OF THE SCALE:
1 - try g format for the numbers.
2 - put numbers on the left of the scale.
3 - allow the scale to be translated.
1: The numbers are automatically g-formatted when necessary.
2: please send a patch that adds an option to have the numbers on the left than on the right
3: you mean to translate the numerals to e.g. Farsi numbers? OK, but FreeCAD does in general not yet allow to translate numerals.
mac_the_bike
Posts: 42
Joined: Sun Jun 30, 2019 12:56 pm

Re: FEM Pipeline units on last dev versions

Post by mac_the_bike »

uwestoehr

Thanks for taking time to reply to my meanderings.
This question:
3 - allow the scale to be translated.
I was trying to be too clever - what I meant by translate was simply move.

As I have no experience of electrostatic analysis I will not make any more comments about it.

COMMENTS:

UNIT SYSTEMS:
Edit->Preferences->General->Units:
Most of the units systems require specifying correctly. If I was looking for a FEA pre and post processing program and I saw these definitions of units, I would not be impressed.

CCX RESULTS
In the section for displacements "show", the scale for deflections should be increased, to 10,000. This should, (?), cope with potential small displacements from vibration analyses.

PIPELINE:
There doesn't appear to be any method by which you can tell which set of results are being plotted in the PipeLine display; this data should be in the "Result display options" panel and displayed on the output window.

Also, I haven't read anything that shows how you can change the results being processed.

The "Calculate and Plot" function in the Result Entity is not available in the pipeline.

It would be useful to have, optional, pointers to the positions of the min and max values, also the plot could display theses values.

Contour lines on the plot, as on a map, would make the display clearer.
User avatar
uwestoehr
Veteran
Posts: 4961
Joined: Sun Jan 27, 2019 3:21 am
Location: Germany
Contact:

Re: FEM Pipeline units on last dev versions

Post by uwestoehr »

mac_the_bike wrote: Wed Jun 29, 2022 12:42 pm 3 - allow the scale to be translated.
I was trying to be too clever - what I meant by translate was simply move.
This is not simple. However, you can change the location of the NaviCube in the preferences.
mac_the_bike wrote: Wed Jun 29, 2022 12:42 pm As I have no experience of electrostatic analysis I will not make any more comments about it.
This was not my point. my point was that the result of a simulation can be anything in future, a conductivity, a velocity, a mass concentration. This requires a single unit system otherwise as user you will go nuts.
mac_the_bike wrote: Wed Jun 29, 2022 12:42 pm CCX RESULTS
In the section for displacements "show", the scale for deflections should be increased, to 10,000. This should, (?), cope with potential small displacements from vibration analyses.
But you can already change the Slider Max value to anything, also to get 10k. Maybe I misunderstand you, then I need a better description of the problem.
mac_the_bike wrote: Wed Jun 29, 2022 12:42 pm There doesn't appear to be any method by which you can tell which set of results are being plotted in the PipeLine display; this data should be in the "Result display options" panel and displayed on the output window.
I cannot reproduce this. In the "Result display options" panel you can set the field.
Can you please give me an example where you cannot set what is to be plot?
mac_the_bike wrote: Wed Jun 29, 2022 12:42 pm Also, I haven't read anything that shows how you can change the results being processed.
The "Calculate and Plot" function in the Result Entity is not available in the pipeline.
It would be useful to have, optional, pointers to the positions of the min and max values, also the plot could display theses values.
Contour lines on the plot, as on a map, would make the display clearer.
Where do you see the "Calculate and Plot" function?
Everything you want to have is already possible. Don't you use FreeCAD 0.20?
The scale shows the min and max value, you can make scalar cuts or geometrical cuts, get values at certain positions etc. Here is for example a plane cut:
FreeCAD_E6Ife64Gs3.png
FreeCAD_E6Ife64Gs3.png (90.93 KiB) Viewed 1455 times
mac_the_bike
Posts: 42
Joined: Sun Jun 30, 2019 12:56 pm

Re: FEM Pipeline units on last dev versions

Post by mac_the_bike »

uwestoehr

Thanks for the comments. I am using - Version: 0.20.28945 (Git) AppImage.

I have hijacked your picture.
But you can already change the Slider Max value to anything, also to get 10k. Maybe I misunderstand you, then I need a better description of the problem.
I didn't realize that that the slider max could be changed.
Can you please give me an example where you cannot set what is to be plot?
I can see how to set the type of data to be plotted, e.g. displacements. What I mean is that when you look at the pipeline display, as in your attachment, there is no way of telling:
a: which set of data you are plotting, e.g. 'CX_EigenMode_1_Results'
b: the type of data, e.g. x displacements,

My Attachment shows what I was thinking with the source of the data and the data type being displayed.
Where do you see the "Calculate and Plot" function?
The "Calculate and plot" is available under, in my case, 'CX_EigenMode_1_Results' at the bottom of the panel.
The scale shows the min and max value, you can make scalar cuts or geometrical cuts, get values at certain positions etc. Here is for example a plane cut:
My Attachment shows what I was thinking with the max and min labels. It should also be possible to move them.
Also, if you change the range of the scale, e.g. you could set the max to 0.5 and the min to 0.25, the max and min labels must stay the same, in this case 1.0 and 5.55e-22.

What is a scalar cut and how do you do it?
Attachments
pipeline_3.jpg
pipeline_3.jpg (70.76 KiB) Viewed 1391 times
david69
Veteran
Posts: 1773
Joined: Wed Jan 01, 2014 7:48 pm

Re: FEM Pipeline units on last dev versions

Post by david69 »

give a look to this wiki page
https://wiki.freecadweb.org/FEM_Workbench#Menu:_Results
it's talking about scalar clip filter
User avatar
uwestoehr
Veteran
Posts: 4961
Joined: Sun Jan 27, 2019 3:21 am
Location: Germany
Contact:

Re: FEM Pipeline units on last dev versions

Post by uwestoehr »

mac_the_bike wrote: Sat Jul 02, 2022 9:55 am Thanks for the comments. I am using - Version: 0.20.28945 (Git) AppImage.
But this is not the FreeCAD 0.20 release. Please use the final 0.20 release:

Code: Select all

Version: 0.20.29177 (Git)
Build type: Release
Branch: releases/FreeCAD-0-20
Hash: 68e337670e227889217652ddac593c93b5e8dc94
mac_the_bike wrote: Sat Jul 02, 2022 9:55 am I can see how to set the type of data to be plotted, e.g. displacements. What I mean is that when you look at the pipeline display, as in your attachment, there is no way of telling:
a: which set of data you are plotting, e.g. 'CX_EigenMode_1_Results'
b: the type of data, e.g. x displacements,
Can you please prepare a small example file using FreeCAD 0.20?
In the pipeline settings you can of course set what is to be displayed.
mac_the_bike wrote: Sat Jul 02, 2022 9:55 am My Attachment shows what I was thinking with the source of the data and the data type being displayed.
This was never possible. I also don't see the benefit because the color gradient already indicates where the min/max is. You can also change the color gradient to have other colors.
The "Calculate and plot" is available under, in my case, 'CX_EigenMode_1_Results' at the bottom of the panel.
This has been renamed to "Calculate" because this what it does. You can perform there calculations of results. This feature does not exist for result pipelines.
What is a scalar cut and how do you do it?
See https://wiki.freecadweb.org/FEM_Workbench#Menu:_Results
Everything above or below a certain scalar value will be cut. For example every mesh knot that has a temperature above 400 K.
mac_the_bike
Posts: 42
Joined: Sun Jun 30, 2019 12:56 pm

Re: FEM Pipeline units on last dev versions

Post by mac_the_bike »

uwestoehr

Thanks for the comments. I am using:

Code: Select all

OS: Ubuntu 22.04 LTS (GNOME-Flashback:GNOME/gnome-flashback-metacity)
Word size of FreeCAD: 64-bit
Version: 0.20.29177 (Git) AppImage
Build type: Release
Branch: (HEAD detached at 0.20)
Hash: 68e337670e227889217652ddac593c93b5e8dc94
Python 3.9.13, Qt 5.12.9, Coin 4.0.0, Vtk 9.1.0, OCC 7.5.3
Locale: English/United Kingdom (en_GB)
Can you please prepare a small example file using FreeCAD 0.20?
I hope the attachment is what you are looking for. This should be run as a Frequency Analysis. The attachment that I previously sent you was modified in "gimp".
This was never possible. I also don't see the benefit because the color gradient already indicates WHERE the min/max is. You can also change the color gradient to have other colors.
Do you mean "what" as opposed to "WHERE"?
If you change the parameter range of the scale, the scale shows the min/max values of the scale, it doesn't show the main/max values of the data being plotted,
Without this data, min/max, name of data, type of data, all you have is a pretty plot of something that has a max value of 1.0.
If this plot was in a report, it would not be possible to trace the source of the data being plotted.
This has been renamed to "Calculate" because this what it does. You can perform there calculations of results. This feature does not exist for result pipelines.
I see that now I am running the production version.
There are several quantities that are available under "Calculate" that are not in the result pipeline, e.g. principal stresses and temperature.
At least all plottable quantities that are available in "Calculate" must be present in the results pipeline.

Also:
At a complete tangent, even for me, in the "Calculate" section could there be a "Conditional Statement" option. For example:
1 [ x > 10 ] - where if this is True it returns the value 1, False returns 0. The plot will then consist of 2 contours, 0 and 1.

2 [[ x > 10 ] and [ y < 4 ] ] - where if both are True it returns the value 1, if either is False returns 0. The plot will again consist of 2 contours, 0 and 1.

3 [p1<0] * p1 - plots p1, for p1<0, and 0, for p1>=0. This could be used to shows sections of the model that are in compression. This is an example to show the use of the feature.
Attachments
forum.FCStd
(13.47 KiB) Downloaded 22 times
User avatar
uwestoehr
Veteran
Posts: 4961
Joined: Sun Jan 27, 2019 3:21 am
Location: Germany
Contact:

Re: FEM Pipeline units on last dev versions

Post by uwestoehr »

mac_the_bike wrote: Fri Jul 08, 2022 10:48 am I hope the attachment is what you are looking for. This should be run as a Frequency Analysis.
Thanks. After running the analysis, you get 2 results for 2 eigenmodes. Select the eigenmode you want to display further in the tree and then create a new result pipeline from this (Menu Results -> Post pipeline fro result).
mac_the_bike wrote: Fri Jul 08, 2022 10:48 am Do you mean "what" as opposed to "WHERE"?
If you change the parameter range of the scale, the scale shows the min/max values of the scale, it doesn't show the main/max values of the data being plotted,
I really don't understand what you mean. You have e.g. a scale from 0 to 1. you choose a color model where 1 is red and 0 is blue then you see in your model where the red areas are. This way you see WHERE the min/max is.
As I wrote the pipelines offer different methods to visualize the results. So make a cut at an appropriate position to make clear Where the min/mar is.
A single pointer of the global min/max is not useful For example in your file the max displacements should be almost the same on all corners and a pointer to only one corner is misleading because depending on the mesh on the next run the global maximum might be at another edge.
There are several quantities that are available under "Calculate" that are not in the result pipeline, e.g. principal stresses and temperature.
At least all plottable quantities that are available in "Calculate" must be present in the results pipeline.
Where do you see a temperature? You did not perform a thermomechanical analysis, therefore there is no temperature available.
I also don't see quantities under Calculate. This is how your example it looks in FreeCAD 0.20:
FreeCAD_fZU3DF5iwS.png
FreeCAD_fZU3DF5iwS.png (21.85 KiB) Viewed 1220 times
The pipeline allows you to visualize all available result scalars and vectors. What result do you miss?
As I wrote, the Calculate feature is not available for pipelines, so you cannot display e.g. "Tresca - vonMises stress", only either Tresca or vonMises.

---------

Your example shows that the units are incorrect in the pipeline results. I will have a look.
User avatar
uwestoehr
Veteran
Posts: 4961
Joined: Sun Jan 27, 2019 3:21 am
Location: Germany
Contact:

Re: FEM Pipeline units on last dev versions

Post by uwestoehr »

uwestoehr wrote: Sat Jul 09, 2022 10:57 pm Your example shows that the units are incorrect in the pipeline results. I will have a look.
Also with a mesh with maximal cell size 1.0 mm, I get a maximal displacement of 640 mm:
FreeCAD_H1Fh3im2dU.png
FreeCAD_H1Fh3im2dU.png (17.21 KiB) Viewed 1206 times
I get the same with FreeCAD 0.19.
Since the meshed block has a maximal size of ca. 20 mm, the displacement cannot be greater.

I forgot that your setup has no constraints, therefore the wrong results are clear.
So I was wrong because the displayed units are correct
Post Reply