From 8e7d1b27158512f54d18a296dc596a119d775adc Mon Sep 17 00:00:00 2001 From: Paul Garlick Date: Fri, 18 Oct 2019 14:48:29 +0100 Subject: calculate mean inlet velocities. --- makeBoundary.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/makeBoundary.py b/makeBoundary.py index 1ed9776..6eece9d 100755 --- a/makeBoundary.py +++ b/makeBoundary.py @@ -218,7 +218,7 @@ total_flow = np.cumsum([item[-1] for item in sortedQ]) print(total_flow) # target_flow_west = target_flow - Q_i[-1] - Q_i_east[-1] # calculate velocity: note dependence on hydraulic radius -# velocity_channel = Q_i[-1]/A_i[-1] +velocity_channel = Q_i[panel[0]][-1]/A_i[panel[0]][-1] # velocity_east = Q_i_east[-1]/A_i_east[-1] # print(target_flow_west) @@ -240,8 +240,8 @@ print(h_i[panel[ind_p]][ind_q-1], h_extra, h_i[panel[ind_p]][ind_q]) A_extra = A_i[panel[ind_p]][ind_q-1] + (h_extra-h_i[panel[ind_p]][ind_q-1])*(A_i[panel[ind_p]][ind_q]-A_i[panel[ind_p]][ind_q-1])/(h_i[panel[ind_p]][ind_q]-h_i[panel[ind_p]][ind_q-1]) print(r_h[panel[ind_p]][ind_q-1], r_h[panel[ind_p]][ind_q]) -velocity_west = target_flow_west/A_extra -print(velocity_channel, velocity_east, velocity_west) +velocity_panel = panel_target_flow/A_extra +print(velocity_channel, velocity_panel) csa = np.zeros(len(xin)) # cross-sectional area csa_west = 0 -- cgit