ourocode 1.6.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of ourocode might be problematic. Click here for more details.
- ourocode/__init__.py +0 -0
- ourocode/__version__.py +1 -0
- ourocode/data/caracteristique_meca_acier.csv +33 -0
- ourocode/data/caracteristique_meca_bois.csv +59 -0
- ourocode/data/carte_action_region.csv +36722 -0
- ourocode/data/coeff_psy.csv +13 -0
- ourocode/data/exploitation.csv +17 -0
- ourocode/data/gammaM.csv +14 -0
- ourocode/data/kdef.csv +11 -0
- ourocode/data/kfi.csv +10 -0
- ourocode/data/kmod.csv +16 -0
- ourocode/data/limite_fleche.csv +9 -0
- ourocode/data/qualite_acier.csv +18 -0
- ourocode/data/screenshot/C90_def.png +0 -0
- ourocode/data/screenshot/Kv_def.png +0 -0
- ourocode/data/screenshot/fleche.png +0 -0
- ourocode/data/screenshot/sign_convention.png +0 -0
- ourocode/data/section_boulon.csv +12 -0
- ourocode/data/vent/vent_Cp_toiture_isolee_1_versant.csv +22 -0
- ourocode/data/vent/vent_Cp_toiture_isolee_1_versant.png +0 -0
- ourocode/data/vent/vent_Cp_toiture_isolee_2_versants.csv +31 -0
- ourocode/data/vent/vent_Cp_toiture_isolee_2_versants.png +0 -0
- ourocode/data/vent/vent_Cpe_mur_verticaux.csv +11 -0
- ourocode/data/vent/vent_Cpe_mur_verticaux.png +0 -0
- ourocode/data/vent/vent_Cpe_toiture_1_versant.png +0 -0
- ourocode/data/vent/vent_Cpe_toiture_1_versant_0_degres.csv +13 -0
- ourocode/data/vent/vent_Cpe_toiture_1_versant_180_degres.csv +13 -0
- ourocode/data/vent/vent_Cpe_toiture_1_versant_90_degres.csv +13 -0
- ourocode/data/vent/vent_Cpe_toiture_2_versants.png +0 -0
- ourocode/data/vent/vent_Cpe_toiture_2_versants_0_degres.csv +21 -0
- ourocode/data/vent/vent_Cpe_toiture_2_versants_90_degres.csv +21 -0
- ourocode/data/vent/vent_Cpe_toiture_terrasse.csv +21 -0
- ourocode/data/vent/vent_Cpe_toiture_terrasse.png +0 -0
- ourocode/data/vent/vent_Ffr.png +0 -0
- ourocode/eurocode/A0_Projet.py +1408 -0
- ourocode/eurocode/EC0_Combinaison.py +1763 -0
- ourocode/eurocode/EC1_Exploitation.py +103 -0
- ourocode/eurocode/EC1_Neige.py +385 -0
- ourocode/eurocode/EC1_Vent.py +1388 -0
- ourocode/eurocode/EC3_Assemblage.py +466 -0
- ourocode/eurocode/EC3_Element_droit.py +302 -0
- ourocode/eurocode/EC5_Assemblage.py +1760 -0
- ourocode/eurocode/EC5_Element_droit.py +1740 -0
- ourocode/eurocode/EC5_Feu.py +922 -0
- ourocode/eurocode/EC8_Sismique.py +2 -0
- ourocode/eurocode/__init__.py +0 -0
- ourocode/eurocode/logical.py +83 -0
- ourocode/eurocode/objet.py +263 -0
- ourocode-1.6.0.dist-info/METADATA +331 -0
- ourocode-1.6.0.dist-info/RECORD +53 -0
- ourocode-1.6.0.dist-info/WHEEL +5 -0
- ourocode-1.6.0.dist-info/licenses/LICENSE +201 -0
- ourocode-1.6.0.dist-info/top_level.txt +1 -0
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
from math import *
|
|
2
|
+
|
|
3
|
+
import forallpeople as si
|
|
4
|
+
from handcalcs.decorator import handcalc
|
|
5
|
+
|
|
6
|
+
from ourocode.eurocode.A0_Projet import Projet
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
class Exploitation(Projet):
|
|
10
|
+
CATEGORIE = list(Projet._data_from_csv(Projet, "exploitation.csv").index)
|
|
11
|
+
def __init__(self, categorie: str=CATEGORIE, **kwargs):
|
|
12
|
+
"""Créer une classe permettant la définition des charges d'exploitation selon l'EN 1991-1-1 et son AN.
|
|
13
|
+
Cette classe est hérité de la classe Projet du module A0_Projet.py
|
|
14
|
+
|
|
15
|
+
Args:
|
|
16
|
+
categorie (str, optional): Catégorie d'exploitation avec pour exemple : "A_plancher", pour un plancher d'habitation.
|
|
17
|
+
"""
|
|
18
|
+
super().__init__(**kwargs)
|
|
19
|
+
self.categorie = categorie
|
|
20
|
+
|
|
21
|
+
@property
|
|
22
|
+
def cat_exploitation(self):
|
|
23
|
+
"""Retourne le dataframe de la catégorie d'exploitation choisi
|
|
24
|
+
"""
|
|
25
|
+
file = "exploitation.csv"
|
|
26
|
+
df = self._data_from_csv(file)
|
|
27
|
+
return df.loc[self.categorie]
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
@property
|
|
31
|
+
def qk(self):
|
|
32
|
+
"""Retourne la charge linéique de la catégorie d'exploitation définit.
|
|
33
|
+
"""
|
|
34
|
+
return self.cat_exploitation["qk (kN/m²)"] * si.kN/si.m**2
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
@property
|
|
38
|
+
def Qk(self):
|
|
39
|
+
"""Retourne la charge ponctuelle à appliquer aux endroits les plus défavorables du modèle.
|
|
40
|
+
"""
|
|
41
|
+
return self.cat_exploitation["Qk (kN)"] * si.kN
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
def alpha_A(self, A: float):
|
|
45
|
+
"""Retourne le coefficient de réduction de charge à appliquer à la valeur qk selon l'EN 1991-1-1 et son AN §6.2.1(4) et 6.3.1.2(10).
|
|
46
|
+
Cela concernent les catégories d'usage suivantes: A, B, C3, D1, F.
|
|
47
|
+
|
|
48
|
+
Args:
|
|
49
|
+
A (float): Aire chargée en m²
|
|
50
|
+
|
|
51
|
+
Returns:
|
|
52
|
+
float: coef. de réduction
|
|
53
|
+
"""
|
|
54
|
+
A = A * si.m**2
|
|
55
|
+
A_0 = 3.5 * si.m**2
|
|
56
|
+
q_k = self.qk
|
|
57
|
+
|
|
58
|
+
if self.categorie in ("A_plancher", "A_escalier", "A_balcons", "B", "C3", "D1", "F"):
|
|
59
|
+
@handcalc(override="short", precision=2, jupyter_display=self.JUPYTER_DISPLAY, left="\[", right="\]")
|
|
60
|
+
def val():
|
|
61
|
+
alpha_A = min(0.77 + A_0 / A, 1) #EN 1991-1-1 et son AN §6.2.1(4) et 6.3.1.2(10)
|
|
62
|
+
q_k_alpha_A = q_k * alpha_A
|
|
63
|
+
return alpha_A
|
|
64
|
+
return val()
|
|
65
|
+
else:
|
|
66
|
+
print("La catégorie n'a pas de réduction possible par le coefficient alphaA.")
|
|
67
|
+
return False
|
|
68
|
+
|
|
69
|
+
|
|
70
|
+
def alpha_n(self, n: int):
|
|
71
|
+
"""Retourne le coefficient de réduction de charge pour les poteaux et les murs, à multiplier par la charge d'exploitation totale apportée
|
|
72
|
+
par plusieurs étages selon l'EN 1991-1-1 et son AN §6.2.2(2) et 6.3.1.2(11).
|
|
73
|
+
Cela concernent les catégories d'usage suivantes: A, B, C3, D1, F.
|
|
74
|
+
|
|
75
|
+
Args:
|
|
76
|
+
n (int): le nombre d'étages (> 2) au-dessus des éléments structuraux chargés de la même catégorie
|
|
77
|
+
|
|
78
|
+
Returns:
|
|
79
|
+
float: coef. de réduction
|
|
80
|
+
"""
|
|
81
|
+
if n > 2:
|
|
82
|
+
if self.categorie in ("B", "F"):
|
|
83
|
+
@handcalc(override="short", precision=2, jupyter_display=self.JUPYTER_DISPLAY, left="\[", right="\]")
|
|
84
|
+
def val():
|
|
85
|
+
alpha_n = 0.7 + 0.8 / n #EN 1991-1-1 §6.2.2(2) et 6.3.1.2(11)
|
|
86
|
+
return alpha_n
|
|
87
|
+
return val()
|
|
88
|
+
|
|
89
|
+
elif self.categorie in ("A_plancher", "A_escalier", "A_balcons"):
|
|
90
|
+
@handcalc(override="short", precision=2, jupyter_display=self.JUPYTER_DISPLAY, left="\[", right="\]")
|
|
91
|
+
def val():
|
|
92
|
+
alpha_n = 0.5 + 1.36 / n #EN 1991-1-1 §6.2.2(2) et 6.3.1.2(11)
|
|
93
|
+
return alpha_n
|
|
94
|
+
return val()
|
|
95
|
+
|
|
96
|
+
print("La catégorie n'a pas de réduction possible par le coefficient alpha_n.")
|
|
97
|
+
return False
|
|
98
|
+
|
|
99
|
+
|
|
100
|
+
|
|
101
|
+
if __name__ == "__main__":
|
|
102
|
+
expl = Exploitation("A_plancher")
|
|
103
|
+
print(expl.alpha_n(3))
|
|
@@ -0,0 +1,385 @@
|
|
|
1
|
+
#! env\Scripts\python.exe
|
|
2
|
+
# Encoding in UTF-8 by Anthony PARISOT
|
|
3
|
+
from math import sin, radians
|
|
4
|
+
import pandas as pd
|
|
5
|
+
|
|
6
|
+
import forallpeople as si
|
|
7
|
+
from handcalcs.decorator import handcalc
|
|
8
|
+
|
|
9
|
+
from ourocode.eurocode.A0_Projet import Batiment
|
|
10
|
+
|
|
11
|
+
class Neige(Batiment):
|
|
12
|
+
EXPOSITION = ("Normal", "Protégé")
|
|
13
|
+
TYPE_TOIT = ("1 versant", "2 versants", "Versants multiples")
|
|
14
|
+
SNOW_LOAD_CARAC = {"A1": (0.45, 0, "A"),
|
|
15
|
+
"A2": (0.45, 1, "B1"),
|
|
16
|
+
"B1": (0.55, 1, "B1"),
|
|
17
|
+
"B2": (0.55, 1.35, "B1"),
|
|
18
|
+
"C1": (0.65, 0, "A"),
|
|
19
|
+
"C2": (0.65, 1.35, "B1"),
|
|
20
|
+
"D": (0.90, 1.8, "B1"),
|
|
21
|
+
"E": (1.40, 0, "A")}
|
|
22
|
+
def __init__(self, exposition: str=EXPOSITION, type_toit :str=TYPE_TOIT, blocage: bool=("False", "True"), **kwargs):
|
|
23
|
+
"""Créer une classe permettant le calcul de l'action variable de neige sur les structure à l'Eurocode 1. Elle est hérité de la classe Bâtiment.
|
|
24
|
+
|
|
25
|
+
Args:
|
|
26
|
+
exposition (str, optional): Défini le type d'exposition, normal ou protégé par des batiments
|
|
27
|
+
alentour rendant inexistant le déplacement possible de la neige par le vent (EC1_AN 5.2.7). Defaults to "normal".
|
|
28
|
+
type_toit (str, optional): Défini le type de toit, "1 versant", "2 versants". Defaults to "2 versants"
|
|
29
|
+
blocage (bool, optional): Défini si il y a un blocage du glissement de la neige sur la toiture. Defaults to False.
|
|
30
|
+
"""
|
|
31
|
+
super().__init__(**kwargs)
|
|
32
|
+
self.exposition = exposition
|
|
33
|
+
self.type_toit = type_toit
|
|
34
|
+
self.blocage = blocage
|
|
35
|
+
self.C_t = 1
|
|
36
|
+
|
|
37
|
+
@property
|
|
38
|
+
def region_neige(self):
|
|
39
|
+
file = "carte_action_region.csv"
|
|
40
|
+
df = self._data_from_csv(file, index_col=1)
|
|
41
|
+
return df.loc[str(self.code_INSEE)]["Zone_neige"]
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
@property
|
|
45
|
+
def S_k_200(self):
|
|
46
|
+
"""Retourne la valeur de neige au sol pour une situation normale Sk200 en kN/m2
|
|
47
|
+
|
|
48
|
+
Returns:
|
|
49
|
+
float : Sk200 en kN/m2
|
|
50
|
+
"""
|
|
51
|
+
return self.SNOW_LOAD_CARAC[self.region_neige][0] * si.kN/si.m**2
|
|
52
|
+
|
|
53
|
+
|
|
54
|
+
@property
|
|
55
|
+
def S_Ad(self):
|
|
56
|
+
"""Retourne la valeur de neige au sol pour une situation accidentelle SAd en kN/m2
|
|
57
|
+
|
|
58
|
+
Returns:
|
|
59
|
+
float : SAd en kN/m2
|
|
60
|
+
"""
|
|
61
|
+
return self.SNOW_LOAD_CARAC[self.region_neige][1] * si.kN/si.m**2
|
|
62
|
+
|
|
63
|
+
|
|
64
|
+
@property
|
|
65
|
+
def C_e(self):
|
|
66
|
+
"""Détermine le coefficient d'exposition
|
|
67
|
+
"""
|
|
68
|
+
match self.exposition:
|
|
69
|
+
case "Normal":
|
|
70
|
+
return 1
|
|
71
|
+
case _:
|
|
72
|
+
return 1.25
|
|
73
|
+
|
|
74
|
+
|
|
75
|
+
@property
|
|
76
|
+
def mu(self):
|
|
77
|
+
"""Retourne le mu d'une toiture simple et double pan et a versants multiples selon l'EN 1991-1-3 §5.3
|
|
78
|
+
Ne prend pas en compte les constructions proches ou plus élevées, ni les toitures cylindrique.
|
|
79
|
+
|
|
80
|
+
Returns:
|
|
81
|
+
float : mu1, mu2, mu3
|
|
82
|
+
"""
|
|
83
|
+
|
|
84
|
+
match self.type_toit:
|
|
85
|
+
case "1 versant":
|
|
86
|
+
alpha_toit = self.alpha_toit
|
|
87
|
+
if self.blocage:
|
|
88
|
+
dict_mu = {"mu1": 0.8}
|
|
89
|
+
|
|
90
|
+
if 0 <= alpha_toit <= 30:
|
|
91
|
+
dict_mu = {"mu1": 0.8}
|
|
92
|
+
elif 30 < alpha_toit < 60:
|
|
93
|
+
@handcalc(override="short", precision=2, jupyter_display=self.JUPYTER_DISPLAY, left="\\[", right="\\]")
|
|
94
|
+
def val():
|
|
95
|
+
mu_1 = 0.8 * (60 - alpha_toit) / 30
|
|
96
|
+
return mu_1
|
|
97
|
+
dict_mu = {"mu1": val()}
|
|
98
|
+
elif alpha_toit >= 60:
|
|
99
|
+
dict_mu = {"mu1": 0}
|
|
100
|
+
|
|
101
|
+
|
|
102
|
+
case "2 versants" | "Versants multiples":
|
|
103
|
+
alpha_versant_1 = self.alpha_toit
|
|
104
|
+
alpha_versant_2 = self.alpha_toit2
|
|
105
|
+
dict_mu = {"mu2 versant 1": None, "mu2 versant 2": None}
|
|
106
|
+
for i, alpha in enumerate((alpha_versant_1, alpha_versant_2)):
|
|
107
|
+
if 0 <= alpha <= 30:
|
|
108
|
+
value = 0.8
|
|
109
|
+
elif 30 < alpha < 60:
|
|
110
|
+
@handcalc(override="short", precision=2, jupyter_display=self.JUPYTER_DISPLAY, left="\\[", right="\\]")
|
|
111
|
+
def val():
|
|
112
|
+
mu_2 = 0.8 * (60 - alpha) / 30
|
|
113
|
+
return mu_2
|
|
114
|
+
value = val()
|
|
115
|
+
elif alpha >= 60:
|
|
116
|
+
value = 0.8
|
|
117
|
+
|
|
118
|
+
if i:
|
|
119
|
+
dict_mu["mu2 versant 2"] = value
|
|
120
|
+
else:
|
|
121
|
+
dict_mu["mu2 versant 1"] = value
|
|
122
|
+
|
|
123
|
+
|
|
124
|
+
if self.type_toit == "Versants multiples":
|
|
125
|
+
alpha_mean = (alpha_versant_1 + alpha_versant_2) / 2
|
|
126
|
+
if 0 <= alpha_mean <= 30:
|
|
127
|
+
@handcalc(override="short", precision=2, jupyter_display=self.JUPYTER_DISPLAY, left="\\[", right="\\]")
|
|
128
|
+
def val():
|
|
129
|
+
alpha_m = (alpha_versant_1 + alpha_versant_2) / 2
|
|
130
|
+
mu_3 = 0.8 + 0.8 * alpha_m / 30
|
|
131
|
+
return mu_3
|
|
132
|
+
dict_mu["mu3"] = val()
|
|
133
|
+
elif 30 < alpha_mean < 60:
|
|
134
|
+
dict_mu["mu3"] = 1.6
|
|
135
|
+
elif alpha_mean >= 60:
|
|
136
|
+
dict_mu["mu3"] = None
|
|
137
|
+
return dict_mu
|
|
138
|
+
|
|
139
|
+
|
|
140
|
+
@property
|
|
141
|
+
def Sk_alt(self):
|
|
142
|
+
"""Retourne la charge de neige caractéristique horizontal en kN/m² à une altitude donnée
|
|
143
|
+
|
|
144
|
+
Returns:
|
|
145
|
+
float: la charge en kN/m²
|
|
146
|
+
"""
|
|
147
|
+
|
|
148
|
+
altitude = int(self.alt.value)
|
|
149
|
+
S_k_200 = self.S_k_200
|
|
150
|
+
|
|
151
|
+
if altitude <= 200:
|
|
152
|
+
@handcalc(override="short", precision=2, jupyter_display=self.JUPYTER_DISPLAY, left="\\[", right="\\]")
|
|
153
|
+
def val():
|
|
154
|
+
S_k_alt = S_k_200 + 0
|
|
155
|
+
return S_k_alt
|
|
156
|
+
|
|
157
|
+
elif 200 < altitude <= 500:
|
|
158
|
+
if self.region_neige == "E":
|
|
159
|
+
@handcalc(override="short", precision=2, jupyter_display=self.JUPYTER_DISPLAY, left="\\[", right="\\]")
|
|
160
|
+
def val():
|
|
161
|
+
delta_S_2 = 0.15 * (altitude - 200) /100
|
|
162
|
+
S_k_alt = S_k_200 + delta_S_2 * si.kPa
|
|
163
|
+
return S_k_alt
|
|
164
|
+
else:
|
|
165
|
+
@handcalc(override="short", precision=2, jupyter_display=self.JUPYTER_DISPLAY, left="\\[", right="\\]")
|
|
166
|
+
def val():
|
|
167
|
+
delta_S_1 = 0.10 * (altitude - 200) /100
|
|
168
|
+
S_k_alt = S_k_200 + delta_S_1 * si.kPa
|
|
169
|
+
return S_k_alt
|
|
170
|
+
|
|
171
|
+
elif 500 < altitude <= 1000:
|
|
172
|
+
if self.region_neige == "E":
|
|
173
|
+
@handcalc(override="short", precision=2, jupyter_display=self.JUPYTER_DISPLAY, left="\\[", right="\\]")
|
|
174
|
+
def val():
|
|
175
|
+
delta_S_2 = 0.45 + 0.35 * (altitude - 500) /100
|
|
176
|
+
S_k_alt = S_k_200 + delta_S_2 * si.kPa
|
|
177
|
+
return S_k_alt
|
|
178
|
+
else:
|
|
179
|
+
@handcalc(override="short", precision=2, jupyter_display=self.JUPYTER_DISPLAY, left="\\[", right="\\]")
|
|
180
|
+
def val():
|
|
181
|
+
delta_S_1 = 0.30 + 0.15 * (altitude - 500) /100
|
|
182
|
+
S_k_alt = S_k_200 + delta_S_1 * si.kPa
|
|
183
|
+
return S_k_alt
|
|
184
|
+
|
|
185
|
+
elif 1000 < altitude <= 2000:
|
|
186
|
+
if self.region_neige == "E":
|
|
187
|
+
@handcalc(override="short", precision=2, jupyter_display=self.JUPYTER_DISPLAY, left="\\[", right="\\]")
|
|
188
|
+
def val():
|
|
189
|
+
delta_S_2 = 2.20 + 0.70 * (altitude - 1000) /100
|
|
190
|
+
S_k_alt = S_k_200 + delta_S_2 * si.kPa
|
|
191
|
+
return S_k_alt
|
|
192
|
+
else:
|
|
193
|
+
@handcalc(override="short", precision=2, jupyter_display=self.JUPYTER_DISPLAY, left="\\[", right="\\]")
|
|
194
|
+
def val():
|
|
195
|
+
delta_S_1 = 1.05 + 0.35 * (altitude - 1000) /100
|
|
196
|
+
S_k_alt = S_k_200 + delta_S_1 * si.kPa
|
|
197
|
+
return S_k_alt
|
|
198
|
+
return val()
|
|
199
|
+
|
|
200
|
+
|
|
201
|
+
@property
|
|
202
|
+
def Sn(self):
|
|
203
|
+
"""Retourne la charge de neige normal horizontal en kN/m² fonction du cas de chargement (non distribué/distribué)
|
|
204
|
+
|
|
205
|
+
Returns:
|
|
206
|
+
dict: le dictionnaire des charges
|
|
207
|
+
"""
|
|
208
|
+
C_e = self.C_e
|
|
209
|
+
C_t = self.C_t
|
|
210
|
+
S_k_alt = self.Sk_alt[1]
|
|
211
|
+
|
|
212
|
+
def get_mu_2():
|
|
213
|
+
mu_2_versant_1 = self.mu["mu2 versant 1"]
|
|
214
|
+
mu_2_versant_2 = self.mu["mu2 versant 2"]
|
|
215
|
+
for i, mu in enumerate((mu_2_versant_1, mu_2_versant_2)):
|
|
216
|
+
if isinstance(mu, tuple):
|
|
217
|
+
if i:
|
|
218
|
+
mu_2_versant_2 = mu[1]
|
|
219
|
+
else:
|
|
220
|
+
mu_2_versant_1 = mu[1]
|
|
221
|
+
return mu_2_versant_1, mu_2_versant_2
|
|
222
|
+
|
|
223
|
+
match self.type_toit:
|
|
224
|
+
case "1 versant":
|
|
225
|
+
mu_1 = self.mu["mu1"]
|
|
226
|
+
if isinstance(mu_1, tuple):
|
|
227
|
+
mu_1 = mu_1[1]
|
|
228
|
+
@handcalc(override="short", precision=2, jupyter_display=self.JUPYTER_DISPLAY, left="\\[", right="\\]")
|
|
229
|
+
def val():
|
|
230
|
+
S_n = C_e * C_t * S_k_alt * mu_1
|
|
231
|
+
return S_n
|
|
232
|
+
value = val()
|
|
233
|
+
|
|
234
|
+
case "2 versants":
|
|
235
|
+
mu_2_versant_1, mu_2_versant_2 = get_mu_2()
|
|
236
|
+
@handcalc(override="short", precision=2, jupyter_display=self.JUPYTER_DISPLAY, left="\\[", right="\\]")
|
|
237
|
+
def val():
|
|
238
|
+
v1_cas_1 = C_e * C_t * S_k_alt * mu_2_versant_1
|
|
239
|
+
v1_cas_2 = C_e * C_t * S_k_alt * mu_2_versant_1 * 0.5
|
|
240
|
+
v2_cas_1 = C_e * C_t * S_k_alt * mu_2_versant_2
|
|
241
|
+
v2_cas_2 = C_e * C_t * S_k_alt * mu_2_versant_2 * 0.5
|
|
242
|
+
return v1_cas_1, v1_cas_2, v2_cas_1, v2_cas_2
|
|
243
|
+
|
|
244
|
+
latex_sn, value = val()
|
|
245
|
+
v1_cas_1, v1_cas_2, v2_cas_1, v2_cas_2 = value
|
|
246
|
+
value = (latex_sn, {"Versant 1": {"cas 1": v1_cas_1, "cas 2": v1_cas_2},
|
|
247
|
+
"Versant 2": {"cas 1": v2_cas_1, "cas 2": v2_cas_2}})
|
|
248
|
+
|
|
249
|
+
case "Versants multiples":
|
|
250
|
+
mu_2_versant_1, mu_2_versant_2 = get_mu_2()
|
|
251
|
+
mu_3 = self.mu["mu3"]
|
|
252
|
+
if isinstance(mu_3, tuple):
|
|
253
|
+
mu_3 = mu_3[1]
|
|
254
|
+
|
|
255
|
+
@handcalc(override="short", precision=2, jupyter_display=self.JUPYTER_DISPLAY, left="\\[", right="\\]")
|
|
256
|
+
def val():
|
|
257
|
+
v1_cas_1 = C_e * C_t * S_k_alt * mu_2_versant_1
|
|
258
|
+
v2_cas_1 = C_e * C_t * S_k_alt * mu_2_versant_2
|
|
259
|
+
cas_2 = C_e * C_t * S_k_alt * mu_3
|
|
260
|
+
return v1_cas_1, v2_cas_1, cas_2
|
|
261
|
+
latex_sn, value = val()
|
|
262
|
+
v1_cas_1, v2_cas_1, cas_2 = value
|
|
263
|
+
value = (latex_sn, {"cas 1": {"Versant 1": v1_cas_1, "Versant 2": v2_cas_1,}, "cas 2": cas_2})
|
|
264
|
+
|
|
265
|
+
# Majoration faible pente de 0.2 kN/m²
|
|
266
|
+
if self.alpha_toit < 1.718:
|
|
267
|
+
match self.type_toit:
|
|
268
|
+
case "1 versant":
|
|
269
|
+
S_n = value[1]
|
|
270
|
+
@handcalc(override="short", precision=2, jupyter_display=self.JUPYTER_DISPLAY, left="\\[", right="\\]")
|
|
271
|
+
def val():
|
|
272
|
+
S_n = S_n + 0.2 # Majoration faible pente
|
|
273
|
+
return S_n
|
|
274
|
+
value2 = val()
|
|
275
|
+
value = (value[0]+value2[0], value2[1])
|
|
276
|
+
return value
|
|
277
|
+
|
|
278
|
+
|
|
279
|
+
@property
|
|
280
|
+
def Sx(self):
|
|
281
|
+
"""Retourne la charge de neige accidentelle horizontal en kN/m² fonction du cas de chargement (non distribué/distribué)
|
|
282
|
+
|
|
283
|
+
Returns:
|
|
284
|
+
dict: le dictionnaire des charges
|
|
285
|
+
"""
|
|
286
|
+
C_e = self.C_e
|
|
287
|
+
C_t = self.C_t
|
|
288
|
+
S_Ad = self.S_Ad
|
|
289
|
+
|
|
290
|
+
match self.type_toit:
|
|
291
|
+
case "1 versant":
|
|
292
|
+
mu_1 = self.mu["mu1"]
|
|
293
|
+
if isinstance(mu_1, tuple):
|
|
294
|
+
mu_1 = mu_1[1]
|
|
295
|
+
@handcalc(override="short", precision=2, jupyter_display=self.JUPYTER_DISPLAY, left="\\[", right="\\]")
|
|
296
|
+
def val():
|
|
297
|
+
S_x = C_e * C_t * S_Ad * mu_1
|
|
298
|
+
return S_x
|
|
299
|
+
|
|
300
|
+
case "2 versants" | "Versants multiples":
|
|
301
|
+
mu_2_versant_1 = self.mu["mu2 versant 1"]
|
|
302
|
+
mu_2_versant_2 = self.mu["mu2 versant 2"]
|
|
303
|
+
for i, mu in enumerate((mu_2_versant_1, mu_2_versant_2)):
|
|
304
|
+
if isinstance(mu, tuple):
|
|
305
|
+
if i:
|
|
306
|
+
mu_2_versant_2 = mu[1]
|
|
307
|
+
else:
|
|
308
|
+
mu_2_versant_1 = mu[1]
|
|
309
|
+
@handcalc(override="short", precision=2, jupyter_display=self.JUPYTER_DISPLAY, left="\\[", right="\\]")
|
|
310
|
+
def val():
|
|
311
|
+
v1_cas_1 = C_e * C_t * S_Ad * mu_2_versant_1
|
|
312
|
+
v2_cas_1 = C_e * C_t * S_Ad * mu_2_versant_2
|
|
313
|
+
return {"Versant 1 cas 1": v1_cas_1, "Versant 2 cas 1": v2_cas_1}
|
|
314
|
+
return val()
|
|
315
|
+
|
|
316
|
+
|
|
317
|
+
@property
|
|
318
|
+
def Se(self):
|
|
319
|
+
"""Retourne la charge linéaire en kN/m à appliquer en débord de toiture si l'altitude est > à 900m
|
|
320
|
+
|
|
321
|
+
Returns:
|
|
322
|
+
float: la charge verticale en débord de toiture en kN/m
|
|
323
|
+
"""
|
|
324
|
+
def calcul_Se(S_n:float):
|
|
325
|
+
"""
|
|
326
|
+
Args:
|
|
327
|
+
S_n (float): charge de neige normal
|
|
328
|
+
"""
|
|
329
|
+
if self.alt.value > 900:
|
|
330
|
+
gam = 3 # poid de reférence de la neige en kN/m3
|
|
331
|
+
d = S_n / gam
|
|
332
|
+
k = 3 / d
|
|
333
|
+
|
|
334
|
+
if k > (d * gam):
|
|
335
|
+
k = d * gam
|
|
336
|
+
Se = k * S_n**2 / gam
|
|
337
|
+
else:
|
|
338
|
+
Se = 0
|
|
339
|
+
return Se
|
|
340
|
+
|
|
341
|
+
match self.type_toit:
|
|
342
|
+
case "1 versant":
|
|
343
|
+
S_n = self.Sn[1]
|
|
344
|
+
return calcul_Se(S_n)
|
|
345
|
+
case "2 versants":
|
|
346
|
+
dict_Se = {"Versant 1": None, "Versant 2": None}
|
|
347
|
+
S_n_v1 = self.Sn[1]["Versant 1"]["cas 1"]
|
|
348
|
+
S_n_v2 = self.Sn[1]["Versant 2"]["cas 1"]
|
|
349
|
+
|
|
350
|
+
for i, S_n in enumerate((S_n_v1, S_n_v2)):
|
|
351
|
+
Se = calcul_Se(S_n)
|
|
352
|
+
if i:
|
|
353
|
+
dict_Se["Versant 2"] = Se
|
|
354
|
+
else:
|
|
355
|
+
dict_Se["Versant 1"] = Se
|
|
356
|
+
return dict_Se
|
|
357
|
+
|
|
358
|
+
|
|
359
|
+
def fs(self, S_n: float, entraxe:float, alpha: float):
|
|
360
|
+
"""Retourne la charge de neige en kN/m sur un obstacle ou une barre à neige
|
|
361
|
+
|
|
362
|
+
Args:
|
|
363
|
+
S_n (float): la charge de neige en kN/m²
|
|
364
|
+
entraxe (int): entraxe horizontal entre deux obstacle à la neige en m
|
|
365
|
+
alpha (float): angle du versant considéré.
|
|
366
|
+
|
|
367
|
+
Returns:
|
|
368
|
+
float: La charge en kN/m
|
|
369
|
+
"""
|
|
370
|
+
S_n = S_n *si.kN/si.m**2
|
|
371
|
+
entraxe = entraxe * si.m
|
|
372
|
+
@handcalc(override="short", precision=2, jupyter_display=self.JUPYTER_DISPLAY, left="\\[", right="\\]")
|
|
373
|
+
def val():
|
|
374
|
+
F_s = S_n * entraxe * sin(radians(alpha))
|
|
375
|
+
return F_s
|
|
376
|
+
return val()
|
|
377
|
+
|
|
378
|
+
|
|
379
|
+
|
|
380
|
+
if __name__ == "__main__":
|
|
381
|
+
from A0_Projet import Projet
|
|
382
|
+
projet = Projet(code_INSEE=73215, alt=400)
|
|
383
|
+
bat = Batiment._from_parent_class(projet, h_bat=5,b_bat=10,d_bat=10, alpha_toit=28, alpha_toit2=12)
|
|
384
|
+
Action_snow = Neige._from_parent_class(bat, exposition="Normal", type_toit="Versants multiples", blocage=True)
|
|
385
|
+
print(Action_snow.Sn)
|