From ddc3133d494ba4f57ee1ed2558bd56a2d6123f61 Mon Sep 17 00:00:00 2001 From: Paul Garlick Date: Wed, 16 Oct 2019 19:14:37 +0100 Subject: identify insertion index for level in part-filled panel. --- makeBoundary.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'makeBoundary.py') 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 -- cgit