[general] about the future of the FEM workbench

About the development of the FEM module/workbench.

Moderator: bernd

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

Re: [general] about the future of the FEM workbench

Post by Jee-Bee »

Kunda1 wrote: Wed Aug 17, 2022 12:11 pm An aside, I've x-posted this thread to the the CalculiX discourse forum.
Thanks
uwestoehr wrote: Wed Aug 17, 2022 10:18 am ...
I think that you have the most experience with programming (For FEM) from the current responders.
If you start totaly from ground up a new FEM WB... What would you do as current more solvers == more choice == more better OR one solver with more functionality?

(Comment: the reason i don't ask Bernd is that bast on previous post i think that he likes multiple solvers)
User avatar
uwestoehr
Veteran
Posts: 4961
Joined: Sun Jan 27, 2019 3:21 am
Location: Germany
Contact:

Re: [general] about the future of the FEM workbench

Post by uwestoehr »

NewJoker wrote: Wed Aug 17, 2022 9:36 am 1. Rigid body constraint
2. Support for multiple meshes
3. Beams with arbitrary cross-section
4. Simple creation of node and element sets
5. Advanced material models (orthotropy, hyperelasticity, creep and so on)
Can you explain 1., 3. and 4. a bit more please?
What constraint do you miss? At the moment the only open bug is that the temperature constraint is used for all bodies. Fixing this is on my ToDo. 3. is already possible in my opinion.
User avatar
uwestoehr
Veteran
Posts: 4961
Joined: Sun Jan 27, 2019 3:21 am
Location: Germany
Contact:

Re: [general] about the future of the FEM workbench

Post by uwestoehr »

NewJoker wrote: Wed Aug 17, 2022 12:00 pm The Analysis container is added with the ccx solver each time.
Yes. This seems to be the bias form former times ;) . I can understand this since up to now, Elmer support was not complete and had issues. For FC 1.0 we should drop this and let the user decide what to use. Don't forget that we also support Z88 which gives me for mechanics also proper results.
NewJoker wrote: Wed Aug 17, 2022 12:00 pm What they describe as finite elasticity, is usually called hyperelasticity (or nonlinear elasticity). Elmer offers only the Neo-Hookean model while CalculiX supports a wide range of models: Arruda-Boyce, Mooney-Rivlin, Neo-Hookean, Ogden, Polynomial, Reduced Polynomial and Yeoh.
Thanks. I guess FreeCAD's CCX support does not allow me to use them, right? However, as I wrote, I need to take the flow through the tube into account. The deformation of the tube changes the flow speed.
NewJoker wrote: Wed Aug 17, 2022 12:00 pm I assume that by existing geometry you mean objects designed in other CAD software and available e.g. in STEP format.
Not necessarily. In my case I constructed and 3D-printed everything on my own using 100% FreeCAD. But I see now that I am much faster on exporting a STEP and use this for ElmerGUI to benefit from the different Elmer settings I need but that are not yet supported in FreeCAD.
User avatar
uwestoehr
Veteran
Posts: 4961
Joined: Sun Jan 27, 2019 3:21 am
Location: Germany
Contact:

Re: [general] about the future of the FEM workbench

Post by uwestoehr »

johnwang wrote: Wed Aug 17, 2022 12:47 pm Elmer doesn't suggest to use elmergui. GUI is too much for them.
Where do you see this? I see instead an excellent tutorial manual based on the GUI (it has even 185 pages since it steps through different fields of physics). It is really excellent, try it out!. The official Elmer YouTube channel also shows how to work with the GUI.
User avatar
NewJoker
Veteran
Posts: 3015
Joined: Sun Oct 11, 2020 7:49 pm

Re: [general] about the future of the FEM workbench

Post by NewJoker »

uwestoehr wrote: Wed Aug 17, 2022 5:11 pm Can you explain 1., 3. and 4. a bit more please?
What constraint do you miss? At the moment the only open bug is that the temperature constraint is used for all bodies. Fixing this is on my ToDo. 3. is already possible in my opinion.
1. CalculiX offers a very useful and versatile type of constraint - rigid body. It can be used to make the parts rigid (as the name suggests) but also to apply torque and boundary conditions to rotational DOFs (currently it's not possible to simulate torsion of a bar with an arbitrary section) or to apply remote loads. Here's a discussion about this constraint with implementation ideas: https://forum.freecadweb.org/viewtopic.php?f=18&t=60892

This would be number one to implement for me.

3. Currently, only 3 beam section types are supported in FreeCAD - circular, rectangular and pipe. CalculiX offers two more predefined sections (elliptical and box) but also a general beam section which allows users to specify the section constants directly and thus simulate arbitrary section shape. I've tried to implement this but failed because of insufficient programming skills. Here's a thread about this: https://forum.freecadweb.org/viewtopic.php?f=18&t=60808

Maybe someone could help me implement this.

4. Many features of CalculiX are currently unsupported but can be added using the keyword editor. It would be much easier to define them with node and element set creation in GUI. This tool theoretically can create node sets: FEM CreateNodesSet
However, my research so far shows that it's very unintuitive, not documented and it seems that many of its options don't work at all. I think that this tool requires a separate discussion. Still, there's no option to create element sets. The possibility to create surfaces would also be nice.

uwestoehr wrote: Wed Aug 17, 2022 5:11 pm Thanks. I guess FreeCAD's CCX support does not allow me to use them, right? However, as I wrote, I need to take the flow through the tube into account. The deformation of the tube changes the flow speed.
You can define hyperelastic material using keyword editor - just change *Elastic to *Hyperelastic, select a model and specify constants for it. Check CalculiX's manual (section 7.72) for more details: http://www.dhondt.de/ccx_2.20.pdf

When it comes to fluid flow, CalculiX offers some basic capabilities but true power lies in coupling it with OpenFOAM which is possible with the help of preCICE software.
User avatar
uwestoehr
Veteran
Posts: 4961
Joined: Sun Jan 27, 2019 3:21 am
Location: Germany
Contact:

Re: [general] about the future of the FEM workbench

Post by uwestoehr »

HarryvL wrote: Wed Aug 17, 2022 1:46 pm Let me start by saying that I don’t know Elmer GUI nor the capabilities of its solver
Why do you suspect or judge it then?

While I have you here, can you please reply in this thread since I made a PR just for you and need your input:
https://forum.freecadweb.org/viewtopic. ... 66#p612366
HarryvL wrote: Wed Aug 17, 2022 1:46 pm Judging from your list you are focused on product design
I think t doesn't matter in what field you are. The task is usually to improve an existing layout or to create something new. I mean for e.g. a pillar of a bridge you need to use as less material as necessary while keeping the same stiffness or whatever. So just analyzing the model you created is only the first step. You need to optimize the layout of the pillar to save material but in a way that you later can build the pillar within your budget for manpower and equipment. Therefore you need a loop between designing and analyzing to optimize the geometry. And that is where I see that the FEM WB would be the big advantage compared to Comsol ElmerGUI etc.
HarryvL wrote: Wed Aug 17, 2022 1:46 pm I can’t imagine Elmer has practical tools for structural analysis.
Then check it out. FreeCAD 0.20.1 + my patch collection: https://forum.freecadweb.org/viewtopic.php?f=18&t=71058
supports almost all stress features Elmer provides:
https://wiki.freecadweb.org/FEM_EquationElasticity
User avatar
uwestoehr
Veteran
Posts: 4961
Joined: Sun Jan 27, 2019 3:21 am
Location: Germany
Contact:

Re: [general] about the future of the FEM workbench

Post by uwestoehr »

thschrader wrote: Wed Aug 17, 2022 2:57 pm How can I do geometry changes in elmer GUI?
As I wrote, a loop between designing and analyzing would be FreeCAD's strength because Comsol and Co. only support to lead in a STEP file.

This thread is not meant to discuss what solver is the best. CCX can do multiphysics as well as Elmer. But that dos not help us when we don't provide a proper model change loop.
For many applications, to get the results you need you use CCX or Elmer directly. Since FreeCAD will never be able to be as feature-complete as these solvers.
thschrader wrote: Wed Aug 17, 2022 2:57 pm Loading a new stp-file from FC? This brakes the model, you start again.
Does not happen here. I just have to remesh to update the mesh t the new geometry.
thschrader wrote: Wed Aug 17, 2022 2:57 pm In elmer GUI you have no visual presentation of forces/fixings like in FC
Its VTK visualization is even better than ours. For example the iso-area view is very useful. Adding this VTK feature for FreeCAD is therefore on my ToDo as well.
If you mean the highlighting of faces where forces act, I think i see that this is possible in Elmer too. However in FreeCAD we miss this feature for several constraints (all Python-based contraints like flow and potential)
thschrader wrote: Wed Aug 17, 2022 2:57 pm I did the flange calculation with ccx and elmer. Deformations are nearly equal,
but stresses are different, 480 MPa ccx vs 320 MPa elmer. Used elmerGrid an Umfpack solver.
But elmer runs faster, 19 sec vs 50 sec ccx.
I don't know enough but how are the results normed? What stress did you calculate. vonMises results are relative to itself as I understood it. So its maximum is not important but the difference between the min and max.
In general, to work with a solver, one need to invest time to check what settings have to be done. If you give me your particular file (also your Elmer project files) I can as k in the Elmer forum. Maybe we need to do the norming in FreeCAD like for the Eigenvalues results.
thschrader wrote: Wed Aug 17, 2022 2:57 pm Sooo... ccx is the first choice for me in daily work.
Yes. As I wrote above, this thread is not about what solver is better. Depending on your uses cases you will decide what to use.

What is important is that for CCX we have a major drawback that
- we only support its thermomech capabilities
- whenever I re-run the solver because made a change i the setup, the mesh or design, I have to rebuild my result pipelines to get the result info I need. This issue if for me the main blocker because it kills the workflow.
User avatar
uwestoehr
Veteran
Posts: 4961
Joined: Sun Jan 27, 2019 3:21 am
Location: Germany
Contact:

Re: [general] about the future of the FEM workbench

Post by uwestoehr »

Jee-Bee wrote: Wed Aug 17, 2022 3:17 pm If you start totaly from ground up a new FEM WB... What would you do as current more solvers == more choice == more better OR one solver with more functionality?
The same as FreeCAD does already but with the focus that before more solver features are added, there is a framework to setup a change loop.

Take my use case as example:
- a tube is compressed by a stamp
- what tube wall thickness, what curvature of the stamp's front plate and what displacement of the stamp is needed to get the maximal flow speed in the center and half center the tube's cross section while not exceeding a certain level at deformation at the tube's outermost material shell.

So a framework is necessary in which I can specify the positions of interest, in my case 3 positions. Then to setup the conditions at these 3 positions I like to have. From the transient analysis result, the framework takes from all calculated time steps (and thus the different positions of the stamp) and tells me the stamp position for which the conditions at the 3 positions were the closest to the desired ones.
The user can setup a level of acceptance for a condition. If all values are within the levels, one is done. If not, one can specify that the tube wall thickness is changed in a certain direction (thicker or thinner). If no success, the curvature of the stamp is changed and for every curvature change all wall thicknesses are tested again.

The result would be days of calculation, but one gets info on how to change the layout to achieve the design goals. or one realizes that with the design the goals cannot be reached. Then one can change e.g. the tube material and re-run the whole loop.
Jee-Bee
Veteran
Posts: 2566
Joined: Tue Jun 16, 2015 10:32 am
Location: Netherlands

Re: [general] about the future of the FEM workbench

Post by Jee-Bee »

uwestoehr wrote: Wed Aug 17, 2022 6:10 pm As I wrote, a loop between designing and analyzing would be FreeCAD's strength because Comsol and Co. only support to lead in a STEP file.
I think you forgot that companies as comsol, as ansys as .... Have plugins that work with the CAD software like Creo, SW, NX, .... So the iteration is there too. I don't say everybody pay for these couplings...


uwestoehr wrote: Wed Aug 17, 2022 6:10 pm Does not happen here. I just have to remesh to update the mesh t the new geometry.
I'm kind of curious is that only because of ccx vs elmer? because i have the same experience as thschrader. If i can do things better...

uwestoehr wrote: Wed Aug 17, 2022 6:10 pm What is important is that for CCX we have a major drawback that
- we only support its thermomech capabilities
- whenever I re-run the solver because made a change i the setup, the mesh or design, I have to rebuild my result pipelines to get the result info I need. This issue if for me the main blocker because it kills the workflow.
May i add another one? I had mentioned allready but i think in the other topic...
- Calculix is behind comparing to Elmer in developed features.
User avatar
NewJoker
Veteran
Posts: 3015
Joined: Sun Oct 11, 2020 7:49 pm

Re: [general] about the future of the FEM workbench

Post by NewJoker »

Jee-Bee wrote: Wed Aug 17, 2022 8:19 pm - Calculix is behind comparing to Elmer in developed features.
Right, when it comes to non-mechanical analysis types (acoustic, electromagnetic, fluid flow). But it's the other way around when it comes to capabilities in mechanical analyses. As it was already stated in this thread, Elmer doesn't even support standard contact and plasticity which makes it useless in many scenarios. Other nonlinear material models are also significantly limited (no creep, only one hyperelastic model and no features for laminated composite modeling). From what I know, it also has limited support for 1D elements and mixed meshes. There are likely more missing features like that but I don't know Elmer well enough to list them.

In my opinion (but also according to what many open-source FEM software users say), CalculiX is the best option for most mechanical analyses, in some cases, Code_Aster might be better since it offers advanced analysis and element types (but is extremely hard to use) while Elmer is the way to go for non-mechanical simulations. It may actually be one of the best open-source codes for electromagnetics, if not the best one. It might be also superior in terms of acoustics.
Post Reply