From 9af463c1930d6b9d2a200fb268629c611f91e88d Mon Sep 17 00:00:00 2001 From: Paul Garlick Date: Wed, 16 Oct 2019 00:51:09 +0100 Subject: use list objects for plotting. --- makeBoundary.py | 27 ++++++--------------------- 1 file changed, 6 insertions(+), 21 deletions(-) (limited to 'makeBoundary.py') diff --git a/makeBoundary.py b/makeBoundary.py index f20ed2e..ac86d16 100755 --- a/makeBoundary.py +++ b/makeBoundary.py @@ -204,27 +204,12 @@ for p in range(num_panels): zregion[p], zmin[p], zmax) - -plot_region(h_i-zmin, 'maximum depth / m', - r_h, 'hydraulic radius / m', - K_i, r'conveyance / $m^3/s$', - Q_i, r'discharge / $m^3/s$', 'main channel flow') - -p_i_west, A_i_west, r_h_west, h_i_west, K_i_west, Q_i_west = conveyance( - numH, n_co_west, xregion_west, zregion_west, zmin_west, zmax_west) - -plot_region(h_i_west-zmin_west, 'maximum depth / m', - r_h_west, 'hydraulic radius / m', - K_i_west, r'conveyance / $m^3/s$', - Q_i_west, r'discharge / $m^3/s$', 'west overland flow') - -p_i_east, A_i_east, r_h_east, h_i_east, K_i_east, Q_i_east = conveyance( - numH, n_co_east, xregion_east, zregion_east, zmin_east, zmax_east) - -plot_region(h_i_east-zmin_east, 'maximum depth / m', - r_h_east, 'hydraulic radius / m', - K_i_east, r'conveyance / $m^3/s$', - Q_i_east, r'discharge / $m^3/s$', 'east overland flow') + plot_region( + h_i[p]-zmin[p], 'maximum depth / m', + r_h[p], 'hydraulic radius / m', + K_i[p], r'conveyance / $m^3/s$', + Q_i[p], r'discharge / $m^3/s$', + 'Panel {}'.format(p)) target_flow_west = target_flow - Q_i[-1] - Q_i_east[-1] # calculate velocity: note dependence on hydraulic radius -- cgit