#%% Plot profiles n_point = flow.n_q - 1 flow.extract(flow.n_h - 1) flow.compute_derivative() fig_profile1 = plt.figure(figsize=(6 * 1., 3.6 * 1.)) ax = fig_profile1.gca() ax.plot(flow.q2, flow.y2[:, 0:-1:40], 'b-', linewidth=1.2) ax.plot(flow.q2, flow.y2[:, 0], '-m', linewidth=1.2) ax.grid(linestyle="--") plt.xlabel('$x$') plt.ylabel('$y$') plt.tight_layout() #%% Plot velocity flow.compute_velocity(flow.n_h - 1) fig_u = plt.figure(figsize=(6 * 1., 3.6 * 1.)) ax = fig_u.gca() ax.plot(flow.p, flow.c_u[0, :].T, 'b-') ax.grid(linestyle="--") plt.ylabel('$c-u$', fontsize=12) plt.xlabel('$p$', fontsize=12) ax.grid(linestyle="--") plt.tight_layout() print(min(flow.c_u[0, :])) #%% Plot variation of depth fig_depth = plt.figure(figsize=(6 * 1., 3.6 * 1.)) ax = fig_depth.gca() ax.plot(flow.Q[0:], flow.d[0:], 'b-o', markersize=4) ax.grid(linestyle="--")