main
John Lauer
Add three compact 3D cooling concepts and conditional thermal trade study
461aa3b
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
"""Original conceptual geometry and analytical fin-efficiency sensitivity, not CFD."""
from pathlib import Path
import json,math
import numpy as np
import matplotlib
matplotlib.use('Agg')
import matplotlib.pyplot as plt
from mpl_toolkits.mplot3d.art3d import Poly3DCollection
R=Path(__file__).resolve().parents[1];O=R/'docs/cooling-3d';A=R/'analysis/cooling-3d'
CASES=[dict(id='preferred50',title='50 mm low-profile',W=50,L=50,H=12,B=2,FH=10,N=12,t=1,x=6,y=11,fan='inset',coverage=.50),dict(id='chipset40',title='40 mm tall-fin',W=40,L=40,H=45,B=3,FH=32,N=12,t=1,x=10,y=16,fan='axial',coverage=1.),dict(id='pi5',title='Pi 5 blower',W=42.5,L=63.5,H=13.7,B=2,FH=11.7,N=10,t=1,x=7,y=4.25,fan='blower',coverage=.60)]
PIN=[(4,4),(68,4),(4,68),(68,68)];RCS=.6727626557059773;RJC=.42
# Fin counts/base thickness/coverage are sensitivity assumptions, NOT measured vendor geometry.
def thermal(c,h,area_factor=1,spread=.5):
W,L,B,H,t=[c[k]*.001 for k in ['W','L','B','FH','t']];k=200;n=c['N'];cov=c['coverage']*area_factor
m=math.sqrt(2*h/(k*t));eta=math.tanh(m*H)/(m*H)
afin=n*2*L*H*cov;ab=max(0,W*L-n*t*L)*cov+2*(W+L)*B
rsa=1/(h*(eta*afin+ab));rt=rsa+spread+RCS+RJC
# Retain both case ceiling and stricter historical junction-rise guard; 10% load guard.
p=min(15/rt,15/(rsa+spread+RCS))/1.1
return dict(h=h,areaFactor=area_factor,Rspread=spread,finEfficiency=eta,Rsa=rsa,PloadCeilingW=p,Tcase5W=40+5*(rsa+spread+RCS),Tj5W=40+5*rt,effectiveAreaM2=eta*afin+ab)
results=[];geo={};plt.style.use('dark_background')
for c in CASES:
rows=[thermal(c,h) for h in [5,10,25,50,100,150]]
sensitivity=[thermal(c,h,f,sp) for h in [50,100,150] for f in [.7,1,1.3] for sp in [.2,.5,1.]]
results.append(dict(**c,screen=rows,sensitivity=sensitivity,qualified=False))
shapes=[]
def box(name,x,y,z,w,l,h,color):shapes.append(dict(name=name,type='box',origin=[x,y,z],size=[w,l,h],color=color))
def cyl(name,x,y,z,r,h,color):shapes.append(dict(name=name,type='cylinder',origin=[x,y,z],r=r,h=h,color=color))
green='#247557';gold='#d7b368';metal='#a8b4c1';dark='#252b35';teal='#298d98'
box('PCB_outline_UNROUTED',0,0,4.05,72,72,1.6,green)
for i,(px,py) in enumerate(PIN):
cyl(f'MP{i+1}_large_body',px,py,.05,1.8,5.6,gold);cyl(f'MP{i+1}_tail',px,py,-4.7,.925,4.75,gold);cyl(f'MP{i+1}_flange',px,py,5.65,2.4,.8,gold);cyl(f'MP{i+1}_grip_envelope',px,py,6.45,1.8,7.6,gold)
for px in [4,36,68]:
for py in [4,36,68]:cyl('Scaffold_contact',px,py,-.7,2.5,.75,'#748795')
box('Proposed_probe_lane_NOT_swept_volume',60,12,5.66,10,48,.25,teal)
for i in range(7):cyl('Proposed_TP',65,15+i*7.1,5.95,1,.12,gold)
box('USB_C_edge_reservation',25,0,5.65,9,4,3,metal)
for px in [c['x']+2,c['x']+c['W']-2]:
for py in [c['y']+2,c['y']+c['L']-2]:cyl('Support_boss_RESERVATION',px,py,5.65,1.6,6.235,teal)
cx=c['x']+c['W']/2;cy=c['y']+c['L']/2
box('Q1_TO220_body_nominal',cx-5,cy-8,5.65,10,16,4.5,dark);box('Q1_drain_tab',cx-5,cy-10,10.15,10,20,.5,metal)
box('AlN_insulator_nominal',cx-7,cy-10,10.65,14,20,.635,'#eeeeee');box('Spreader_stack_RESERVATION',cx-7,cy-10,11.285,14,20,.6,'#c38c55')
z0=11.885;box('Sink_base_CONCEPT',c['x'],c['y'],z0,c['W'],c['L'],c['B'],metal)
for i,fx in enumerate(np.linspace(c['x'],c['x']+c['W']-1,c['N'])):
for j in range(int(c['L'])):
fy=c['y']+j+.5
if c['fan']=='inset' and (fx+.5-cx)**2+(fy-cy)**2<17**2:continue
if c['fan']=='blower' and (fx+.5-cx)**2+(fy-(c['y']+18))**2<15**2:continue
box('Fin_CONCEPT',fx,fy-.5,z0+c['B'],1,1,c['FH'],metal)
fz=z0+c['B'] if c['fan']!='axial' else z0+35;fc=(cx,cy if c['fan']!='blower' else c['y']+18);rad=17 if c['fan']=='inset' else 15 if c['fan']=='blower' else 18
cyl('Fan_rotor_hub_CONCEPT',*fc,fz,5,3,dark)
for a in np.linspace(0,2*np.pi,12,endpoint=False):box('Fan_blade_CONCEPT',fc[0]+np.cos(a)*rad*.65-2,fc[1]+np.sin(a)*rad*.65-1,fz,4,2,3,dark)
if c['fan']=='axial':
for x0,y0,w,l in [(c['x'],c['y'],40,2),(c['x'],c['y']+38,40,2),(c['x'],c['y'],2,40),(c['x']+38,c['y'],2,40)]:box('Fan_frame',x0,y0,fz,w,l,10,dark)
geo[c['id']]=shapes
fig=plt.figure(figsize=(10,8));ax=fig.add_subplot(projection='3d');polys=[];colors=[]
for b in shapes:
x,y,z=b['origin']
if b['type']=='box':
w,l,h=b['size'];v=np.array([[x,y,z],[x+w,y,z],[x+w,y+l,z],[x,y+l,z],[x,y,z+h],[x+w,y,z+h],[x+w,y+l,z+h],[x,y+l,z+h]])
for f in [[0,1,2,3],[4,5,6,7],[0,1,5,4],[1,2,6,5],[2,3,7,6],[3,0,4,7]]:polys.append(v[f]);colors.append(b['color'])
else:
a=np.linspace(0,2*np.pi,13);lo=np.array([x+b['r']*np.cos(a),y+b['r']*np.sin(a),np.full(13,z)]).T;hi=lo.copy();hi[:,2]+=b['h'];polys+=[lo,hi];colors +=[b['color']]*2
for k in range(12):polys.append(np.array([lo[k],lo[k+1],hi[k+1],hi[k]]));colors.append(b['color'])
ax.add_collection3d(Poly3DCollection(polys,facecolors=colors,edgecolors='#61717a',linewidths=.12));ax.set(xlim=(-4,78),ylim=(-4,78),zlim=(-5,62),xlabel='X mm',ylabel='Y mm',zlabel='Z mm');ax.set_box_aspect((82,82,67));ax.view_init(32,-62);ax.set_title(c['title']+'\n72 × 72 mm PCB TARGET • 64 × 64 mm pin span\nCONCEPT: components and probe travel not validated',fontsize=12)
fig.tight_layout();fig.savefig(O/(c['id']+'.png'),dpi=140);plt.close(fig)
# Analytical axial fin temperature profile at 5 W, same assumed h, no CFD.
fig,ax=plt.subplots(figsize=(8,4));zz=np.linspace(0,c['FH']/1000,100)
for h,label in [(5,'Still-air sensitivity h=5'),(50,'Forced-air sensitivity h=50'),(150,'Forced-air sensitivity h=150')]:
rr=thermal(c,h);m=np.sqrt(2*h/(200*.001));T=40+5*rr['Rsa']*np.cosh(m*(c['FH']/1000-zz))/np.cosh(m*c['FH']/1000);ax.plot(zz*1000,T,label=label)
ax.set(xlabel='Height above fin root (mm)',ylabel='Fin temperature (°C)',title=c['title']+' • 5 W • analytical fin profile\nAssumed geometry and film; not an installed fan test');ax.legend();ax.grid(alpha=.2);fig.tight_layout();fig.savefig(O/(c['id']+'-thermal.png'),dpi=140);plt.close(fig)
(A/'results.json').write_text(json.dumps(dict(status='UNQUALIFIED_ANALYTICAL_SENSITIVITY',ambientC=40,caseLimitC=55,junctionRiseLimitC=15,Rcs=RCS,Rjc=RJC,cases=results),indent=2));(A/'geometry.json').write_text(json.dumps(geo))
fig,ax=plt.subplots(figsize=(10,5))
for c in results:ax.plot([r['h'] for r in c['screen']],[r['PloadCeilingW'] for r in c['screen']],'-o',label=c['title'])
ax.set(xlabel='Assumed effective film h (W/m²K), NOT measured RPM',ylabel='Conservative load-power ceiling (W)',title='Sensitivity only • 40°C ambient • unchanged temperature gates');ax.legend();ax.grid(alpha=.2);fig.tight_layout();fig.savefig(O/'power-sensitivity.png',dpi=150)
for c in results:print(c['id'], 'nominal 50..150', [round(c['screen'][i]['PloadCeilingW'],2) for i in [3,5]],'full sensitivity',round(min(r['PloadCeilingW'] for r in c['sensitivity']),2),round(max(r['PloadCeilingW'] for r in c['sensitivity']),2))