|
13 | 13 | outdir = '../../Verification/Atmospheric_Effects/' |
14 | 14 | pltdir = '../../Manuals/FDS_User_Guide/SCRIPT_FIGURES/' |
15 | 15 |
|
16 | | -git_file = outdir + 'atmospheric_boundary_layer_1_git.txt' |
17 | | -version_string = fdsplotlib.get_version_string(git_file) |
18 | | - |
19 | 16 | basein = outdir + 'atmospheric_boundary_layer' |
20 | 17 | baseout = pltdir + 'atmospheric_boundary_layer' |
21 | 18 |
|
22 | 19 | for i in range(1, 5): # Loop from 1 to 4 (inclusive) |
23 | 20 |
|
| 21 | + git_file = outdir + f'atmospheric_boundary_layer_{i}_git.txt' |
| 22 | + version_string = fdsplotlib.get_version_string(git_file) |
| 23 | + |
24 | 24 | datafile = basein + '_' + str(i) |
25 | 25 | outfile = baseout + '_' + str(i) |
26 | 26 |
|
|
52 | 52 | theta_star = u_star**2 * theta_0 / (g * kappa * L) |
53 | 53 |
|
54 | 54 | z = np.array([z_0[i], 10*z_0[i], 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 15, 20, 25, 30, 50, 100]) |
| 55 | + z = np.sort(z) |
55 | 56 |
|
56 | 57 | # Create figure 1 for velocity |
57 | 58 |
|
|
63 | 64 | psi_m = -5*z/L |
64 | 65 | psi_h = psi_m |
65 | 66 |
|
66 | | - u = (u_star/kappa) * (np.log(z/z_0[i]) - psi_m) |
| 67 | + u = (u_star/kappa) * np.maximum(np.log(z/z_0[i]) - psi_m, 0.) |
67 | 68 | theta = theta_0 + (theta_star/kappa) * (np.log(z/z_0[i]) - psi_h) |
68 | 69 | T = theta * (p_0 / (p_0 - rho_0*g*(z - z_0[i])))**(-0.285) |
69 | 70 |
|
|
75 | 76 |
|
76 | 77 | fig = fdsplotlib.plot_to_fig(x_data=M2.iloc[:, 1].values, y_data=M2.iloc[:, 0].values, marker_style='k-', data_label='FDS', |
77 | 78 | x_label='Velocity (m/s)', y_label='Height (m)', |
78 | | - x_min=0, x_max=u_high[i], y_min=0, y_max=100) |
| 79 | + x_min=0, x_max=u_high[i], y_min=0, y_max=100, |
| 80 | + revision_label=version_string, |
| 81 | + legend_location='lower right') |
79 | 82 |
|
80 | 83 | fdsplotlib.plot_to_fig(x_data=u, y_data=z, figure_handle=fig, marker_style='ko', data_label='M-O Theory') |
81 | 84 |
|
|
100 | 103 |
|
101 | 104 | fig = fdsplotlib.plot_to_fig(x_data=M2.iloc[:,2].values, y_data=M2.iloc[:,0].values, marker_style='k-', data_label='FDS', |
102 | 105 | x_label='Temperature (°C)', y_label='Height (m)', |
103 | | - x_min=T_low[i], x_max=T_high[i], y_min=0, y_max=100) |
| 106 | + x_min=T_low[i], x_max=T_high[i], y_min=0, y_max=100, |
| 107 | + revision_label=version_string, |
| 108 | + legend_location='lower left') |
104 | 109 |
|
105 | 110 | fdsplotlib.plot_to_fig(x_data=T - 273.15, y_data=z, figure_handle=fig, marker_style='ko', data_label='M-O Theory') |
106 | 111 |
|
|
0 commit comments