Composite Repair (structures/composites/composite-repair)
Use when you must size a bonded scarf repair for a damaged composite
laminate: computing the scarf length from the parent thickness and the
scarf angle, the average adhesive shear stress carried by the scarf
joint when the parent laminate runs at its applied stress, the required
scarf angle for an adhesive shear allowable, and the external patch
thickness that restores the parent in-plane stiffness. This leaf
implements the standard uniform-stress scarf joint model in pure Python,
stdlib only, with no material constants so it applies to any
carbon/epoxy or glass/epoxy system. It pairs with the other composites
leaves: laminate-stiffness and failure-criteria provide the parent
layup modulus and the applied laminate stress used as inputs here, and
cmh17-allowables frames the adhesive and laminate allowables.
Domain quick reference
- Scarf length for a full-depth scarf: L = thickness / tan(theta),
where theta is the scarf angle measured from the laminate plane. A
shallower angle gives a longer scarf.
- Average adhesive shear stress (uniform-stress scarf model):
tau = sigma * sin(theta) * cos(theta), equivalently tau =
(sigma / 2) * sin(2 * theta), with sigma the far-field parent laminate
stress carried across the scarf plane.
- Required scarf angle for an adhesive shear allowable tau_a:
theta_req = 0.5 * asin(2 * tau_a / sigma). When
2 * tau_a / sigma exceeds 1.0 no real scarf angle can carry the load
at that stress; the repair cannot be made in scarf.
- Stiffness-matched external patch: t_patch = t_parent * E_parent /
E_patch, matching the parent in-plane stiffness when the patch runs at
the parent strain.
- Margin: margin = tau_a / tau - 1. A negative margin means the chosen
scarf angle does not clear the allowable, and the scarf must be made
shallower (longer) so the adhesive shear drops to the allowable.
- Angles are degrees for callers; repair_sizing takes SI inputs (m, Pa)
and returns scarf_length_m, adhesive_shear_Pa and patch_thickness_m.
- CMH-17 frames bonded repair practice for composite structures; the
relations above are standard engineering methodology, summary-only.
Workflow
- Fix the repair inputs: parent laminate thickness, the applied
laminate stress at the repair location, the parent modulus, the patch
material modulus, a chosen scarf angle, and the adhesive shear
allowable.
- Compute the scarf length with scarf_length from the parent thickness
and the chosen scarf angle.
- Compute the average adhesive shear stress with
adhesive_shear_stress from the parent stress and the chosen scarf
angle.
- Check the scarf angle against the allowable with
required_scarf_angle: if the required angle differs from the chosen
angle in the steep direction, the chosen scarf does not clear the
allowable.
- Size the external patch with patch_thickness_for_stiffness from the
parent thickness and the two moduli; a stiffer patch is thinner, a
softer patch is thicker.
- Run repair_sizing for the full summary including the margin, and
re-scarf at the required angle whenever the margin is negative.
- Confirm the deterministic checks with the contract test
scripts/test_composite_repair.py.
Worked example
Carbon/epoxy parent: thickness 3.0 mm, applied laminate stress 300 MPa,
parent modulus 70 GPa, patch material modulus 70 GPa (same material),
scarf angle 3 degrees, adhesive shear allowable 12 MPa.
- Scarf length: L = 3.0 / tan(3 deg) = 57.24 mm (scarf_length(3.0, 3.0)
= 57.24 mm, within the 50-65 mm band).
- Adhesive shear stress: tau = 300 * sin(3 deg) * cos(3 deg) = 15.68 MPa
(adhesive_shear_stress(300.0, 3.0) = 15.679 MPa, within the 14-17 MPa
band).
- Required scarf angle for the 12 MPa allowable:
theta_req = 0.5 * asin(24 / 300) = 2.29 deg (required_scarf_angle
gives 2.294 deg, within the 2.0-2.6 deg band).
- Patch thickness: t_patch = 3.0 * 70 / 70 = 3.0 mm exactly, the
same-material identity.
- Margin at 3 degrees: 12 / 15.68 - 1 = -0.235. The chosen 3 deg scarf
FAILS the 12 MPa allowable; the repair must be re-scarfed shallower.
- Passing check at 2.2 degrees: tau = 300 * sin(2.2 deg) * cos(2.2 deg)
= 11.51 MPa, margin = 12 / 11.51 - 1 = +0.043, so a 2.2 deg scarf
clears the allowable.
Pitfalls
- Sizing the scarf at a steep angle out of habit: a shallower angle
gives a longer scarf and a lower adhesive shear; the 3 deg scarf in
the worked example fails the 12 MPa allowable (margin -0.235) and
the repair must be re-scarfed to about 2.29 deg.
- Demanding a scarf when no scarf can work: when 2 * tau_a / sigma
exceeds 1.0 no real scarf angle carries the load and the functions
raise ValueError - the repair cannot be made in scarf at that
stress.
- Checking the margin against the chosen angle only: the margin is
tau_a / tau - 1 at the CHOSEN angle; a negative margin means
re-scarf shallower, and the required-angle round trip (scarfing at
the required angle reproduces the allowable) is the design check.
- Forgetting the modulus match on the patch: the external patch is
sized for stiffness t_patch = t_parent * E_parent / E_patch, so a
stiffer patch is thinner and a softer patch is thicker; the
same-material identity t_patch = t holds exactly.
- Using degrees where the model wants radians: the public angle
helpers take degrees while repair_sizing takes SI inputs and
returns SI outputs - mixing the two conventions silently skews the
scarf length and shear.
- Confusing the repair model with a lap joint: this leaf is the
uniform-stress scarf model; lap joint analysis belongs to
adhesive-bonded-joints, and mechanically fastened repairs to
composite-bolted-joints.
Verification
- Confirm scarf_length(3.0, 3.0) returns 57.24 mm and sits in 50-65 mm.
- Confirm adhesive_shear_stress(300.0, 3.0) returns 15.679 MPa and sits
in 14-17 MPa.
- Confirm required_scarf_angle(300.0, 12.0) returns 2.294 deg and sits
in 2.0-2.6 deg.
- Confirm the margin is negative for the 3 deg case (-0.235) and
positive for the 2.2 deg case (+0.043).
- Confirm the patch identity
patch_thickness_for_stiffness(t, E, E) == t and the sin-cos form of
the shear equals the (sigma / 2) * sin(2 theta) form.
- Confirm every non-positive thickness, stress, modulus or allowable,
every angle at or beyond 90 degrees, and every required_scarf_angle
call with 2 * tau_a / sigma > 1 (for example sigma = 100 MPa,
tau_a = 80 MPa) raises ValueError.
- Run the contract test offline: python3
scripts/test_composite_repair.py (34 tests, deterministic).
Related leaves
- structures/composites/adhesive-bonded-joints: lap joint bonded
analysis in the same pack; lap geometry analysis is not part of this
leaf.
- structures/composites/composite-bolted-joints: mechanically fastened
patch attachment analysis, the alternative to a bonded repair.
- structures/composites/laminate-stiffness: parent layup stiffness, an
input to the stiffness-matched patch sizing here.
- structures/composites/cmh17-allowables: laminate and adhesive
allowables used as inputs here.
- structures/composites/delamination-growth: fracture assessment of
interlaminar damage growth in the parent around the repair location.
Behavior contract (gate 3)
Run the deterministic contract test (stdlib unittest, offline):
python3 scripts/test_composite_repair.py
The test covers the worked example contract (scarf length 57.24 mm,
adhesive shear 15.68 MPa, required angle 2.29 deg, patch identity 3.0
mm), the magnitude bounds from the spec (50-65 mm, 14-17 MPa, 2.0-2.6
deg), the margin signs for both the failing 3 deg case and the passing
2.2 deg case, the sin-cos closed-form identity, the
required-angle round-trip (scarfing at the required angle reproduces
the allowable), determinism, and ValueError rejection of non-physical
inputs.
Compliance
- Standards referenced, not reproduced: CMH-17 (the Composite Materials
Handbook) is referenced for bonded scarf repair practice; the repair
sizing relations above are standard engineering methodology,
summary-only per standards-map.yaml.
- compliance: STANDARDS-REF, gated: false.
1---2name: composite-repair3description: Use when you must size a bonded scarf repair for a damaged composite laminate: compute the scarf length from the parent thickness and the scarf angle, the average adhesive shear stress carried by the scarf joint at the parent laminate stress, the required scarf angle for an adhesive shear allowable, and the external patch thickness that restores the parent stiffness. Produces the scarf length, adhesive shear stress, required scarf angle, and stiffness-matched patch thickness that gate a composite repair design. Trigger: composite-repair, scarf-repair, scarf-length, adhesive-shear-stress, stiffness-matched-patch, scarf angle, adhesive shear allowable, bonded repair, patch thickness.4license: Apache-2.05---67# Composite Repair (structures/composites/composite-repair)89Use when you must size a bonded scarf repair for a damaged composite10laminate: computing the scarf length from the parent thickness and the11scarf angle, the average adhesive shear stress carried by the scarf12joint when the parent laminate runs at its applied stress, the required13scarf angle for an adhesive shear allowable, and the external patch14thickness that restores the parent in-plane stiffness. This leaf15implements the standard uniform-stress scarf joint model in pure Python,16stdlib only, with no material constants so it applies to any17carbon/epoxy or glass/epoxy system. It pairs with the other composites18leaves: laminate-stiffness and failure-criteria provide the parent19layup modulus and the applied laminate stress used as inputs here, and20cmh17-allowables frames the adhesive and laminate allowables.2122## Domain quick reference2324- Scarf length for a full-depth scarf: L = thickness / tan(theta),25 where theta is the scarf angle measured from the laminate plane. A26 shallower angle gives a longer scarf.27- Average adhesive shear stress (uniform-stress scarf model):28 tau = sigma * sin(theta) * cos(theta), equivalently tau =29 (sigma / 2) * sin(2 * theta), with sigma the far-field parent laminate30 stress carried across the scarf plane.31- Required scarf angle for an adhesive shear allowable tau_a:32 theta_req = 0.5 * asin(2 * tau_a / sigma). When33 2 * tau_a / sigma exceeds 1.0 no real scarf angle can carry the load34 at that stress; the repair cannot be made in scarf.35- Stiffness-matched external patch: t_patch = t_parent * E_parent /36 E_patch, matching the parent in-plane stiffness when the patch runs at37 the parent strain.38- Margin: margin = tau_a / tau - 1. A negative margin means the chosen39 scarf angle does not clear the allowable, and the scarf must be made40 shallower (longer) so the adhesive shear drops to the allowable.41- Angles are degrees for callers; repair_sizing takes SI inputs (m, Pa)42 and returns scarf_length_m, adhesive_shear_Pa and patch_thickness_m.43- CMH-17 frames bonded repair practice for composite structures; the44 relations above are standard engineering methodology, summary-only.4546## Workflow47481. Fix the repair inputs: parent laminate thickness, the applied49 laminate stress at the repair location, the parent modulus, the patch50 material modulus, a chosen scarf angle, and the adhesive shear51 allowable.522. Compute the scarf length with scarf_length from the parent thickness53 and the chosen scarf angle.543. Compute the average adhesive shear stress with55 adhesive_shear_stress from the parent stress and the chosen scarf56 angle.574. Check the scarf angle against the allowable with58 required_scarf_angle: if the required angle differs from the chosen59 angle in the steep direction, the chosen scarf does not clear the60 allowable.615. Size the external patch with patch_thickness_for_stiffness from the62 parent thickness and the two moduli; a stiffer patch is thinner, a63 softer patch is thicker.646. Run repair_sizing for the full summary including the margin, and65 re-scarf at the required angle whenever the margin is negative.667. Confirm the deterministic checks with the contract test67 scripts/test_composite_repair.py.6869## Worked example7071Carbon/epoxy parent: thickness 3.0 mm, applied laminate stress 300 MPa,72parent modulus 70 GPa, patch material modulus 70 GPa (same material),73scarf angle 3 degrees, adhesive shear allowable 12 MPa.7475- Scarf length: L = 3.0 / tan(3 deg) = 57.24 mm (scarf_length(3.0, 3.0)76 = 57.24 mm, within the 50-65 mm band).77- Adhesive shear stress: tau = 300 * sin(3 deg) * cos(3 deg) = 15.68 MPa78 (adhesive_shear_stress(300.0, 3.0) = 15.679 MPa, within the 14-17 MPa79 band).80- Required scarf angle for the 12 MPa allowable:81 theta_req = 0.5 * asin(24 / 300) = 2.29 deg (required_scarf_angle82 gives 2.294 deg, within the 2.0-2.6 deg band).83- Patch thickness: t_patch = 3.0 * 70 / 70 = 3.0 mm exactly, the84 same-material identity.85- Margin at 3 degrees: 12 / 15.68 - 1 = -0.235. The chosen 3 deg scarf86 FAILS the 12 MPa allowable; the repair must be re-scarfed shallower.87- Passing check at 2.2 degrees: tau = 300 * sin(2.2 deg) * cos(2.2 deg)88 = 11.51 MPa, margin = 12 / 11.51 - 1 = +0.043, so a 2.2 deg scarf89 clears the allowable.909192## Pitfalls9394- Sizing the scarf at a steep angle out of habit: a shallower angle95 gives a longer scarf and a lower adhesive shear; the 3 deg scarf in96 the worked example fails the 12 MPa allowable (margin -0.235) and97 the repair must be re-scarfed to about 2.29 deg.98- Demanding a scarf when no scarf can work: when 2 * tau_a / sigma99 exceeds 1.0 no real scarf angle carries the load and the functions100 raise ValueError - the repair cannot be made in scarf at that101 stress.102- Checking the margin against the chosen angle only: the margin is103 tau_a / tau - 1 at the CHOSEN angle; a negative margin means104 re-scarf shallower, and the required-angle round trip (scarfing at105 the required angle reproduces the allowable) is the design check.106- Forgetting the modulus match on the patch: the external patch is107 sized for stiffness t_patch = t_parent * E_parent / E_patch, so a108 stiffer patch is thinner and a softer patch is thicker; the109 same-material identity t_patch = t holds exactly.110- Using degrees where the model wants radians: the public angle111 helpers take degrees while repair_sizing takes SI inputs and112 returns SI outputs - mixing the two conventions silently skews the113 scarf length and shear.114- Confusing the repair model with a lap joint: this leaf is the115 uniform-stress scarf model; lap joint analysis belongs to116 adhesive-bonded-joints, and mechanically fastened repairs to117 composite-bolted-joints.118## Verification119120- Confirm scarf_length(3.0, 3.0) returns 57.24 mm and sits in 50-65 mm.121- Confirm adhesive_shear_stress(300.0, 3.0) returns 15.679 MPa and sits122 in 14-17 MPa.123- Confirm required_scarf_angle(300.0, 12.0) returns 2.294 deg and sits124 in 2.0-2.6 deg.125- Confirm the margin is negative for the 3 deg case (-0.235) and126 positive for the 2.2 deg case (+0.043).127- Confirm the patch identity128 patch_thickness_for_stiffness(t, E, E) == t and the sin-cos form of129 the shear equals the (sigma / 2) * sin(2 theta) form.130- Confirm every non-positive thickness, stress, modulus or allowable,131 every angle at or beyond 90 degrees, and every required_scarf_angle132 call with 2 * tau_a / sigma > 1 (for example sigma = 100 MPa,133 tau_a = 80 MPa) raises ValueError.134- Run the contract test offline: python3135 scripts/test_composite_repair.py (34 tests, deterministic).136137## Related leaves138139- structures/composites/adhesive-bonded-joints: lap joint bonded140 analysis in the same pack; lap geometry analysis is not part of this141 leaf.142- structures/composites/composite-bolted-joints: mechanically fastened143 patch attachment analysis, the alternative to a bonded repair.144- structures/composites/laminate-stiffness: parent layup stiffness, an145 input to the stiffness-matched patch sizing here.146- structures/composites/cmh17-allowables: laminate and adhesive147 allowables used as inputs here.148- structures/composites/delamination-growth: fracture assessment of149 interlaminar damage growth in the parent around the repair location.150151## Behavior contract (gate 3)152153Run the deterministic contract test (stdlib unittest, offline):154155 python3 scripts/test_composite_repair.py156157The test covers the worked example contract (scarf length 57.24 mm,158adhesive shear 15.68 MPa, required angle 2.29 deg, patch identity 3.0159mm), the magnitude bounds from the spec (50-65 mm, 14-17 MPa, 2.0-2.6160deg), the margin signs for both the failing 3 deg case and the passing1612.2 deg case, the sin-cos closed-form identity, the162required-angle round-trip (scarfing at the required angle reproduces163the allowable), determinism, and ValueError rejection of non-physical164inputs.165166## Compliance167168- Standards referenced, not reproduced: CMH-17 (the Composite Materials169 Handbook) is referenced for bonded scarf repair practice; the repair170 sizing relations above are standard engineering methodology,171 summary-only per standards-map.yaml.172- compliance: STANDARDS-REF, gated: false.