From c780b1567ea748ef2dddfe920305216747cf189c Mon Sep 17 00:00:00 2001 From: Paul Garlick Date: Tue, 22 Oct 2019 15:18:55 +0100 Subject: set element cross sectional area to zero in empty panels. --- makeBoundary.py | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/makeBoundary.py b/makeBoundary.py index 59f4dc0..67209aa 100755 --- a/makeBoundary.py +++ b/makeBoundary.py @@ -127,12 +127,12 @@ print(zmin[1]) zmax = min(zregion[panel[0]][0], zregion[panel[0]][-1]) - ztol def conveyance(numH, n_co, xregion, zregion, zmin, zmax): - p_i = [] # wetted perimeter - A_i = [] # area - r_h = [] # hydraulic radius - h_i = [] # list of heights - K_i = [] # conveyance - Q_i = [] # discharge + p_i = [] # wetted perimeter + A_i = [] # area + r_h = [] # hydraulic radius + h_i = [] # list of heights + K_i = [] # conveyance + Q_i = [] # discharge x_sub = [[] for i in range(numH)] # list of x values in subregion z_sub = [[] for i in range(numH)] # list of z values in subregion for i in range(numH): @@ -269,6 +269,8 @@ for i, p in enumerate(panel): csa_p[p] = area_sum else: # panel is empty + for m in range(marker_ind[p], marker_ind[p+1]): + csa[m] = 0 csa_p[p] = 0 -- cgit