structuralcodes 0.3.1__py3-none-any.whl → 0.5.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.
- structuralcodes/__init__.py +1 -1
- structuralcodes/codes/ec2_2004/__init__.py +2 -0
- structuralcodes/codes/ec2_2004/shear.py +44 -4
- structuralcodes/codes/mc2010/__init__.py +40 -0
- structuralcodes/codes/mc2010/_concrete_punching.py +300 -388
- structuralcodes/codes/mc2010/_interface_concrete_steel_rebar.py +348 -0
- structuralcodes/core/base.py +1 -22
- structuralcodes/geometry/_circular.py +3 -10
- structuralcodes/geometry/_geometry.py +47 -92
- structuralcodes/geometry/_rectangular.py +3 -10
- structuralcodes/geometry/_reinforcement.py +8 -11
- structuralcodes/materials/__init__.py +2 -1
- structuralcodes/materials/basic/__init__.py +11 -0
- structuralcodes/materials/basic/_elastic.py +52 -0
- structuralcodes/materials/basic/_elasticplastic.py +75 -0
- structuralcodes/materials/basic/_generic.py +26 -0
- structuralcodes/materials/concrete/_concrete.py +1 -62
- structuralcodes/materials/concrete/_concreteEC2_2004.py +270 -224
- structuralcodes/materials/concrete/_concreteEC2_2023.py +246 -188
- structuralcodes/materials/concrete/_concreteMC2010.py +280 -235
- structuralcodes/materials/constitutive_laws/__init__.py +16 -15
- structuralcodes/materials/reinforcement/_reinforcement.py +0 -71
- structuralcodes/materials/reinforcement/_reinforcementEC2_2004.py +37 -2
- structuralcodes/materials/reinforcement/_reinforcementEC2_2023.py +34 -1
- structuralcodes/materials/reinforcement/_reinforcementMC2010.py +38 -2
- structuralcodes/sections/_generic.py +76 -21
- structuralcodes/sections/_rc_utils.py +15 -5
- structuralcodes/sections/section_integrators/_fiber_integrator.py +19 -11
- structuralcodes/sections/section_integrators/_marin_integrator.py +24 -19
- {structuralcodes-0.3.1.dist-info → structuralcodes-0.5.0.dist-info}/METADATA +3 -2
- {structuralcodes-0.3.1.dist-info → structuralcodes-0.5.0.dist-info}/RECORD +33 -27
- {structuralcodes-0.3.1.dist-info → structuralcodes-0.5.0.dist-info}/WHEEL +1 -1
- structuralcodes-0.5.0.dist-info/licenses/LICENSE +201 -0
|
@@ -4,7 +4,6 @@ import abc
|
|
|
4
4
|
import typing as t
|
|
5
5
|
|
|
6
6
|
from structuralcodes.core.base import ConstitutiveLaw, Material
|
|
7
|
-
from structuralcodes.materials.constitutive_laws import create_constitutive_law
|
|
8
7
|
|
|
9
8
|
|
|
10
9
|
class Concrete(Material):
|
|
@@ -13,7 +12,7 @@ class Concrete(Material):
|
|
|
13
12
|
_fck: float
|
|
14
13
|
_gamma_c: t.Optional[float] = None
|
|
15
14
|
_existing: bool
|
|
16
|
-
_constitutive_law: t.Optional[ConstitutiveLaw]
|
|
15
|
+
_constitutive_law: t.Optional[ConstitutiveLaw]
|
|
17
16
|
|
|
18
17
|
def __init__(
|
|
19
18
|
self,
|
|
@@ -34,72 +33,12 @@ class Concrete(Material):
|
|
|
34
33
|
)
|
|
35
34
|
self._existing = existing
|
|
36
35
|
self._gamma_c = gamma_c
|
|
37
|
-
self._constitutive_law = None
|
|
38
36
|
|
|
39
37
|
@property
|
|
40
38
|
def fck(self) -> float:
|
|
41
39
|
"""Returns fck in MPa."""
|
|
42
40
|
return self._fck
|
|
43
41
|
|
|
44
|
-
@fck.setter
|
|
45
|
-
def fck(self, fck: float) -> None:
|
|
46
|
-
"""Setter for fck (in MPa)."""
|
|
47
|
-
self._fck = abs(fck)
|
|
48
|
-
self._reset_attributes()
|
|
49
|
-
|
|
50
|
-
@abc.abstractmethod
|
|
51
|
-
def _reset_attributes(self):
|
|
52
|
-
"""Each concrete should define its own _reset_attributes method. This
|
|
53
|
-
is because fck setting, reset the object arguments.
|
|
54
|
-
"""
|
|
55
|
-
|
|
56
|
-
@property
|
|
57
|
-
def constitutive_law(self) -> ConstitutiveLaw:
|
|
58
|
-
"""Returns the constitutive law object."""
|
|
59
|
-
if self._constitutive_law is None:
|
|
60
|
-
self.constitutive_law = 'parabolarectangle'
|
|
61
|
-
return self._constitutive_law
|
|
62
|
-
|
|
63
|
-
@constitutive_law.setter
|
|
64
|
-
def constitutive_law(
|
|
65
|
-
self,
|
|
66
|
-
constitutive_law: t.Union[
|
|
67
|
-
ConstitutiveLaw,
|
|
68
|
-
t.Literal['elastic', 'parabolarectangle', 'sargin', 'popovics'],
|
|
69
|
-
],
|
|
70
|
-
) -> None:
|
|
71
|
-
"""Setter for constitutive law.
|
|
72
|
-
|
|
73
|
-
Arguments:
|
|
74
|
-
consitutive_law (ConstitutiveLaw | str): A valid ConstitutiveLaw
|
|
75
|
-
object for concrete or a string defining a valid constitutive
|
|
76
|
-
law type for concrete. (valid options for string: 'elastic',
|
|
77
|
-
'parabolarectangle', 'bilinearcompression', 'sargin',
|
|
78
|
-
'popovics').
|
|
79
|
-
"""
|
|
80
|
-
if constitutive_law is None:
|
|
81
|
-
raise ValueError(
|
|
82
|
-
'At least a constitutive law or a string defining the '
|
|
83
|
-
'constitutive law must be provided.'
|
|
84
|
-
)
|
|
85
|
-
if isinstance(constitutive_law, str):
|
|
86
|
-
constitutive_law = create_constitutive_law(
|
|
87
|
-
constitutive_law_name=constitutive_law, material=self
|
|
88
|
-
)
|
|
89
|
-
|
|
90
|
-
if isinstance(constitutive_law, ConstitutiveLaw):
|
|
91
|
-
if 'concrete' in constitutive_law.__materials__:
|
|
92
|
-
self._constitutive_law = constitutive_law
|
|
93
|
-
else:
|
|
94
|
-
raise ValueError(
|
|
95
|
-
'The constitutive law selected is not suitable '
|
|
96
|
-
'for being used with a concrete material.'
|
|
97
|
-
)
|
|
98
|
-
else:
|
|
99
|
-
raise ValueError(
|
|
100
|
-
f'The constitutive law {constitutive_law} could not be created'
|
|
101
|
-
)
|
|
102
|
-
|
|
103
42
|
@property
|
|
104
43
|
@abc.abstractmethod
|
|
105
44
|
def gamma_c(self) -> float:
|