|
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) |
| 16 | +# git_file = outdir + 'atmospheric_boundary_layer_1_git.txt' |
| 17 | +# version_string = fdsplotlib.get_version_string(git_file) |
18 | 18 |
|
19 | 19 | basein = outdir + 'atmospheric_boundary_layer' |
20 | 20 | baseout = pltdir + 'atmospheric_boundary_layer' |
21 | 21 |
|
22 | 22 | for i in range(1, 5): # Loop from 1 to 4 (inclusive) |
23 | 23 |
|
| 24 | + git_file = outdir + f'atmospheric_boundary_layer_{i}_git.txt' |
| 25 | + version_string = fdsplotlib.get_version_string(git_file) |
| 26 | + |
24 | 27 | datafile = basein + '_' + str(i) |
25 | 28 | outfile = baseout + '_' + str(i) |
26 | 29 |
|
|
52 | 55 | theta_star = u_star**2 * theta_0 / (g * kappa * L) |
53 | 56 |
|
54 | 57 | 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]) |
| 58 | + z = np.sort(z) |
55 | 59 |
|
56 | 60 | # Create figure 1 for velocity |
57 | 61 |
|
|
63 | 67 | psi_m = -5*z/L |
64 | 68 | psi_h = psi_m |
65 | 69 |
|
66 | | - u = (u_star/kappa) * (np.log(z/z_0[i]) - psi_m) |
| 70 | + u = (u_star/kappa) * np.maximum(np.log(z/z_0[i]) - psi_m, 0.) |
67 | 71 | theta = theta_0 + (theta_star/kappa) * (np.log(z/z_0[i]) - psi_h) |
68 | 72 | T = theta * (p_0 / (p_0 - rho_0*g*(z - z_0[i])))**(-0.285) |
69 | 73 |
|
|
75 | 79 |
|
76 | 80 | fig = fdsplotlib.plot_to_fig(x_data=M2.iloc[:, 1].values, y_data=M2.iloc[:, 0].values, marker_style='k-', data_label='FDS', |
77 | 81 | x_label='Velocity (m/s)', y_label='Height (m)', |
78 | | - x_min=0, x_max=u_high[i], y_min=0, y_max=100) |
| 82 | + x_min=0, x_max=u_high[i], y_min=0, y_max=100, |
| 83 | + revision_label=version_string, |
| 84 | + legend_location='lower right') |
79 | 85 |
|
80 | 86 | fdsplotlib.plot_to_fig(x_data=u, y_data=z, figure_handle=fig, marker_style='ko', data_label='M-O Theory') |
81 | 87 |
|
|
100 | 106 |
|
101 | 107 | fig = fdsplotlib.plot_to_fig(x_data=M2.iloc[:,2].values, y_data=M2.iloc[:,0].values, marker_style='k-', data_label='FDS', |
102 | 108 | 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) |
| 109 | + x_min=T_low[i], x_max=T_high[i], y_min=0, y_max=100, |
| 110 | + revision_label=version_string, |
| 111 | + legend_location='lower left') |
104 | 112 |
|
105 | 113 | fdsplotlib.plot_to_fig(x_data=T - 273.15, y_data=z, figure_handle=fig, marker_style='ko', data_label='M-O Theory') |
106 | 114 |
|
|
0 commit comments