FEM Geometry Preparation and Meshing: Difference between revisions

From FreeCAD Documentation
Line 26: Line 26:
* bolts, threads,
* bolts, threads,
* decorative elements (logos, markings).
* decorative elements (logos, markings).
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:
* geometry,
* loads,
* boundary conditions,
* response (one has to be careful with frequency/buckling analyses utilizing symmetry - antisymmetric mode shapes won't be obtained).
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:
* translation in the direction normal to the symmetry plane should be blocked for solid parts,
* translations in the direction normal to the symmetry plane and rotations other than around the axis normal to the symmetry plane should be blocked for shell and beam parts.


== Geometry partitioning ==
== Geometry partitioning ==

Revision as of 13:57, 28 December 2023

Background

Geometry preparation and meshing are crucial parts of preprocessing of simulations using Finite Element Method (FEM). While easily accessible simulation software connected with CAD environment (such as the FEM Workbench in FreeCAD) makes it tempting to perform analyses on fresh designs, it is very important to remember that FEM is advanced method and requires properly prepared geometry and mesh to provide reasonable, accurate results. The old garbage in, garbage out rule is particularly important here. There are also other crucial settings on which FEM accuracy highly depends (such as material properties and boundary conditions) but the first steps and some of the most common sources of issues are geometry preparation and meshing, discussed on this page.

Types of geometry used for FEM in FreeCAD

  • Lines (wires) - used for analyses with beam elements
  • Surfaces - used for analyses with shell elements
  • Solids - used for analyses with solid elements

Choice of the type of geometry

While most designs consist of solids, it's often highly recommended to use wires or surfaces for FEM if the structure allows for thatː

  • if a part is slender (long and thin) and beam-like and has a regular cross-section of one of the supported beam section types (rectangular, circular or pipe) then it should be analyzed using beam elements (unless there are some specific forms of loading, response or unavoidable geometry details that invalidate this assumption). Basically, one should draw a centerline (some tips on how to extract it from existing solid geometry can be found in forum thread) and apply proper beam section with optional rotation. There's no single rule dictating when beam elements can be used but it's often advised that the cross-section dimensions should be < 1/10 of part's length for the beam assumption to be valid.
  • if a part is thin-walled (such as sheetmetal parts) then it should be analyzed using shell elements (unless accurate contact results are needed or there are some limitations of shell elements are encountered). This is very important and often overlooked. To obtain proper accuracy of results (especially when bending is involved) for thin-walled parts, one needs a few elements (at least 3-5) in the thickness direction. This usually results in large meshes (especially when tetrahedrons are used since hexahedral elements can't be generated in FreeCAD) and large computational cost - high computer power requirements and long solving time. To obtain the geometry suitable for analysis with shell elements, one should draw a midsurface of the part (some tips on how to extract it from existing solid geometry can be found in forum thread, one and one) and apply proper thickness. Again, there's no single rule but it's usually recommended that the thickness should be < 1/10 of a typical global dimension (length/width) for the shell assumption to be valid.

One should remember that beam and shell elements used in CalculiX are not true beam/shell elements (they don't use the beam/shell element formulations known from literature and other software) - they are internally expanded to solids. Still, their use is recommended in the aforementioned cases.

Geometry validity

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.

Geometry simplification

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 too 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 and thus can't be ignored. The following features are typically omitted:

  • small fillets and chamfers,
  • small holes,
  • other small details,
  • welds,
  • bolts, threads,
  • decorative elements (logos, markings).

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:

  • geometry,
  • loads,
  • boundary conditions,
  • response (one has to be careful with frequency/buckling analyses utilizing symmetry - antisymmetric mode shapes won't be obtained).

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:

  • translation in the direction normal to the symmetry plane should be blocked for solid parts,
  • translations in the direction normal to the symmetry plane and rotations other than around the axis normal to the symmetry plane should be blocked for shell and beam parts.

Geometry partitioning

So-called partitioning is a division of the geometry into smaller segments. In other software, it's commonly used to allow hex meshing but in FreeCAD it can be useful for other reasons too. The main application of partitioning is when a load (or a boundary condition) has to be applied only to a selected region of the part's surface. The easiest way to achieve it is to create a sketch with proper contour on that face and use the Part Boolean Fragments tool to split the face with the sketch. Another reason for partitioning is when multiple materials have to be applied to a single part (without having to use multiple parts connected together). Then partitioning can be done using a datum plane and Boolean Fragments tool with the Compsolid mode.

Assembly geometries