How to Set Up Gravity Loads in FreeCAD FEM
Setting up gravity loads—also referred to as self-weight—in FreeCAD's Finite Element Method (FEM) workbench allows you to simulate the internal stresses and deformation caused by an object's own mass. This process requires creating an FEM analysis container, generating a solid mesh, assigning a material with a defined mass density, applying fixed boundary conditions, and configuring the self-weight constraint before solving the simulation.
Step 1: Prepare the Model and FEM Container
- Open your 3D model in FreeCAD and switch to the FEM Workbench using the workbench selector.
- Click Analysis container (the yellow ball icon) in the toolbar to create a new analysis.
- Select your solid part and generate a mesh using either Netgen or Gmsh. Ensure the generated mesh is placed inside the active Analysis container in the tree view.
Step 2: Assign a Material with Density
Gravity calculations depend entirely on the mass of the object, which is derived from volume and density.
- In the FEM toolbar, click Material for solid (the red mechanical part icon).
- Choose a preset material from the dropdown list (such as Steel-Generic or Aluminum-Generic) or create a custom one.
- Verify that the Density field contains a valid value (e.g., \(7850\text{ kg/m}^3\) for steel). If density is missing or zero, the gravity load will not generate any forces.
- Add your solid object to the material's geometry selection list and click OK.
Step 3: Apply Boundary Conditions
A model subjected only to gravity must have at least one anchor point to prevent unconstrained rigid body motion:
- Click Constraint fixed (the padlock icon).
- Select the face, edge, or vertex where the part is supported.
- Click Add, select the geometry, and click OK.
Step 4: Add the Self-Weight (Gravity) Constraint
- In the toolbar, click the Constraint self weight icon.
- In the task panel, configure the gravity direction vector and
acceleration value:
- Direction: Gravity acts downward relative to your
coordinate system. If the vertical axis is Z, set the vector to
x: 0,y: 0, andz: -1. - Acceleration: The default acceleration is standard Earth gravity (\(9.81\text{ m/s}^2\) or \(9810\text{ mm/s}^2\), depending on your unit settings). You can increase this value to simulate higher g-forces or load factors.
- Direction: Gravity acts downward relative to your
coordinate system. If the vertical axis is Z, set the vector to
- Click OK to add the constraint to the analysis container.
Step 5: Run the Solver and Inspect Results
- Double-click the SolverCcxTools object inside the Analysis container.
- In the task panel, select Static analysis.
- Click Write .inp file to generate the input deck, then click Run CalculiX.
- Once the solver finishes without errors, close the task panel.
- Double-click the resulting CCX_Results object to inspect the deformation, displacement vectors, and Von Mises stress generated by the gravity load.