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,329 @@
1
+ """IPN profiles."""
2
+
3
+ from shapely import (
4
+ Polygon,
5
+ )
6
+
7
+ from ._base_profile import BaseProfile
8
+ from ._common_functions import (
9
+ _create_taper_I_section,
10
+ )
11
+
12
+
13
+ class IPN(BaseProfile):
14
+ """Simple class for representing an IPN profile.
15
+
16
+ IPN in accordance with standard.
17
+
18
+ 14% slope in flange.
19
+ """
20
+
21
+ parameters = {
22
+ 'IPN80': {
23
+ 'h': 80.0,
24
+ 'b': 42.0,
25
+ 'tw': 3.9,
26
+ 'tf': 5.9,
27
+ 'r1': 3.9,
28
+ 'r2': 2.3,
29
+ 'd': 59.0,
30
+ },
31
+ 'IPN100': {
32
+ 'h': 100.0,
33
+ 'b': 50.0,
34
+ 'tw': 4.5,
35
+ 'tf': 6.8,
36
+ 'r1': 4.5,
37
+ 'r2': 2.7,
38
+ 'd': 75.7,
39
+ },
40
+ 'IPN120': {
41
+ 'h': 120.0,
42
+ 'b': 58.0,
43
+ 'tw': 5.1,
44
+ 'tf': 7.7,
45
+ 'r1': 5.1,
46
+ 'r2': 3.1,
47
+ 'd': 92.4,
48
+ },
49
+ 'IPN140': {
50
+ 'h': 140.0,
51
+ 'b': 66.0,
52
+ 'tw': 5.7,
53
+ 'tf': 8.6,
54
+ 'r1': 5.7,
55
+ 'r2': 3.4,
56
+ 'd': 109.1,
57
+ },
58
+ 'IPN160': {
59
+ 'h': 160.0,
60
+ 'b': 74.0,
61
+ 'tw': 6.3,
62
+ 'tf': 9.5,
63
+ 'r1': 6.3,
64
+ 'r2': 3.8,
65
+ 'd': 125.8,
66
+ },
67
+ 'IPN180': {
68
+ 'h': 180.0,
69
+ 'b': 82.0,
70
+ 'tw': 6.9,
71
+ 'tf': 10.4,
72
+ 'r1': 6.9,
73
+ 'r2': 4.1,
74
+ 'd': 142.4,
75
+ },
76
+ 'IPN200': {
77
+ 'h': 200.0,
78
+ 'b': 90.0,
79
+ 'tw': 7.5,
80
+ 'tf': 11.3,
81
+ 'r1': 7.5,
82
+ 'r2': 4.5,
83
+ 'd': 159.1,
84
+ },
85
+ 'IPN220': {
86
+ 'h': 220.0,
87
+ 'b': 98.0,
88
+ 'tw': 8.1,
89
+ 'tf': 12.2,
90
+ 'r1': 8.1,
91
+ 'r2': 4.9,
92
+ 'd': 175.8,
93
+ },
94
+ 'IPN240': {
95
+ 'h': 240.0,
96
+ 'b': 106.0,
97
+ 'tw': 8.7,
98
+ 'tf': 13.1,
99
+ 'r1': 8.7,
100
+ 'r2': 5.2,
101
+ 'd': 192.5,
102
+ },
103
+ 'IPN260': {
104
+ 'h': 260.0,
105
+ 'b': 113.0,
106
+ 'tw': 9.4,
107
+ 'tf': 14.1,
108
+ 'r1': 9.4,
109
+ 'r2': 5.6,
110
+ 'd': 208.9,
111
+ },
112
+ 'IPN280': {
113
+ 'h': 280.0,
114
+ 'b': 119.0,
115
+ 'tw': 10.1,
116
+ 'tf': 15.2,
117
+ 'r1': 10.1,
118
+ 'r2': 6.1,
119
+ 'd': 225.1,
120
+ },
121
+ 'IPN300': {
122
+ 'h': 300.0,
123
+ 'b': 125.0,
124
+ 'tw': 10.8,
125
+ 'tf': 16.2,
126
+ 'r1': 10.8,
127
+ 'r2': 6.5,
128
+ 'd': 241.6,
129
+ },
130
+ 'IPN320': {
131
+ 'h': 320.0,
132
+ 'b': 131.0,
133
+ 'tw': 11.5,
134
+ 'tf': 17.3,
135
+ 'r1': 11.5,
136
+ 'r2': 6.9,
137
+ 'd': 257.9,
138
+ },
139
+ 'IPN340': {
140
+ 'h': 340.0,
141
+ 'b': 137.0,
142
+ 'tw': 12.2,
143
+ 'tf': 18.3,
144
+ 'r1': 12.2,
145
+ 'r2': 7.3,
146
+ 'd': 274.3,
147
+ },
148
+ 'IPN360': {
149
+ 'h': 360.0,
150
+ 'b': 143.0,
151
+ 'tw': 13.0,
152
+ 'tf': 19.5,
153
+ 'r1': 13.0,
154
+ 'r2': 7.8,
155
+ 'd': 290.2,
156
+ },
157
+ 'IPN380': {
158
+ 'h': 380.0,
159
+ 'b': 149.0,
160
+ 'tw': 13.7,
161
+ 'tf': 20.5,
162
+ 'r1': 13.7,
163
+ 'r2': 8.2,
164
+ 'd': 306.7,
165
+ },
166
+ 'IPN400': {
167
+ 'h': 400.0,
168
+ 'b': 155.0,
169
+ 'tw': 14.4,
170
+ 'tf': 21.6,
171
+ 'r1': 14.4,
172
+ 'r2': 8.6,
173
+ 'd': 322.9,
174
+ },
175
+ 'IPN450': {
176
+ 'h': 450.0,
177
+ 'b': 170.0,
178
+ 'tw': 16.2,
179
+ 'tf': 24.3,
180
+ 'r1': 16.2,
181
+ 'r2': 9.7,
182
+ 'd': 363.6,
183
+ },
184
+ 'IPN500': {
185
+ 'h': 500.0,
186
+ 'b': 185.0,
187
+ 'tw': 18.0,
188
+ 'tf': 27.0,
189
+ 'r1': 18.0,
190
+ 'r2': 10.8,
191
+ 'd': 404.3,
192
+ },
193
+ 'IPN550': {
194
+ 'h': 550.0,
195
+ 'b': 200.0,
196
+ 'tw': 19.0,
197
+ 'tf': 30.0,
198
+ 'r1': 19.0,
199
+ 'r2': 11.9,
200
+ 'd': 445.6,
201
+ },
202
+ 'IPN600': {
203
+ 'h': 600.0,
204
+ 'b': 215.0,
205
+ 'tw': 21.6,
206
+ 'tf': 32.4,
207
+ 'r1': 21.6,
208
+ 'r2': 13.0,
209
+ 'd': 485.8,
210
+ },
211
+ }
212
+
213
+ @classmethod
214
+ def get_polygon(cls, name: str) -> Polygon:
215
+ """Returns a shapely polygon representing an IPN section."""
216
+ if isinstance(name, (float, int)):
217
+ name = f'IPN{int(name):0d}'
218
+ parameters = cls.parameters.get(name)
219
+ if parameters is None:
220
+ raise ValueError(
221
+ f"Profile '{name}' not found in IPN sections. "
222
+ "Select a valid profile (available ones: "
223
+ f"{cls.profiles()})"
224
+ )
225
+ parameters['slope'] = 0.14
226
+ return _create_taper_I_section(
227
+ **{
228
+ key: parameters[key]
229
+ for key in parameters
230
+ if key in ['h', 'b', 'tw', 'tf', 'r1', 'r2', 'slope']
231
+ }
232
+ )
233
+
234
+ @classmethod
235
+ def profiles(cls) -> list:
236
+ """Returns a list containing all available profiles."""
237
+ return list(cls.parameters.keys())
238
+
239
+ def __init__(self, name: str) -> None:
240
+ """Creates a new IPN object."""
241
+ if isinstance(name, (float, int)):
242
+ name = f'IPN{int(name):0d}'
243
+ parameters = self.parameters.get(name)
244
+ if parameters is None:
245
+ raise ValueError(
246
+ f"Profile '{name}' not found in IPN sections. "
247
+ "Select a valid profile (available ones: "
248
+ f"{self.profiles()})"
249
+ )
250
+ super().__init__()
251
+ self._h = parameters.get('h')
252
+ self._b = parameters.get('b')
253
+ self._tw = parameters.get('tw')
254
+ self._tf = parameters.get('tf')
255
+ self._r1 = parameters.get('r1')
256
+ self._r2 = parameters.get('r2')
257
+ self._flange_slope = 0.14
258
+ self._polygon = _create_taper_I_section(
259
+ h=self._h,
260
+ b=self._b,
261
+ tw=self._tw,
262
+ tf=self._tf,
263
+ r1=self._r1,
264
+ r2=self._r2,
265
+ slope=self._flange_slope,
266
+ )
267
+
268
+ @property
269
+ def polygon(self) -> Polygon:
270
+ """Returns shapely Polygon of section.
271
+
272
+ Returns:
273
+ Polygon: The represention of the IPN section.
274
+ """
275
+ return self._polygon
276
+
277
+ @property
278
+ def h(self) -> float:
279
+ """Returns height of IPN section.
280
+
281
+ Returns:
282
+ float: Height h of IPN section.
283
+ """
284
+ return self._h
285
+
286
+ @property
287
+ def b(self) -> float:
288
+ """Returns width of IPN section.
289
+
290
+ Returns:
291
+ float: Width b of IPN section.
292
+ """
293
+ return self._b
294
+
295
+ @property
296
+ def tw(self) -> float:
297
+ """Returns thickness of web of IPN section.
298
+
299
+ Returns:
300
+ float: Web thickness tw of IPN section.
301
+ """
302
+ return self._tw
303
+
304
+ @property
305
+ def tf(self) -> float:
306
+ """Returns thickness of flange of IPN section.
307
+
308
+ Returns:
309
+ float: Flange thickness tw of IPN section.
310
+ """
311
+ return self._tf
312
+
313
+ @property
314
+ def r1(self) -> float:
315
+ """Returns fillet radius of IPN section.
316
+
317
+ Returns:
318
+ float: Fillet radius r1 of IPN section.
319
+ """
320
+ return self._r1
321
+
322
+ @property
323
+ def r2(self) -> float:
324
+ """Returns fillet radius of IPN section.
325
+
326
+ Returns:
327
+ float: Fillet radius r2 of IPN section.
328
+ """
329
+ return self._r2