fcFEM - FEA from start to finish
Moderator: bernd
Forum rules
and Helpful information for the FEM forum
and Helpful information for the FEM forum
fcFEM - FEA from start to finish
I created a solver macro for running an internal finite element analysis. I finally got it to work:
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.
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.
Re: fcFEM - FEA from start to finish
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
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
Re: fcFEM - FEA from start to finish
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.
Re: fcFEM - FEA from start to finish
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
same mesh, same element type, same consistent load vector, same boundary conditions, but small difference. I need to find out why.
Theoretical deflection: bending=0.9375mm + shear=6E-7mm (so can be ignored).
Calculix: 0.937671mm
fcFEM: 0.938523mm
same mesh, same element type, same consistent load vector, same boundary conditions, but small difference. I need to find out why.
Re: fcFEM - FEA from start to finish
FYI: If you compare Calculix and Z88 for such mesh they give your exact the same result. Try the cantilever.
Re: fcFEM - FEA from start to finish
Yes I should get exactly the same. Still something wrong in the shear deformation.
Re: fcFEM - FEA from start to finish
Found the issue. Now get exactly the same displacement as Calculix.
Re: fcFEM - FEA from start to finish
So we'll have an internal solver?!