FEM Geometry Preparation and Meshing: Difference between revisions

From FreeCAD Documentation
No edit summary
Line 19: Line 19:


== Geometry simplification ==
== 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).

Revision as of 13:36, 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).