fcFEM - FEA from start to finish

About the development of the FEM module/workbench.

Moderator: bernd

Post Reply
User avatar
HarryvL
Veteran
Posts: 1285
Joined: Sat Jan 06, 2018 7:38 pm
Location: Netherlands

fcFEM - FEA from start to finish

Post by HarryvL »

I created a solver macro for running an internal finite element analysis. I finally got it to work:

fcFEM_1.jpg
fcFEM_1.jpg (31.13 KiB) Viewed 9859 times

I want to use this as a testing tool for several ideas I have for enhanced FC FEM capabilities. Now the framework is in place it should be relatively simple to implement and test the stuff I describe here (https://forum.freecadweb.org/viewtopic. ... ed#p268721), including creating mixed mesh analyses (https://forum.freecadweb.org/viewtopic. ... ch#p216682), improved beam and shell elements (the 3D beams and shells in Calculix have their limtations: https://forum.freecadweb.org/viewtopic. ... am#p226038), arc-length control for overcoming limit points (https://forum.freecadweb.org/viewtopic. ... ks#p215325) and zero-thickness interface elements for various applications, like post-tensioned concrete with friction losses (https://forum.freecadweb.org/viewtopic. ... 20#p259636), geotextile in road and embankment analysis, etc. etc.

Part of the fun will be to see how fast I can make this using numpy and list comprehension. I am hopeful this can be a true competitor for external solvers, at least for the structural/mechanical applications I have in mind.

And of course I will make all of this available once it is in reasonable shape.
Jee-Bee
Veteran
Posts: 2566
Joined: Tue Jun 16, 2015 10:32 am
Location: Netherlands

Re: fcFEM - FEA from start to finish

Post by Jee-Bee »

cool
User avatar
looo
Veteran
Posts: 3941
Joined: Mon Nov 11, 2013 5:29 pm

Re: fcFEM - FEA from start to finish

Post by looo »

nice! python is perfect choice for this.
There is always the option to implement a faster solver by using pybind11 and eigen for example. With pybind11 you can easily (and fast) pass numpy arrays to eigen arrays and on c++side for-loops are not slow anymore ;)

Also have a look at scipy.sparse matrices.
https://docs.scipy.org/doc/scipy/reference/sparse.html

There are endless options, but starting the development in python will guarantee success ;)

I have also the need for such a library. So if you choose to go opensource I can contribute truss and membrane elements which I already implemented here: https://github.com/booya-at/paraFEM
User avatar
HarryvL
Veteran
Posts: 1285
Joined: Sat Jan 06, 2018 7:38 pm
Location: Netherlands

Re: fcFEM - FEA from start to finish

Post by HarryvL »

Thanks. I think we’re on to something. I also saw that through NumPy/SciPy you can tap into low level specialist solvers for positive definite, sparse systems. I worked out a 6-node isoparametric interface element already. It will require duplication of element nodes on selected internal faces, but that should not be too hard. Yes, I will go FOSS once I have most in order. So I will take you up on your offer once I get to that stage.
User avatar
HarryvL
Veteran
Posts: 1285
Joined: Sat Jan 06, 2018 7:38 pm
Location: Netherlands

Re: fcFEM - FEA from start to finish

Post by HarryvL »

Cantilever 10x10x500mm, E=100MPa, nu=0.0, p=1Pa.
Theoretical deflection: bending=0.9375mm + shear=6E-7mm (so can be ignored).
Calculix: 0.937671mm
fcFEM: 0.938523mm


cantilever_beam_test.jpg
cantilever_beam_test.jpg (38.88 KiB) Viewed 9736 times


same mesh, same element type, same consistent load vector, same boundary conditions, but small difference. I need to find out why.
User avatar
bernd
Veteran
Posts: 12849
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland
Contact:

Re: fcFEM - FEA from start to finish

Post by bernd »

FYI: If you compare Calculix and Z88 for such mesh they give your exact the same result. Try the cantilever.
User avatar
HarryvL
Veteran
Posts: 1285
Joined: Sat Jan 06, 2018 7:38 pm
Location: Netherlands

Re: fcFEM - FEA from start to finish

Post by HarryvL »

Yes I should get exactly the same. Still something wrong in the shear deformation.
User avatar
HarryvL
Veteran
Posts: 1285
Joined: Sat Jan 06, 2018 7:38 pm
Location: Netherlands

Re: fcFEM - FEA from start to finish

Post by HarryvL »

Found the issue. Now get exactly the same displacement as Calculix.
User avatar
PrzemoF
Veteran
Posts: 3520
Joined: Fri Jul 25, 2014 4:52 pm
Contact:

Re: fcFEM - FEA from start to finish

Post by PrzemoF »

So we'll have an internal solver?! :o
User avatar
HarryvL
Veteran
Posts: 1285
Joined: Sat Jan 06, 2018 7:38 pm
Location: Netherlands

Re: fcFEM - FEA from start to finish

Post by HarryvL »

Yup
Post Reply