Skip to content

Commit 0975528

Browse files
committed
Merge remote-tracking branch 'firemodels/master' into FireX
2 parents 24ae335 + 04a3740 commit 0975528

File tree

1 file changed

+24
-10
lines changed

1 file changed

+24
-10
lines changed

Utilities/Python/scripts/atmospheric_boundary_layer.py

Lines changed: 24 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@
7171
T = T + (theta_0 - T[11])
7272

7373
ERROR = abs(u[-1] - M2.iloc[-1, 1])
74-
if ERROR > 2.:
74+
if ERROR > 3.:
7575
print(f'Python Warning: atmospheric_boundary_layer Case {i} velocity out of tolerance. ERROR = {ERROR} m/s')
7676

7777
fig = fdsplotlib.plot_to_fig(x_data=M2.iloc[:, 1].values, y_data=M2.iloc[:, 0].values, marker_style='k-', data_label='FDS',
@@ -84,13 +84,20 @@
8484

8585
ax1 = fig.axes[0]
8686

87-
ax1.text(0.05, 0.90, f'Case {i}', transform=ax1.transAxes)
88-
ax1.text(0.05, 0.80, f'$F={fvec[i]:.3f}' + r'\; \mathrm{Pa/m}$', transform=ax1.transAxes)
89-
ax1.text(0.05, 0.70, f'$s={s[i]:.2f}' + r'\; \mathrm{m}$', transform=ax1.transAxes)
90-
ax1.text(0.05, 0.60, f'$\\dot{{q}}_{{\\rm c}}\\prime \\prime={qdot[i]/1000:.3f}' + r'\; \mathrm{kW/m}^2$', transform=ax1.transAxes)
91-
ax1.text(0.05, 0.50, f'$u({z_r:.0f}' + r'\; \mathrm{m})=' + f'{u_r:.1f}' + r'\; \mathrm{m/s}$', transform=ax1.transAxes)
92-
ax1.text(0.05, 0.40, f'$L={L:.0f}$ m', transform=ax1.transAxes)
93-
ax1.text(0.05, 0.30, f'$z_0={z_0[i]:.3f}$ m', transform=ax1.transAxes)
87+
common_text_args = {
88+
"transform": ax1.transAxes,
89+
"fontfamily": "serif",
90+
"fontsize": plot_style["Key_Font_Size"],
91+
"usetex": True,
92+
}
93+
94+
ax1.text(0.05, 0.90, f'Case {i}', **common_text_args)
95+
ax1.text(0.05, 0.80, f'$F={fvec[i]:.3f}' + r'\; \mathrm{Pa/m}$', **common_text_args)
96+
ax1.text(0.05, 0.70, f'$s={s[i]:.2f}' + r'\; \mathrm{m}$', **common_text_args)
97+
ax1.text(0.05, 0.60, f'$\\dot{{q}}_{{\\rm c}}^{{\\prime\\prime}}={qdot[i]/1000:.3f}' + r'\; \mathrm{kW/m}^2$', **common_text_args)
98+
ax1.text(0.05, 0.50, f'$u({z_r:.0f}' + r'\; \mathrm{m})=' + f'{u_r:.1f}' + r'\; \mathrm{m/s}$', **common_text_args)
99+
ax1.text(0.05, 0.40, f'$L={L:.0f}$ m', **common_text_args)
100+
ax1.text(0.05, 0.30, f'$z_0={z_0[i]:.3f}$ m', **common_text_args)
94101

95102
plt.savefig(outfile + '_vel.pdf', format='pdf')
96103
plt.close()
@@ -111,8 +118,15 @@
111118

112119
ax2 = fig.axes[0]
113120

114-
ax2.text(0.05, 0.90, f'Case {i}', transform=ax2.transAxes)
115-
ax2.text(0.05, 0.80, f'$T({z_r:.0f}' + r'\; \mathrm{m})=' + f'{T_r-273:.1f}' + r'\;^\circ$C', transform=ax2.transAxes)
121+
common_text_args = {
122+
"transform": ax2.transAxes,
123+
"fontfamily": "serif",
124+
"fontsize": plot_style["Key_Font_Size"],
125+
"usetex": True,
126+
}
127+
128+
ax2.text(0.05, 0.90, f'Case {i}', **common_text_args)
129+
ax2.text(0.05, 0.80, f'$T({z_r:.0f}' + r'\; \mathrm{m})=' + f'{T_r-273:.1f}' + r'\;^\circ$C', **common_text_args)
116130

117131
plt.savefig(outfile + '_tmp.pdf', format='pdf')
118132
plt.close()

0 commit comments

Comments
 (0)