aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Garlick <pgarlick@tourbillion-technology.com>2019-10-16 19:14:37 +0100
committerPaul Garlick <pgarlick@tourbillion-technology.com>2019-10-16 19:14:37 +0100
commitddc3133d494ba4f57ee1ed2558bd56a2d6123f61 (patch)
tree69f8bb14abde399c536b39e5b745badb235c8a33
parent3772692e0aacbda2c0791da71b3924ded205e293 (diff)
downloadfullSWOF-utils-ddc3133d494ba4f57ee1ed2558bd56a2d6123f61.tar.gz
identify insertion index for level in part-filled panel.
-rwxr-xr-xmakeBoundary.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/makeBoundary.py b/makeBoundary.py
index 19ba37e..86b2955 100755
--- a/makeBoundary.py
+++ b/makeBoundary.py
@@ -226,8 +226,11 @@ print(total_flow)
ind_p = bisect.bisect(total_flow, target_flow)
print(ind_p)
-# find insertion point for target flow value
-ind_q = bisect.bisect(Q_i_west, target_flow_west)
+# calculate target flow in part-filled panel:
+panel_target_flow = target_flow - total_flow[ind_p-1]
+
+# find insertion point for target flow value:
+ind_q = bisect.bisect(Q_i[panel[ind_p]], panel_target_flow)
print(ind_q)
# find height at target flow by linear interpolation