main
John Lauer Board32 finish and export evidence, selected cooling assembly review and mechanical BOM 851498a
"""Series-path sensitivity of the selected prototype model; not qualification."""
from pathlib import Path
import hashlib
import json

root = Path(__file__).resolve().parents[1]
spec_path = root / 'design/spec.json'
spec = json.loads(spec_path.read_text())
cooling = next(x for x in spec['packageCooling'] if x['reference'] == 'Q1')
power = spec['hot']['Q1']['watts']
limit = spec['hot']['Q1']['maxRiseC']
rjc = cooling['junctionCaseKPerW']
rcs = cooling['caseSinkKPerW']
rsa = cooling['sinkAmbientStillKPerW']
rows = []
for contact_factor in [1.0, 1.1, 1.25, 1.5]:
    for sink_factor in [1.0, 1.05, 1.1, 1.25, 1.5]:
        rise = power * (rjc + rcs * contact_factor + rsa * sink_factor)
        rows.append(dict(contactFactor=contact_factor, sinkFactor=sink_factor,
                         junctionRiseC=rise, marginC=limit-rise,
                         withinDesignBudget=rise <= limit))
result = {
    'status': 'sensitivity-review-not-qualification',
    'specSha256': hashlib.sha256(spec_path.read_bytes()).hexdigest(),
    'source': 'design/spec.json', 'powerW': power, 'riseLimitC': limit,
    'nominalSeriesRiseC': power*(rjc+rcs+rsa),
    'nominalMarginC': limit-power*(rjc+rcs+rsa),
    'maximumSinkKPerWAtNominalContact': limit/power-rjc-rcs,
    'maximumSinkFactorAtNominalContact': (limit/power-rjc-rcs)/rsa,
    'maximumContactKPerWAtNominalSink': limit/power-rjc-rsa,
    'scenarios': rows,
    'interpretation': 'Nominal model passes, but modest combined contact/convection degradation can exceed the unchanged 15 C rise budget. No guaranteed installed rating follows.',
    'limitations': [
        'Full source power is assigned to the series path; this is a separate conservative path calculation, not a new coupled Fields solve.',
        'Scenario factors are hypothetical sensitivity probes, not measured manufacturing distributions.',
        'Catalog convection, modified sink geometry, interface pressure, spreading and actual ambient require later verification.',
        'No credit for fan cooling, no firmware output enable and no acceptance threshold changed.'
    ]
}
out = root / 'checkpoints/board32-cooling-design-adoption/sensitivity.json'
out.write_text(json.dumps(result, indent=2)+'\n')
print(json.dumps({k:v for k,v in result.items() if k != 'scenarios'}, indent=2))