fcFEM - FEA from start to finish

About the development of the FEM module/workbench.

Moderator: bernd

User avatar
HarryvL
Posts: 1052
Joined: Sat Jan 06, 2018 7:38 pm

fcFEM - FEA from start to finish

Postby HarryvL » Mon Feb 04, 2019 9:45 pm

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 2220 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
Posts: 1969
Joined: Tue Jun 16, 2015 10:32 am
Location: Netherlands

Re: fcFEM - FEA from start to finish

Postby Jee-Bee » Tue Feb 05, 2019 11:05 am

cool
looo
Posts: 2959
Joined: Mon Nov 11, 2013 5:29 pm

Re: fcFEM - FEA from start to finish

Postby looo » Tue Feb 05, 2019 11:29 am

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
please help with my conda-packaging efforts: https://liberapay.com/looooo/
User avatar
HarryvL
Posts: 1052
Joined: Sat Jan 06, 2018 7:38 pm

Re: fcFEM - FEA from start to finish

Postby HarryvL » Tue Feb 05, 2019 12:14 pm

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
Posts: 1052
Joined: Sat Jan 06, 2018 7:38 pm

Re: fcFEM - FEA from start to finish

Postby HarryvL » Wed Feb 06, 2019 5:20 am

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 2079 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
Posts: 8486
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland

Re: fcFEM - FEA from start to finish

Postby bernd » Wed Feb 06, 2019 10:31 am

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

Re: fcFEM - FEA from start to finish

Postby HarryvL » Wed Feb 06, 2019 10:34 am

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

Re: fcFEM - FEA from start to finish

Postby HarryvL » Thu Feb 07, 2019 3:44 pm

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

Re: fcFEM - FEA from start to finish

Postby PrzemoF » Thu Feb 07, 2019 3:47 pm

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

Re: fcFEM - FEA from start to finish

Postby HarryvL » Thu Feb 07, 2019 5:12 pm

Yup