aboutsummaryrefslogtreecommitdiff
path: root/makeBoundary.py
diff options
context:
space:
mode:
authorPaul Garlick <pgarlick@tourbillion-technology.com>2019-10-18 14:48:29 +0100
committerPaul Garlick <pgarlick@tourbillion-technology.com>2019-10-18 14:48:29 +0100
commit8e7d1b27158512f54d18a296dc596a119d775adc (patch)
treeed545be9e8af870271d4245b8cc2eef79c58db9e /makeBoundary.py
parent2f3c3a55d197316d6dcba38d1dfaeed5f3c66d0a (diff)
downloadfullSWOF-utils-8e7d1b27158512f54d18a296dc596a119d775adc.tar.gz
calculate mean inlet velocities.
Diffstat (limited to 'makeBoundary.py')
-rwxr-xr-xmakeBoundary.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/makeBoundary.py b/makeBoundary.py
index 1ed9776..6eece9d 100755
--- a/makeBoundary.py
+++ b/makeBoundary.py
@@ -218,7 +218,7 @@ total_flow = np.cumsum([item[-1] for item in sortedQ])
print(total_flow)
# target_flow_west = target_flow - Q_i[-1] - Q_i_east[-1]
# calculate velocity: note dependence on hydraulic radius
-# velocity_channel = Q_i[-1]/A_i[-1]
+velocity_channel = Q_i[panel[0]][-1]/A_i[panel[0]][-1]
# velocity_east = Q_i_east[-1]/A_i_east[-1]
# print(target_flow_west)
@@ -240,8 +240,8 @@ print(h_i[panel[ind_p]][ind_q-1], h_extra, h_i[panel[ind_p]][ind_q])
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])
print(r_h[panel[ind_p]][ind_q-1], r_h[panel[ind_p]][ind_q])
-velocity_west = target_flow_west/A_extra
-print(velocity_channel, velocity_east, velocity_west)
+velocity_panel = panel_target_flow/A_extra
+print(velocity_channel, velocity_panel)
csa = np.zeros(len(xin)) # cross-sectional area
csa_west = 0