Contact Analysis (structures/fem/contact-analysis)
Use when the task is finite element contact analysis of aircraft
structure: penalty versus Lagrange enforcement, contact stiffness and
penetration control, Coulomb friction with stick-slip states,
master-slave and node-to-surface formulation, tie constraints, and
typical bolted joint and bearing contact applications. This leaf sits
beside structures/fem/calculix-nonlinear (which owns the nonlinear
solver workflow into which contact runs are fed) and
structures/fem/calculix-linear (linear static checks); it computes the
contact mechanics quantities, not the global solve.
Domain quick reference
- Penalty method: the normal contact force is the penalty stiffness
times the penetration, F_n = k_pen * p. Contact is soft: a small
penetration is always present, and larger stiffness drives it down
at the cost of ill-conditioning.
- Lagrange method: the zero penetration constraint is enforced exactly
with a Lagrange multiplier (the contact pressure). No penetration
parameter is tuned, but the active set must be iterated and the
method can introduce zero-energy modes and convergence cost.
- Penalty stiffness estimate: k_pen = alpha * E * A / L from the
softer contacting member (E modulus, A contact area, L
characteristic length), with alpha typically 10 to 1000 times the
underlying element stiffness scale.
- Penetration control: for an applied normal load F, penetration
p = F / k_pen; raise the stiffness by a factor and re-check until
p falls under the accepted tolerance.
- Master-slave (node-to-surface): slave nodes are projected onto the
master surface; the signed gap is the projection distance along the
master surface normal. A negative gap is penetration, a positive gap
is separation.
- Coulomb friction: the maximum tangential (shear) force is
f_max = mu * |F_n|. When the trial shear is below f_max the
interface sticks (elastic shear, no relative sliding); at f_max it
slips (sliding with frictional resistance at the limit).
- Tie constraints: rigidly bond two surfaces (no separation, no
sliding) within a relative displacement tolerance, for example
bonded patch doublers or potted inserts.
- Typical aerospace applications: bolted joint lug-to-bolt bearing
contact, bushing-sleeve interfaces, and fastener head-to-structure
clamping; FAR-25 and CS-25 set the certification context for the
strength checks that follow the contact solution.
Workflow
- Identify the contacting pairs and the softer member; record the
unit convention (N/mm is assumed here).
- Estimate the penalty stiffness with contact_stiffness_estimate.
- Compute the signed gap of each slave node against its master
surface with node_to_surface_gap.
- Get the normal force from the gap with penalty_contact_force, or
check exact enforcement with lagrange_contact_check when the
constraint must hold with zero penetration.
- If penetration exceeds the accepted tolerance, raise the stiffness
with penetration_control until the penetration is under tolerance.
- Compute the tangential (shear) response with friction_force: the
result is categorized as sticking or slipping.
- Check tied interfaces with tie_constraint_check where the joint is
bonded.
- Confirm the deterministic checks with the contract test
scripts/test_contact_analysis.py.
Penalty versus Lagrange
The penalty method converts the contact inequality constraint into a
spring: F_n = k_pen * p with penetration p. It is simple to implement
and keeps the tangent stiffness positive definite, but the result
depends on the user-chosen stiffness and always shows a small,
non-physical penetration. The Lagrange method carries the penetration
to zero by treating the contact pressure as an unknown, at the cost of
active-set iteration and possible ill-conditioning. In practice,
augmented Lagrange methods combine both: a Lagrange multiplier base
with a small penalty regularizer that stabilizes the iteration. This
leaf implements the two pure methods and lets the caller compare them
on the same gap input.
Friction and stick-slip
Coulomb friction caps the tangential force at mu times the absolute
normal force. The interface is categorized as sticking when the trial
shear stays below the cap (the tangential force equals the trial
value, relative sliding is zero) and slipping when the trial exceeds
it (the tangential force saturates at the cap and sliding occurs).
Because the cap scales with the normal force, a joint carrying a high
clamping load resists far more shear before it slips than the same
joint unloaded in the normal direction.
Worked example
Steel bolt bearing contact: E = 200,000 N/mm^2, contact area
A = 100 mm^2, characteristic length L = 10 mm, alpha = 100:
- k_pen = 100 * 200,000 * 100 / 10 = 2.0e8 N/mm.
- Applied bearing load F = 100 kN: penetration p = F / k_pen
= 100,000 / 2.0e8 = 5.0e-4 mm, well under the 0.01 mm tolerance.
- Penalty force check: k_pen * p = 2.0e8 * 5.0e-4 = 100 kN, matching
the applied load (equilibrium).
- Friction with mu = 0.2: f_max = 0.2 * 100 kN = 20 kN. A trial shear
of 8 kN sticks (friction force 8 kN, no sliding); a trial shear of
25 kN slips (friction force saturates at 20 kN).
- Lagrange on the same pair: penetration enforced to zero; the gap
check reports enforced when the penetration is within 1e-9.
Pitfalls
- Tuning only the penetration and ignoring conditioning: the penalty
force F_n = k_pen * p depends on the user-chosen stiffness, and a
stiffness raised far above the element scale (alpha of 10-1000)
drives penetration down at the cost of ill-conditioning - the
penalty method never gives exact zero penetration.
- Expecting zero penetration from the penalty method: penetration is
always present and only Lagrange (or augmented Lagrange) enforces
the constraint exactly; the worked 5.0e-4 mm penetration is under
tolerance, not zero.
- Reading the gap sign backwards: node-to-surface gaps are signed
along the master normal - negative is penetration, positive is
separation - so a flipped sign turns a penetrating node into an
open contact.
- Using the wrong friction branch: the interface sticks when the
trial shear is below mu * |F_n| and slips when it reaches the cap;
a high clamping load resists far more shear than the same joint
unloaded in the normal direction, and the cap uses the absolute
normal force.
- Mixing units at the interface: the module assumes N/mm (the worked
bolt case uses E in N/mm^2 and A in mm^2); feeding SI Pa and m
shifts the stiffness estimate by the unit ratio.
- Confusing contact with the global solve: this leaf computes
contact quantities (forces, gaps, friction, tie checks); the
nonlinear solver workflow that carries a contact run belongs to
calculix-nonlinear.
Related leaves
- structures/fem/calculix-linear: linear static stress and margin of
safety checks downstream of the contact solution.
- structures/fem/calculix-nonlinear: nonlinear solver workflow where
contact runs live.
- structures/fem/truss-analysis: simple element-level checks for the
members the contact model connects.
- structures/composites/composite-bolted-joints: bolted joint strength
evaluation that consumes bearing contact forces.
Behavior contract (gate 3)
Run the deterministic contract test (stdlib unittest, offline):
python3 scripts/test_contact_analysis.py
The test covers the penalty stiffness estimate, penalty force at zero
penetration and at finite penetration, Lagrange enforcement tolerance,
Coulomb stick and slip states, friction with zero and negative normal
force, penetration control convergence, node-to-surface signed gaps,
tie constraint tolerance, and invalid-input edge cases.
Compliance
- Standards referenced, not reproduced: FAR-25 and CS-25 are public
airworthiness regulations, named for certification context only;
both resolve in standards-map.yaml with reference-only: true.
- compliance: STANDARDS-REF, gated: false.
1---2name: contact-analysis3description: Use when the task is FEA contact, penalty or Lagrange methods, contact stiffness, penetration, friction, stick-slip, master-slave contact, node-to-surface, or tied interfaces in bolted joints and bearing contacts. Compute finite element contact analysis quantities for aircraft structure: determine normal contact forces with the penalty method from contact stiffness and penetration, estimate penalty stiffness from the contacting element properties, check Lagrange multiplier enforcement of zero penetration, apply Coulomb friction to categorize stick or slip, and run penetration control until penetration is under tolerance. The skill covers master-slave and node-to-surface gaps, tie constraints, and bolted joint and bearing contacts. Trigger: contact analysis, fea contact, penalty method, lagrange multiplier, contact stiffness, penetration, coulomb friction, stick-slip, master-slave, node-to-surface, tie constraint, bolted joint, bearing contact.4license: Apache-2.05---67# Contact Analysis (structures/fem/contact-analysis)89Use when the task is finite element contact analysis of aircraft10structure: penalty versus Lagrange enforcement, contact stiffness and11penetration control, Coulomb friction with stick-slip states,12master-slave and node-to-surface formulation, tie constraints, and13typical bolted joint and bearing contact applications. This leaf sits14beside structures/fem/calculix-nonlinear (which owns the nonlinear15solver workflow into which contact runs are fed) and16structures/fem/calculix-linear (linear static checks); it computes the17contact mechanics quantities, not the global solve.1819## Domain quick reference2021- Penalty method: the normal contact force is the penalty stiffness22 times the penetration, F_n = k_pen * p. Contact is soft: a small23 penetration is always present, and larger stiffness drives it down24 at the cost of ill-conditioning.25- Lagrange method: the zero penetration constraint is enforced exactly26 with a Lagrange multiplier (the contact pressure). No penetration27 parameter is tuned, but the active set must be iterated and the28 method can introduce zero-energy modes and convergence cost.29- Penalty stiffness estimate: k_pen = alpha * E * A / L from the30 softer contacting member (E modulus, A contact area, L31 characteristic length), with alpha typically 10 to 1000 times the32 underlying element stiffness scale.33- Penetration control: for an applied normal load F, penetration34 p = F / k_pen; raise the stiffness by a factor and re-check until35 p falls under the accepted tolerance.36- Master-slave (node-to-surface): slave nodes are projected onto the37 master surface; the signed gap is the projection distance along the38 master surface normal. A negative gap is penetration, a positive gap39 is separation.40- Coulomb friction: the maximum tangential (shear) force is41 f_max = mu * |F_n|. When the trial shear is below f_max the42 interface sticks (elastic shear, no relative sliding); at f_max it43 slips (sliding with frictional resistance at the limit).44- Tie constraints: rigidly bond two surfaces (no separation, no45 sliding) within a relative displacement tolerance, for example46 bonded patch doublers or potted inserts.47- Typical aerospace applications: bolted joint lug-to-bolt bearing48 contact, bushing-sleeve interfaces, and fastener head-to-structure49 clamping; FAR-25 and CS-25 set the certification context for the50 strength checks that follow the contact solution.5152## Workflow53541. Identify the contacting pairs and the softer member; record the55 unit convention (N/mm is assumed here).562. Estimate the penalty stiffness with contact_stiffness_estimate.573. Compute the signed gap of each slave node against its master58 surface with node_to_surface_gap.594. Get the normal force from the gap with penalty_contact_force, or60 check exact enforcement with lagrange_contact_check when the61 constraint must hold with zero penetration.625. If penetration exceeds the accepted tolerance, raise the stiffness63 with penetration_control until the penetration is under tolerance.646. Compute the tangential (shear) response with friction_force: the65 result is categorized as sticking or slipping.667. Check tied interfaces with tie_constraint_check where the joint is67 bonded.688. Confirm the deterministic checks with the contract test69 scripts/test_contact_analysis.py.7071## Penalty versus Lagrange7273The penalty method converts the contact inequality constraint into a74spring: F_n = k_pen * p with penetration p. It is simple to implement75and keeps the tangent stiffness positive definite, but the result76depends on the user-chosen stiffness and always shows a small,77non-physical penetration. The Lagrange method carries the penetration78to zero by treating the contact pressure as an unknown, at the cost of79active-set iteration and possible ill-conditioning. In practice,80augmented Lagrange methods combine both: a Lagrange multiplier base81with a small penalty regularizer that stabilizes the iteration. This82leaf implements the two pure methods and lets the caller compare them83on the same gap input.8485## Friction and stick-slip8687Coulomb friction caps the tangential force at mu times the absolute88normal force. The interface is categorized as sticking when the trial89shear stays below the cap (the tangential force equals the trial90value, relative sliding is zero) and slipping when the trial exceeds91it (the tangential force saturates at the cap and sliding occurs).92Because the cap scales with the normal force, a joint carrying a high93clamping load resists far more shear before it slips than the same94joint unloaded in the normal direction.9596## Worked example9798Steel bolt bearing contact: E = 200,000 N/mm^2, contact area99A = 100 mm^2, characteristic length L = 10 mm, alpha = 100:100101- k_pen = 100 * 200,000 * 100 / 10 = 2.0e8 N/mm.102- Applied bearing load F = 100 kN: penetration p = F / k_pen103 = 100,000 / 2.0e8 = 5.0e-4 mm, well under the 0.01 mm tolerance.104- Penalty force check: k_pen * p = 2.0e8 * 5.0e-4 = 100 kN, matching105 the applied load (equilibrium).106- Friction with mu = 0.2: f_max = 0.2 * 100 kN = 20 kN. A trial shear107 of 8 kN sticks (friction force 8 kN, no sliding); a trial shear of108 25 kN slips (friction force saturates at 20 kN).109- Lagrange on the same pair: penetration enforced to zero; the gap110 check reports enforced when the penetration is within 1e-9.111112113## Pitfalls114115- Tuning only the penetration and ignoring conditioning: the penalty116 force F_n = k_pen * p depends on the user-chosen stiffness, and a117 stiffness raised far above the element scale (alpha of 10-1000)118 drives penetration down at the cost of ill-conditioning - the119 penalty method never gives exact zero penetration.120- Expecting zero penetration from the penalty method: penetration is121 always present and only Lagrange (or augmented Lagrange) enforces122 the constraint exactly; the worked 5.0e-4 mm penetration is under123 tolerance, not zero.124- Reading the gap sign backwards: node-to-surface gaps are signed125 along the master normal - negative is penetration, positive is126 separation - so a flipped sign turns a penetrating node into an127 open contact.128- Using the wrong friction branch: the interface sticks when the129 trial shear is below mu * |F_n| and slips when it reaches the cap;130 a high clamping load resists far more shear than the same joint131 unloaded in the normal direction, and the cap uses the absolute132 normal force.133- Mixing units at the interface: the module assumes N/mm (the worked134 bolt case uses E in N/mm^2 and A in mm^2); feeding SI Pa and m135 shifts the stiffness estimate by the unit ratio.136- Confusing contact with the global solve: this leaf computes137 contact quantities (forces, gaps, friction, tie checks); the138 nonlinear solver workflow that carries a contact run belongs to139 calculix-nonlinear.140## Related leaves141142- structures/fem/calculix-linear: linear static stress and margin of143 safety checks downstream of the contact solution.144- structures/fem/calculix-nonlinear: nonlinear solver workflow where145 contact runs live.146- structures/fem/truss-analysis: simple element-level checks for the147 members the contact model connects.148- structures/composites/composite-bolted-joints: bolted joint strength149 evaluation that consumes bearing contact forces.150151## Behavior contract (gate 3)152153Run the deterministic contract test (stdlib unittest, offline):154155 python3 scripts/test_contact_analysis.py156157The test covers the penalty stiffness estimate, penalty force at zero158penetration and at finite penetration, Lagrange enforcement tolerance,159Coulomb stick and slip states, friction with zero and negative normal160force, penetration control convergence, node-to-surface signed gaps,161tie constraint tolerance, and invalid-input edge cases.162163## Compliance164165- Standards referenced, not reproduced: FAR-25 and CS-25 are public166 airworthiness regulations, named for certification context only;167 both resolve in standards-map.yaml with reference-only: true.168- compliance: STANDARDS-REF, gated: false.