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

Files changed (52) hide show
  1. structuralcodes/__init__.py +1 -1
  2. structuralcodes/codes/ec2_2004/__init__.py +2 -0
  3. structuralcodes/codes/ec2_2004/shear.py +44 -4
  4. structuralcodes/codes/mc2010/__init__.py +18 -0
  5. structuralcodes/codes/mc2010/_concrete_creep_and_shrinkage.py +2 -2
  6. structuralcodes/codes/mc2010/_concrete_punching.py +300 -388
  7. structuralcodes/core/base.py +116 -5
  8. structuralcodes/geometry/__init__.py +2 -8
  9. structuralcodes/geometry/_circular.py +3 -10
  10. structuralcodes/geometry/_geometry.py +58 -114
  11. structuralcodes/geometry/_rectangular.py +3 -10
  12. structuralcodes/geometry/_reinforcement.py +9 -14
  13. structuralcodes/geometry/profiles/__init__.py +19 -0
  14. structuralcodes/geometry/profiles/_base_profile.py +305 -0
  15. structuralcodes/geometry/profiles/_common_functions.py +194 -0
  16. structuralcodes/geometry/profiles/_he.py +192 -0
  17. structuralcodes/geometry/profiles/_ipe.py +130 -0
  18. structuralcodes/geometry/profiles/_ipn.py +329 -0
  19. structuralcodes/geometry/profiles/_ub.py +264 -0
  20. structuralcodes/geometry/profiles/_ubp.py +227 -0
  21. structuralcodes/geometry/profiles/_uc.py +276 -0
  22. structuralcodes/geometry/profiles/_upn.py +315 -0
  23. structuralcodes/materials/__init__.py +2 -1
  24. structuralcodes/materials/basic/__init__.py +11 -0
  25. structuralcodes/materials/basic/_elastic.py +69 -0
  26. structuralcodes/materials/basic/_elasticplastic.py +92 -0
  27. structuralcodes/materials/basic/_generic.py +43 -0
  28. structuralcodes/materials/concrete/__init__.py +3 -0
  29. structuralcodes/materials/concrete/_concrete.py +10 -1
  30. structuralcodes/materials/concrete/_concreteEC2_2004.py +14 -0
  31. structuralcodes/materials/concrete/_concreteEC2_2023.py +14 -0
  32. structuralcodes/materials/concrete/_concreteMC2010.py +19 -0
  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 +15 -1
  39. structuralcodes/materials/reinforcement/_reinforcementEC2_2023.py +15 -1
  40. structuralcodes/materials/reinforcement/_reinforcementMC2010.py +15 -1
  41. structuralcodes/sections/_generic.py +53 -14
  42. structuralcodes/sections/_rc_utils.py +15 -5
  43. structuralcodes/sections/section_integrators/__init__.py +3 -1
  44. structuralcodes/sections/section_integrators/_fiber_integrator.py +19 -11
  45. structuralcodes/sections/section_integrators/_marin_integrator.py +25 -20
  46. {structuralcodes-0.4.0.dist-info → structuralcodes-0.6.0.dist-info}/METADATA +2 -2
  47. structuralcodes-0.6.0.dist-info/RECORD +77 -0
  48. structuralcodes/geometry/_steel_sections.py +0 -2155
  49. structuralcodes-0.4.0.dist-info/RECORD +0 -63
  50. /structuralcodes/{sections/section_integrators → core}/_marin_integration.py +0 -0
  51. {structuralcodes-0.4.0.dist-info → structuralcodes-0.6.0.dist-info}/WHEEL +0 -0
  52. {structuralcodes-0.4.0.dist-info → structuralcodes-0.6.0.dist-info}/licenses/LICENSE +0 -0
@@ -0,0 +1,264 @@
1
+ """UB 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 UB(BaseProfile):
14
+ """Simple class for representing a UB profile.
15
+
16
+ Universal Beams.
17
+ """
18
+
19
+ parameters = {
20
+ 'UB127x76x13': {'h': 127.0, 'b': 76.0, 'tw': 4.0, 'tf': 7.6, 'r': 8.0},
21
+ 'UB152x89x16': {'h': 152.0, 'b': 89.0, 'tw': 4.5, 'tf': 7.7, 'r': 8.0},
22
+ 'UB178x102x19': {
23
+ 'h': 178.0,
24
+ 'b': 101.0,
25
+ 'tw': 4.8,
26
+ 'tf': 7.9,
27
+ 'r': 8.0,
28
+ },
29
+ 'UB203x102x23': {
30
+ 'h': 203.0,
31
+ 'b': 102.0,
32
+ 'tw': 5.4,
33
+ 'tf': 9.3,
34
+ 'r': 8.0,
35
+ },
36
+ 'UB203x133x25': {
37
+ 'h': 203.0,
38
+ 'b': 133.0,
39
+ 'tw': 5.7,
40
+ 'tf': 7.8,
41
+ 'r': 8.0,
42
+ },
43
+ 'UB203x133x30': {
44
+ 'h': 207.0,
45
+ 'b': 134.0,
46
+ 'tw': 6.4,
47
+ 'tf': 9.6,
48
+ 'r': 8.0,
49
+ },
50
+ 'UB254x102x22': {
51
+ 'h': 254.0,
52
+ 'b': 102.0,
53
+ 'tw': 5.7,
54
+ 'tf': 6.8,
55
+ 'r': 8.0,
56
+ },
57
+ 'UB254x102x25': {
58
+ 'h': 257.0,
59
+ 'b': 102.0,
60
+ 'tw': 6.0,
61
+ 'tf': 8.4,
62
+ 'r': 8.0,
63
+ },
64
+ 'UB254x102x28': {
65
+ 'h': 260.0,
66
+ 'b': 102.0,
67
+ 'tw': 6.3,
68
+ 'tf': 10.0,
69
+ 'r': 8.0,
70
+ },
71
+ 'UB254x146x31': {
72
+ 'h': 251.0,
73
+ 'b': 146.0,
74
+ 'tw': 6.0,
75
+ 'tf': 8.6,
76
+ 'r': 8.0,
77
+ },
78
+ 'UB254x146x37': {
79
+ 'h': 256.0,
80
+ 'b': 146.0,
81
+ 'tw': 6.3,
82
+ 'tf': 10.9,
83
+ 'r': 8.0,
84
+ },
85
+ 'UB254x146x43': {
86
+ 'h': 260.0,
87
+ 'b': 147.0,
88
+ 'tw': 7.2,
89
+ 'tf': 12.7,
90
+ 'r': 8.0,
91
+ },
92
+ 'UB305x102x25': {
93
+ 'h': 305.0,
94
+ 'b': 102.0,
95
+ 'tw': 5.8,
96
+ 'tf': 7.0,
97
+ 'r': 8.0,
98
+ },
99
+ 'UB305x102x28': {
100
+ 'h': 309.0,
101
+ 'b': 102.0,
102
+ 'tw': 6.0,
103
+ 'tf': 8.8,
104
+ 'r': 8.0,
105
+ },
106
+ 'UB305x102x33': {
107
+ 'h': 313.0,
108
+ 'b': 102.0,
109
+ 'tw': 6.6,
110
+ 'tf': 10.8,
111
+ 'r': 8.0,
112
+ },
113
+ 'UB305x127x37': {
114
+ 'h': 304.0,
115
+ 'b': 123.0,
116
+ 'tw': 7.1,
117
+ 'tf': 10.7,
118
+ 'r': 9.0,
119
+ },
120
+ 'UB305x127x42': {
121
+ 'h': 307.0,
122
+ 'b': 124.0,
123
+ 'tw': 8.0,
124
+ 'tf': 12.1,
125
+ 'r': 9.0,
126
+ },
127
+ 'UB305x127x48': {
128
+ 'h': 311.0,
129
+ 'b': 125.0,
130
+ 'tw': 9.0,
131
+ 'tf': 14.0,
132
+ 'r': 9.0,
133
+ },
134
+ 'UB305x165x40': {
135
+ 'h': 303.0,
136
+ 'b': 165.0,
137
+ 'tw': 6.0,
138
+ 'tf': 10.2,
139
+ 'r': 9.0,
140
+ },
141
+ 'UB305x165x46': {
142
+ 'h': 307.0,
143
+ 'b': 166.0,
144
+ 'tw': 6.7,
145
+ 'tf': 11.8,
146
+ 'r': 9.0,
147
+ },
148
+ 'UB305x165x54': {
149
+ 'h': 310.0,
150
+ 'b': 167.0,
151
+ 'tw': 7.9,
152
+ 'tf': 13.7,
153
+ 'r': 9.0,
154
+ },
155
+ 'UB356x171x45': {
156
+ 'h': 351.0,
157
+ 'b': 171.0,
158
+ 'tw': 7.0,
159
+ 'tf': 9.7,
160
+ 'r': 13.0,
161
+ },
162
+ 'UB356x171x51': {
163
+ 'h': 355.0,
164
+ 'b': 172.0,
165
+ 'tw': 7.4,
166
+ 'tf': 11.5,
167
+ 'r': 13.0,
168
+ },
169
+ 'UB356x171x57': {
170
+ 'h': 358.0,
171
+ 'b': 172.0,
172
+ 'tw': 8.1,
173
+ 'tf': 13.0,
174
+ 'r': 13.0,
175
+ },
176
+ }
177
+
178
+ @classmethod
179
+ def get_polygon(cls, name: str) -> Polygon:
180
+ """Returns a shapely polygon representing a UB section."""
181
+ parameters = cls.parameters.get(name)
182
+ if parameters is None:
183
+ raise ValueError(
184
+ f"Profile '{name}' not found in UB sections. "
185
+ "Select a valid profile (available ones: "
186
+ f"{cls.profiles()})"
187
+ )
188
+ return _create_I_section(**parameters)
189
+
190
+ @classmethod
191
+ def profiles(cls) -> list:
192
+ """Returns a list containing all available profiles."""
193
+ return list(cls.parameters.keys())
194
+
195
+ def __init__(self, name: str) -> None:
196
+ """Creates a new UB object."""
197
+ parameters = self.parameters.get(name)
198
+ if parameters is None:
199
+ raise ValueError(
200
+ f"Profile '{name}' not found in UB sections. "
201
+ "Select a valid profile (available ones: "
202
+ f"{self.profiles()})"
203
+ )
204
+ super().__init__()
205
+ self._h = parameters.get('h')
206
+ self._b = parameters.get('b')
207
+ self._tw = parameters.get('tw')
208
+ self._tf = parameters.get('tf')
209
+ self._r = parameters.get('r')
210
+ self._polygon = _create_I_section(**parameters)
211
+
212
+ @property
213
+ def polygon(self) -> Polygon:
214
+ """Returns shapely Polygon of section.
215
+
216
+ Returns:
217
+ Polygon: The represention of the UB section.
218
+ """
219
+ return self._polygon
220
+
221
+ @property
222
+ def h(self) -> float:
223
+ """Returns height of UB section.
224
+
225
+ Returns:
226
+ float: Height h of UB section.
227
+ """
228
+ return self._h
229
+
230
+ @property
231
+ def b(self) -> float:
232
+ """Returns width of UB section.
233
+
234
+ Returns:
235
+ float: Width b of UB section.
236
+ """
237
+ return self._b
238
+
239
+ @property
240
+ def tw(self) -> float:
241
+ """Returns thickness of web of UB section.
242
+
243
+ Returns:
244
+ float: Web thickness tw of UB section.
245
+ """
246
+ return self._tw
247
+
248
+ @property
249
+ def tf(self) -> float:
250
+ """Returns thickness of flange of UB section.
251
+
252
+ Returns:
253
+ float: Flange thickness tw of UB section.
254
+ """
255
+ return self._tf
256
+
257
+ @property
258
+ def r(self) -> float:
259
+ """Returns fillet radius of UB section.
260
+
261
+ Returns:
262
+ float: Fillet radius r of UB section.
263
+ """
264
+ return self._r
@@ -0,0 +1,227 @@
1
+ """UBP 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 UBP(BaseProfile):
14
+ """Simple class for representing a UBP profile.
15
+
16
+ Universal Bearing Pile.
17
+ """
18
+
19
+ parameters = {
20
+ 'UBP203x203x45': {
21
+ 'h': 200.0,
22
+ 'b': 206.0,
23
+ 'tw': 9.5,
24
+ 'tf': 9.5,
25
+ 'r': 10.0,
26
+ },
27
+ 'UBP203x203x54': {
28
+ 'h': 204.0,
29
+ 'b': 208.0,
30
+ 'tw': 11.3,
31
+ 'tf': 11.4,
32
+ 'r': 10.0,
33
+ },
34
+ 'UBP254x254x63': {
35
+ 'h': 247.0,
36
+ 'b': 257.0,
37
+ 'tw': 10.6,
38
+ 'tf': 10.7,
39
+ 'r': 20.0,
40
+ },
41
+ 'UBP254x254x71': {
42
+ 'h': 250.0,
43
+ 'b': 258.0,
44
+ 'tw': 12.0,
45
+ 'tf': 12.0,
46
+ 'r': 20.0,
47
+ },
48
+ 'UBP254x254x85': {
49
+ 'h': 254.0,
50
+ 'b': 260.0,
51
+ 'tw': 14.4,
52
+ 'tf': 14.3,
53
+ 'r': 20.0,
54
+ },
55
+ 'UBP305x305x79': {
56
+ 'h': 299.0,
57
+ 'b': 306.0,
58
+ 'tw': 11.0,
59
+ 'tf': 11.1,
60
+ 'r': 20.0,
61
+ },
62
+ 'UBP305x305x88': {
63
+ 'h': 302.0,
64
+ 'b': 308.0,
65
+ 'tw': 12.4,
66
+ 'tf': 12.3,
67
+ 'r': 20.0,
68
+ },
69
+ 'UBP305x305x95': {
70
+ 'h': 304.0,
71
+ 'b': 309.0,
72
+ 'tw': 13.3,
73
+ 'tf': 13.3,
74
+ 'r': 20.0,
75
+ },
76
+ 'UBP305x305x110': {
77
+ 'h': 308.0,
78
+ 'b': 311.0,
79
+ 'tw': 15.3,
80
+ 'tf': 15.4,
81
+ 'r': 20.0,
82
+ },
83
+ 'UBP305x305x126': {
84
+ 'h': 312.0,
85
+ 'b': 313.0,
86
+ 'tw': 17.5,
87
+ 'tf': 17.6,
88
+ 'r': 20.0,
89
+ },
90
+ 'UBP305x305x149': {
91
+ 'h': 318.0,
92
+ 'b': 316.0,
93
+ 'tw': 20.6,
94
+ 'tf': 20.7,
95
+ 'r': 20.0,
96
+ },
97
+ 'UBP305x305x186': {
98
+ 'h': 328.0,
99
+ 'b': 321.0,
100
+ 'tw': 25.5,
101
+ 'tf': 25.6,
102
+ 'r': 2.0,
103
+ },
104
+ 'UBP305x305x223': {
105
+ 'h': 338.0,
106
+ 'b': 326.0,
107
+ 'tw': 30.3,
108
+ 'tf': 30.4,
109
+ 'r': 20.0,
110
+ },
111
+ 'UBP356x368x109': {
112
+ 'h': 346.0,
113
+ 'b': 371.0,
114
+ 'tw': 12.8,
115
+ 'tf': 12.9,
116
+ 'r': 20.0,
117
+ },
118
+ 'UBP356x368x133': {
119
+ 'h': 352.0,
120
+ 'b': 374.0,
121
+ 'tw': 15.6,
122
+ 'tf': 15.7,
123
+ 'r': 20.0,
124
+ },
125
+ 'UBP356x368x152': {
126
+ 'h': 356.0,
127
+ 'b': 376.0,
128
+ 'tw': 17.8,
129
+ 'tf': 17.9,
130
+ 'r': 20.0,
131
+ },
132
+ 'UBP356x368x174': {
133
+ 'h': 361.0,
134
+ 'b': 378.0,
135
+ 'tw': 20.3,
136
+ 'tf': 20.4,
137
+ 'r': 20.0,
138
+ },
139
+ }
140
+
141
+ @classmethod
142
+ def get_polygon(cls, name: str) -> Polygon:
143
+ """Returns a shapely polygon representing a UBP section."""
144
+ parameters = cls.parameters.get(name)
145
+ if parameters is None:
146
+ raise ValueError(
147
+ f"Profile '{name}' not found in UBP sections. "
148
+ "Select a valid profile (available ones: "
149
+ f"{cls.profiles()})"
150
+ )
151
+ return _create_I_section(**parameters)
152
+
153
+ @classmethod
154
+ def profiles(cls) -> list:
155
+ """Returns a list containing all available profiles."""
156
+ return list(cls.parameters.keys())
157
+
158
+ def __init__(self, name: str) -> None:
159
+ """Creates a new UBP object."""
160
+ parameters = self.parameters.get(name)
161
+ if parameters is None:
162
+ raise ValueError(
163
+ f"Profile '{name}' not found in UBP sections. "
164
+ "Select a valid profile (available ones: "
165
+ f"{self.profiles()})"
166
+ )
167
+ super().__init__()
168
+ self._h = parameters.get('h')
169
+ self._b = parameters.get('b')
170
+ self._tw = parameters.get('tw')
171
+ self._tf = parameters.get('tf')
172
+ self._r = parameters.get('r')
173
+ self._polygon = _create_I_section(**parameters)
174
+
175
+ @property
176
+ def polygon(self) -> Polygon:
177
+ """Returns shapely Polygon of section.
178
+
179
+ Returns:
180
+ Polygon: The represention of the UBP section.
181
+ """
182
+ return self._polygon
183
+
184
+ @property
185
+ def h(self) -> float:
186
+ """Returns height of UBP section.
187
+
188
+ Returns:
189
+ float: Height h of UBP section.
190
+ """
191
+ return self._h
192
+
193
+ @property
194
+ def b(self) -> float:
195
+ """Returns width of UBP section.
196
+
197
+ Returns:
198
+ float: Width b of UBP section.
199
+ """
200
+ return self._b
201
+
202
+ @property
203
+ def tw(self) -> float:
204
+ """Returns thickness of web of UBP section.
205
+
206
+ Returns:
207
+ float: Web thickness tw of UBP section.
208
+ """
209
+ return self._tw
210
+
211
+ @property
212
+ def tf(self) -> float:
213
+ """Returns thickness of flange of UBP section.
214
+
215
+ Returns:
216
+ float: Flange thickness tw of UBP section.
217
+ """
218
+ return self._tf
219
+
220
+ @property
221
+ def r(self) -> float:
222
+ """Returns fillet radius of UBP section.
223
+
224
+ Returns:
225
+ float: Fillet radius r of UBP section.
226
+ """
227
+ return self._r