aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xmakeBoundary.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/makeBoundary.py b/makeBoundary.py
index 86b2955..1ed9776 100755
--- a/makeBoundary.py
+++ b/makeBoundary.py
@@ -234,11 +234,11 @@ ind_q = bisect.bisect(Q_i[panel[ind_p]], panel_target_flow)
print(ind_q)
# find height at target flow by linear interpolation
-h_extra = h_i_west[ind_q-1] + (h_i_west[ind_q]-h_i_west[ind_q-1])*(target_flow_west-Q_i_west[ind_q-1])/(Q_i_west[ind_q]-Q_i_west[ind_q-1])
-print(h_i_west[ind_q-1], h_extra, h_i_west[ind_q])
+h_extra = h_i[panel[ind_p]][ind_q-1] + (h_i[panel[ind_p]][ind_q]-h_i[panel[ind_p]][ind_q-1])*(panel_target_flow-Q_i[panel[ind_p]][ind_q-1])/(Q_i[panel[ind_p]][ind_q]-Q_i[panel[ind_p]][ind_q-1])
+print(h_i[panel[ind_p]][ind_q-1], h_extra, h_i[panel[ind_p]][ind_q])
# find area at target flow by linear interpolation
-A_extra = A_i_west[ind_q-1] + (h_extra-h_i_west[ind_q-1])*(A_i_west[ind_q]-A_i_west[ind_q-1])/(h_i_west[ind_q]-h_i_west[ind_q-1])
-print(r_h_west[ind_q-1], r_h_west[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)