⏱️ Calculating read time...
Explained: Modeling Compliant Mechanisms in ANSYS

Explained: Modeling Compliant Mechanisms in ANSYS

One of the more cutting-edge forms of modern engineering exploration is in compliant mechanisms, which intentionally use the deformation of parts to transmit force or alter geometry [1]. Designing and evaluating compliant mechanisms can be difficult, because they are often nonlinear and vary in behavior from simple geometry changes. One robust method to analyze their complex behavior is through implementing ANSYS, a Finite Element Analysis (FEA) software package, along with AI-assisted Python scripts.

Designing the Model

Compliant mechanisms are often simple designs, but somewhat difficult to analyze. Many of them are 2D extrusions while others are origami-based, also constructed from primarily planar configurations [2]. When folded out, a complex origami pattern looks like little more than lines on paper. Yet, when folded in the correct order, it can become an impressively complex shape. 

Figure 1: An origami pegasus [3].

Because of this complexity, compliant mechanisms can be very difficult to analyze from hand calculations. Although methods like pseudo-rigid body models exist, they become increasingly complicated with more degrees of freedom and differences in beam thicknesses [4]. Creating Computer-Aided Design (CAD) models and analyzing them with FEA in ANSYS can increase the pace and thoroughness of compliant mechanism modeling. Models can be created in a CAD software such as Onshape (rather than ANSYS’s own SpaceClaim, which is better at simplification than parametric design), which offers a streamlined design process.

Figure 2: An example of a compliant mechanism during its design process in Onshape. The outer blue shell is what will house different configurations to test variations in geometry. The Y-axis is top to the bottom and the X-axis is left to right, modeled in mm. Image by the author.

Design Iterations

Figure 3: The 3D model of two different configurations of my compliant mechanism based on the sketch in Figure 2.

Above in Figure 2 is a compliant spring mechanism that I designed in Onshape, along with a 3D display in Figure 3. I used linear patterns and variables to make it adjustable to test out a variety of different geometry configurations. This allows me to easily export different STEP files to import into ANSYS. To simplify the modeling process, I used a skeleton frame for each mechanism. I removed 0.01 mm from the max Y on the skeleton so that the face where the force is applied becomes the new max Y face and applied fixed supports on the minimum X and maximum X faces. There are four variables that can be configured: support bar thickness (t), the gap between support bars (g), number of support bars (#), and support bar angle (d). I named each configuration after this pattern: “Test Mechanism_t_g_#_d”.

Analysis in ANSYS

While you can manually access ANSYS and set up the model, when doing repeated experiments, using a Python script helps to automate the process. IronPython is used for much of ANSYS Workbench, so it integrates well into the pre-existing software. The model I made in Figures 2 and 3 is an extrusion of a 2D sketch, so I could analyze it purely from DXFs/DWGs, but I prefer to use STEP files for a more thorough process and to support higher-complexity modeling.

I used ANSYS 2023 R2 for modeling. Employing Gemini and Claude, I built a Python script that does the static analysis and another script that runs a batch of mechanisms sequentially (see the links for the Python scripts). Without some familiarity with ANSYS, it is much more challenging to correctly prompt AI to build the scripts. For example, even though I explicitly told the AI models that I was using 2023 R2, they would conflate versions and make assumptions. One tactic I like to use in code prompts is to have AI include print statements for debugging. All of my Python scripts were vibe-coded, because I had no experience with IronPython, but I do have extensive experience with Python itself. 

The model assumes that there is a mass (called the Striker) that impacts the contact face of the spring. The script needs a mass and velocity for this striker to calculate its kinetic energy. At the top of the static analysis script are all of these parameters:

  • STRIKER_MASS_KG = 20.0

  • VELOCITY_M_S = 1

  • YIELD_MPA = 250.0  # Structural Steel (Mechanical default material)

  • STROKE_MM = 4.0 # pad displacement applied in the static solve

  • ELEMENT_SIZE_MM = 0.60 # in-plane element size

  • Z_LAYERS = 2 # hex layers through the extrusion depth

  • MAX_ELEMENTS = 40000 # skip the solve if the mesh is larger than this

The first three parameters are for the material and situation, which is constant through these simulations. Element size, Z layers, and max elements in the mesh are there to tune the model. The primary variable to change is the stroke, representing the displacement applied to the contact face by ANSYS. It will always force the face to that distance, even if it results in an unrealistic result (like the part bending in on itself). With a stroke of 4 mm, the ANSYS script executes in under two minutes per model, allowing for rapid batch analysis.

Figure 3: How the mechanism looks in ANSYS.

Figure 4: The mechanism after a mesh is applied. Note that this is actually a different mechanism than the one above, with the support beams at an angle of 85. Notice as well how there are two z-layers of thickness.

Figure 5: The mechanism at the max deflection with the force applied to the green highlighted face. This mechanism is the same as the one above.

Understanding the Results

Running the batch analysis exports a plot of the results with force vs time step, with a dot on the curves where the initial kinetic energy is stored in the spring. In an experiment with a real model, that is the distance at which the mechanism would be expected to spring back. Because the time steps are 1:1 to displacement, the plot is really a force vs displacement graph. 

Figure 6: The plots of the force-displacement curves of the different mechanisms.

The curvature of the force-time curve indicates that these are not linear springs. Most of them curve upwards, meaning they become more stiff as displacement increases. One spring has a particularly unusual curve, which is worth another look. From ANSYS, the response of the spring can be animated.

Figure 7: A .gif of a 95 degree mechanism through each time step. This displays the time-displacement reaction, which would require a variable-force input, as shown above in Figure 6.

Watching the animations helps us understand where peak stress is occurring and what can be done to modify the mechanism’s behavior. If we saw stress peaks around edges, we would know that we should add fillets to reduce stress concentration [5]. If we wanted to reduce the displacement required to absorb the energy, we would prefer a mechanism with increasing stiffness, which we could primarily achieve by increasing bar thickness. 

Figure 8: A .gif of another, much more complicated compliant mechanism.

While the springs depicted here are relatively simple, some can be far more complex, like the spring pictured above in Figure 8. Modeling compliant mechanisms in ANSYS is a great way to visually understand a spring’s behavior and change its geometry to achieve desired results. Using Python scripts substantially decreases the time needed to model these springs, and when a designer wants to compare models, it also offers a robust system for doing so. Together, Python and ANSYS make compliant mechanism design faster, more efficient, and more intuitive.

REFERENCES

[1] Howell, Larry. “Compliant Mechanisms and Origami-Based Engineering Explained.” BYU Compliant Mechanisms Research Group, 2021, compliantmechanisms.byu.edu/post/compliant-mechanisms-and-origami-based-engineering-explained.

[2] Magleby, Spencer. “Origami Design: A Fuzzy Boundary between Art and Science.” The BYU Design Review, 2021, www.designreview.byu.edu/collections/origami-design-a-fuzzy-boundary-between-art-and-science.

[3] “7 of the Most Breathtaking Origami Pieces Ever Made.” Bored Panda, www.boredpanda.com/i-have-found-7-most-breathtaking-origami-ever-made/.

[4] Teo, Daniel. “Review: Pseudo-Rigid-Body Model (PRBM).” Daniel Teo Design Technology, danielteodesigntechnology.wordpress.com/theoretical/review-pseudo-rigid-body-model/.

[5] “Fillet vs. Chamfer: A Comprehensive Technical Guide for Engineers.” Wevolver, 2023, www.wevolver.com/article/fillet-vs-chamfer-a-comprehensive-technical-guide-for-engineers.

To cite this article:
Conover, Dylan “Explained: Modeling Compliant Mechanisms in ANSYS.” The BYU Design Review, 2 Nov 2026, https://www.designreview.byu.edu/collections/explained-modeling-compliant-mechanisms-in-ansys.

Music-Synced Halloween Lights

Music-Synced Halloween Lights