Elmer analysis also possible in calculix

About the development of the FEM module/workbench.

Moderator: bernd

Jee-Bee
Posts: 2127
Joined: Tue Jun 16, 2015 10:32 am
Location: Netherlands

Elmer analysis also possible in calculix

Postby Jee-Bee » Wed Jul 15, 2020 8:19 am

I start this topic because i was thinking since some Elmer solver related topics are quite active now( https://forum.freecadweb.org/viewtopic.php?f=18&t=48635 and https://forum.freecadweb.org/viewtopic.php?f=18&t=41488 at least)

The basic FEM features are implemented for all / most solvers. But for elmer there are some specific type of analysis types that are only implemented in Elmer.
Why not making also these anlaysis types availeble for Calculix. It is posible according their documentation:
http://www.feacluster.com/CalculiX/ccx_ ... de169.html
http://www.feacluster.com/CalculiX/ccx_ ... de177.html
http://www.feacluster.com/CalculiX/ccx_ ... de168.html
(probably i miss one or more links specially on the flow side. since i don't have elmer and the FEM documentation is a bit behind i can't compare them
User avatar
bernd
Posts: 10781
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland

Re: Elmer analysis also possible in calculix

Postby bernd » Wed Jul 15, 2020 9:02 am

Jee-Bee wrote:
Wed Jul 15, 2020 8:19 am
The basic FEM features are implemented for all / most solvers. But for elmer there are some specific type of analysis types that are only implemented in Elmer.
Why not making also these anlaysis types availeble for Calculix. It is posible according their documentation:
http://www.feacluster.com/CalculiX/ccx_ ... de169.html
http://www.feacluster.com/CalculiX/ccx_ ... de177.html
http://www.feacluster.com/CalculiX/ccx_ ... de168.html
(probably i miss one or more links specially on the flow side. since i don't have elmer and the FEM documentation is a bit behind i can't compare them
very good idea. The constraints to define them are available. The analysis types could be easily extended in CalculiX. :)

To get started, best would be to take one of the Elmer examples, and create a CalculiX input file (or if splitted a input file set) out of it. Run it with CalculiX, check if the results are equal. These file could be posted here.

Than we could start to implement the constraints and analysis types in CalculiX. I would help with the coding.
johnwang
Posts: 445
Joined: Sun Jan 27, 2019 12:41 am

Re: Elmer analysis also possible in calculix

Postby johnwang » Wed Jul 15, 2020 11:59 am

It seems to me that fc fem chose a solver first, then define other things like BCs for that solver.

I'd like to see one could define BCs and other things first. At the end, choose which solver and output case file for that solver. Or even output a few cases file for several solvers.I think in this way, it is more easy to introduce new solver into fc.

Sure there is times you need to specify some special BCs for one paticular solver.
User avatar
bernd
Posts: 10781
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland

Re: Elmer analysis also possible in calculix

Postby bernd » Wed Jul 15, 2020 12:30 pm

johnwang wrote:
Wed Jul 15, 2020 11:59 am
It seems to me that fc fem chose a solver first, then define other things like BCs for that solver.

I'd like to see one could define BCs and other things first. At the end, choose which solver and output case file for that solver. Or even output a few cases file for several solvers.I think in this way, it is more easy to introduce new solver into fc.

Sure there is times you need to specify some special BCs for one paticular solver.
this is totally up to you. Add an analysis, delete the standardsolver, add your BCs and add the solver you like. cheers bernd

solver, meshing and BCs are totally independent. even the code behind is independent. The only one they are connected to each other is the geometry and the analysis container they all have to be into.
RatonLaveur
Posts: 790
Joined: Wed Mar 27, 2019 10:45 am

Re: Elmer analysis also possible in calculix

Postby RatonLaveur » Wed Jul 15, 2020 2:38 pm

I find all of this fascinating and there is definitely value in being able to use different solvers for different tasks when one dives deep enough into MultiPhysics FEA, as well as to confirm that the results agree with each other.

That being said, there is now Calculix, Z88, Elmer and fc-FEM all at different stages of implementation and user-friendliness in FreeCAD, some with different capabilities than others.

I cannot but ask the question, aren't we dividing our efforts?

That being said: it is only a question asked in earnest and does not suggest we should pick one and stick to it. I for one appreciate Elmer a lot, I find the documentation elegant and the code seems to be very powerful at a low cost in usage, but that's probably because I have not gotten so much experience with Calculix.

Please take my discourse exactly for what it is, a question looking to be informed by other opinions.
User avatar
bernd
Posts: 10781
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland

Re: Elmer analysis also possible in calculix

Postby bernd » Wed Jul 15, 2020 3:51 pm

A problem which has to be solved by any community project where noone pays the devs ...

Some history first ... In early times of FEM only CalculiX was supported, and all solver handling inside inputfile writer. This module grow and grow. At some point the solver handling code was extracted from the writer but totally dependent on CalculiX. From time to time there where disscusions about other solver. I decided to make the solver binary handling solver independent. For this I used the only open source solver I knew from my students time, Z88. Since no one really used Z88 it still only has very limited support for BCs and only reads deformations. CalculiX envolved the time beeing. Than HoWil came to the forum and asked for Elmer. He even organised a GSoC to support Elmer. In this GSoC a totally new frame work for solver handling was written and z88 as well as calculix where ported to this frame work. But since not all calculix tools are implemented in this fram work the ccxtools still remain. Calculix solver and Ccxtools solver create the same input file. I never used Elmer. I even do not know the syntax (slowly get into). I even do not need all this none mechanical stuff. I would need mixed edge shell analysis which is not good in calculix. But I never finished something in this regard. Harry started a new solver OOFEM, than gave up. I did the mistake to have a look at it and thus we had another solver up. It is mot in master, but rebased regularly. One can say this branch is the tutorial to add a new solver. This is what ebrahim did, he added OpenSees, which is great in earth quake and good for edge and shell analysis. Perfect for me, but no development ATM. Furthermore it is not free for comercial use, which is a problem for me. This is where we are ATM.

As written I will not do any big afford in this jusr if some one will do spend time on this I surely help with implementation.

In the regard of bring all together in one solver. Might be true and much more efficient but as long as you do not pay people you can not tell them what they have to develop.

I myself am really happy about the GSoC we do at the moment as it finds errors and makes what is really needed, examples.

cheers bernd
RatonLaveur
Posts: 790
Joined: Wed Mar 27, 2019 10:45 am

Re: Elmer analysis also possible in calculix

Postby RatonLaveur » Wed Jul 15, 2020 6:04 pm

Bernd thanks for the history. I had more or less understood most of that. I also completely understand the fact that FreeCAD is a sandbox. If someone wants Elmer they'll code elmer, if someone prefers Calculix, well who is anyone to tell them "no you can't do that...".

I think you did a fantastic and almost prescient job of trying to untie most of the tools from the solver. It gives a lot of freedom and simplicity to performing FEA any which way one wants.

All the other contributors added a stone to the edifice and FEM is moving forward in several directions yes, but with a surprising amount of cohesion. I really only wanted a little insight and you gave plenty. Thanks!
User avatar
bernd
Posts: 10781
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland

Re: Elmer analysis also possible in calculix

Postby bernd » Wed Jul 15, 2020 6:59 pm

RatonLaveur wrote:
Wed Jul 15, 2020 6:04 pm
... I really only wanted a little insight and you gave plenty. Thanks!
History gives even more, not about FEM, but interesting anyway.
HoWil
Posts: 1192
Joined: Sun Jun 14, 2015 7:31 pm
Location: Austria

Re: Elmer analysis also possible in calculix

Postby HoWil » Wed Jul 15, 2020 8:09 pm

I suggest to find some common interests and implement whats needed together :?: :!: See e.g. https://forum.freecadweb.org/viewtopic. ... 65#p416445
johnwang
Posts: 445
Joined: Sun Jan 27, 2019 12:41 am

Re: Elmer analysis also possible in calculix

Postby johnwang » Thu Jul 16, 2020 4:54 am

bernd wrote:
Wed Jul 15, 2020 12:30 pm
solver, meshing and BCs are totally independent.
Thanks, I see it now.