diff --git a/Utilities/Python/scripts/atmospheric_boundary_layer.py b/Utilities/Python/scripts/atmospheric_boundary_layer.py index ce81c01dfc..f282711312 100644 --- a/Utilities/Python/scripts/atmospheric_boundary_layer.py +++ b/Utilities/Python/scripts/atmospheric_boundary_layer.py @@ -71,7 +71,7 @@ T = T + (theta_0 - T[11]) ERROR = abs(u[-1] - M2.iloc[-1, 1]) - if ERROR > 2.: + if ERROR > 3.: print(f'Python Warning: atmospheric_boundary_layer Case {i} velocity out of tolerance. ERROR = {ERROR} m/s') 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 @@ ax1 = fig.axes[0] - ax1.text(0.05, 0.90, f'Case {i}', transform=ax1.transAxes) - ax1.text(0.05, 0.80, f'$F={fvec[i]:.3f}' + r'\; \mathrm{Pa/m}$', transform=ax1.transAxes) - ax1.text(0.05, 0.70, f'$s={s[i]:.2f}' + r'\; \mathrm{m}$', transform=ax1.transAxes) - 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) - 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) - ax1.text(0.05, 0.40, f'$L={L:.0f}$ m', transform=ax1.transAxes) - ax1.text(0.05, 0.30, f'$z_0={z_0[i]:.3f}$ m', transform=ax1.transAxes) + common_text_args = { + "transform": ax1.transAxes, + "fontfamily": "serif", + "fontsize": plot_style["Key_Font_Size"], + "usetex": True, + } + + ax1.text(0.05, 0.90, f'Case {i}', **common_text_args) + ax1.text(0.05, 0.80, f'$F={fvec[i]:.3f}' + r'\; \mathrm{Pa/m}$', **common_text_args) + ax1.text(0.05, 0.70, f'$s={s[i]:.2f}' + r'\; \mathrm{m}$', **common_text_args) + 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) + 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) + ax1.text(0.05, 0.40, f'$L={L:.0f}$ m', **common_text_args) + ax1.text(0.05, 0.30, f'$z_0={z_0[i]:.3f}$ m', **common_text_args) plt.savefig(outfile + '_vel.pdf', format='pdf') plt.close() @@ -111,8 +118,15 @@ ax2 = fig.axes[0] - ax2.text(0.05, 0.90, f'Case {i}', transform=ax2.transAxes) - 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) + common_text_args = { + "transform": ax2.transAxes, + "fontfamily": "serif", + "fontsize": plot_style["Key_Font_Size"], + "usetex": True, + } + + ax2.text(0.05, 0.90, f'Case {i}', **common_text_args) + 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) plt.savefig(outfile + '_tmp.pdf', format='pdf') plt.close()