An error occurred while loading the file. Please try again.
-
Pierre-Antoine Rouby authorede6878c47
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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
from extreme_data.eurocode_data.utils import LAST_YEAR_FOR_EUROCODE
from root_utils import classproperty
class AbstractEurocodeRegion(object):
def __init__(self, sk0, sad) -> None:
# Valeurs caracteristique de la charge de neige sur le sol à une altitude inférieure à 200m
self.sk0 = sk0
# Valeur de calcul de la charge exceptionelle
self.sad = sad
def eurocode_max_loading(self, altitude):
valeur_caracteritique = self.valeur_caracteristique(altitude)
if self.sad is None:
return valeur_caracteritique
else:
return max(self.sad, valeur_caracteritique)
def valeur_caracteristique(self, altitude):
return self.sk0 + self._lois_de_variation_de_la_valeur_caracteristique(altitude)
def _lois_de_variation_de_la_valeur_caracteristique(self, altitude):
if 200 <= altitude <= 2000:
if 200 <= altitude <= 500:
a, b = self.lois_de_variation_200_and_500
elif 500 <= altitude <= 1000:
a, b = self.lois_de_variation_500_and_1000
else:
a, b = self.lois_de_variation_1000_and_2000
return a * altitude / 1000 + b
else:
raise ValueError('altitude {}m is out of range'.format(altitude))
@property
def lois_de_variation_200_and_500(self):
return 1.0, -0.20
@property
def lois_de_variation_500_and_1000(self):
return 1.5, -0.45
@property
def lois_de_variation_1000_and_2000(self):
return 3.5, -2.45
def plot_eurocode_snow_load_on_ground_characteristic_value_variable_action(self, ax, altitudes,
label='French standards',
linestyle=None):
# The breaking point must be exactly at 500 and 1000
for threshold in [500, 1000]:
if min(altitudes) < threshold < max(altitudes):
assert threshold in altitudes
# Plot the curve
ax.plot(altitudes, [self.valeur_caracteristique(altitude) for altitude in altitudes],
label=label, color=self.eurocode_color, linewidth=5, linestyle=linestyle)
@classproperty
def eurocode_color(self):
raise NotImplementedError
class C(AbstractEurocodeRegion):
def __init__(self, sad=None) -> None:
super().__init__(0.65, sad)
@classproperty
def eurocode_color(self):
return 'gold'
class C1(C):
pass
class C2(C):
def __init__(self) -> None:
super().__init__(sad=1.35)
class E(AbstractEurocodeRegion):
def __init__(self) -> None:
super().__init__(1.40, None)
@property
def lois_de_variation_200_and_500(self):
return 1.5, -0.30
@property
def lois_de_variation_500_and_1000(self):
return 3.5, -1.30
@property
def lois_de_variation_1000_and_2000(self):
return 7, -4.80
@classproperty
def eurocode_color(self):
return 'orange'