Best practices when beginning design with FEM?

About the development of the FEM module/workbench.

Moderator: bernd

Post Reply
pipe2null
Posts: 5
Joined: Sun Sep 06, 2020 6:31 am

Best practices when beginning design with FEM?

Post by pipe2null »

I'm working my way through tutorials and whatnot to learn how to do FEA/FEM in freecad. I'm in the process of designing (and eventually building) a CNC machine. I need to model and do analysis on the whole design as well as sub-sections, from material->work bed->frame->linear rails/bearing blocks/->...gantry...->spindle motor and bit. The whole structural loop.

A few questions, hopefully with simple answers:
  1. I've had trouble finding tutorials/vids for using FEM for more complicated analysis beyond squishing very simple parts. Is anyone aware of more complicated examples, like multiple analysis in one file, or analysis of parts individually plus in combination?
  2. Are there any Best Practices for organizing a document topology/part hierarchy for use with FEM?
  3. What is the cleanest strategy for setting up FEM with a design (for example, I have the impression that using Gmesh does not automatically re-mesh when you change dimensions on a part, but the currently-not-available netgen would?)
  4. If anyone has used freecad for modelling/analyzing a CNC or similar type design, I'll take any advice you're willing to offer. A partially fleshed out project file with a few parts and analysis would be ideal to see good ways of structuring bodies, parts, global parameters (parametrics stored in spreadsheet versus named constraints in sketches, etc). Basically, for this type design/analysis, any suggestions on optimum workflow when using freecad would be appreciated.
One more question (or issue?). I've been digging into the following tutorial and I am stuck at the "Select CompoundFilter:Solid2" part:
https://wiki.freecadweb.org/FEM_Shear_o ... site_Block

For the life of me, I cannot figure out how to select the obscured block/second sub-element when attempting to reference through the CompoundFilter element, and the "S,E" shortcut just creates a SolverElmer which is definitely not what the tutorial is showing.

Any help/pointers would be much appreciated!
Jee-Bee
Veteran
Posts: 2566
Joined: Tue Jun 16, 2015 10:32 am
Location: Netherlands

Re: Best practices when beginning design with FEM?

Post by Jee-Bee »

To be onest. the power of FC FEM is more in the direction of static (building )structures.
It would be great if FC get some love related to more complicated (machine) situations.
for example contact is implemented but for every contact a new set have to be created.
2020-09-09 14_02_59-FreeCAD 0.19.png
2020-09-09 14_02_59-FreeCAD 0.19.png (15.24 KiB) Viewed 1155 times
while i like to see that a single master with multiple slaves (or multiple masters and on slave of course) would be aloud.

i can imagine that you start with a static situation and after that kind of (steady state) dynamics. but from that point it becomes more difficult.
for example:
  • The frequency analysis isn't able to handle loads(needs extra step).
  • When using masses and springs FC isn't able to export a single point for additional functions
  • Forces and pressures are implemented but there is no way to change the amplitude / duration over time.
You can edit the inp file so a lot is possible after initial creation.
  • For example a frequency analysis with a force can be created with a static analysis and add the required frequency analysis after it.
    the pity is that there is some mismatch between the showed model and the result (if you need to show the results to somebody else)
  • for example you want to create a frequency analysis with a object where a mass is attached to. You start with a modified static analysis but a static analysis is not aloud without fix/ displacement. When you modified the inp file to what you want then the result is not related with the initial setup.
pipe2null
Posts: 5
Joined: Sun Sep 06, 2020 6:31 am

Re: Best practices when beginning design with FEM?

Post by pipe2null »

Hi Jee-Bee, thanks for the feedback!

Hmm... Well, I am not against getting my hands dirty in code, but I am extremely rusty. And being bran new to the entire subject of FEA, I wouldn't trust any code that I may end up writing, well, at least not initially... A few months back I bought a book on Python (never needed that specific language before). A real, physical book, made of paper. Do kids these days know what those are? Arg, I might be getting old, but I'm in denial. HAH! I digress.

Purely static analysis is exactly what I need to start with so I can get calculated estimates on my (personal use) CNC frame stiffness and beef up any parts that need to be thickened up, bracing, etc... And then I'll finally be able to do a reasonably complete costing of the different parts. And then redesign much of the machine to get it somewhere remotely close to my current budget. By that point I should be familiar enough with the overall process of design->analyze->cost->redesign, etc. and with enough working knowledge of freecad to dig a little deeper into FEM and see what dynamic analysis I can do, as well as some thermo calcs (I had a crazy idea of building in a heated bed).

At this exact moment, I'm dead in the water on using FEM due to a calculix-result loading problem with my current build of fc on my linux casual-use machine, and my primary dev machine is dead and it's replacement from Lenovo won't arrive until the end of the month.

In the meantime, I'm trying to get my design into freecad-form, but structuring the elements, bodies, parts, spreadsheets, etc in the document to be organized optimally for doing FEA on a 100% parametrized design (no unnamed dimensional constraints allowed). Many, many years ago I did some autocad, more recently I was primarily using openscad until I outgrew it and switched to Fusion. But doing the number of analysis runs I will need to do for my CNC project will be waaaaay too expensive to do with Fusion, so I am transitioning over to freecad (Yay! Open source!).

I can figure out the "100% parametrized" part no problem, either master sketch with named constraints or a master spreadsheet (although I'll always take suggestions), but I have no real idea on the best way to organize everything when I need to do analysis on individual and combinations of bodies, parts, assemblies, etc:
- Can this all be done within a single document/file?
- Do I have to split sections of the design into separate files due to some FEM related requirement/limitation?
- Manually running individual FEM analysis for different design sub sections is ok (but hopefully there is a way to automate this for overnight test runs), but how do I set up my document so meshes and other FEM-related objects are automatically updated when I change part dimensions or other parameters?

My current questions are more along the lines of architecting/organizing the freecad software objects in my file/document(s) so repeatedly performing many different FEM analysis on evolving parametrized components and subcomponents of my CNC design requires the least amount of pain, and minimizing the opportunity for ID:10-T errors caused by myself. It is not a question a newbie like myself can answer, only someone with experience doing more complex FEM would have insight on this, although I'll always appreciate suggestions regardless of experience level.
User avatar
-alex-
Veteran
Posts: 1857
Joined: Wed Feb 13, 2019 9:42 pm
Location: France

Re: Best practices when beginning design with FEM?

Post by -alex- »

pipe2null wrote: Wed Sep 09, 2020 7:47 pm My current questions are more along the lines of architecting/organizing the freecad software objects in my file/document(s) so repeatedly performing many different FEM analysis on evolving parametrized components and subcomponents of my CNC design requires the least amount of pain, and minimizing the opportunity for ID:10-T errors caused by myself. It is not a question a newbie like myself can answer, only someone with experience doing more complex FEM would have insight on this, although I'll always appreciate suggestions regardless of experience level.
IMHO if you want to design some reliable parametric model for FEM analisys you will get troubles with the well known topological naming issue in FreeCAD.
I'm not saying you can't perform the analysis. I'm saying if you modify a lot of times your design to improve it so that involves some additional faces or removal faces, then the reference faces used for constraints forces or for contacts will be broken. So you will need to fix that by selecting again every reference which is broken.
BTW FreeCAD is very convenient to analyse static FEM models (with or without contacts), but maybe less convenient to modify them.
So, if I were you I would design a model specifically dedicated to FEM analysis, I would design it as simple as possible. A very very simplified model, in order to avoid the 20 last percent of Pareto's law ;)
And about architecture, just my 2 cents, I use to design all parts and sub parts in the same file.
What else? Hum, FEM WB doesn't support shell/solid combined meshes for now.
Finally: use FreeCAD 0.19 release.


Good luck
pipe2null
Posts: 5
Joined: Sun Sep 06, 2020 6:31 am

Re: Best practices when beginning design with FEM?

Post by pipe2null »

Hi alex, great feedback, thanks!

Just to confirm, is the "well known topological naming issue" you are referring to the requirement (I think "requirement"?) for each software object to have a unique name in the overall tree, regardless of the objects position in the tree?

Broken ref's of FEM constraint obj's etc:
Hmm. Makes sense, good point. So document-architecturally speaking, I should figure out a way to arrange parts and constraints so broken ref's are isolated to the part and directly related FEM obj's I'm doing a major renovation on... Perhaps use something like a zero thickness block as the border between part assemblies so at least all references external to the sub-assembly remain valid? Hmm... I'll have to think about that.

Is there a "clean/standard" way with freecad to manually design/create 2 or more versions of a body and switch between them or toggle which one is enabled globally (Detailed versus Overly-Simplified)?:
For FEA it is typically recommended to ignore things like fillets, countersinks, and inconsequential bits of geometry, so using a simplified model was on my radar, but perhaps I underestimated how simplified I would need to make it. If I will have to maintain 2 versions of my design, both a detailed and an over-simplified version, it would be really good if I could house both versions at the same place in the document tree so it is easier to make sure both versions are using identical references to external parameters (dimensions, etc.). The same thing could be handy for evaluating completely different concepts of the same part as well, like machine gantry variations, provided I ensure external contact points remain uniform.

Using 0.19 release:
I tried the appimage and it crashed on me, but rather than attempting to get it working, I figured it would be a better use of time to get a tip-of-tree build working. I could be very wrong on that. I have the impression that I will probably have to do some coding myself in order to complete my CNC design with a reasonable amount of the FEA analysis "you are supposed to do" prior to shelling out a lot of ca$h for parts. I do *not* have the expertise to code up mechanical engineering analysis, but if Calculix already does it and the functionality just needs to be exposed up through the software stack... Well, I might be able to do something there... But I am RUSTY... Heh.

If one were to start digging in to freecad code (for purposes of FEA/FEM), is there a better starting checkin than tip-of-tree? Don't expect anything out of my current coding ability, but I might as well take a hack at it.
User avatar
-alex-
Veteran
Posts: 1857
Joined: Wed Feb 13, 2019 9:42 pm
Location: France

Re: Best practices when beginning design with FEM?

Post by -alex- »

pipe2null wrote: Thu Sep 10, 2020 9:15 pm Just to confirm, is the "well known topological naming issue" you are referring to the requirement (I think "requirement"?) for each software object to have a unique name in the overall tree, regardless of the objects position in the tree?
No it is not. Topological naming issue is due to geometic kernel OCCT used by FreeCAD. Have a look at the documentation Topological_naming_problem
This issue is not fixed in FreeCAD master branch yet, but a fix was imlplemented by developer @realthunder in his branch of FreeCAD. More informations here https://forum.freecadweb.org/viewtopic.php?f=10&t=27278.
So, if you want experienced the great features of FreeCAD 0.19 with no toponaming issue you could use his branch which contains also assembly 3 workbench BTW: https://github.com/realthunder/FreeCAD_ ... 3/releases
So, you could use asm3 branch to modelise your FEA model parametrically in a more reliable way.
You could also design your models with asm3 WB, pretty convenient (have a look in forum).
However, be aware that asm3 branch has it's own features, so models designed in it could be not fully compatible with FreeCAD standard (master branch I mean).
FYI toponaming algorithm could be merged in FreeCAD 0.20.
Broken ref's of FEM constraint obj's etc:
Hmm. Makes sense, good point. So document-architecturally speaking, I should figure out a way to arrange parts and constraints so broken ref's are isolated to the part and directly related FEM obj's I'm doing a major renovation on... Perhaps use something like a zero thickness block as the border between part assemblies so at least all references external to the sub-assembly remain valid? Hmm... I'll have to think about that.
IMHO I don't think it is a valuable workaround.
Using 0.19 release:
I tried the appimage and it crashed on me
Please send your system informations has requested here: https://forum.freecadweb.org/viewtopic.php?f=3&t=2264
Don't expect anything out of my current coding ability
Neither mine, I'm an end user, I'm a noob in coding ;)
Post Reply