structuralcodes 0.1.0__tar.gz → 0.1.1__tar.gz
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.
- {structuralcodes-0.1.0 → structuralcodes-0.1.1}/PKG-INFO +1 -1
- {structuralcodes-0.1.0 → structuralcodes-0.1.1}/structuralcodes/__init__.py +1 -1
- {structuralcodes-0.1.0 → structuralcodes-0.1.1}/structuralcodes/codes/ec2_2004/annex_b_shrink_and_creep.py +1 -1
- {structuralcodes-0.1.0 → structuralcodes-0.1.1}/structuralcodes/codes/ec2_2004/shear.py +5 -1
- {structuralcodes-0.1.0 → structuralcodes-0.1.1}/structuralcodes/codes/mc2010/_concrete_creep_and_shrinkage.py +3 -1
- {structuralcodes-0.1.0 → structuralcodes-0.1.1}/structuralcodes/geometry/_reinforcement.py +14 -2
- {structuralcodes-0.1.0 → structuralcodes-0.1.1}/structuralcodes/sections/_generic.py +26 -6
- {structuralcodes-0.1.0 → structuralcodes-0.1.1}/README.md +0 -0
- {structuralcodes-0.1.0 → structuralcodes-0.1.1}/pyproject.toml +0 -0
- {structuralcodes-0.1.0 → structuralcodes-0.1.1}/structuralcodes/codes/__init__.py +0 -0
- {structuralcodes-0.1.0 → structuralcodes-0.1.1}/structuralcodes/codes/ec2_2004/__init__.py +0 -0
- {structuralcodes-0.1.0 → structuralcodes-0.1.1}/structuralcodes/codes/ec2_2004/_concrete_material_properties.py +0 -0
- {structuralcodes-0.1.0 → structuralcodes-0.1.1}/structuralcodes/codes/ec2_2004/_reinforcement_material_properties.py +0 -0
- {structuralcodes-0.1.0 → structuralcodes-0.1.1}/structuralcodes/codes/ec2_2004/_section_7_3_crack_control.py +0 -0
- {structuralcodes-0.1.0 → structuralcodes-0.1.1}/structuralcodes/codes/ec2_2023/__init__.py +0 -0
- {structuralcodes-0.1.0 → structuralcodes-0.1.1}/structuralcodes/codes/ec2_2023/_annexB_time_dependent.py +0 -0
- {structuralcodes-0.1.0 → structuralcodes-0.1.1}/structuralcodes/codes/ec2_2023/_section5_materials.py +0 -0
- {structuralcodes-0.1.0 → structuralcodes-0.1.1}/structuralcodes/codes/ec2_2023/_section9_sls.py +0 -0
- {structuralcodes-0.1.0 → structuralcodes-0.1.1}/structuralcodes/codes/mc2010/__init__.py +0 -0
- {structuralcodes-0.1.0 → structuralcodes-0.1.1}/structuralcodes/codes/mc2010/_concrete_interface_different_casting_times.py +0 -0
- {structuralcodes-0.1.0 → structuralcodes-0.1.1}/structuralcodes/codes/mc2010/_concrete_material_properties.py +0 -0
- {structuralcodes-0.1.0 → structuralcodes-0.1.1}/structuralcodes/codes/mc2010/_concrete_punching.py +0 -0
- {structuralcodes-0.1.0 → structuralcodes-0.1.1}/structuralcodes/codes/mc2010/_concrete_shear.py +0 -0
- {structuralcodes-0.1.0 → structuralcodes-0.1.1}/structuralcodes/codes/mc2010/_concrete_torsion.py +0 -0
- {structuralcodes-0.1.0 → structuralcodes-0.1.1}/structuralcodes/codes/mc2010/_reinforcement_material_properties.py +0 -0
- {structuralcodes-0.1.0 → structuralcodes-0.1.1}/structuralcodes/codes/mc2020/__init__.py +0 -0
- {structuralcodes-0.1.0 → structuralcodes-0.1.1}/structuralcodes/core/__init__.py +0 -0
- {structuralcodes-0.1.0 → structuralcodes-0.1.1}/structuralcodes/core/_section_results.py +0 -0
- {structuralcodes-0.1.0 → structuralcodes-0.1.1}/structuralcodes/core/base.py +0 -0
- {structuralcodes-0.1.0 → structuralcodes-0.1.1}/structuralcodes/geometry/__init__.py +0 -0
- {structuralcodes-0.1.0 → structuralcodes-0.1.1}/structuralcodes/geometry/_geometry.py +0 -0
- {structuralcodes-0.1.0 → structuralcodes-0.1.1}/structuralcodes/geometry/_steel_sections.py +0 -0
- {structuralcodes-0.1.0 → structuralcodes-0.1.1}/structuralcodes/materials/__init__.py +0 -0
- {structuralcodes-0.1.0 → structuralcodes-0.1.1}/structuralcodes/materials/concrete/__init__.py +0 -0
- {structuralcodes-0.1.0 → structuralcodes-0.1.1}/structuralcodes/materials/concrete/_concrete.py +0 -0
- {structuralcodes-0.1.0 → structuralcodes-0.1.1}/structuralcodes/materials/concrete/_concreteEC2_2004.py +0 -0
- {structuralcodes-0.1.0 → structuralcodes-0.1.1}/structuralcodes/materials/concrete/_concreteEC2_2023.py +0 -0
- {structuralcodes-0.1.0 → structuralcodes-0.1.1}/structuralcodes/materials/concrete/_concreteMC2010.py +0 -0
- {structuralcodes-0.1.0 → structuralcodes-0.1.1}/structuralcodes/materials/constitutive_laws.py +0 -0
- {structuralcodes-0.1.0 → structuralcodes-0.1.1}/structuralcodes/materials/reinforcement/__init__.py +0 -0
- {structuralcodes-0.1.0 → structuralcodes-0.1.1}/structuralcodes/materials/reinforcement/_reinforcement.py +0 -0
- {structuralcodes-0.1.0 → structuralcodes-0.1.1}/structuralcodes/materials/reinforcement/_reinforcementEC2_2004.py +0 -0
- {structuralcodes-0.1.0 → structuralcodes-0.1.1}/structuralcodes/materials/reinforcement/_reinforcementEC2_2023.py +0 -0
- {structuralcodes-0.1.0 → structuralcodes-0.1.1}/structuralcodes/materials/reinforcement/_reinforcementMC2010.py +0 -0
- {structuralcodes-0.1.0 → structuralcodes-0.1.1}/structuralcodes/sections/__init__.py +0 -0
- {structuralcodes-0.1.0 → structuralcodes-0.1.1}/structuralcodes/sections/section_integrators/__init__.py +0 -0
- {structuralcodes-0.1.0 → structuralcodes-0.1.1}/structuralcodes/sections/section_integrators/_factory.py +0 -0
- {structuralcodes-0.1.0 → structuralcodes-0.1.1}/structuralcodes/sections/section_integrators/_fiber_integrator.py +0 -0
- {structuralcodes-0.1.0 → structuralcodes-0.1.1}/structuralcodes/sections/section_integrators/_marin_integration.py +0 -0
- {structuralcodes-0.1.0 → structuralcodes-0.1.1}/structuralcodes/sections/section_integrators/_marin_integrator.py +0 -0
- {structuralcodes-0.1.0 → structuralcodes-0.1.1}/structuralcodes/sections/section_integrators/_section_integrator.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: structuralcodes
|
|
3
|
-
Version: 0.1.
|
|
3
|
+
Version: 0.1.1
|
|
4
4
|
Summary: A Python package that contains models from structural design codes.
|
|
5
5
|
Author-email: fib - International Federation for Structural Concrete <info@fib-international.org>
|
|
6
6
|
Requires-Python: >=3.8
|
|
@@ -191,7 +191,7 @@ def eps_cs(
|
|
|
191
191
|
ValueError: Checks if the cement class equals R, N or S.
|
|
192
192
|
"""
|
|
193
193
|
_cement_class = cement_class.upper().strip()
|
|
194
|
-
beta_ds = (t - t_S) / (t - t_S + 0.04 * h_0 ** (
|
|
194
|
+
beta_ds = (t - t_S) / (t - t_S + 0.04 * h_0 ** (3 / 2)) # (3.10)
|
|
195
195
|
beta_as = 1 - math.exp(-0.2 * t**0.5) # (3.13)
|
|
196
196
|
|
|
197
197
|
# k_h is defined in Table 3.3 under (3.9)
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"""Design rules according to EN 1992-1-1 regarding shear."""
|
|
2
2
|
|
|
3
3
|
import math
|
|
4
|
+
import typing as t
|
|
4
5
|
|
|
5
6
|
# General functions
|
|
6
7
|
|
|
@@ -171,6 +172,7 @@ def VRdc(
|
|
|
171
172
|
fcd: float,
|
|
172
173
|
k1: float = 0.15,
|
|
173
174
|
gamma_c: float = 1.5,
|
|
175
|
+
CRdc: t.Optional[float] = None,
|
|
174
176
|
) -> float:
|
|
175
177
|
"""Compute the design strength of the shear resistance.
|
|
176
178
|
|
|
@@ -194,11 +196,13 @@ def VRdc(
|
|
|
194
196
|
value might differ between National Annexes.
|
|
195
197
|
gamma_c (float): Partial factor for concrete. Default value = 1.5,
|
|
196
198
|
value might differ between National Annexes.
|
|
199
|
+
CRdc (Optional[float]): Scaling factor for the shear resistance.
|
|
200
|
+
Default value is 0.18 / gamma_c.
|
|
197
201
|
|
|
198
202
|
Returns:
|
|
199
203
|
float: The concrete shear resistance in MPa.
|
|
200
204
|
"""
|
|
201
|
-
CRdc = 0.18 / gamma_c
|
|
205
|
+
CRdc = CRdc or 0.18 / gamma_c
|
|
202
206
|
return (
|
|
203
207
|
max(
|
|
204
208
|
CRdc * _k(d) * (100 * _rho_L(Asl, bw, d) * fck) ** (1.0 / 3.0)
|
|
@@ -291,7 +291,9 @@ def beta_ds(
|
|
|
291
291
|
numpy.ndarray: Multiplication factor used for calculating the drying
|
|
292
292
|
shrinkage as a function of time.
|
|
293
293
|
"""
|
|
294
|
-
|
|
294
|
+
time_drying = np.atleast_1d(time - ts)
|
|
295
|
+
time_drying[time_drying < 0.0] = 0.0
|
|
296
|
+
return np.sqrt(time_drying / (0.035 * (notional_size) ** 2 + time_drying))
|
|
295
297
|
|
|
296
298
|
|
|
297
299
|
def beta_s1(fcm: float) -> float:
|
|
@@ -18,6 +18,7 @@ def add_reinforcement(
|
|
|
18
18
|
coords: t.Tuple[float, float],
|
|
19
19
|
diameter: float,
|
|
20
20
|
material: t.Union[Material, ConstitutiveLaw],
|
|
21
|
+
group_label: t.Optional[str] = None,
|
|
21
22
|
) -> CompoundGeometry:
|
|
22
23
|
"""Add a single bar given coordinate.
|
|
23
24
|
|
|
@@ -28,12 +29,16 @@ def add_reinforcement(
|
|
|
28
29
|
diameter (float): The diameter of the reinforcement.
|
|
29
30
|
material (Union(Material, ConstitutiveLaw)): A material or a
|
|
30
31
|
constitutive law for the behavior of the reinforcement.
|
|
32
|
+
group_label (Optional(str)): A label for grouping several objects
|
|
33
|
+
(default is None).
|
|
31
34
|
|
|
32
35
|
Returns:
|
|
33
36
|
CompoundGeometry: A compound geometry with the original geometry and
|
|
34
37
|
the reinforcement.
|
|
35
38
|
"""
|
|
36
|
-
bar = PointGeometry(
|
|
39
|
+
bar = PointGeometry(
|
|
40
|
+
Point(coords), diameter, material, group_label=group_label
|
|
41
|
+
)
|
|
37
42
|
return geo + bar
|
|
38
43
|
|
|
39
44
|
|
|
@@ -47,6 +52,7 @@ def add_reinforcement_line(
|
|
|
47
52
|
s: float = 0.0,
|
|
48
53
|
first: bool = True,
|
|
49
54
|
last: bool = True,
|
|
55
|
+
group_label: t.Optional[str] = None,
|
|
50
56
|
) -> CompoundGeometry:
|
|
51
57
|
"""Adds a set of bars distributed in a line.
|
|
52
58
|
|
|
@@ -66,6 +72,8 @@ def add_reinforcement_line(
|
|
|
66
72
|
True).
|
|
67
73
|
last (bool): Boolean indicating if placing the last bar (default =
|
|
68
74
|
True).
|
|
75
|
+
group_label (Optional(str)): A label for grouping several objects
|
|
76
|
+
(default is None).
|
|
69
77
|
|
|
70
78
|
Note:
|
|
71
79
|
At least n or s should be greater than zero.
|
|
@@ -110,6 +118,10 @@ def add_reinforcement_line(
|
|
|
110
118
|
continue
|
|
111
119
|
coords = p1 + v * s * i
|
|
112
120
|
geo = add_reinforcement(
|
|
113
|
-
geo,
|
|
121
|
+
geo,
|
|
122
|
+
(coords[0], coords[1]),
|
|
123
|
+
diameter,
|
|
124
|
+
material,
|
|
125
|
+
group_label=group_label,
|
|
114
126
|
)
|
|
115
127
|
return geo
|
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
|
|
3
3
|
from __future__ import annotations # To have clean hints of ArrayLike in docs
|
|
4
4
|
|
|
5
|
+
import math
|
|
5
6
|
import typing as t
|
|
6
7
|
import warnings
|
|
7
|
-
from math import cos, sin
|
|
8
8
|
|
|
9
9
|
import numpy as np
|
|
10
10
|
from numpy.typing import ArrayLike
|
|
@@ -208,7 +208,13 @@ class GenericSectionCalculator(SectionCalculator):
|
|
|
208
208
|
)
|
|
209
209
|
# Change sign due to moment sign convention
|
|
210
210
|
izz *= -1
|
|
211
|
-
|
|
211
|
+
|
|
212
|
+
# Compute reasonable value for absolute tolerance for checking iyz
|
|
213
|
+
rel_tol = 1e-9
|
|
214
|
+
abs_tol = 0.5 * (iyy + izz) * rel_tol
|
|
215
|
+
|
|
216
|
+
# Check calculated cross moment
|
|
217
|
+
if not math.isclose(iyz, izy, rel_tol=rel_tol, abs_tol=abs_tol):
|
|
212
218
|
error_str = 'Something went wrong with computation of '
|
|
213
219
|
error_str += f'moments of area: iyz = {iyz}, izy = {izy}.\n'
|
|
214
220
|
error_str += 'They should be equal but are not!'
|
|
@@ -574,7 +580,12 @@ class GenericSectionCalculator(SectionCalculator):
|
|
|
574
580
|
"""Rotate triangulated data of angle theta."""
|
|
575
581
|
rotated_triangulated_data = []
|
|
576
582
|
for tr in self.triangulated_data:
|
|
577
|
-
T = np.array(
|
|
583
|
+
T = np.array(
|
|
584
|
+
[
|
|
585
|
+
[np.cos(theta), -np.sin(theta)],
|
|
586
|
+
[np.sin(theta), np.cos(theta)],
|
|
587
|
+
]
|
|
588
|
+
)
|
|
578
589
|
coords = np.vstack((tr[0], tr[1]))
|
|
579
590
|
coords_r = T @ coords
|
|
580
591
|
rotated_triangulated_data.append(
|
|
@@ -636,7 +647,9 @@ class GenericSectionCalculator(SectionCalculator):
|
|
|
636
647
|
)
|
|
637
648
|
|
|
638
649
|
# Rotate back to section CRS TODO Check
|
|
639
|
-
T = np.array(
|
|
650
|
+
T = np.array(
|
|
651
|
+
[[np.cos(theta), -np.sin(theta)], [np.sin(theta), np.cos(theta)]]
|
|
652
|
+
)
|
|
640
653
|
M = T @ np.array([[My], [Mz]])
|
|
641
654
|
if self.triangulated_data is not None:
|
|
642
655
|
# Rotate back also triangulated data!
|
|
@@ -771,7 +784,12 @@ class GenericSectionCalculator(SectionCalculator):
|
|
|
771
784
|
geo=rotated_geom, strain=strain, tri=self.triangulated_data
|
|
772
785
|
)
|
|
773
786
|
# Rotate back to section CRS
|
|
774
|
-
T = np.array(
|
|
787
|
+
T = np.array(
|
|
788
|
+
[
|
|
789
|
+
[np.cos(theta), -np.sin(theta)],
|
|
790
|
+
[np.sin(theta), np.cos(theta)],
|
|
791
|
+
]
|
|
792
|
+
)
|
|
775
793
|
M = T @ np.array([[My], [Mz]])
|
|
776
794
|
eps_a[i] = strain[0]
|
|
777
795
|
my[i] = M[0, 0]
|
|
@@ -1106,7 +1124,9 @@ class GenericSectionCalculator(SectionCalculator):
|
|
|
1106
1124
|
eps_a = eps_n - kappa_y * y_n
|
|
1107
1125
|
|
|
1108
1126
|
# rotate back components to work in section CRS
|
|
1109
|
-
T = np.array(
|
|
1127
|
+
T = np.array(
|
|
1128
|
+
[[np.cos(theta), -np.sin(theta)], [np.sin(theta), np.cos(theta)]]
|
|
1129
|
+
)
|
|
1110
1130
|
components = np.vstack((kappa_y, np.zeros_like(kappa_y)))
|
|
1111
1131
|
rotated_components = T @ components
|
|
1112
1132
|
return np.column_stack((eps_a, rotated_components.T)), field_num
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{structuralcodes-0.1.0 → structuralcodes-0.1.1}/structuralcodes/codes/ec2_2023/_section9_sls.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{structuralcodes-0.1.0 → structuralcodes-0.1.1}/structuralcodes/codes/mc2010/_concrete_punching.py
RENAMED
|
File without changes
|
{structuralcodes-0.1.0 → structuralcodes-0.1.1}/structuralcodes/codes/mc2010/_concrete_shear.py
RENAMED
|
File without changes
|
{structuralcodes-0.1.0 → structuralcodes-0.1.1}/structuralcodes/codes/mc2010/_concrete_torsion.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{structuralcodes-0.1.0 → structuralcodes-0.1.1}/structuralcodes/materials/concrete/__init__.py
RENAMED
|
File without changes
|
{structuralcodes-0.1.0 → structuralcodes-0.1.1}/structuralcodes/materials/concrete/_concrete.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{structuralcodes-0.1.0 → structuralcodes-0.1.1}/structuralcodes/materials/constitutive_laws.py
RENAMED
|
File without changes
|
{structuralcodes-0.1.0 → structuralcodes-0.1.1}/structuralcodes/materials/reinforcement/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|