Skip to content

Commit b8c5f40

Browse files
committed
FDS User Guide: convert fan_curve.m
1 parent ffa1327 commit b8c5f40

File tree

4 files changed

+46
-51
lines changed

4 files changed

+46
-51
lines changed

Utilities/Matlab/FDS_verification_script.m

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,6 @@
6262

6363
disp('compression_wave...'); compression_wave
6464
disp('extinction...'); extinction
65-
disp('fan_curve...'); fan_curve
6665
disp('mesh_transformation...'); mesh_transformation
6766
disp('synthetic_eddy_method...'); synthetic_eddy_method
6867
disp('shunn_mms_error...'); shunn_mms_error

Utilities/Matlab/scripts/fan_curve.m

Lines changed: 0 additions & 50 deletions
This file was deleted.

Utilities/Python/FDS_verification_script.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@
3232
# Special cases
3333

3434
print("blasius..."); subprocess.run(["python","./scripts/blasius.py"])
35+
print("fan_curve..."); subprocess.run(["python","./scripts/fan_curve.py"])
3536
print("fds_moody_chart..."); subprocess.run(["python","./scripts/fds_moody_chart.py"])
3637
print("fluid_part..."); subprocess.run(["python","./scripts/fluid_part.py"])
3738
print("heated_channel..."); subprocess.run(["python","./scripts/heated_channel.py"])
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
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

Comments
 (0)