main
John Lauer Review cooling stack tolerance sensitivity and prototype spacer selection 8718929
"""Hypothetical dimensional sensitivity; no supplier tolerances are asserted."""
from pathlib import Path
import json
R=Path(__file__).resolve().parents[1]
assembly=json.loads((R/'design/cooling-assembly.json').read_text())
contact=json.loads((R/'mechanical/passive-contact-study/review.json').read_text())
nominal=sum(x.get('thicknessMm',0) for x in assembly['coolingPath'])
case=assembly['coolingPath'][0]['topZmm'];sink=assembly['coolingPath'][-1]['bottomZmm']
assert abs(case+nominal-sink)<1e-8
rows=[]
# Worst-case arithmetic, not probability or a selected tolerance specification.
for label,case_position,sink_position,spacer,isolator,film in [
 ('tight illustrative process',.025,.025,.025,.025,.005),
 ('moderate illustrative process',.05,.05,.05,.05,.01),
 ('loose illustrative process',.1,.1,.1,.05,.01)]:
 total=case_position+sink_position+spacer+isolator+3*film
 rows.append({'scenario':label,'hypotheticalPlusMinusMm':{'casePosition':case_position,'sinkPosition':sink_position,'spacerThickness':spacer,'isolatorThickness':isolator,'eachGreaseFilm':film},'residualGapRangeMm':[-total,total],'minimumScrewEngagementMm':contact['tappedAttachmentCandidate']['nominalBaseEngagementMm']-total,'minimumTipToFullThreadEndMm':contact['tappedAttachmentCandidate']['tipToTapEndMm']-total,'interpretation':'Negative residual means interference; positive means unfilled gap. Screw calculation assumes all error changes grip, and omits screw/thread tolerances.'})
out={'status':'design-sensitivity-not-manufacturing-release','nominalCaseZmm':case,'nominalSinkZmm':sink,'nominalInterfaceStackMm':nominal,'nominalResidualGapMm':sink-case-nominal,'scenarios':rows,'finding':'The fixed-height nominal stack has no demonstrated accommodation for dimensional variation. Grease is not a structural gap filler. Do not force assembly by bending Q1 leads or loading the ceramic.','requiredDesignResolution':['Measure or control case-to-sink seating separation before selecting final spacer thickness.','Provide a controlled adjustable or compliant retention scheme that sets interface compression independently of PCB lead strain.','Specify supplied isolator thickness, flatness, dielectric properties and grease bond-line behavior before assigning production tolerances.','Verify full thread depth, screw length tolerance and preload/creep; nominal thread clearance alone is insufficient.'],'scope':'Does not modify board, thermal assumptions, pass evidence or acceptance limits. Hypothetical ranges are not vendor specifications.'}
p=R/'mechanical/board32-selected-cooling/stack-tolerance-review.json';p.write_text(json.dumps(out,indent=2)+'\n');print(json.dumps(out,indent=2))