| Thema |
|---|
| Finite-Elemente-Analyse |
| Niveau |
| Anfänger |
| Bearbeitungszeit |
| N/A |
| Autoren |
| NewJoker |
| FreeCAD-Version |
| 1.0 oder neuer |
| Beispieldateien |
| None |
| Siehe auch |
| Arbeitsbereich FEM |
Die Vorbereitung der Geometrie und die Vernetzung sind entscheidende Bestandteile der Vorverarbeitung von Simulationen mit der Finite-Elemente-Methode (FEM). Während leicht zugängliche Simulationssoftware, die mit einer CAD-Umgebung (wie z. B. der Arbeitsbereich FEM in FreeCAD) verbunden ist, ist es verlockend, neue Konstruktionen sofort zu analysieren, aber man darf nicht vergessen, dass FEM eine fortgeschrittene Methode ist, die eine sorgfältig vorbereitete Geometrie und ein sorgfältig vorbereitetes Netz erfordert, um vernünftige, genaue Ergebnisse zu liefern. Die alte Regel garbage in, garbage out ist hier besonders wichtig. Es gibt noch weitere wichtige Einstellungen, von denen die Genauigkeit der FEM stark abhängt (z. B. Materialeigenschaften und Randbedingungen), aber die ersten Schritte und einige der häufigsten Fehlerquellen sind die Geometrievorbereitung und die Vernetzung, die auf dieser Seite behandelt werden.
While most designs consist of solids, it's often highly recommended to use wires or surfaces for FEM if the structure allows for that:
Schlankes Bauteil, das zur Analyse von Stabelementen geeignet ist - Mittellinie hervorgehoben
Dünnwandiges Bauteil, das zur Analyse von Schalenelementen geeignet ist - Mittelfläche hervorgehoben
Man sollte bedenken, dass die in CalculiX verwendeten Balken-, Schalen-, ebenen Spannungs-/Dehnungs- und achsensymmetrischen Elemente keine echten Elemente dieser Art sind (sie verwenden nicht die aus der Literatur und anderer Software bekannten klassischen Elementformulierungen) – sie werden intern zu Volumenkörpern erweitert. Dennoch wird ihre Verwendung in den oben genannten Fällen empfohlen.
The geometry used for FEM has to be valid. Most importantly, there can't be any intersections. It's a common issue often occurring when assemblies are modeled without proper constraints between the parts. The Part SectionCut tool can help find such interferences between parts. Of course, Part Fuse may help resolve them if they are intentional. Other issues with the geometry (such as non-manifold geometries, redundant edges or faces and so on) also have to be fixed before proceeding to meshing. The Part CheckGeometry tool can be helpful but visual checks are also important. When preparing a simulation using solid elements and in doubt whether the part is really solid or just a closed shell, the aforementioned tools (Part SectionCut and Shape Content tab of the Part CheckGeometry tool output) may clarify this.
Bei Oberflächengeometrien, die für Analysen mit Schalen- und 2D-Elementen verwendet werden, können die Normalenrichtungen der Oberflächen von Bedeutung sein. Sie dienen zur Unterscheidung zwischen der positiven und negativen Seite eines Oberflächen-Finite-Elemente-Netzes und beeinflussen Analysefunktionen wie Druckbelastungen und Kontakt. Darüber hinaus erfordern 2D-Analysen (ebene Spannung/Dehnung und achsensymmetrisch) mit CalculiX, dass die Normalen in die positive Z-Richtung zeigen. Sind sie invertiert, treten negative Jacobi-Fehler auf.
Um die Normalen zu überprüfen, verwende einen der folgenden Ansätze:
Um die Normalen umzukehren, verwende das Part FormUmkehren-Werkzeug.
Surface meshes, typically imported from STL, OBJ and similar files or created in the Mesh Workbench, can't be used directly for FEM. It is necessary to create a shape from mesh first. Then this shape can be meshed in the FEM workbench to create a surface (shell / 2D) finite element mesh. If a solid (3D) finite element mesh is needed, shape creation has to be followed by conversion to a solid.
Das größte Problem bei Formen, die aus Oberflächennetzen erstellt werden, besteht darin, dass alle ihre Dreiecke zu Flächen der erzeugten Form werden. In der FEM macht dies die Zuweisung von Analysefunktionen (wie Lasten und Randbedingungen) besonders problematisch. Bei ebenen Flächen können durch eine Verfeinerung nach der Konvertierung in einen Volumenkörper die überflüssigen Dreiecksflächen entfernt werden. In der Praxis bleiben jedoch die meisten Flächen erhalten, weshalb Oberflächennetze für die Verwendung in der FEM nicht empfohlen werden. Stattdessen sollten CAD-Geometrien (die in FreeCAD erstellt oder aus STEP/IGES-Dateien importiert wurden) verwendet werden. Manchmal kann es sogar sinnvoll sein, die Geometrie auf der Grundlage des Oberflächennetzes neu zu erstellen.
Designs prepared in CAD software are typically too detailed to be suitable for FEM simulations. In many cases, it's necessary to simplify them first. This step is often overlooked but it's very important because it can be hard to obtain a good mesh when the part is too detailed and even if such a mesh is obtained eventually, it might be very dense, leading to unreasonable solving times. Thus, one should always look at the design and try to simplify it as much as possible, leaving only those geometric features that may have a significant impact on the results (strength/stiffness) and thus can't be ignored. The following features are typically omitted:
Das Werkzeug Part FormelementEntfernen und der externe Arbeitsbereich Defeaturing können bei der Vereinfachung von Teilen für Simulationen hilfreich sein.
Ursprungsgeometrie eines Halters
Die nur mit dem Werkzeug Part FormelementEntfernen vereinfachte Geometrie des Halters
Bei Baugruppen (mehr dazu in einem der nächsten Abschnitte) können oft einige Teile aus Simulationen ausgeschlossen und durch Randbedingungen ersetzt werden, wenn sie an analysierte Teile angebracht waren. Ein solcher Ansatz ist gültig, wenn die ausgeschlossenen Teile deutlich steifer sind (im Sinne der strukturellen Steifigkeit, also unter Berücksichtigung nicht nur der Elastizität des Materials, sondern auch der Geometrie des Teils) als die analysierten Teile, mit denen sie verbunden waren. Das liegt daran, dass feste Randbedingungen Steifigkeit einführen (als ob das analysierte Teil mit einem unendlich steifen Bauteil verbunden wäre) und flexible Stützen wie Federelemente in der FEM-Workbench von FreeCAD bei Verwendung von CalculiX nicht verfügbar sind (Elmer hat FEM RandbedingungFeder).
Geometry simplification for FEM may also mean cutting it in one of the symmetry planes to make use of the planar symmetry assumption in the analysis. This assumption is valid only when all the following aspects of the model exhibit symmetry in a given plane:
The use of symmetry (1/2, 1/4 or 1/8 of the model) is recommended whenever possible since it can highly reduce the computational cost of the analysis. Another advantage is that it eliminates some rigid body motions, making it easier to constrain the part. A symmetry boundary condition should be applied to the faces belonging to the plane of the cut:
Applied force should be properly reduced if the symmetry plane cuts the region to which the force is applied (irrelevant when pressure load is used).
Modell von 1/8 eines zylindrischen Druckbehälters mit Randbedingungen Symmetrie und Innendruckbelastung
Another, less common type of symmetry available in FreeCAD FEM is cyclic symmetry. It can be defined using the tie constraint and makes it possible to analyze only a single representative sector of a structure consisting of such circular patterns around an axis. The assumption is that boundary conditions and loads also exhibit this form of symmetry. Tangential loads can be applied and thus torsion can be simulated this way. However, centrifugal load is commonly used with cyclic symmetry. This approach might be used e.g. for rotors, shafts, turbines, fans and flywheels.
Die sogenannte Partitionierung ist eine Aufteilung der Geometrie in kleinere Segmente. In anderer Software wird sie häufig für die Hex-Vernetzung verwendet, aber in FreeCAD kann sie auch aus anderen Gründen nützlich sein:
Die Hauptanwendung der Partitionierung ist, wenn eine Last (oder eine Randbedingung) nur auf einen ausgewählten Bereich der Oberfläche des Teils angewendet werden soll. Der einfachste Weg, dies für Volumenteile zu erreichen, besteht darin, eine Skizze mit einer geeigneten Kontur auf dieser Fläche zu erstellen und das Werkzeug Part BoolescheBestandteile zu verwenden, um die Fläche mit der Skizze zu teilen.
Bauteil mit Teilfläche zum Aufbringen einer Last oder Anwenden einer Randbedingung
Ein weiterer Grund für die Partitionierung ist, wenn mehrere Materialien auf ein einzelnes Teil aufgebracht werden müssen (ohne mehrere miteinander verbundene Teile verwenden zu müssen). In diesem Fall kann die Partitionierung mithilfe einer Bezugsebene und dem Werkzeug Boolesche Bestandteile im Modus „Compsolid” durchgeführt werden.
In the case of surface (shell) geometries, the easiest way to make a sketch-based partition could be to use the Boolean Fragments tool (like for the partitions on the faces of solids). However, as explained here, when mesh group creation is enabled in the FEM preferences, it may not work properly and the following approach should be used:
Quadratische Platte mit kreisförmiger Unterteilung
Partitioning only the selected faces of a solid using datum planes instead of sketches without splitting the whole volume is also tricky. One possible approach is to:
Another way is to:
Other ideas can be found in this forum thread but they are more case-specific.
Zylindrische Fläche einer Bohrung, die durch eine Ebene unterteilt ist, um eine 180°-Belastung durch einen Stift auszuüben
One of the current major limitations of the FEM workbench is that multiple meshes are not supported. In practice, this means that one cannot mesh each part of the assembly individually and then connect the parts with proper constraints for the analysis. Instead, it's necessary to create a single object containing all the parts of the assembly and mesh it. There are several different options here, all relying on Part boolean tools. The choice depends on the desired effect - whether the individual parts/volumes and their boundaries should be selectable (e.g. for material assignments or definitions of boundary conditions acting on internal faces) or not:
It's important to mention that if the parts are exactly touching, a continuous mesh will be created on the boolean object and no constraints will be needed for the simulation (unless Part Compound is used and nodes aren't coincident or Gmsh's Coherence Mesh property is set to false). If there's even a small gap (or an intersection within a Part Compound) between the parts, the mesh won't be continuous and constraints like tie or contact will be needed. Running a frequency analysis is a good way to reveal if the mesh is continuous or not - if the parts are not connected, the first mode shapes with deformation visualized using Warp filter will show separation - the parts will "fly away".
Die erste Modusform einer Frequenzanalyse, visualisiert mit dem Warp-Filter – zwei Würfel mit einem kleinen Anfangsabstand wurden analysiert.
It is often advised to use Boolean fragments with Compsolid mode and then apply a Compound filter to it, particularly when analyzing multi-material assemblies and solids embedded in other solids without cutouts (like in the FEM Shear of a Composite Block tutorial). As can be seen in the Shape Content tab of the Check geometry tool (it is important to use this tool when in doubt in such cases), Compound filter removes the Compound and leaves only the Compsolid consisting of multiple solids connected by their faces.
Behelfslösungen für Fehler wie:
ERROR: femelement_table != count_femelements
Error in get_femelement_sets -- > femelements_count_ok() failed!
und:
*ERROR in calinput: no material was assigned
to element ...
inklusive:
Solche Fehler werden durch fehlende oder sich überschneidende Materialdefinitionen in einigen Elementen verursacht. Dieser Forumsbeitrag enthält Referenzen, die dies anschaulich veranschaulichen, und der gesamte Faden kann auch bei ähnlichen Problemen hilfreich sein.
Selection of internal regions (e.g. faces/volumes) can be tricky. It might be needed for the application of different materials, body loads or boundary conditions (especially in thermal and electromagnetic analyses). Several ways are possible:
Too coarse mesh is one of the most common sources of inaccuracies and other issues in FEM. It's often a partial fault of automatic mesher settings - they typically generate very coarse, unsuitable meshes when the element size is not manually specified but left with a default value. One should always know the approximate dimensions of the part, especially the size of the smallest relevant feature (Std Measure tool can be used to find it) and specify the proper maximum element size based on that. There is also a minimum element size setting that can prevent the creation of too tiny elements around small geometric features which may lead to unnecessarily dense meshes (and sometimes even FreeCAD crashing or freezing when trying to generate such meshes). Generally speaking, it's better to start with a coarser mesh (taking less time to generate), see what it looks like (some experience is necessary) and refine it if necessary. It often makes sense to use dense mesh only around the areas of interest (locations with large stress gradients/concentrations - notches) and relatively coarse mesh away from them. This way, the number of elements can be significantly reduced, leading to shorter solving times. Local mesh refinement is defined using FEM MeshRegion.
Standardwerte, zu grobes Netz
Global verfeinertes Netz
Lokal verfeinertes Netz
Die Wahl des Elementtyps ist nicht einfach und hängt von vielen Faktoren ab, aber die allgemeine Regel lautet, dass hexaedrische und quadrilaterale Elemente gegenüber tetraedrischen und dreieckigen Elementen vorzuziehen sind. Komplexe Geometrien können jedoch nicht mit hexaedrischen Elementen vernetzt werden, und FreeCAD kann diese nicht ordnungsgemäß generieren (nur unter Verwendung des Unterteilungsalgorithmus des Gmsh-Mesher, dessen Ergebnisse jedoch nicht den Erwartungen an ein hexagonales Netz entsprechen). Quad- oder quad-dominierte Netze können normalerweise auf Oberflächen generiert werden – siehe dieser Forenthread). Hexaedrische Elemente können aus externen Netzgeneratoren importiert werden, wie z. B. Gmsh und im Arbeitsbereich FEM verwendet, wie in diesem Video gezeigt.
Die Wahl der Elementordnung (erste oder zweite Ordnung) hängt von den Analysebedingungen ab, in den meisten Fällen werden jedoch Elemente zweiter Ordnung bevorzugt. Dies gilt insbesondere für dreieckige und tetraedrische Elemente – ihre linearen Versionen erster Ordnung werden normalerweise nicht für den regulären Gebrauch empfohlen und sollten nur als Füllelemente in Bereichen von geringer Bedeutung verwendet werden. Da FreeCAD jedoch keine hexaedrischen Elemente korrekt generieren kann, können in einigen Fällen lineare Tetraeder verwendet werden, wenn die Netze dicht genug sind. Insbesondere bei der Durchführung von Analysen mit Kontakt-Randbedingungen.
If the above rules are followed (especially regarding geometry validity, defeaturing and element size selection), the mesh should be generated correctly. However, in some cases, the geometry can't be simplified too much, or the modeling procedure is appropriate but leads to small edges and faces anyway. Then meshing with second-order elements may fail due to negative Jacobians. The reason is that meshers have to follow the CAD model and put the mid-side nodes of second-order elements on the geometry. With more complex shapes, it may lead to elements being stretched so much that they become inverted. Jacobian is one of the most common mesh quality measures. It represents the element's deviation from the ideal shape. It becomes negative when the element turns inside out (becomes inverted) either due to large deformation during the analysis (not considered here) or because of the aforementioned meshing issues. Negative Jacobians in FreeCAD FEM might be reported by Gmsh or by CalculiX. Their locations in the mesh are highlighted when CalculiX analyses are submitted using the Run solver calculations button. The following tips can help eliminate them:
Unabhängig von diesen Tipps ist es wichtig, noch einmal zu betonen, dass negative Jacobimatrizen in der Regel auf unordentliche Modellierungsansätze und mangelnde Vorbereitung der Geometrie für die Analyse zurückzuführen sind (besonders häufig bei STEP-Modellen, die von verschiedenen Webseiten heruntergeladen wurden). Selbst wenn in solchen Fällen letztendlich ein Netz generiert wird, sind die Ergebnisse wahrscheinlich von schlechter Qualität (denke an die im ersten Absatz erwähnte GIGO-Regel). Daher sollte die Bereinigung und Vorbereitung der Geometrie für die FEM immer Vorrang haben.
Mesh convergence studies are recommended in all serious projects requiring accurate results. The reason is that the results can change a lot, approaching correct values when the mesh is refined. The following approach should be used:
It usually helps to create a plot with a given result vs mesh density. This way it's easier to notice when the results start to converge. The acceptable difference in results between two runs is usually around a few percent (e.g. below 5%).
In some cases, it may happen that the maximum stress will be growing indefinitely regardless of how dense the mesh will be. Such a non-physical effect is known as a stress singularity. It may occur due to the following reasons:
Typical ways of dealing with stress singularities are:
Typical mesh convergence plots:
- displacement (green curve) converges quickly,
- maximum stress at a notch like a hole (blue curve) needs more iterations of mesh refinement to converge,
- maximum stress at a sharp corner with a fixed boundary condition (red curve) doesn't converge at all. Stress singularity occurs and a small fillet would have to be added and the connection would have to be modeled in more realistic, flexible way to avoid this behavior.
Constraints