com4FlowPy.flowClass.Cell
- class Cell(rowindex, colindex, dem_ng, cellsize, flux, z_delta, parent, alpha, exp, flux_threshold, max_z_delta, startcell, fluxDistOldVersionBool=False, FSI=None, forestParams=None)[source]
Bases:
object- __init__(rowindex, colindex, dem_ng, cellsize, flux, z_delta, parent, alpha, exp, flux_threshold, max_z_delta, startcell, fluxDistOldVersionBool=False, FSI=None, forestParams=None)[source]
constructor for the Cell class that describes a raster cell that is hit by the GMF. the constructor function is called every time a new instance of type ‘Cell’ is initialized. NOTE/TODO: parent can be of different data types still, maybe split into two separate variables
bool –> isStart
Cell –> startCell
Methods
__init__(rowindex, colindex, dem_ng, ...[, ...])constructor for the Cell class that describes a raster cell that is hit by the GMF. the constructor function is called every time a new instance of type 'Cell' is initialized. NOTE/TODO: parent can be of different data types still, maybe split into two separate variables * bool --> isStart * Cell --> startCell.
add_os(flux)Adds flux to 'existing' flux
add_parent(parent)Adds parent to parents list and optionally the forest interaction value of the parent
calcDistMin([calc3D])function calculates the projected horizontal (self.min_distance) and 3D (self.minDistXYZ) length of the shortest flow path from the start-cell to the current cell.
calculates flux and zdelta that is distributed to the adjacent cells
function calculates the travel-angle along the shortest flow-path from the start-cell to the current cell.
calculates persistence-based routing
function calculates the travel-angle between the start cell and the current cell using the shortest connection or straight line (sl) between the two cells.
calculates the normalized terrain based routing
function calculates zDelta (velocity or energy line height) to the eligible neighbours NOTE: forestFriction related mechanics are implemented here!
linear decrease of forest effect with regard to alpha increase and kinetic energy height This is the detrainment routine for forest.
- add_parent(parent)[source]
Adds parent to parents list and optionally the forest interaction value of the parent
- Parameters
parent (class Cell) – Cell object to add to the list of parent cells ‘lOfParents’
- calcDistMin(calc3D=False)[source]
function calculates the projected horizontal (self.min_distance) and 3D (self.minDistXYZ) length of the shortest flow path from the start-cell to the current cell.
- Parameters
calc3D (bool) – if True, the 3D distance is computed additionally (default: False)
- calc_distribution()[source]
calculates flux and zdelta that is distributed to the adjacent cells
- Returns
list of row, col, flux, zdelta of adjacent cells that receive flux/zdelta
- Return type
tuple
- calc_fp_travelangle()[source]
function calculates the travel-angle along the shortest flow-path from the start-cell to the current cell. The travel-angle along the shortest flow-path is equivalent to the maximum travel angle along all paths from the startcell to this cell.
- calc_sl_travelangle()[source]
function calculates the travel-angle between the start cell and the current cell using the shortest connection or straight line (sl) between the two cells. The travel angle calculated with this shortest horizontal distance ‘sl_gamma’ is always larger or equal to the travel angle ‘max_gamma’, which is calculated along the (potentially curved) flow path (fp). (vgl. Meißl, 1998)
- calc_z_delta()[source]
function calculates zDelta (velocity or energy line height) to the eligible neighbours NOTE: forestFriction related mechanics are implemented here!
- forest_detrainment()[source]
linear decrease of forest effect with regard to alpha increase and kinetic energy height This is the detrainment routine for forest. It should reduce the routing flux of the avalanche. NOTE: This is more or less copied+pasted from ‘foreste_detrainment’ branch in avaframe/FlowPy repo TODO: Definitely re-check/test this function!!