aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Garlick <pgarlick@tourbillion-technology.com>2019-10-22 15:18:55 +0100
committerPaul Garlick <pgarlick@tourbillion-technology.com>2019-10-22 15:18:55 +0100
commitc780b1567ea748ef2dddfe920305216747cf189c (patch)
tree7d8b10042eda1bf992ae33c7a0cd7d0b131d0e43
parent25b23c55228609873fd0743129d8f4b7a2a06ea1 (diff)
downloadfullSWOF-utils-c780b1567ea748ef2dddfe920305216747cf189c.tar.gz
set element cross sectional area to zero in empty panels.
-rwxr-xr-xmakeBoundary.py14
1 files 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