add new function to fem module

About the development of the FEM module/workbench.

Moderator: bernd

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

Re: add new function to fem module

Post by bernd »

The time beeing we have set up a very simple example for eigenvalue analysis for Elmer. For this example we have results from Elmer in FreeCAD and from Elmer in the tutorial to compare with. Would be cool if we could extend this example by a calculix solver ...

- see https://forum.freecadweb.org/viewtopic. ... 40#p488277
- and https://github.com/FreeCAD/FreeCAD/blob ... ic_beam.py

If we would get the same results in Calxulix than in Elmer, I would immediately merge the buckling code.

Neverless the lateral torsional buckling problem would be extremly cool to solve too 8-)
User avatar
bernd
Veteran
Posts: 12851
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland
Contact:

Re: add new function to fem module

Post by bernd »

attached the FreeCAD file which calculates the frequencies ... they match, means only the eigenvalue analysis is missing.

elmer_nongui_tut1_calculix.FCStd
(156.6 KiB) Downloaded 56 times

Code: Select all

- 643.49
- 1099.57
- 1580.31
- 1650.34
- 2521.68
which is close to what Elmer tutorial gives ...

freq.png
freq.png (12.82 KiB) Viewed 2502 times
User avatar
bernd
Veteran
Posts: 12851
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland
Contact:

Re: add new function to fem module

Post by bernd »

git commit cf241d0c936c

- start FreeCAD
- switch to FEM
- open examples Gui
- setup Solver --> ccxtools --> elmer tutorial 01
- save and run
- frequencies should match

I am curious if the eigenvalues match too?
twangrt
Posts: 40
Joined: Sun Apr 28, 2019 6:34 pm

Re: add new function to fem module

Post by twangrt »

bernd wrote: Wed Mar 17, 2021 11:27 am
I am curious if the eigenvalues match too?
Cool, Ill have a look at this tomorrow. Should not be hard at all to check.

Update:
I have been struggling making a hex-mesh in GMSH for a couple of days and finally I think I made it work.

Now the buckling factors, from the manual calculation, calculix, and another FEA program are all within a 5% margin.
Attachments
Skärmavbild 2021-03-17 kl. 20.40.47.png
Skärmavbild 2021-03-17 kl. 20.40.47.png (333.67 KiB) Viewed 2446 times
User avatar
bernd
Veteran
Posts: 12851
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland
Contact:

Re: add new function to fem module

Post by bernd »

wow, would you shsre the the file.
twangrt
Posts: 40
Joined: Sun Apr 28, 2019 6:34 pm

Re: add new function to fem module

Post by twangrt »

bernd wrote: Wed Mar 17, 2021 9:04 pm wow, would you shsre the the file.
https://drive.google.com/file/d/1q3rPcR ... sp=sharing
twangrt
Posts: 40
Joined: Sun Apr 28, 2019 6:34 pm

Re: add new function to fem module

Post by twangrt »

bernd wrote: Wed Mar 17, 2021 11:27 am
I am curious if the eigenvalues match too?
The elmer example is a frequency calculation, the only that causes compression loads are the self weight of the element. Which is not included in the FreeCAD example.

Why dont we use Calculix verification examples to validate the results instead? The only problem is that you need to manually read the .inp file to try to replicate it in FreeCAD. http://www.feacluster.com/CalculiX/ccx_ ... ode403.php
User avatar
bernd
Veteran
Posts: 12851
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland
Contact:

Re: add new function to fem module

Post by bernd »

perfect! very good idea! This one http://www.feacluster.com/CalculiX/ccx_ ... beam8b.inp ? Or are there others?

You can import the inp file. The mesh will be imported and can directlx be used for the analysis. Fem utility in mesh menu can convert the fem mesh to surface freecad mesh. with part you get a part. or make this simple part yourself. make the fixes yourself and you should be done.
User avatar
bernd
Veteran
Posts: 12851
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland
Contact:

Re: add new function to fem module

Post by bernd »

Ahh material should be Calculix_Standard or similar. Search for a card with Calculix in the card name. It is available in FreeCAD FEM materials ...
twangrt
Posts: 40
Joined: Sun Apr 28, 2019 6:34 pm

Re: add new function to fem module

Post by twangrt »

bernd wrote: Thu Mar 18, 2021 2:54 pm perfect! very good idea! This one http://www.feacluster.com/CalculiX/ccx_ ... beam8b.inp ? Or are there others?

You can import the inp file. The mesh will be imported and can directlx be used for the analysis. Fem utility in mesh menu can convert the fem mesh to surface freecad mesh. with part you get a part. or make this simple part yourself. make the fixes yourself and you should be done.
Yeah exactly, beam8b example.

Didnt know you could import an ".inp" file to get the mesh, nice. I already made an hex-mesh, but this is better.

Below is the result from the reference and my calculation with the exact same mesh.

Beam8b.dat Referencefile:

Code: Select all

     B U C K L I N G   F A C T O R   O U T P U T

 MODE NO       BUCKLING
                FACTOR

      1   0.5353338E+02
      2   0.1123187E+03
      3   0.4425644E+03
      4   0.8385897E+03
      5   0.1063985E+04
      6   0.1751251E+04
      7   0.1770198E+04
      8   0.2406977E+04
      9   0.2597970E+04
     10   0.2992558E+04

ccx_dat_file.dat from calculation:

Code: Select all

         B U C K L I N G   F A C T O R   O U T P U T

 MODE NO       BUCKLING
                FACTOR

      1   0.5353773E+02
      2   0.1123524E+03
      3   0.4429172E+03
      4   0.8406785E+03
      5   0.1066613E+04
      6   0.1760440E+04
      7   0.1781060E+04
      8   0.2428616E+04
      9   0.2625109E+04
     10   0.3032522E+04

It´s not exactly the same result. But close enough? When I run it through standalone Calculix in macOS, I get the exact same result.
I need to update Calculix on my ubuntu machine and test again. It´s ancient :roll:
Attachments
Skärmavbild 2021-03-18 kl. 16.54.48.png
Skärmavbild 2021-03-18 kl. 16.54.48.png (204.28 KiB) Viewed 2325 times
Post Reply