|
1 | | -"""Example for a R_th calculation for a given heat sink geometry and a single fan.""" |
| 1 | +"""Example for an R_th calculation for a given heat sink geometry and a single fan.""" |
2 | 2 | # import 3rd party libraries |
3 | 3 | import numpy as np |
| 4 | +from matplotlib import pyplot as plt |
4 | 5 |
|
5 | 6 | # import own libraries |
6 | 7 | import hct |
|
14 | 15 |
|
15 | 16 | fan_name = 'orion_od4010m.csv' |
16 | 17 |
|
17 | | -volume_flow, pressure = hct.calc_volume_flow(fan_name, geometry, plot=True) |
| 18 | +hct.global_plot_settings_font_latex() |
| 19 | +hct.global_plot_settings_font_size(12) |
| 20 | +figure_size = (80, 60) |
18 | 21 |
|
| 22 | +volume_flow, pressure = hct.calc_volume_flow(fan_name, geometry, plot=True, figure_size=figure_size) |
19 | 23 | r_th_sa = hct.calc_final_r_th_s_a(geometry, constants, t_ambient, volume_flow) |
20 | | - |
21 | 24 | print(f"{r_th_sa=}") |
| 25 | + |
| 26 | + |
| 27 | +r_th_sa_sweep_list = np.array([]) |
| 28 | +volume_flow_sweep_list = np.linspace(0.002, 0.035) |
| 29 | +for volume_flow_sweep in volume_flow_sweep_list: |
| 30 | + r_th_sa_sweep = hct.calc_final_r_th_s_a(geometry, constants, t_ambient, volume_flow_sweep) |
| 31 | + r_th_sa_sweep_list = np.append(r_th_sa_sweep_list, r_th_sa_sweep) |
| 32 | + |
| 33 | +plt.figure(figsize=[x / 25.4 for x in figure_size] if figure_size is not None else None, dpi=80) |
| 34 | +plt.plot(volume_flow_sweep_list, r_th_sa_sweep_list, color=hct.colors()["blue"]) |
| 35 | +plt.xlabel("Volume flow / (m³/s)") |
| 36 | +plt.ylabel(r"$R_\mathrm{th}$ / (K/W)") |
| 37 | +plt.grid() |
| 38 | +plt.tight_layout() |
| 39 | +plt.show() |
0 commit comments