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,217 @@
1
+ """LI profiles."""
2
+
3
+ from shapely import (
4
+ Polygon,
5
+ )
6
+
7
+ from ._base_profile import BaseProfile
8
+ from ._common_functions import (
9
+ _create_L_section,
10
+ )
11
+
12
+
13
+ class LI(BaseProfile):
14
+ """Simple class for representing a LI profile.
15
+
16
+ European standard unequal side angle.
17
+
18
+ """
19
+
20
+ parameters = {
21
+ 'L120x80x8': {'h': 120.0, 'b': 80.0, 't': 8.0, 'r1': 11.0, 'r2': 5.5},
22
+ 'L120x80x10': {
23
+ 'h': 120.0,
24
+ 'b': 80.0,
25
+ 't': 10.0,
26
+ 'r1': 11.0,
27
+ 'r2': 5.5,
28
+ },
29
+ 'L120x80x12': {
30
+ 'h': 120.0,
31
+ 'b': 80.0,
32
+ 't': 12.0,
33
+ 'r1': 11.0,
34
+ 'r2': 5.5,
35
+ },
36
+ 'L150x75x9': {'h': 150.0, 'b': 75.0, 't': 9.0, 'r1': 12.0, 'r2': 6.0},
37
+ 'L150x75x10': {
38
+ 'h': 150.0,
39
+ 'b': 75.0,
40
+ 't': 10.0,
41
+ 'r1': 12.0,
42
+ 'r2': 6.0,
43
+ },
44
+ 'L150x75x11': {
45
+ 'h': 150.0,
46
+ 'b': 75.0,
47
+ 't': 11.0,
48
+ 'r1': 12.0,
49
+ 'r2': 6.0,
50
+ },
51
+ 'L150x75x12': {
52
+ 'h': 150.0,
53
+ 'b': 75.0,
54
+ 't': 12.0,
55
+ 'r1': 12.0,
56
+ 'r2': 6.0,
57
+ },
58
+ 'L150x90x10': {
59
+ 'h': 150.0,
60
+ 'b': 90.0,
61
+ 't': 10.0,
62
+ 'r1': 12.0,
63
+ 'r2': 6.0,
64
+ },
65
+ 'L150x90x11': {
66
+ 'h': 150.0,
67
+ 'b': 90.0,
68
+ 't': 11.0,
69
+ 'r1': 12.0,
70
+ 'r2': 6.0,
71
+ },
72
+ 'L150x100x10': {
73
+ 'h': 150.0,
74
+ 'b': 100.0,
75
+ 't': 10.0,
76
+ 'r1': 12.0,
77
+ 'r2': 6.0,
78
+ },
79
+ 'L150x100x12': {
80
+ 'h': 150.0,
81
+ 'b': 100.0,
82
+ 't': 12.0,
83
+ 'r1': 12.0,
84
+ 'r2': 6.0,
85
+ },
86
+ 'L150x100x14': {
87
+ 'h': 150.0,
88
+ 'b': 100.0,
89
+ 't': 14.0,
90
+ 'r1': 12.0,
91
+ 'r2': 6.0,
92
+ },
93
+ 'L200x100x10': {
94
+ 'h': 200.0,
95
+ 'b': 100.0,
96
+ 't': 10.0,
97
+ 'r1': 15.0,
98
+ 'r2': 7.5,
99
+ },
100
+ 'L200x100x12': {
101
+ 'h': 200.0,
102
+ 'b': 100.0,
103
+ 't': 12.0,
104
+ 'r1': 15.0,
105
+ 'r2': 7.5,
106
+ },
107
+ 'L200x100x14': {
108
+ 'h': 200.0,
109
+ 'b': 100.0,
110
+ 't': 14.0,
111
+ 'r1': 15.0,
112
+ 'r2': 7.5,
113
+ },
114
+ }
115
+
116
+ @classmethod
117
+ def get_polygon(cls, name: str) -> Polygon:
118
+ """Returns a shapely polygon representing an L section."""
119
+ parameters = cls.parameters.get(name)
120
+ if parameters is None:
121
+ raise ValueError(
122
+ f"Profile '{name}' not found in L sections. "
123
+ "Select a valid profile (available ones: "
124
+ f"{cls.profiles()})"
125
+ )
126
+ parameters['t1'] = parameters['t']
127
+ parameters['t2'] = parameters['t']
128
+ return _create_L_section(
129
+ **{
130
+ key: parameters[key]
131
+ for key in parameters
132
+ if key in ['h', 'b', 't1', 't2', 'r1', 'r2']
133
+ }
134
+ )
135
+
136
+ @classmethod
137
+ def profiles(cls) -> list:
138
+ """Returns a list containing all available profiles."""
139
+ return list(cls.parameters.keys())
140
+
141
+ def __init__(self, name: str) -> None:
142
+ """Creates a new L object."""
143
+ parameters = self.parameters.get(name)
144
+ if parameters is None:
145
+ raise ValueError(
146
+ f"Profile '{name}' not found in LI sections. "
147
+ "Select a valid profile (available ones: "
148
+ f"{self.profiles()})"
149
+ )
150
+ super().__init__()
151
+ self._h = parameters.get('h')
152
+ self._b = parameters.get('b')
153
+ self._t = parameters.get('t')
154
+ self._r1 = parameters.get('r1')
155
+ self._r2 = parameters.get('r2')
156
+ self._polygon = _create_L_section(
157
+ h=self._h,
158
+ b=self._b,
159
+ t1=self._t,
160
+ t2=self._t,
161
+ r1=self._r1,
162
+ r2=self._r2,
163
+ )
164
+
165
+ @property
166
+ def polygon(self) -> Polygon:
167
+ """Returns shapely Polygon of section.
168
+
169
+ Returns:
170
+ Polygon: The represention of the L section.
171
+ """
172
+ return self._polygon
173
+
174
+ @property
175
+ def h(self) -> float:
176
+ """Returns height of L section.
177
+
178
+ Returns:
179
+ float: Height h of L section.
180
+ """
181
+ return self._h
182
+
183
+ @property
184
+ def b(self) -> float:
185
+ """Returns width of L section.
186
+
187
+ Returns:
188
+ float: Width b of L section.
189
+ """
190
+ return self._b
191
+
192
+ @property
193
+ def t(self) -> float:
194
+ """Returns thickness of L section.
195
+
196
+ Returns:
197
+ float: Thickness t of L section.
198
+ """
199
+ return self._t
200
+
201
+ @property
202
+ def r1(self) -> float:
203
+ """Returns fillet radius of L section.
204
+
205
+ Returns:
206
+ float: Fillet radius r1 of L section.
207
+ """
208
+ return self._r1
209
+
210
+ @property
211
+ def r2(self) -> float:
212
+ """Returns fillet radius of L section.
213
+
214
+ Returns:
215
+ float: Fillet radius r2 of L section.
216
+ """
217
+ return self._r2
@@ -0,0 +1,173 @@
1
+ """U profiles."""
2
+
3
+ from shapely import (
4
+ Polygon,
5
+ )
6
+
7
+ from ._base_profile import BaseProfile
8
+ from ._common_functions import (
9
+ _create_taper_U_section,
10
+ )
11
+
12
+
13
+ class U(BaseProfile):
14
+ """Simple class for representing an U profile.
15
+
16
+ EN 10279.
17
+
18
+ Taper flange Channels.
19
+
20
+ 8% slope in flange.
21
+ """
22
+
23
+ parameters = {
24
+ 'U40x20': {
25
+ 'h': 40.0,
26
+ 'b': 20.0,
27
+ 'tw': 5.0,
28
+ 'tf': 5.5,
29
+ 'r1': 5.0,
30
+ 'r2': 2.5,
31
+ },
32
+ 'U50x25': {
33
+ 'h': 50.0,
34
+ 'b': 25.0,
35
+ 'tw': 5.0,
36
+ 'tf': 6.0,
37
+ 'r1': 6.0,
38
+ 'r2': 3.0,
39
+ },
40
+ 'U60x30': {
41
+ 'h': 60.0,
42
+ 'b': 30.0,
43
+ 'tw': 6.0,
44
+ 'tf': 6.0,
45
+ 'r1': 6.0,
46
+ 'r2': 3.0,
47
+ },
48
+ 'U65x42': {
49
+ 'h': 65.0,
50
+ 'b': 42.0,
51
+ 'tw': 5.5,
52
+ 'tf': 7.5,
53
+ 'r1': 7.5,
54
+ 'r2': 4.0,
55
+ },
56
+ }
57
+
58
+ @classmethod
59
+ def get_polygon(cls, name: str) -> Polygon:
60
+ """Returns a shapely polygon representing an U section."""
61
+ parameters = cls.parameters.get(name)
62
+ if parameters is None:
63
+ raise ValueError(
64
+ f"Profile '{name}' not found in U sections. "
65
+ "Select a valid profile (available ones: "
66
+ f"{cls.profiles()})"
67
+ )
68
+ parameters['slope'] = 0.08
69
+ parameters['u'] = parameters['b'] / 2.0
70
+ return _create_taper_U_section(
71
+ **{
72
+ key: parameters[key]
73
+ for key in parameters
74
+ if key in ['h', 'b', 'tw', 'tf', 'r1', 'r2', 'slope', 'u']
75
+ }
76
+ )
77
+
78
+ @classmethod
79
+ def profiles(cls) -> list:
80
+ """Returns a list containing all available profiles."""
81
+ return list(cls.parameters.keys())
82
+
83
+ def __init__(self, name: str) -> None:
84
+ """Creates a new U object."""
85
+ parameters = self.parameters.get(name)
86
+ if parameters is None:
87
+ raise ValueError(
88
+ f"Profile '{name}' not found in U sections. "
89
+ "Select a valid profile (available ones: "
90
+ f"{self.profiles()})"
91
+ )
92
+ super().__init__()
93
+ self._h = parameters.get('h')
94
+ self._b = parameters.get('b')
95
+ self._tw = parameters.get('tw')
96
+ self._tf = parameters.get('tf')
97
+ self._r1 = parameters.get('r1')
98
+ self._r2 = parameters.get('r2')
99
+ self._flange_slope = 0.08
100
+ self._u = self._b / 2.0
101
+ self._polygon = _create_taper_U_section(
102
+ h=self._h,
103
+ b=self._b,
104
+ tw=self._tw,
105
+ tf=self._tf,
106
+ r1=self._r1,
107
+ r2=self._r2,
108
+ slope=self._flange_slope,
109
+ u=self._u,
110
+ )
111
+
112
+ @property
113
+ def polygon(self) -> Polygon:
114
+ """Returns shapely Polygon of section.
115
+
116
+ Returns:
117
+ Polygon: The represention of the U section.
118
+ """
119
+ return self._polygon
120
+
121
+ @property
122
+ def h(self) -> float:
123
+ """Returns height of U section.
124
+
125
+ Returns:
126
+ float: Height h of U section.
127
+ """
128
+ return self._h
129
+
130
+ @property
131
+ def b(self) -> float:
132
+ """Returns width of U section.
133
+
134
+ Returns:
135
+ float: Width b of U section.
136
+ """
137
+ return self._b
138
+
139
+ @property
140
+ def tw(self) -> float:
141
+ """Returns thickness of web of U section.
142
+
143
+ Returns:
144
+ float: Web thickness tw of U section.
145
+ """
146
+ return self._tw
147
+
148
+ @property
149
+ def tf(self) -> float:
150
+ """Returns thickness of flange of U section.
151
+
152
+ Returns:
153
+ float: Flange thickness tw of U section.
154
+ """
155
+ return self._tf
156
+
157
+ @property
158
+ def r1(self) -> float:
159
+ """Returns fillet radius of U section.
160
+
161
+ Returns:
162
+ float: Fillet radius r1 of U section.
163
+ """
164
+ return self._r1
165
+
166
+ @property
167
+ def r2(self) -> float:
168
+ """Returns fillet radius of U section.
169
+
170
+ Returns:
171
+ float: Fillet radius r2 of U section.
172
+ """
173
+ return self._r2