|
| 1 | + |
| 2 | +# Makes figure for HVAC Fan Parameters section of the FDS Users Guide |
| 3 | + |
| 4 | +import numpy as np |
| 5 | +import matplotlib.pyplot as plt |
| 6 | +import fdsplotlib |
| 7 | + |
| 8 | +plot_style = fdsplotlib.get_plot_style('fds') |
| 9 | + |
| 10 | +pltdir = '../../Manuals/FDS_User_Guide/SCRIPT_FIGURES/' |
| 11 | + |
| 12 | +vdot_max = 10 |
| 13 | +dp_max = 500 |
| 14 | +dp = np.arange(-1000, 1001, 1) |
| 15 | + |
| 16 | +# Constant volume flow rate |
| 17 | +vdot1 = 10 |
| 18 | + |
| 19 | +# Plot quadratic fan curve (black line) |
| 20 | +vdot = vdot_max * np.sign(dp_max - dp) * np.sqrt(np.abs(dp - dp_max) / dp_max) |
| 21 | + |
| 22 | +# Create user fan curve (ramp) data points |
| 23 | +rampx = [] |
| 24 | +rampy = [] |
| 25 | +i = 0 |
| 26 | +for dp_val in range(-1000, 1001, 200): |
| 27 | + rampx.append(vdot_max * np.sign(dp_max - dp_val) * np.sqrt(np.abs(dp_val - dp_max) / dp_max)) |
| 28 | + rampy.append(dp_val) |
| 29 | + i = i + 1 |
| 30 | + |
| 31 | +fig = fdsplotlib.plot_to_fig(x_data=[vdot1,vdot1], y_data=[-1000,1000], marker_style='r-', data_label='constant volume', |
| 32 | + x_min=-10, x_max=20, y_min=-1000, y_max=1000, |
| 33 | + x_label='Volume Flow Rate (m$^3$/s)', |
| 34 | + y_label='Static Pressure (Pa)') |
| 35 | + |
| 36 | +fdsplotlib.plot_to_fig(x_data=vdot, y_data=dp, marker_style='k-', data_label='quadratic', figure_handle=fig) |
| 37 | +fdsplotlib.plot_to_fig(x_data=rampx, y_data=rampy, marker_style='b-', data_label='user fan curve', figure_handle=fig) |
| 38 | + |
| 39 | +# Enable grid |
| 40 | +ax = plt.gca() |
| 41 | +ax.grid(True, which='both', axis='both') |
| 42 | + |
| 43 | +plt.savefig(pltdir + 'fan_curve.pdf', format='pdf') |
| 44 | +plt.close() |
| 45 | + |
0 commit comments