extraction of negative eigenvalues

About the development of the FEM module/workbench.

Moderator: bernd

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

extraction of negative eigenvalues

Postby mac_the_bike » Sun Jun 30, 2019 1:48 pm

I have been using FreeCAD for about 2 weeks.

Suggestion:
My suggestion is that a negative value can be specified for the "Eigenmode Low Limit"

Justification:
I have been performing "Free-Free" Frequency Analyses and I have noticed that not all the Rigid Body Modes are displayed under the Calculix frequency output. (The Rigid Body Modes are those with eigenvalues close to 0.0.)
The modes that are not displayed are those with small negative eigenvalues, of the same magnitude as the other small values, output from Calculix within FreeCAD:

E I G E N V A L U E O U T P U T
MODE NO EIGENVALUE FREQUENCY
REAL PART IMAGINARY PART
(RAD/TIME) (CYCLES/TIME (RAD/TIME)
1 -0.9206131E-05 0.0000000E+00 0.0000000E+00 0.3034161E-02
2 0.4278982E-05 0.2068570E-02 0.3292231E-03 0.0000000E+00
3 0.3131142E-04 0.5595660E-02 0.8905770E-03 0.0000000E+00
4 0.4225360E-04 0.6500277E-02 0.1034551E-02 0.0000000E+00
5 0.4730425E-04 0.6877809E-02 0.1094637E-02 0.0000000E+00
6 0.6699469E-04 0.8185029E-02 0.1302688E-02 0.0000000E+00
7 0.1543087E+09 0.1242211E+05 0.1977040E+04 0.0000000E+00
8 0.2150798E+09 0.1466560E+05 0.2334103E+04 0.0000000E+00
9 0.3530977E+09 0.1879089E+05 0.2990664E+04 0.0000000E+00
10 0.3532363E+09 0.1879458E+05 0.2991251E+04 0.0000000E+00

This output was achieved by modifying the "FREQUENCY" input data in the *.inp file and rerunning.
The small negative value is due to roundoff error. The "jump" between the eigenvalues of the 6th and 7th modes is typical of a good model.
The analysis of "Free-Free" models is an important step in the validation of FEM models. If the model has less than 6 rigid body modes then it implies that there is some sort of constraint within the model.

mac
User avatar
Kunda1
Posts: 5459
Joined: Thu Jan 05, 2017 9:03 pm

Re: extraction of negative eigenvalues

Postby Kunda1 » Sun Jun 30, 2019 7:02 pm

This post has been split off from a more ancient non-relevant post. New thread has been created. OP, please reference older posts instead of posting to them directly. Thanks
Want to contribute back to FC? Checkout:
#lowhangingfruit | Use the Source, Luke. | How to Help FreeCAD | How to report FC bugs and features
User avatar
bernd
Posts: 8323
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland

Re: extraction of negative eigenvalues

Postby bernd » Sun Jun 30, 2019 7:45 pm

Even if it is a rounding error, does it makes sense from mechanical point of view to have negative eigenvalues? Is this considered to ve a bug in calculix or do I just not knew about this? How about other FEM solver? How do they handle this?

As far as I understand this negative eigenvalues will never be smaller than -1 ?!

How about the following:
allow values down to -1 and add a preference to FEM. If the user puts in 0 in FreeCAD on Calculix -1 is used which is set to True by default.

Why:
Most user including me (until today) will miss these negative eigenvalues and may be search for a problem in the model.

Bernd

ps: Welcome to FreeCAD FEM
User avatar
HarryvL
Posts: 1043
Joined: Sat Jan 06, 2018 7:38 pm

Re: extraction of negative eigenvalues

Postby HarryvL » Sun Jun 30, 2019 7:55 pm

In a single mass-spring system the natural frequency (= square root of frequency eigenvalue) is equal to sqrt(k/m), where k=spring stiffness and m=mass. A negative eigenvalue for this simplest of mechanical systems makes therefore no physical sense. A rigid body motion (k=0) corresponds to a natural frequency of 0.
Last edited by HarryvL on Tue Jul 09, 2019 12:02 am, edited 2 times in total.
User avatar
HarryvL
Posts: 1043
Joined: Sat Jan 06, 2018 7:38 pm

Re: extraction of negative eigenvalues

Postby HarryvL » Sun Jun 30, 2019 8:16 pm

In a multiple degree of freedom system (which a FEM system is) the number of natural frequencies and corresponding eigenvectors (= deformation modes) equals the number of degrees of freedom.

Now for the math: it is possible to re-state the mechanical problem in terms of eigen modes. If you do so you are left with a system of equations that is decoupled. This means that each eigenmode behaves like a single-mass spring system, with fictitious mass (m_i) and spring stiffness (k_i) corrrsonding to the equation sqrt(k_i/m_i) = omega_i, where omege_i is the natural frequency of vibration mode i.

What does this mean? Well that every natural frequency represents a physical singe mass-spring system corresponding to an eigenmode.

So in conclusion, natural frequencies for a multiple degree of freedom system (which a FEA system is) cannot be negative. In a rigid body motion you can at best only have 6 zero natural frequencies (corresponding to the 6 rigid body eigen modes. The rest should all be positive.

EDIT: instability may give rise to negative eigenvalues and (therefore) imaginary natural frequencies. This corresponds to exponential (rather than oscillatory) motion. See: https://forum.freecadweb.org/viewtopic. ... 30#p319635
Last edited by HarryvL on Tue Jul 09, 2019 12:07 am, edited 3 times in total.
User avatar
HarryvL
Posts: 1043
Joined: Sat Jan 06, 2018 7:38 pm

Re: extraction of negative eigenvalues

Postby HarryvL » Sun Jun 30, 2019 8:25 pm

NOTE: the numbers you see in the EIGENVALUE OUTPUT are the real and imaginary parts of a complex number. They are used to represent phase shifts due to damping. The corresponding physical natural frequency is obtained by calculating omega = sqrt (real^2 + imaginary^2). So again a positive number.

EDIT: this is not correct. see: https://forum.freecadweb.org/viewtopic. ... 30#p319635
Last edited by HarryvL on Tue Jul 09, 2019 12:09 am, edited 1 time in total.
User avatar
HarryvL
Posts: 1043
Joined: Sat Jan 06, 2018 7:38 pm

Re: extraction of negative eigenvalues

Postby HarryvL » Mon Jul 01, 2019 12:48 am

HarryvL wrote:
Sun Jun 30, 2019 8:16 pm
... you can at best only have 6 zero natural frequencies
There can be more than 6 if there are multiple disconnected bodies or ones that are partly attached (eg pivot, hinge or slide along shared contacts).
User avatar
HarryvL
Posts: 1043
Joined: Sat Jan 06, 2018 7:38 pm

Re: extraction of negative eigenvalues

Postby HarryvL » Mon Jul 01, 2019 7:03 am

A closer look at the output table shows that the first 6 natural frequencies are between 0.002 and 0.008 Hz. The next natural frequency (number 7) is 12422 Hz and the rest are even higher. So within the accuracy of the analysis the first 6 natural frequencies are indeed zero.
UR_
Posts: 972
Joined: Tue Jan 03, 2017 8:42 pm

Re: extraction of negative eigenvalues

Postby UR_ » Mon Jul 01, 2019 9:16 am

Just tried a frequency analysis by modifying cantilever3D example from start page.

Got mode 1 to 15.

If I select result object e.g. "CalculiX_frequency_mode_1_results", I see in properties:

Screenshot 001.png
Screenshot 001.png (2.01 KiB) Viewed 323 times

But same values for all modes :?

Where is the beaf? :confused:
User avatar
bernd
Posts: 8323
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland

Re: extraction of negative eigenvalues

Postby bernd » Mon Jul 01, 2019 11:05 am

I only did code formating on the dat file reader ... But it has been working some time ago ...

For reference ...
https://github.com/FreeCAD/FreeCAD/comm ... Results.py
https://github.com/FreeCAD/FreeCAD/comm ... Results.py
https://github.com/FreeCAD/FreeCAD/comm ... Results.py
https://github.com/FreeCAD/FreeCAD/comm ... tReader.py

the reader code never changed over the years ... initial commit from 3.11.2015 https://github.com/FreeCAD/FreeCAD/blob ... py#L39-L63 vs uptodate master ... https://github.com/FreeCAD/FreeCAD/blob ... y#L78-L105