Pairs
A pair is a directional link between an input preserve and an output preserve. It tells the optimizer: "this input drives this output." Beyond defining the input-output relationship, pairs carry a critical parameter — the stiffness coupling coefficient (K_p_max) — that controls the balance between mechanism flexibility and structural stiffness.
Why It Matters
Without pairs, the optimizer has no way to connect inputs to outputs. You could define an input preserve (where force is applied) and an output preserve (where you want motion), but the solver would not know that they are related. The pair is the glue that binds them:
- Which input drives which output: a mechanism with multiple inputs and outputs needs pairs to define the intended relationships
- How stiff the mechanism should be: K_p_max controls whether the optimizer favors a flexible mechanism (large output motion, low force transmission) or a stiff mechanism (smaller motion, higher force output)
How It Works
The Input-Output Link
A pair connects one or more input preserves to one or more output preserves through index lists. When the solver processes a pair, it:
- Applies force at the input preserve in the input's direction
- Adds a spring element at the output preserve resisting motion in the output's direction
- Optimizes the topology to maximize output displacement against that spring resistance
The spring at the output is the key mechanism. Without it, the optimizer would create an infinitely flexible structure — maximum motion with zero force transmission. The spring forces the mechanism to be stiff enough to do useful work.

K_p_max: The Stiffness Coupling Coefficient
K_p_max (maximum pair stiffness) is the spring constant of the virtual spring placed at the output preserve. It represents the stiffness of the workpiece or load that the mechanism must work against.
High K_p_max (e.g., 1e6 or higher):
- The output spring is very stiff
- The optimizer must create a very stiff mechanism to produce any displacement against this spring
- Result: compact, stiff mechanisms that transmit high force but produce small displacements
- At extreme values (1e20), the stiffness constraint effectively dominates, and the optimizer maximizes overall stiffness
Low K_p_max (e.g., 0.1 to 10):
- The output spring is soft
- The optimizer can achieve large output displacements without much structural stiffness
- Result: flexible mechanisms with large motion range but lower force output
Moderate K_p_max (e.g., 10 to 1000):
- Balanced trade-off between motion range and force transmission
- Typical for most practical applications
Start with the default K_p_max value and adjust based on results. If the mechanism is too flexible (large motion but no structural integrity), increase K_p_max. If it is too stiff (barely moves), decrease it. The optimal value depends on your specific application.
Formulation Modes
The pair's stiffness coupling participates in the optimization through different formulation modes:
Robust mode (default for compliant mechanisms): a workpiece spring is embedded at the output in the structural analysis. The optimizer maximizes output displacement against the spring resistance, balancing flexibility and stiffness.
Nuanced mode (default for decoupled flexure): the optimization focuses on structural optimization — finding the stiffest structure that satisfies the volume constraint. No workpiece spring is added. This mode is used when mechanism stiffness is the primary concern (e.g., thermal flexure mounts where rigidity matters more than displacement amplification). The user should set K_p_max to a high value manually for this mode.
The formulation mode can be chosen in the analysis settings. The compliant mechanism solver defaults to robust mode. The decoupled flexure solver defaults to nuanced mode.
Practical Guidance
Single Pair (Most Common)
The simplest and most common configuration: one input preserve paired with one output preserve. This defines a single-input, single-output mechanism.
Setup:
- Place an input preserve (with force direction)
- Place an output preserve (with desired motion direction)
- Place fixed preserves for anchoring
- Create a pair linking the input to the output
- Set K_p_max based on the desired stiffness behavior
Multiple Pairs
For mechanisms with multiple inputs or outputs, you can define multiple pairs:
- Multiple inputs, one output: each input-output pair contributes to the objective. The optimizer finds a topology that combines all input forces to maximize the single output.
- One input, multiple outputs: each pair defines a target output. The optimizer balances displacement across all outputs.
- Multiple inputs, multiple outputs: the most general case. A single pair can group multiple inputs and outputs, or separate pairs can be created for independent relationships.
When using multiple pairs, the optimizer balances the objectives from all pairs simultaneously. If two pairs have conflicting requirements (e.g., both want material in the same region for different purposes), the optimizer finds a compromise. This may not satisfy either pair perfectly.
Thermal Flexure Configuration
In thermal flexure problems, pairs have a specific configuration:
- Multiple input bolt pads (one per thermal expansion point) are grouped in a single pair, linked to the output preserve
- K_p_max should be set high by the user for stiffness-focused optimization (the default is 10.0 — users must increase it manually for thermal flexure problems)
- The formulation mode is "nuanced" — structural optimization for maximum stiffness
This creates a mechanism that is as stiff as possible against thermal distortion at the output location.
Technical Details
How Pairs Affect the Solver
The pair modifies the optimization problem by adding a virtual spring at the output. This spring naturally balances two competing goals: transmitting input force through the mechanism (to produce output motion) while also providing enough stiffness to work against the spring resistance.
The optimizer accounts for the spring interaction when deciding where to place material. Cells near the output preserve are influenced by the spring's effect on the overall design objective.
Pair configuration
Each pair in deFlex defines:
- Name: a descriptive label for the pair
- Input grouping: which input preserves contribute to this pair (allows grouping multiple inputs)
- Output grouping: which output preserves this pair targets (allows grouping multiple outputs)
- K_p_max: stiffness coupling coefficient (default: 10.0)
The solver reads all pair configurations and assembles the modified structural model and design objective before beginning the optimization loop.
Choosing K_p_max
| Application | Suggested K_p_max | Reasoning |
|---|---|---|
| Motion amplifier | 0.1 - 1.0 | Maximize displacement, low output load |
| General mechanism | 1.0 - 100 | Balance motion and force |
| Force amplifier | 100 - 10000 | Maximize force output |
| Precision mount | 10000+ | Maximize stiffness |
| Thermal flexure | Very high (e.g., 1e6+) | Pure stiffness optimization (must be set manually; default is 10.0) |
K_p_max is accessible through the properties panel in deFlex. The default value (10.0) works well for general-purpose mechanism design. For thermal flexure problems, you must manually increase K_p_max to a high value to achieve maximum stiffness behavior.
Troubleshooting
Mechanism is too flexible / large output motion but no rigidity: K_p_max is too low. Increase it to force the optimizer to create a stiffer mechanism.
Mechanism barely moves / very stiff with negligible output displacement: K_p_max is too high. Decrease it to allow more flexibility.
Multiple pairs produce conflicting designs: the optimizer is struggling to satisfy all pairs simultaneously. Simplify the problem by reducing the number of pairs, or adjust pair weights to prioritize the most important input-output relationship.
Optimizer produces a solid block: K_p_max is extremely high and the volume fraction is generous. The optimizer's best strategy for maximum stiffness is to fill everything with material. Lower K_p_max or reduce the volume fraction.
See Also
- Input Preserves — the source end of a pair
- Output Preserves — the target end of a pair
- Design Optimization — how the optimizer uses pairs
- Thermal Flexure — specialized pair configuration for thermal problems
- Preserves Overview — the preserve system that pairs connect