structuralcodes 0.0.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.
- structuralcodes/__init__.py +17 -0
- structuralcodes/codes/__init__.py +79 -0
- structuralcodes/codes/ec2_2004/__init__.py +133 -0
- structuralcodes/codes/ec2_2004/_concrete_material_properties.py +239 -0
- structuralcodes/codes/ec2_2004/_reinforcement_material_properties.py +104 -0
- structuralcodes/codes/ec2_2004/_section_7_3_crack_control.py +941 -0
- structuralcodes/codes/ec2_2004/annex_b_shrink_and_creep.py +257 -0
- structuralcodes/codes/ec2_2004/shear.py +506 -0
- structuralcodes/codes/ec2_2023/__init__.py +104 -0
- structuralcodes/codes/ec2_2023/_annexB_time_dependent.py +17 -0
- structuralcodes/codes/ec2_2023/_section5_materials.py +1160 -0
- structuralcodes/codes/ec2_2023/_section9_sls.py +325 -0
- structuralcodes/codes/mc2010/__init__.py +169 -0
- structuralcodes/codes/mc2010/_concrete_creep_and_shrinkage.py +704 -0
- structuralcodes/codes/mc2010/_concrete_interface_different_casting_times.py +104 -0
- structuralcodes/codes/mc2010/_concrete_material_properties.py +463 -0
- structuralcodes/codes/mc2010/_concrete_punching.py +543 -0
- structuralcodes/codes/mc2010/_concrete_shear.py +749 -0
- structuralcodes/codes/mc2010/_concrete_torsion.py +164 -0
- structuralcodes/codes/mc2010/_reinforcement_material_properties.py +105 -0
- structuralcodes/core/__init__.py +1 -0
- structuralcodes/core/_section_results.py +211 -0
- structuralcodes/core/base.py +260 -0
- structuralcodes/geometry/__init__.py +25 -0
- structuralcodes/geometry/_geometry.py +875 -0
- structuralcodes/geometry/_steel_sections.py +2155 -0
- structuralcodes/materials/__init__.py +9 -0
- structuralcodes/materials/concrete/__init__.py +82 -0
- structuralcodes/materials/concrete/_concrete.py +114 -0
- structuralcodes/materials/concrete/_concreteEC2_2004.py +477 -0
- structuralcodes/materials/concrete/_concreteEC2_2023.py +435 -0
- structuralcodes/materials/concrete/_concreteMC2010.py +494 -0
- structuralcodes/materials/constitutive_laws.py +979 -0
- structuralcodes/materials/reinforcement/__init__.py +84 -0
- structuralcodes/materials/reinforcement/_reinforcement.py +172 -0
- structuralcodes/materials/reinforcement/_reinforcementEC2_2004.py +103 -0
- structuralcodes/materials/reinforcement/_reinforcementEC2_2023.py +93 -0
- structuralcodes/materials/reinforcement/_reinforcementMC2010.py +98 -0
- structuralcodes/sections/__init__.py +23 -0
- structuralcodes/sections/_generic.py +1249 -0
- structuralcodes/sections/_reinforcement.py +115 -0
- structuralcodes/sections/section_integrators/__init__.py +14 -0
- structuralcodes/sections/section_integrators/_factory.py +41 -0
- structuralcodes/sections/section_integrators/_fiber_integrator.py +238 -0
- structuralcodes/sections/section_integrators/_marin_integration.py +47 -0
- structuralcodes/sections/section_integrators/_marin_integrator.py +222 -0
- structuralcodes/sections/section_integrators/_section_integrator.py +49 -0
- structuralcodes-0.0.1.dist-info/METADATA +40 -0
- structuralcodes-0.0.1.dist-info/RECORD +50 -0
- structuralcodes-0.0.1.dist-info/WHEEL +4 -0
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
"""Reinforcement material."""
|
|
2
|
+
|
|
3
|
+
import typing as t
|
|
4
|
+
|
|
5
|
+
from structuralcodes.codes import _use_design_code
|
|
6
|
+
|
|
7
|
+
from ._reinforcement import Reinforcement
|
|
8
|
+
from ._reinforcementEC2_2004 import ReinforcementEC2_2004
|
|
9
|
+
from ._reinforcementEC2_2023 import ReinforcementEC2_2023
|
|
10
|
+
from ._reinforcementMC2010 import ReinforcementMC2010
|
|
11
|
+
|
|
12
|
+
__all__ = [
|
|
13
|
+
'create_reinforcement',
|
|
14
|
+
'Reinforcement',
|
|
15
|
+
'ReinforcementMC2010',
|
|
16
|
+
'ReinforcementEC2_2004',
|
|
17
|
+
'ReinforcementEC2_2023',
|
|
18
|
+
]
|
|
19
|
+
|
|
20
|
+
REINFORCEMENTS: t.Dict[str, Reinforcement] = {
|
|
21
|
+
'fib Model Code 2010': ReinforcementMC2010,
|
|
22
|
+
'EUROCODE 2 1992-1-1:2004': ReinforcementEC2_2004,
|
|
23
|
+
'EUROCODE 2 1992-1-1:2023': ReinforcementEC2_2023,
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
def create_reinforcement(
|
|
28
|
+
fyk: float,
|
|
29
|
+
Es: float,
|
|
30
|
+
ftk: float,
|
|
31
|
+
epsuk: float,
|
|
32
|
+
gamma_s: t.Optional[float] = None,
|
|
33
|
+
name: t.Optional[str] = None,
|
|
34
|
+
density: float = 7850,
|
|
35
|
+
design_code: t.Optional[str] = None,
|
|
36
|
+
) -> t.Optional[Reinforcement]:
|
|
37
|
+
"""A factory function to create the correct type of reinforcement based on
|
|
38
|
+
the desired design code.
|
|
39
|
+
|
|
40
|
+
Arguments:
|
|
41
|
+
fyk (float): Characteristic yield strength in MPa.
|
|
42
|
+
Es (float): The Young's modulus in MPa.
|
|
43
|
+
ftk (float): Characteristic ultimate strength in MPa.
|
|
44
|
+
epsuk (float): The characteristik strain at the ultimate stress level.
|
|
45
|
+
|
|
46
|
+
Keyword Arguments:
|
|
47
|
+
gamma_s (Optional(float)): The partial factor for reinforcement.
|
|
48
|
+
density (float): Density of the material in kg/m3 (default: 7850)
|
|
49
|
+
design_code (str): Optional string (default: None) indicating the
|
|
50
|
+
desired standard. If None (default) the globally used design
|
|
51
|
+
standard will be adopted. Otherwise the design standard specified
|
|
52
|
+
will be used for the instance of the material.
|
|
53
|
+
|
|
54
|
+
Raises:
|
|
55
|
+
ValueError: If the design code is not valid or does not cover
|
|
56
|
+
reinforcement as a material.
|
|
57
|
+
"""
|
|
58
|
+
# Get the code from the global variable
|
|
59
|
+
_code = _use_design_code(design_code)
|
|
60
|
+
|
|
61
|
+
# Check if the code is a proper code for reinforcement
|
|
62
|
+
code = None
|
|
63
|
+
if _code is not None and 'reinforcement' in _code.__materials__:
|
|
64
|
+
code = _code
|
|
65
|
+
if code is None:
|
|
66
|
+
raise ValueError(
|
|
67
|
+
'The design code is not set, either use '
|
|
68
|
+
'structuralcodes.code.set_designcode, or provide a valid '
|
|
69
|
+
'string in the function.'
|
|
70
|
+
)
|
|
71
|
+
|
|
72
|
+
# Create the proper reinforcement object
|
|
73
|
+
current_reinforcement = REINFORCEMENTS.get(code.__title__, None)
|
|
74
|
+
if current_reinforcement is not None:
|
|
75
|
+
return current_reinforcement(
|
|
76
|
+
fyk=fyk,
|
|
77
|
+
Es=Es,
|
|
78
|
+
name=name,
|
|
79
|
+
density=density,
|
|
80
|
+
ftk=ftk,
|
|
81
|
+
epsuk=epsuk,
|
|
82
|
+
gamma_s=gamma_s,
|
|
83
|
+
)
|
|
84
|
+
return None
|
|
@@ -0,0 +1,172 @@
|
|
|
1
|
+
"""Core implementation of the reinforcement material."""
|
|
2
|
+
|
|
3
|
+
import abc
|
|
4
|
+
import typing as t
|
|
5
|
+
|
|
6
|
+
from structuralcodes.core.base import ConstitutiveLaw, Material
|
|
7
|
+
from structuralcodes.materials.constitutive_laws import (
|
|
8
|
+
ElasticPlastic,
|
|
9
|
+
create_constitutive_law,
|
|
10
|
+
)
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
class Reinforcement(Material):
|
|
14
|
+
"""The abstract reinforcement material."""
|
|
15
|
+
|
|
16
|
+
_fyk: float
|
|
17
|
+
_Es: float
|
|
18
|
+
_ftk: float
|
|
19
|
+
_epsuk: float
|
|
20
|
+
_gamma_s: t.Optional[float] = None
|
|
21
|
+
|
|
22
|
+
def __init__(
|
|
23
|
+
self,
|
|
24
|
+
fyk: float,
|
|
25
|
+
Es: float,
|
|
26
|
+
density: float,
|
|
27
|
+
ftk: float,
|
|
28
|
+
epsuk: float,
|
|
29
|
+
gamma_s: t.Optional[float] = None,
|
|
30
|
+
name: t.Optional[str] = None,
|
|
31
|
+
) -> None:
|
|
32
|
+
"""Initializes an abstract reinforcement material."""
|
|
33
|
+
name = name if name is not None else 'Reinforcement'
|
|
34
|
+
super().__init__(density, name)
|
|
35
|
+
|
|
36
|
+
self._fyk = abs(fyk)
|
|
37
|
+
self._Es = abs(Es)
|
|
38
|
+
self._ftk = abs(ftk)
|
|
39
|
+
self._epsuk = abs(epsuk)
|
|
40
|
+
self._gamma_s = gamma_s
|
|
41
|
+
|
|
42
|
+
# Calculate the plastic hardening modulus
|
|
43
|
+
if self.epsuk - self.fyk / self.Es > 0.0 and self.ftk - self.fyk > 0:
|
|
44
|
+
Eh = (self.ftk - self.fyk) / (self.epsuk - self.fyk / self.Es)
|
|
45
|
+
else:
|
|
46
|
+
Eh = 0.0
|
|
47
|
+
self._constitutive_law = ElasticPlastic(
|
|
48
|
+
E=self.Es, fy=self.fyd(), Eh=Eh, eps_su=self.epsud()
|
|
49
|
+
)
|
|
50
|
+
|
|
51
|
+
@property
|
|
52
|
+
def fyk(self) -> float:
|
|
53
|
+
"""Returns fyk in MPa."""
|
|
54
|
+
return self._fyk
|
|
55
|
+
|
|
56
|
+
@fyk.setter
|
|
57
|
+
def fyk(self, fyk: float) -> None:
|
|
58
|
+
"""Setter for fyk (in MPa)."""
|
|
59
|
+
self._fyk = abs(fyk)
|
|
60
|
+
|
|
61
|
+
@property
|
|
62
|
+
def Es(self) -> float:
|
|
63
|
+
"""Returns Es in MPa."""
|
|
64
|
+
return self._Es
|
|
65
|
+
|
|
66
|
+
@Es.setter
|
|
67
|
+
def Es(self, Es: float) -> None:
|
|
68
|
+
"""Setter for Es (in MPa)."""
|
|
69
|
+
self._Es = abs(Es)
|
|
70
|
+
|
|
71
|
+
@property
|
|
72
|
+
def ftk(self) -> float:
|
|
73
|
+
"""Returns ftk in MPa."""
|
|
74
|
+
return self._ftk
|
|
75
|
+
|
|
76
|
+
@ftk.setter
|
|
77
|
+
def ftk(self, ftk: float) -> None:
|
|
78
|
+
"""Setter for ftk (in MPa)."""
|
|
79
|
+
self._ftk = abs(ftk)
|
|
80
|
+
|
|
81
|
+
@property
|
|
82
|
+
def epsuk(self) -> float:
|
|
83
|
+
"""Returns epsuk."""
|
|
84
|
+
return self._epsuk
|
|
85
|
+
|
|
86
|
+
@epsuk.setter
|
|
87
|
+
def epsuk(self, epsuk: float) -> None:
|
|
88
|
+
"""Setter for epsuk."""
|
|
89
|
+
self._epsuk = abs(epsuk)
|
|
90
|
+
|
|
91
|
+
@property
|
|
92
|
+
def epsyk(self) -> float:
|
|
93
|
+
"""Returns characteristic yield strain epsyk."""
|
|
94
|
+
return self.fyk / self.Es
|
|
95
|
+
|
|
96
|
+
@property
|
|
97
|
+
def constitutive_law(self) -> ConstitutiveLaw:
|
|
98
|
+
"""Returns the constitutive law object."""
|
|
99
|
+
return self._constitutive_law
|
|
100
|
+
|
|
101
|
+
@constitutive_law.setter
|
|
102
|
+
def constitutive_law(
|
|
103
|
+
self,
|
|
104
|
+
constitutive_law: t.Union[
|
|
105
|
+
ConstitutiveLaw,
|
|
106
|
+
t.Literal[
|
|
107
|
+
'elastic',
|
|
108
|
+
'elasticperfecltyplastic',
|
|
109
|
+
'elasticplastic',
|
|
110
|
+
],
|
|
111
|
+
],
|
|
112
|
+
) -> None:
|
|
113
|
+
"""Setter for constitutive law.
|
|
114
|
+
|
|
115
|
+
Arguments:
|
|
116
|
+
consitutive_law (ConstitutiveLaw | str): a valid ConstitutiveLaw
|
|
117
|
+
object for reinforcement or a string defining a valid
|
|
118
|
+
constitutive law type for reinforcement. (valid options:
|
|
119
|
+
'elastic', 'elasticperfectlyplastic', 'elasticplastic').
|
|
120
|
+
"""
|
|
121
|
+
if constitutive_law is None:
|
|
122
|
+
raise ValueError(
|
|
123
|
+
'At least a constitutive law or a string defining the '
|
|
124
|
+
'constitutive law must be provided.'
|
|
125
|
+
)
|
|
126
|
+
if isinstance(constitutive_law, str):
|
|
127
|
+
constitutive_law = create_constitutive_law(
|
|
128
|
+
constitutive_law_name=constitutive_law, material=self
|
|
129
|
+
)
|
|
130
|
+
|
|
131
|
+
if isinstance(constitutive_law, ConstitutiveLaw):
|
|
132
|
+
if 'rebars' in constitutive_law.__materials__:
|
|
133
|
+
self._constitutive_law = constitutive_law
|
|
134
|
+
else:
|
|
135
|
+
raise ValueError(
|
|
136
|
+
'The constitutive law selected is not suitable '
|
|
137
|
+
'for being used with a Reinforcement material.'
|
|
138
|
+
)
|
|
139
|
+
else:
|
|
140
|
+
raise ValueError(
|
|
141
|
+
f'The constitutive law {constitutive_law} could not be created'
|
|
142
|
+
)
|
|
143
|
+
|
|
144
|
+
@property
|
|
145
|
+
@abc.abstractmethod
|
|
146
|
+
def gamma_s(self) -> float:
|
|
147
|
+
"""Each reinforcement should implement its own getter for the partial
|
|
148
|
+
factor in order to interact with the globally set national annex.
|
|
149
|
+
"""
|
|
150
|
+
|
|
151
|
+
@abc.abstractmethod
|
|
152
|
+
def fyd(self) -> float:
|
|
153
|
+
"""Each reinforcement should implement its own method for calculating
|
|
154
|
+
the design yield strength.
|
|
155
|
+
"""
|
|
156
|
+
|
|
157
|
+
@abc.abstractmethod
|
|
158
|
+
def ftd(self) -> float:
|
|
159
|
+
"""Each reinforcement should implement its own method for calculating
|
|
160
|
+
the design ultimate strength.
|
|
161
|
+
"""
|
|
162
|
+
|
|
163
|
+
@abc.abstractmethod
|
|
164
|
+
def epsud(self) -> float:
|
|
165
|
+
"""Each reinforcement should implement its own method for calculating
|
|
166
|
+
the design ultimate strain.
|
|
167
|
+
"""
|
|
168
|
+
|
|
169
|
+
@property
|
|
170
|
+
def epsyd(self) -> float:
|
|
171
|
+
"""Return the design yield strain."""
|
|
172
|
+
return self.fyd() / self.Es
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
"""The concrete class for Eurocode 2 2004 Reinforcement Material."""
|
|
2
|
+
|
|
3
|
+
import typing as t
|
|
4
|
+
|
|
5
|
+
from structuralcodes.codes import ec2_2004
|
|
6
|
+
|
|
7
|
+
from ._reinforcement import Reinforcement
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
class ReinforcementEC2_2004(Reinforcement): # noqa: N801
|
|
11
|
+
"""Reinforcement implementation for EC2 2004."""
|
|
12
|
+
|
|
13
|
+
def __init__(
|
|
14
|
+
self,
|
|
15
|
+
fyk: float,
|
|
16
|
+
Es: float,
|
|
17
|
+
ftk: float,
|
|
18
|
+
epsuk: float,
|
|
19
|
+
gamma_s: t.Optional[float] = None,
|
|
20
|
+
gamma_eps: t.Optional[float] = None,
|
|
21
|
+
name: t.Optional[str] = None,
|
|
22
|
+
density: float = 7850.0,
|
|
23
|
+
):
|
|
24
|
+
"""Initializes a new instance of Reinforcement for EC2 2004.
|
|
25
|
+
|
|
26
|
+
Arguments:
|
|
27
|
+
fyk (float): Characteristic yield strength in MPa.
|
|
28
|
+
Es (float): The Young's modulus in MPa.
|
|
29
|
+
ftk (float): Characteristic ultimate strength in MPa.
|
|
30
|
+
epsuk (float): The characteristik strain at the ultimate stress
|
|
31
|
+
level.
|
|
32
|
+
gamma_s (Optional(float)): The partial factor for reinforcement.
|
|
33
|
+
Default value is 1.15.
|
|
34
|
+
|
|
35
|
+
Keyword Arguments:
|
|
36
|
+
name (str): A descriptive name for the reinforcement.
|
|
37
|
+
density (float): Density of material in kg/m3 (default: 7850).
|
|
38
|
+
"""
|
|
39
|
+
if name is None:
|
|
40
|
+
name = f'Reinforcement{round(fyk):d}'
|
|
41
|
+
|
|
42
|
+
self._gamma_eps = gamma_eps
|
|
43
|
+
super().__init__(
|
|
44
|
+
fyk=fyk,
|
|
45
|
+
Es=Es,
|
|
46
|
+
name=name,
|
|
47
|
+
density=density,
|
|
48
|
+
ftk=ftk,
|
|
49
|
+
epsuk=epsuk,
|
|
50
|
+
gamma_s=gamma_s,
|
|
51
|
+
)
|
|
52
|
+
|
|
53
|
+
def fyd(self) -> float:
|
|
54
|
+
"""The design yield strength."""
|
|
55
|
+
return ec2_2004.fyd(self.fyk, self.gamma_s)
|
|
56
|
+
|
|
57
|
+
@property
|
|
58
|
+
def gamma_s(self) -> float:
|
|
59
|
+
"""The partial factor for reinforcement."""
|
|
60
|
+
# Here we should implement the interaction with the globally set
|
|
61
|
+
# national annex. For now, we simply return the default value.
|
|
62
|
+
return self._gamma_s or 1.15
|
|
63
|
+
|
|
64
|
+
def ftd(self) -> float:
|
|
65
|
+
"""The design ultimate strength."""
|
|
66
|
+
return ec2_2004.fyd(self.ftk, self.gamma_s)
|
|
67
|
+
|
|
68
|
+
def epsud(self) -> float:
|
|
69
|
+
"""The design ultimate strain."""
|
|
70
|
+
return ec2_2004.epsud(self.epsuk, self.gamma_eps)
|
|
71
|
+
|
|
72
|
+
@property
|
|
73
|
+
def gamma_eps(self) -> float:
|
|
74
|
+
"""The partial factor for ultimate strain."""
|
|
75
|
+
# Here we should implement the interaction with the globally set
|
|
76
|
+
# national annex. For now, we simply return the default value.
|
|
77
|
+
return self._gamma_eps or 0.9
|
|
78
|
+
|
|
79
|
+
def __elastic__(self) -> dict:
|
|
80
|
+
"""Returns kwargs for creating an elastic constitutive law."""
|
|
81
|
+
return {'E': self.Es}
|
|
82
|
+
|
|
83
|
+
def __elasticperfectlyplastic__(self) -> dict:
|
|
84
|
+
"""Returns kwargs for ElasticPlastic constitutive law with no strain
|
|
85
|
+
hardening.
|
|
86
|
+
"""
|
|
87
|
+
return {
|
|
88
|
+
'E': self.Es,
|
|
89
|
+
'fy': self.fyd(),
|
|
90
|
+
'eps_su': self.epsud(),
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
def __elasticplastic__(self) -> dict:
|
|
94
|
+
"""Returns kwargs for ElasticPlastic constitutive law with strain
|
|
95
|
+
hardening.
|
|
96
|
+
"""
|
|
97
|
+
Eh = (self.ftd() - self.fyd()) / (self.epsuk - self.epsyd)
|
|
98
|
+
return {
|
|
99
|
+
'E': self.Es,
|
|
100
|
+
'fy': self.fyd(),
|
|
101
|
+
'Eh': Eh,
|
|
102
|
+
'eps_su': self.epsud(),
|
|
103
|
+
}
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
"""The concrete class for Eurocode 2 2023 Reinforcement Material."""
|
|
2
|
+
|
|
3
|
+
import typing as t
|
|
4
|
+
|
|
5
|
+
from structuralcodes.codes import ec2_2023
|
|
6
|
+
|
|
7
|
+
from ._reinforcement import Reinforcement
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
class ReinforcementEC2_2023(Reinforcement): # noqa: N801
|
|
11
|
+
"""Reinforcement implementation for EC2 2023."""
|
|
12
|
+
|
|
13
|
+
def __init__(
|
|
14
|
+
self,
|
|
15
|
+
fyk: float,
|
|
16
|
+
Es: float,
|
|
17
|
+
ftk: float,
|
|
18
|
+
epsuk: float,
|
|
19
|
+
gamma_s: t.Optional[float] = None,
|
|
20
|
+
name: t.Optional[str] = None,
|
|
21
|
+
density: float = 7850.0,
|
|
22
|
+
):
|
|
23
|
+
"""Initializes a new instance of Reinforcement for EC2 2023.
|
|
24
|
+
|
|
25
|
+
Args:
|
|
26
|
+
fyk (float): Characteristic yield strength in MPa.
|
|
27
|
+
Es (float): The Young's modulus in MPa.
|
|
28
|
+
ftk (float): Characteristic ultimate strength in MPa.
|
|
29
|
+
epsuk (float): The characteristik strain at the ultimate stress
|
|
30
|
+
level.
|
|
31
|
+
gamma_s (Optional(float)): The partial factor for reinforcement.
|
|
32
|
+
Default value is 1.15.
|
|
33
|
+
|
|
34
|
+
Keyword Args:
|
|
35
|
+
name (str): A descriptive name for the reinforcement.
|
|
36
|
+
density (float): Density of material in kg/m3 (default: 7850).
|
|
37
|
+
"""
|
|
38
|
+
if name is None:
|
|
39
|
+
name = f'Reinforcement{round(fyk):d}'
|
|
40
|
+
super().__init__(
|
|
41
|
+
fyk=fyk,
|
|
42
|
+
Es=Es,
|
|
43
|
+
name=name,
|
|
44
|
+
density=density,
|
|
45
|
+
ftk=ftk,
|
|
46
|
+
epsuk=epsuk,
|
|
47
|
+
gamma_s=gamma_s,
|
|
48
|
+
)
|
|
49
|
+
|
|
50
|
+
def fyd(self) -> float:
|
|
51
|
+
"""The design yield strength."""
|
|
52
|
+
return ec2_2023.fyd(self.fyk, self.gamma_s)
|
|
53
|
+
|
|
54
|
+
def ftd(self) -> float:
|
|
55
|
+
"""The design ultimate strength."""
|
|
56
|
+
return ec2_2023.fyd(self.ftk, self.gamma_s)
|
|
57
|
+
|
|
58
|
+
def epsud(self) -> float:
|
|
59
|
+
"""The design ultimate strain."""
|
|
60
|
+
return ec2_2023.eps_ud(self.epsuk, self.gamma_s)
|
|
61
|
+
|
|
62
|
+
@property
|
|
63
|
+
def gamma_s(self) -> float:
|
|
64
|
+
"""The partial factor for reinforcement."""
|
|
65
|
+
# Here we should implement the interaction with the globally set
|
|
66
|
+
# national annex. For now, we simply return the default value.
|
|
67
|
+
return self._gamma_s or 1.15
|
|
68
|
+
|
|
69
|
+
def __elastic__(self) -> dict:
|
|
70
|
+
"""Returns kwargs for creating an elastic constitutive law."""
|
|
71
|
+
return {'E': self.Es}
|
|
72
|
+
|
|
73
|
+
def __elasticperfectlyplastic__(self) -> dict:
|
|
74
|
+
"""Returns kwargs for ElasticPlastic constitutive law with no strain
|
|
75
|
+
hardening.
|
|
76
|
+
"""
|
|
77
|
+
return {
|
|
78
|
+
'E': self.Es,
|
|
79
|
+
'fy': self.fyd(),
|
|
80
|
+
'eps_su': self.epsud(),
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
def __elasticplastic__(self) -> dict:
|
|
84
|
+
"""Returns kwargs for ElasticPlastic constitutive law with strain
|
|
85
|
+
hardening.
|
|
86
|
+
"""
|
|
87
|
+
Eh = (self.ftd() - self.fyd()) / (self.epsuk - self.epsyd)
|
|
88
|
+
return {
|
|
89
|
+
'E': self.Es,
|
|
90
|
+
'fy': self.fyd(),
|
|
91
|
+
'Eh': Eh,
|
|
92
|
+
'eps_su': self.epsud(),
|
|
93
|
+
}
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
"""The concrete class for Model Code 2010 Reinforcement Material."""
|
|
2
|
+
|
|
3
|
+
import typing as t
|
|
4
|
+
|
|
5
|
+
from structuralcodes.codes import mc2010
|
|
6
|
+
|
|
7
|
+
from ._reinforcement import Reinforcement
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
class ReinforcementMC2010(Reinforcement):
|
|
11
|
+
"""Reinforcement implementation for MC 2010."""
|
|
12
|
+
|
|
13
|
+
def __init__(
|
|
14
|
+
self,
|
|
15
|
+
fyk: float,
|
|
16
|
+
Es: float,
|
|
17
|
+
ftk: float,
|
|
18
|
+
epsuk: float,
|
|
19
|
+
gamma_s: t.Optional[float] = None,
|
|
20
|
+
gamma_eps: t.Optional[float] = None,
|
|
21
|
+
name: t.Optional[str] = None,
|
|
22
|
+
density: float = 7850.0,
|
|
23
|
+
):
|
|
24
|
+
"""Initializes a new instance of Reinforcement for MC2010.
|
|
25
|
+
|
|
26
|
+
Args:
|
|
27
|
+
fyk (float): Characteristic yield strength in MPa.
|
|
28
|
+
Es (float): The Young's modulus in MPa.
|
|
29
|
+
ftk (float): Characteristic ultimate strength in MPa.
|
|
30
|
+
epsuk (float): The characteristik strain at the ultimate stress
|
|
31
|
+
level.
|
|
32
|
+
gamma_s (Optional(float)): The partial factor for reinforcement.
|
|
33
|
+
Default value is 1.15.
|
|
34
|
+
|
|
35
|
+
Keyword Args:
|
|
36
|
+
name (str): A descriptive name for the reinforcement.
|
|
37
|
+
density (float): Density of material in kg/m3 (default: 7850).
|
|
38
|
+
"""
|
|
39
|
+
if name is None:
|
|
40
|
+
name = f'Reinforcement{round(fyk):d}'
|
|
41
|
+
self._gamma_eps = gamma_eps
|
|
42
|
+
super().__init__(
|
|
43
|
+
fyk=fyk,
|
|
44
|
+
Es=Es,
|
|
45
|
+
name=name,
|
|
46
|
+
density=density,
|
|
47
|
+
ftk=ftk,
|
|
48
|
+
epsuk=epsuk,
|
|
49
|
+
gamma_s=gamma_s,
|
|
50
|
+
)
|
|
51
|
+
|
|
52
|
+
def fyd(self) -> float:
|
|
53
|
+
"""The design yield strength."""
|
|
54
|
+
return mc2010.fyd(self.fyk, self.gamma_s)
|
|
55
|
+
|
|
56
|
+
@property
|
|
57
|
+
def gamma_s(self) -> float:
|
|
58
|
+
"""The partial factor for reinforcement."""
|
|
59
|
+
return self._gamma_s or 1.15
|
|
60
|
+
|
|
61
|
+
def ftd(self) -> float:
|
|
62
|
+
"""The design ultimate strength."""
|
|
63
|
+
return mc2010.fyd(self.ftk, self.gamma_s)
|
|
64
|
+
|
|
65
|
+
def epsud(self) -> float:
|
|
66
|
+
"""The design ultimate strain."""
|
|
67
|
+
return mc2010.epsud(self.epsuk, self.gamma_eps)
|
|
68
|
+
|
|
69
|
+
@property
|
|
70
|
+
def gamma_eps(self) -> float:
|
|
71
|
+
"""The partial factor for ultimate strain."""
|
|
72
|
+
return self._gamma_eps or 0.9
|
|
73
|
+
|
|
74
|
+
def __elastic__(self) -> dict:
|
|
75
|
+
"""Returns kwargs for creating an elastic constitutive law."""
|
|
76
|
+
return {'E': self.Es}
|
|
77
|
+
|
|
78
|
+
def __elasticperfectlyplastic__(self) -> dict:
|
|
79
|
+
"""Returns kwargs for ElasticPlastic constitutive law with no strain
|
|
80
|
+
hardening.
|
|
81
|
+
"""
|
|
82
|
+
return {
|
|
83
|
+
'E': self.Es,
|
|
84
|
+
'fy': self.fyd(),
|
|
85
|
+
'eps_su': self.epsud(),
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
def __elasticplastic__(self) -> dict:
|
|
89
|
+
"""Returns kwargs for ElasticPlastic constitutive law with strain
|
|
90
|
+
hardening.
|
|
91
|
+
"""
|
|
92
|
+
Eh = (self.ftd() - self.fyd()) / (self.epsuk - self.epsyd)
|
|
93
|
+
return {
|
|
94
|
+
'E': self.Es,
|
|
95
|
+
'fy': self.fyd(),
|
|
96
|
+
'Eh': Eh,
|
|
97
|
+
'eps_su': self.epsud(),
|
|
98
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
"""Main entry point for sections."""
|
|
2
|
+
|
|
3
|
+
from ._generic import GenericSection, GenericSectionCalculator
|
|
4
|
+
from ._reinforcement import add_reinforcement, add_reinforcement_line
|
|
5
|
+
from .section_integrators import (
|
|
6
|
+
FiberIntegrator,
|
|
7
|
+
MarinIntegrator,
|
|
8
|
+
SectionIntegrator,
|
|
9
|
+
integrator_factory,
|
|
10
|
+
marin_integration,
|
|
11
|
+
)
|
|
12
|
+
|
|
13
|
+
__all__ = [
|
|
14
|
+
'GenericSection',
|
|
15
|
+
'GenericSectionCalculator',
|
|
16
|
+
'add_reinforcement',
|
|
17
|
+
'add_reinforcement_line',
|
|
18
|
+
'SectionIntegrator',
|
|
19
|
+
'FiberIntegrator',
|
|
20
|
+
'MarinIntegrator',
|
|
21
|
+
'integrator_factory',
|
|
22
|
+
'marin_integration',
|
|
23
|
+
]
|