-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathFloodVulnFunctions.py
More file actions
28 lines (24 loc) · 1.13 KB
/
Copy pathFloodVulnFunctions.py
File metadata and controls
28 lines (24 loc) · 1.13 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#a collection of Python functions for vulnerability analysis and flood loss modelling
#created by Andreas Paul Zischg
import math
import numpy as np
#**************************************************************************
# vulnerability function (Totschnig et al. 2011)
# this function calculates the degree of loss of a buildung on the basis of deposition depths of floods with sediment transport
# Totschnig, Reinhold; Sedlacek, Walter; Fuchs, Sven (2011): A quantitative vulnerability function for fluvial sediment transport. In: Nat Hazards 58 (2), S. 681–703. DOI: 10.1007/s11069-010-9623-5.
#**************************************************************************
def vulnerabilityTotschnig(flowdepth):
if float(flowdepth) >=0.0:
u = (float(flowdepth)+1.442)/1.442-1
v = math.pow(u, 2.233)
w = -0.443*v
x = 1-math.exp(w)
if x >=0.0 and x <=1.0 :
vulnerabilityTotschnig = x
elif x>1.0:
vulnerabilityTotschnig = 1.0
elif x<0.0:
vulnerabilityTotschnig = 0.0
else:
vulnerabilityTotschnig = 0.0
return vulnerabilityTotschnig