structuralcodes 0.5.0__py3-none-any.whl → 0.6.1__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 structuralcodes might be problematic. Click here for more details.

Files changed (48) hide show
  1. structuralcodes/__init__.py +1 -1
  2. structuralcodes/codes/ec2_2004/shear.py +3 -2
  3. structuralcodes/codes/mc2010/_concrete_creep_and_shrinkage.py +2 -2
  4. structuralcodes/core/base.py +138 -12
  5. structuralcodes/geometry/__init__.py +2 -8
  6. structuralcodes/geometry/_geometry.py +103 -19
  7. structuralcodes/geometry/_reinforcement.py +1 -3
  8. structuralcodes/geometry/profiles/__init__.py +33 -0
  9. structuralcodes/geometry/profiles/_base_profile.py +305 -0
  10. structuralcodes/geometry/profiles/_common_functions.py +307 -0
  11. structuralcodes/geometry/profiles/_hd.py +374 -0
  12. structuralcodes/geometry/profiles/_he.py +192 -0
  13. structuralcodes/geometry/profiles/_hp.py +319 -0
  14. structuralcodes/geometry/profiles/_ipe.py +130 -0
  15. structuralcodes/geometry/profiles/_ipn.py +329 -0
  16. structuralcodes/geometry/profiles/_l.py +528 -0
  17. structuralcodes/geometry/profiles/_li.py +217 -0
  18. structuralcodes/geometry/profiles/_u.py +173 -0
  19. structuralcodes/geometry/profiles/_ub.py +1356 -0
  20. structuralcodes/geometry/profiles/_ubp.py +227 -0
  21. structuralcodes/geometry/profiles/_uc.py +276 -0
  22. structuralcodes/geometry/profiles/_upe.py +133 -0
  23. structuralcodes/geometry/profiles/_upn.py +315 -0
  24. structuralcodes/geometry/profiles/_w.py +2157 -0
  25. structuralcodes/materials/basic/_elastic.py +18 -1
  26. structuralcodes/materials/basic/_elasticplastic.py +18 -1
  27. structuralcodes/materials/basic/_generic.py +18 -1
  28. structuralcodes/materials/concrete/__init__.py +3 -0
  29. structuralcodes/materials/concrete/_concrete.py +10 -1
  30. structuralcodes/materials/concrete/_concreteEC2_2004.py +15 -1
  31. structuralcodes/materials/concrete/_concreteEC2_2023.py +15 -1
  32. structuralcodes/materials/concrete/_concreteMC2010.py +20 -1
  33. structuralcodes/materials/constitutive_laws/__init__.py +3 -0
  34. structuralcodes/materials/constitutive_laws/_elasticplastic.py +2 -2
  35. structuralcodes/materials/constitutive_laws/_initial_strain.py +130 -0
  36. structuralcodes/materials/reinforcement/__init__.py +6 -0
  37. structuralcodes/materials/reinforcement/_reinforcement.py +10 -1
  38. structuralcodes/materials/reinforcement/_reinforcementEC2_2004.py +14 -0
  39. structuralcodes/materials/reinforcement/_reinforcementEC2_2023.py +14 -0
  40. structuralcodes/materials/reinforcement/_reinforcementMC2010.py +14 -0
  41. structuralcodes/sections/section_integrators/__init__.py +3 -1
  42. structuralcodes/sections/section_integrators/_marin_integrator.py +1 -1
  43. {structuralcodes-0.5.0.dist-info → structuralcodes-0.6.1.dist-info}/METADATA +2 -2
  44. {structuralcodes-0.5.0.dist-info → structuralcodes-0.6.1.dist-info}/RECORD +47 -30
  45. structuralcodes/geometry/_steel_sections.py +0 -2155
  46. /structuralcodes/{sections/section_integrators → core}/_marin_integration.py +0 -0
  47. {structuralcodes-0.5.0.dist-info → structuralcodes-0.6.1.dist-info}/WHEEL +0 -0
  48. {structuralcodes-0.5.0.dist-info → structuralcodes-0.6.1.dist-info}/licenses/LICENSE +0 -0
@@ -0,0 +1,319 @@
1
+ """HP profiles."""
2
+
3
+ from shapely import (
4
+ Polygon,
5
+ )
6
+
7
+ from ._base_profile import BaseProfile
8
+ from ._common_functions import (
9
+ _create_I_section,
10
+ )
11
+
12
+
13
+ class HP(BaseProfile):
14
+ """Simple class for representing an HP profile.
15
+
16
+ HP profiles.
17
+ """
18
+
19
+ parameters = {
20
+ 'HP200x43': {'h': 200.0, 'b': 205.0, 'tw': 9.0, 'tf': 9.0, 'r': 10.0},
21
+ 'HP200x53': {
22
+ 'h': 204.0,
23
+ 'b': 207.0,
24
+ 'tw': 11.3,
25
+ 'tf': 11.3,
26
+ 'r': 10.0,
27
+ },
28
+ 'HP220x57': {
29
+ 'h': 210.0,
30
+ 'b': 224.5,
31
+ 'tw': 11.0,
32
+ 'tf': 11.0,
33
+ 'r': 18.0,
34
+ },
35
+ 'HP260x75': {
36
+ 'h': 249.0,
37
+ 'b': 265.0,
38
+ 'tw': 12.0,
39
+ 'tf': 12.0,
40
+ 'r': 24.0,
41
+ },
42
+ 'HP260x87': {
43
+ 'h': 253.0,
44
+ 'b': 267.0,
45
+ 'tw': 14.0,
46
+ 'tf': 14.0,
47
+ 'r': 24.0,
48
+ },
49
+ 'HP305x79': {
50
+ 'h': 299.3,
51
+ 'b': 306.4,
52
+ 'tw': 11.0,
53
+ 'tf': 11.1,
54
+ 'r': 15.0,
55
+ },
56
+ 'HP305x88': {
57
+ 'h': 301.7,
58
+ 'b': 307.8,
59
+ 'tw': 12.4,
60
+ 'tf': 12.3,
61
+ 'r': 15.0,
62
+ },
63
+ 'HP305x95': {
64
+ 'h': 303.7,
65
+ 'b': 308.7,
66
+ 'tw': 13.3,
67
+ 'tf': 13.3,
68
+ 'r': 15.0,
69
+ },
70
+ 'HP305x110': {
71
+ 'h': 307.9,
72
+ 'b': 310.7,
73
+ 'tw': 15.3,
74
+ 'tf': 15.4,
75
+ 'r': 15.0,
76
+ },
77
+ 'HP305x126': {
78
+ 'h': 312.3,
79
+ 'b': 312.9,
80
+ 'tw': 17.5,
81
+ 'tf': 17.6,
82
+ 'r': 15.0,
83
+ },
84
+ 'HP305x149': {
85
+ 'h': 318.5,
86
+ 'b': 316.0,
87
+ 'tw': 20.6,
88
+ 'tf': 20.7,
89
+ 'r': 15.0,
90
+ },
91
+ 'HP305x180': {
92
+ 'h': 326.7,
93
+ 'b': 319.7,
94
+ 'tw': 24.8,
95
+ 'tf': 24.8,
96
+ 'r': 15.0,
97
+ },
98
+ 'HP305x186': {
99
+ 'h': 328.3,
100
+ 'b': 320.9,
101
+ 'tw': 25.5,
102
+ 'tf': 25.6,
103
+ 'r': 15.0,
104
+ },
105
+ 'HP305x223': {
106
+ 'h': 337.9,
107
+ 'b': 325.7,
108
+ 'tw': 30.3,
109
+ 'tf': 30.4,
110
+ 'r': 15.0,
111
+ },
112
+ 'HP320x88': {
113
+ 'h': 303.0,
114
+ 'b': 304.0,
115
+ 'tw': 12.0,
116
+ 'tf': 12.0,
117
+ 'r': 27.0,
118
+ },
119
+ 'HP320x103': {
120
+ 'h': 307.0,
121
+ 'b': 306.0,
122
+ 'tw': 14.0,
123
+ 'tf': 14.0,
124
+ 'r': 27.0,
125
+ },
126
+ 'HP320x117': {
127
+ 'h': 311.0,
128
+ 'b': 308.0,
129
+ 'tw': 16.0,
130
+ 'tf': 16.0,
131
+ 'r': 27.0,
132
+ },
133
+ 'HP320x147': {
134
+ 'h': 319.0,
135
+ 'b': 312.0,
136
+ 'tw': 20.0,
137
+ 'tf': 20.0,
138
+ 'r': 27.0,
139
+ },
140
+ 'HP320x184': {
141
+ 'h': 329.0,
142
+ 'b': 317.0,
143
+ 'tw': 25.0,
144
+ 'tf': 25.0,
145
+ 'r': 27.0,
146
+ },
147
+ 'HP360x109': {
148
+ 'h': 346.4,
149
+ 'b': 371.0,
150
+ 'tw': 12.8,
151
+ 'tf': 12.9,
152
+ 'r': 15.0,
153
+ },
154
+ 'HP360x133': {
155
+ 'h': 352.0,
156
+ 'b': 373.8,
157
+ 'tw': 15.6,
158
+ 'tf': 15.7,
159
+ 'r': 15.0,
160
+ },
161
+ 'HP360x152': {
162
+ 'h': 356.4,
163
+ 'b': 376.0,
164
+ 'tw': 17.8,
165
+ 'tf': 17.9,
166
+ 'r': 15.0,
167
+ },
168
+ 'HP360x174': {
169
+ 'h': 361.4,
170
+ 'b': 378.5,
171
+ 'tw': 20.3,
172
+ 'tf': 20.4,
173
+ 'r': 15.0,
174
+ },
175
+ 'HP360x180': {
176
+ 'h': 362.9,
177
+ 'b': 378.8,
178
+ 'tw': 21.1,
179
+ 'tf': 21.1,
180
+ 'r': 15.0,
181
+ },
182
+ 'HP400x122': {
183
+ 'h': 348.0,
184
+ 'b': 390.0,
185
+ 'tw': 14.0,
186
+ 'tf': 14.0,
187
+ 'r': 15.0,
188
+ },
189
+ 'HP400x140': {
190
+ 'h': 352.0,
191
+ 'b': 392.0,
192
+ 'tw': 16.0,
193
+ 'tf': 16.0,
194
+ 'r': 15.0,
195
+ },
196
+ 'HP400x158': {
197
+ 'h': 356.0,
198
+ 'b': 394.0,
199
+ 'tw': 18.0,
200
+ 'tf': 18.0,
201
+ 'r': 15.0,
202
+ },
203
+ 'HP400x176': {
204
+ 'h': 360.0,
205
+ 'b': 396.0,
206
+ 'tw': 20.0,
207
+ 'tf': 20.0,
208
+ 'r': 15.0,
209
+ },
210
+ 'HP400x194': {
211
+ 'h': 364.0,
212
+ 'b': 398.0,
213
+ 'tw': 22.0,
214
+ 'tf': 22.0,
215
+ 'r': 15.0,
216
+ },
217
+ 'HP400x213': {
218
+ 'h': 368.0,
219
+ 'b': 400.0,
220
+ 'tw': 24.0,
221
+ 'tf': 24.0,
222
+ 'r': 15.0,
223
+ },
224
+ 'HP400x231': {
225
+ 'h': 372.0,
226
+ 'b': 402.0,
227
+ 'tw': 26.0,
228
+ 'tf': 26.0,
229
+ 'r': 15.0,
230
+ },
231
+ }
232
+
233
+ @classmethod
234
+ def get_polygon(cls, name: str) -> Polygon:
235
+ """Returns a shapely polygon representing an HP section."""
236
+ parameters = cls.parameters.get(name)
237
+ if parameters is None:
238
+ raise ValueError(
239
+ f"Profile '{name}' not found in HP sections. "
240
+ "Select a valid profile (available ones: "
241
+ f"{cls.profiles()})"
242
+ )
243
+ return _create_I_section(**parameters)
244
+
245
+ @classmethod
246
+ def profiles(cls) -> list:
247
+ """Returns a list containing all available profiles."""
248
+ return list(cls.parameters.keys())
249
+
250
+ def __init__(self, name: str) -> None:
251
+ """Creates a new HP object."""
252
+ parameters = self.parameters.get(name)
253
+ if parameters is None:
254
+ raise ValueError(
255
+ f"Profile '{name}' not found in HP sections. "
256
+ "Select a valid profile (available ones: "
257
+ f"{self.profiles()})"
258
+ )
259
+ super().__init__()
260
+ self._h = parameters.get('h')
261
+ self._b = parameters.get('b')
262
+ self._tw = parameters.get('tw')
263
+ self._tf = parameters.get('tf')
264
+ self._r = parameters.get('r')
265
+ self._polygon = _create_I_section(**parameters)
266
+
267
+ @property
268
+ def polygon(self) -> Polygon:
269
+ """Returns shapely Polygon of section.
270
+
271
+ Returns:
272
+ Polygon: The represention of the HP section.
273
+ """
274
+ return self._polygon
275
+
276
+ @property
277
+ def h(self) -> float:
278
+ """Returns height of HP section.
279
+
280
+ Returns:
281
+ float: Height h of HP section.
282
+ """
283
+ return self._h
284
+
285
+ @property
286
+ def b(self) -> float:
287
+ """Returns width of HP section.
288
+
289
+ Returns:
290
+ float: Width b of HP section.
291
+ """
292
+ return self._b
293
+
294
+ @property
295
+ def tw(self) -> float:
296
+ """Returns thickness of web of HP section.
297
+
298
+ Returns:
299
+ float: Web thickness tw of HP section.
300
+ """
301
+ return self._tw
302
+
303
+ @property
304
+ def tf(self) -> float:
305
+ """Returns thickness of flange of HP section.
306
+
307
+ Returns:
308
+ float: Flange thickness tw of HP section.
309
+ """
310
+ return self._tf
311
+
312
+ @property
313
+ def r(self) -> float:
314
+ """Returns fillet radius of HP section.
315
+
316
+ Returns:
317
+ float: Fillet radius r of HP section.
318
+ """
319
+ return self._r
@@ -0,0 +1,130 @@
1
+ """IPE profiles."""
2
+
3
+ from shapely import (
4
+ Polygon,
5
+ )
6
+
7
+ from ._base_profile import BaseProfile
8
+ from ._common_functions import (
9
+ _create_I_section,
10
+ )
11
+
12
+
13
+ class IPE(BaseProfile):
14
+ """Simple class for representing an IPE profile.
15
+
16
+ IPE 80-600 in accordance with standard Euronorm 19-57.
17
+ """
18
+
19
+ parameters = {
20
+ 'IPE80': {'h': 80.0, 'b': 46.0, 'tw': 3.8, 'tf': 5.2, 'r': 5.0},
21
+ 'IPE100': {'h': 100.0, 'b': 55.0, 'tw': 4.1, 'tf': 5.7, 'r': 7.0},
22
+ 'IPE120': {'h': 120.0, 'b': 64.0, 'tw': 4.4, 'tf': 6.3, 'r': 7.0},
23
+ 'IPE140': {'h': 140.0, 'b': 73.0, 'tw': 4.7, 'tf': 6.9, 'r': 7.0},
24
+ 'IPE160': {'h': 160.0, 'b': 82.0, 'tw': 5.0, 'tf': 7.4, 'r': 9.0},
25
+ 'IPE180': {'h': 180.0, 'b': 91.0, 'tw': 5.3, 'tf': 8.0, 'r': 9.0},
26
+ 'IPE200': {'h': 200.0, 'b': 100.0, 'tw': 5.6, 'tf': 8.5, 'r': 12.0},
27
+ 'IPE220': {'h': 220.0, 'b': 110.0, 'tw': 5.9, 'tf': 9.2, 'r': 12.0},
28
+ 'IPE240': {'h': 240.0, 'b': 120.0, 'tw': 6.2, 'tf': 9.8, 'r': 15.0},
29
+ 'IPE270': {'h': 270.0, 'b': 135.0, 'tw': 6.6, 'tf': 10.2, 'r': 15.0},
30
+ 'IPE300': {'h': 300.0, 'b': 150.0, 'tw': 7.1, 'tf': 10.7, 'r': 15.0},
31
+ 'IPE330': {'h': 330.0, 'b': 160.0, 'tw': 7.5, 'tf': 11.5, 'r': 18.0},
32
+ 'IPE360': {'h': 360.0, 'b': 170.0, 'tw': 8.0, 'tf': 12.7, 'r': 18.0},
33
+ 'IPE400': {'h': 400.0, 'b': 180.0, 'tw': 8.6, 'tf': 13.5, 'r': 21.0},
34
+ 'IPE450': {'h': 450.0, 'b': 190.0, 'tw': 9.4, 'tf': 14.6, 'r': 21.0},
35
+ 'IPE500': {'h': 500.0, 'b': 200.0, 'tw': 10.2, 'tf': 16.0, 'r': 21.0},
36
+ 'IPE550': {'h': 550.0, 'b': 210.0, 'tw': 11.1, 'tf': 17.2, 'r': 24.0},
37
+ 'IPE600': {'h': 600.0, 'b': 220.0, 'tw': 12.0, 'tf': 19.0, 'r': 24.0},
38
+ }
39
+
40
+ @classmethod
41
+ def get_polygon(cls, name: str) -> Polygon:
42
+ """Returns a shapely polygon representing an IPE section."""
43
+ if isinstance(name, (float, int)):
44
+ name = f'IPE{int(name):0d}'
45
+ parameters = cls.parameters.get(name)
46
+ if parameters is None:
47
+ raise ValueError(
48
+ f"Profile '{name}' not found in IPE sections. "
49
+ "Select a valid profile (available ones: "
50
+ f"{cls.profiles()})"
51
+ )
52
+ return _create_I_section(**parameters)
53
+
54
+ @classmethod
55
+ def profiles(cls) -> list:
56
+ """Returns a list containing all available profiles."""
57
+ return list(cls.parameters.keys())
58
+
59
+ def __init__(self, name: str) -> None:
60
+ """Creates a new IPE object."""
61
+ if isinstance(name, (float, int)):
62
+ name = f'IPE{int(name):0d}'
63
+ parameters = self.parameters.get(name)
64
+ if parameters is None:
65
+ raise ValueError(
66
+ f"Profile '{name}' not found in IPE sections. "
67
+ "Select a valid profile (available ones: "
68
+ f"{self.profiles()})"
69
+ )
70
+ super().__init__()
71
+ self._h = parameters.get('h')
72
+ self._b = parameters.get('b')
73
+ self._tw = parameters.get('tw')
74
+ self._tf = parameters.get('tf')
75
+ self._r = parameters.get('r')
76
+ self._polygon = _create_I_section(**parameters)
77
+
78
+ @property
79
+ def polygon(self) -> Polygon:
80
+ """Returns shapely Polygon of section.
81
+
82
+ Returns:
83
+ Polygon: The represention of the IPE section.
84
+ """
85
+ return self._polygon
86
+
87
+ @property
88
+ def h(self) -> float:
89
+ """Returns height of IPE section.
90
+
91
+ Returns:
92
+ float: Height h of IPE section.
93
+ """
94
+ return self._h
95
+
96
+ @property
97
+ def b(self) -> float:
98
+ """Returns width of IPE section.
99
+
100
+ Returns:
101
+ float: Width b of IPE section.
102
+ """
103
+ return self._b
104
+
105
+ @property
106
+ def tw(self) -> float:
107
+ """Returns thickness of web of IPE section.
108
+
109
+ Returns:
110
+ float: Web thickness tw of IPE section.
111
+ """
112
+ return self._tw
113
+
114
+ @property
115
+ def tf(self) -> float:
116
+ """Returns thickness of flange of IPE section.
117
+
118
+ Returns:
119
+ float: Flange thickness tw of IPE section.
120
+ """
121
+ return self._tf
122
+
123
+ @property
124
+ def r(self) -> float:
125
+ """Returns fillet radius of IPE section.
126
+
127
+ Returns:
128
+ float: Fillet radius r of IPE section.
129
+ """
130
+ return self._r