From 9d670b192439e9319e25a2ba29422c689bff418f Mon Sep 17 00:00:00 2001 From: Paul Garlick Date: Thu, 24 Oct 2019 15:50:57 +0100 Subject: add space between operator and operands. --- makeBoundary.py | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/makeBoundary.py b/makeBoundary.py index 15a1c0b..feb197b 100755 --- a/makeBoundary.py +++ b/makeBoundary.py @@ -35,9 +35,9 @@ def conveyance(numH, n_co, xregion, zregion, zmin, zmax): for interval in range(len(xregion)-1): if booleanArray[interval+1] != booleanArray[interval]: x_extra = xregion[interval] \ - + (h_i[i]-zregion[interval])\ - *(xregion[interval+1]-xregion[interval])\ - /(zregion[interval+1]-zregion[interval]) + + (h_i[i] - zregion[interval])\ + *(xregion[interval+1] - xregion[interval])\ + /(zregion[interval+1] - zregion[interval]) bisect.insort(x_sub[i], x_extra) # add intercept value ind_x = x_sub[i].index(x_extra) z_sub[i].insert(ind_x, h_i[i]) # add height value @@ -277,15 +277,15 @@ print('insertion point =', ind_q) # find height at target flow by linear interpolation 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]) + + (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('heights:', 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[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]) + *(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('hydraulic radii:', r_h[panel[ind_p]][ind_q-1], r_h[panel[ind_p]][ind_q]) velocity_panel = panel_target_flow/A_extra -- cgit