"""Chosen matched-rod thermal model, no historical data; PNG to CWD.""" from pathlib import Path import matplotlib matplotlib.use('Agg') import matplotlib.pyplot as plt import numpy as np def main(): plt.rcParams.update({'font.size':12,'font.family':'DejaVu Sans'}) length,alpha,area,ab,ar,capacity,conductance,irradiance=.2,20e-6,.002,.9,.1,5.,.2,600. tau=capacity/conductance steady=alpha*length*area*(ab-ar)*irradiance/conductance threshold=10e-6; stop=180. close=-tau*np.log1p(-threshold/steady) at_stop=steady*(-np.expm1(-stop/tau)) reopen=stop+tau*np.log(at_stop/threshold) t=np.linspace(0,300,2001) displacement=np.where(t<=stop,steady*(-np.expm1(-t/tau)),at_stop*np.exp(-(t-stop)/tau)) permission=(displacement','color':'#555'}) fig.suptitle('Differential heating gives a delayed mechanical switching signal',fontsize=17,y=.97) fig.text(.5,.07,'Chosen illumination: 600 W/m² for 180 s; matched thermal time constant: 25 s; steady extension: 19.2 µm.',ha='center',fontsize=11) fig.text(.5,.025,'Model calculation, not historical measurements. The lower trace gives permission, not a measured gas-flow rate.',ha='center',fontsize=11) fig.savefig(Path.cwd()/(Path(__file__).stem+'.png'),facecolor='white') plt.close(fig) if __name__=='__main__': main()