ship.utils.tools package¶
Submodules¶
ship.utils.tools.geometry module¶
- Summary:
- Contains tools used to calculate geoemtric properties, such as polygon area and perimiter.
- Author:
- Duncan Runnacles
- Created:
- 01 Apr 2016
- Copyright:
- Duncan Runnacles 2016
TODO:
Updates:
ship.utils.tools.openchannel module¶
- Summary:
Contains methods for calculating characteristics of open channel flow.
Currently only used to calculate conveyance for a channel section.
- Author:
- Duncan Runnacles
- Created:
- 01 Apr 2016
- Copyright:
- Duncan Runnacles 2016
TODO:
Updates:
-
calcConveyance
(x_vals, y_vals, panel_vals=[], n_vals=None, depths=[], no_panels=False, interpolate_space=0, tolerance=0.0)[source]¶ Calculate conveyance over a range of depths from min to max elevation.
Parameters: - x_vals (list) – cross section chainage values.
- y_vals (list) – corresponding elevation values
- panel_vals=[] (list) – corresponding panel locations.
- n_vals=[] (list) – corresponding mannings n values.
- depths=[] (list) – list of depths required. Any specific depths needed.
- no_panels (Bool) – If false any panels found will not be included in the calculations.
- interpolate_space=0 (int) – float stipulating the maximum allowable space between depths. If zero then only section elevations will be used.
- tolerance=0.0 (float) – tolerance used to identify negative conveyance. if the reduction in conveyance is less than tolerance it will not be flagged.
Returns: - list: containing a dictionary for each depth with:
Conveyance: the conveyance value calculated. Stage: the depth of the value calculated. Negative: boolean - True if value less than previous depth.
boolean: True if contains a negative conveyance.
Return type: Tuple