structuralcodes 0.1.0__tar.gz → 0.2.0__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.2.0}/PKG-INFO +1 -1
- {structuralcodes-0.1.0 → structuralcodes-0.2.0}/structuralcodes/__init__.py +1 -1
- {structuralcodes-0.1.0 → structuralcodes-0.2.0}/structuralcodes/codes/ec2_2004/__init__.py +43 -11
- structuralcodes-0.2.0/structuralcodes/codes/ec2_2004/_concrete_creep_and_shrinkage.py +529 -0
- {structuralcodes-0.1.0 → structuralcodes-0.2.0}/structuralcodes/codes/ec2_2004/shear.py +5 -1
- {structuralcodes-0.1.0 → structuralcodes-0.2.0}/structuralcodes/codes/mc2010/_concrete_creep_and_shrinkage.py +3 -1
- {structuralcodes-0.1.0 → structuralcodes-0.2.0}/structuralcodes/core/base.py +16 -4
- {structuralcodes-0.1.0 → structuralcodes-0.2.0}/structuralcodes/geometry/_geometry.py +4 -2
- {structuralcodes-0.1.0 → structuralcodes-0.2.0}/structuralcodes/geometry/_reinforcement.py +14 -2
- structuralcodes-0.2.0/structuralcodes/materials/constitutive_laws/__init__.py +84 -0
- structuralcodes-0.2.0/structuralcodes/materials/constitutive_laws/_bilinearcompression.py +138 -0
- structuralcodes-0.2.0/structuralcodes/materials/constitutive_laws/_elastic.py +114 -0
- structuralcodes-0.2.0/structuralcodes/materials/constitutive_laws/_elasticplastic.py +172 -0
- structuralcodes-0.2.0/structuralcodes/materials/constitutive_laws/_parabolarectangle.py +198 -0
- structuralcodes-0.2.0/structuralcodes/materials/constitutive_laws/_popovics.py +133 -0
- structuralcodes-0.2.0/structuralcodes/materials/constitutive_laws/_sargin.py +115 -0
- structuralcodes-0.2.0/structuralcodes/materials/constitutive_laws/_userdefined.py +218 -0
- {structuralcodes-0.1.0 → structuralcodes-0.2.0}/structuralcodes/sections/_generic.py +39 -9
- {structuralcodes-0.1.0 → structuralcodes-0.2.0}/structuralcodes/sections/section_integrators/_fiber_integrator.py +1 -3
- {structuralcodes-0.1.0 → structuralcodes-0.2.0}/structuralcodes/sections/section_integrators/_marin_integrator.py +1 -1
- structuralcodes-0.1.0/structuralcodes/codes/ec2_2004/annex_b_shrink_and_creep.py +0 -257
- structuralcodes-0.1.0/structuralcodes/materials/constitutive_laws.py +0 -981
- {structuralcodes-0.1.0 → structuralcodes-0.2.0}/README.md +0 -0
- {structuralcodes-0.1.0 → structuralcodes-0.2.0}/pyproject.toml +0 -0
- {structuralcodes-0.1.0 → structuralcodes-0.2.0}/structuralcodes/codes/__init__.py +0 -0
- {structuralcodes-0.1.0 → structuralcodes-0.2.0}/structuralcodes/codes/ec2_2004/_concrete_material_properties.py +0 -0
- {structuralcodes-0.1.0 → structuralcodes-0.2.0}/structuralcodes/codes/ec2_2004/_reinforcement_material_properties.py +0 -0
- {structuralcodes-0.1.0 → structuralcodes-0.2.0}/structuralcodes/codes/ec2_2004/_section_7_3_crack_control.py +0 -0
- {structuralcodes-0.1.0 → structuralcodes-0.2.0}/structuralcodes/codes/ec2_2023/__init__.py +0 -0
- {structuralcodes-0.1.0 → structuralcodes-0.2.0}/structuralcodes/codes/ec2_2023/_annexB_time_dependent.py +0 -0
- {structuralcodes-0.1.0 → structuralcodes-0.2.0}/structuralcodes/codes/ec2_2023/_section5_materials.py +0 -0
- {structuralcodes-0.1.0 → structuralcodes-0.2.0}/structuralcodes/codes/ec2_2023/_section9_sls.py +0 -0
- {structuralcodes-0.1.0 → structuralcodes-0.2.0}/structuralcodes/codes/mc2010/__init__.py +0 -0
- {structuralcodes-0.1.0 → structuralcodes-0.2.0}/structuralcodes/codes/mc2010/_concrete_interface_different_casting_times.py +0 -0
- {structuralcodes-0.1.0 → structuralcodes-0.2.0}/structuralcodes/codes/mc2010/_concrete_material_properties.py +0 -0
- {structuralcodes-0.1.0 → structuralcodes-0.2.0}/structuralcodes/codes/mc2010/_concrete_punching.py +0 -0
- {structuralcodes-0.1.0 → structuralcodes-0.2.0}/structuralcodes/codes/mc2010/_concrete_shear.py +0 -0
- {structuralcodes-0.1.0 → structuralcodes-0.2.0}/structuralcodes/codes/mc2010/_concrete_torsion.py +0 -0
- {structuralcodes-0.1.0 → structuralcodes-0.2.0}/structuralcodes/codes/mc2010/_reinforcement_material_properties.py +0 -0
- {structuralcodes-0.1.0 → structuralcodes-0.2.0}/structuralcodes/codes/mc2020/__init__.py +0 -0
- {structuralcodes-0.1.0 → structuralcodes-0.2.0}/structuralcodes/core/__init__.py +0 -0
- {structuralcodes-0.1.0 → structuralcodes-0.2.0}/structuralcodes/core/_section_results.py +0 -0
- {structuralcodes-0.1.0 → structuralcodes-0.2.0}/structuralcodes/geometry/__init__.py +0 -0
- {structuralcodes-0.1.0 → structuralcodes-0.2.0}/structuralcodes/geometry/_steel_sections.py +0 -0
- {structuralcodes-0.1.0 → structuralcodes-0.2.0}/structuralcodes/materials/__init__.py +0 -0
- {structuralcodes-0.1.0 → structuralcodes-0.2.0}/structuralcodes/materials/concrete/__init__.py +0 -0
- {structuralcodes-0.1.0 → structuralcodes-0.2.0}/structuralcodes/materials/concrete/_concrete.py +0 -0
- {structuralcodes-0.1.0 → structuralcodes-0.2.0}/structuralcodes/materials/concrete/_concreteEC2_2004.py +0 -0
- {structuralcodes-0.1.0 → structuralcodes-0.2.0}/structuralcodes/materials/concrete/_concreteEC2_2023.py +0 -0
- {structuralcodes-0.1.0 → structuralcodes-0.2.0}/structuralcodes/materials/concrete/_concreteMC2010.py +0 -0
- {structuralcodes-0.1.0 → structuralcodes-0.2.0}/structuralcodes/materials/reinforcement/__init__.py +0 -0
- {structuralcodes-0.1.0 → structuralcodes-0.2.0}/structuralcodes/materials/reinforcement/_reinforcement.py +0 -0
- {structuralcodes-0.1.0 → structuralcodes-0.2.0}/structuralcodes/materials/reinforcement/_reinforcementEC2_2004.py +0 -0
- {structuralcodes-0.1.0 → structuralcodes-0.2.0}/structuralcodes/materials/reinforcement/_reinforcementEC2_2023.py +0 -0
- {structuralcodes-0.1.0 → structuralcodes-0.2.0}/structuralcodes/materials/reinforcement/_reinforcementMC2010.py +0 -0
- {structuralcodes-0.1.0 → structuralcodes-0.2.0}/structuralcodes/sections/__init__.py +0 -0
- {structuralcodes-0.1.0 → structuralcodes-0.2.0}/structuralcodes/sections/section_integrators/__init__.py +0 -0
- {structuralcodes-0.1.0 → structuralcodes-0.2.0}/structuralcodes/sections/section_integrators/_factory.py +0 -0
- {structuralcodes-0.1.0 → structuralcodes-0.2.0}/structuralcodes/sections/section_integrators/_marin_integration.py +0 -0
- {structuralcodes-0.1.0 → structuralcodes-0.2.0}/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.
|
|
3
|
+
Version: 0.2.0
|
|
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
|
|
@@ -2,6 +2,33 @@
|
|
|
2
2
|
|
|
3
3
|
import typing as t
|
|
4
4
|
|
|
5
|
+
from ._concrete_creep_and_shrinkage import (
|
|
6
|
+
alpha_1,
|
|
7
|
+
alpha_2,
|
|
8
|
+
alpha_3,
|
|
9
|
+
alpha_cement,
|
|
10
|
+
alpha_ds1,
|
|
11
|
+
alpha_ds2,
|
|
12
|
+
beta_as,
|
|
13
|
+
beta_c,
|
|
14
|
+
beta_ds,
|
|
15
|
+
beta_fcm,
|
|
16
|
+
beta_H,
|
|
17
|
+
beta_RH,
|
|
18
|
+
beta_t0,
|
|
19
|
+
eps_ca,
|
|
20
|
+
eps_ca_inf,
|
|
21
|
+
eps_cd,
|
|
22
|
+
eps_cd_0,
|
|
23
|
+
eps_cs,
|
|
24
|
+
h_0,
|
|
25
|
+
k_h,
|
|
26
|
+
phi,
|
|
27
|
+
phi_0,
|
|
28
|
+
phi_RH,
|
|
29
|
+
t0_adj,
|
|
30
|
+
t_T,
|
|
31
|
+
)
|
|
5
32
|
from ._concrete_material_properties import (
|
|
6
33
|
Ecm,
|
|
7
34
|
eps_c1,
|
|
@@ -49,17 +76,6 @@ from ._section_7_3_crack_control import (
|
|
|
49
76
|
wk,
|
|
50
77
|
xi1,
|
|
51
78
|
)
|
|
52
|
-
from .annex_b_shrink_and_creep import (
|
|
53
|
-
beta_c,
|
|
54
|
-
beta_fcm,
|
|
55
|
-
beta_H,
|
|
56
|
-
beta_RH,
|
|
57
|
-
eps_cd_0,
|
|
58
|
-
eps_cs,
|
|
59
|
-
phi,
|
|
60
|
-
phi_RH,
|
|
61
|
-
t0_adj,
|
|
62
|
-
)
|
|
63
79
|
from .shear import (
|
|
64
80
|
Asw_max,
|
|
65
81
|
VEdmax_unreinf,
|
|
@@ -117,15 +133,31 @@ __all__ = [
|
|
|
117
133
|
'VRdc_prin_stress',
|
|
118
134
|
'VRdmax',
|
|
119
135
|
'VRds',
|
|
136
|
+
'alpha_1',
|
|
137
|
+
'alpha_2',
|
|
138
|
+
'alpha_3',
|
|
139
|
+
'alpha_cement',
|
|
140
|
+
'alpha_ds1',
|
|
141
|
+
'alpha_ds2',
|
|
142
|
+
'beta_as',
|
|
120
143
|
'beta_c',
|
|
144
|
+
'beta_ds',
|
|
121
145
|
'beta_fcm',
|
|
122
146
|
'beta_H',
|
|
123
147
|
'beta_RH',
|
|
148
|
+
'beta_t0',
|
|
149
|
+
'eps_ca',
|
|
150
|
+
'eps_ca_inf',
|
|
151
|
+
'eps_cd',
|
|
124
152
|
'eps_cd_0',
|
|
125
153
|
'eps_cs',
|
|
154
|
+
'h_0',
|
|
155
|
+
'k_h',
|
|
126
156
|
'phi',
|
|
157
|
+
'phi_0',
|
|
127
158
|
'phi_RH',
|
|
128
159
|
't0_adj',
|
|
160
|
+
't_T',
|
|
129
161
|
]
|
|
130
162
|
|
|
131
163
|
__title__: str = 'EUROCODE 2 1992-1-1:2004'
|
|
@@ -0,0 +1,529 @@
|
|
|
1
|
+
"""Collection of functions from EUROCODE 1992-1-1:2004 related to creep and
|
|
2
|
+
shrinkage.
|
|
3
|
+
"""
|
|
4
|
+
|
|
5
|
+
from __future__ import annotations # To have clean hints of ArrayLike in docs
|
|
6
|
+
|
|
7
|
+
import typing as t
|
|
8
|
+
|
|
9
|
+
import numpy as np
|
|
10
|
+
import numpy.typing as npt
|
|
11
|
+
|
|
12
|
+
ALPHA_CEMENT_DICT = {'R': 1.0, 'N': 0.0, 'S': -1.0} # As defined in Eq. (B.9)
|
|
13
|
+
ALPHA_DS_DICT = {
|
|
14
|
+
'R': {'alpha_ds1': 6, 'alpha_ds2': 0.11},
|
|
15
|
+
'N': {'alpha_ds1': 4, 'alpha_ds2': 0.12},
|
|
16
|
+
'S': {'alpha_ds1': 3, 'alpha_ds2': 0.13},
|
|
17
|
+
} # As defined in Eq. (B.11)
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
def eps_cs(eps_cd: npt.ArrayLike, eps_ca: npt.ArrayLike) -> npt.ArrayLike:
|
|
21
|
+
"""Calculate the total shrinkage strain.
|
|
22
|
+
|
|
23
|
+
EN 1992-1-1:2004, Eq. (3.8).
|
|
24
|
+
|
|
25
|
+
Args:
|
|
26
|
+
eps_cd (npt.ArrayLike): The drying shrinkage defined in Eq. (3.9).
|
|
27
|
+
eps_ca (npt.ArrayLike): The autogenous shrinkage defined in Eq. (3.11).
|
|
28
|
+
|
|
29
|
+
Returns:
|
|
30
|
+
npt.ArrayLike: The total shrinkage strain.
|
|
31
|
+
|
|
32
|
+
Note:
|
|
33
|
+
In EC2 (2004), the shrinkage strain is calculated as a positive number.
|
|
34
|
+
"""
|
|
35
|
+
eps_cd = eps_cd if np.isscalar(eps_cd) else np.atleast_1d(eps_cd)
|
|
36
|
+
eps_ca = eps_ca if np.isscalar(eps_ca) else np.atleast_1d(eps_ca)
|
|
37
|
+
return eps_cd + eps_ca
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
def eps_cd(
|
|
41
|
+
beta_ds: npt.ArrayLike, k_h: float, eps_cd_0: float
|
|
42
|
+
) -> npt.ArrayLike:
|
|
43
|
+
"""Calculate the drying shrinkage.
|
|
44
|
+
|
|
45
|
+
EN 1992-1-1:2004, Eq. (3.9).
|
|
46
|
+
|
|
47
|
+
Args:
|
|
48
|
+
beta_ds (npt.ArrayLike): A coefficient taking into account the time of
|
|
49
|
+
drying defined in Eq. (3.10).
|
|
50
|
+
k_h (float): A coefficient depending on the effective thickness of the
|
|
51
|
+
section defined in Tab. 3.3.
|
|
52
|
+
eps_cd_0 (float): The nominal value of drying shrinkage defined in Eq.
|
|
53
|
+
(B.11).
|
|
54
|
+
|
|
55
|
+
Returns:
|
|
56
|
+
npt.ArrayLike: The drying shrinkage.
|
|
57
|
+
|
|
58
|
+
Note:
|
|
59
|
+
In EC2 (2004), the shrinkage strain is calculated as a positive number.
|
|
60
|
+
"""
|
|
61
|
+
beta_ds = beta_ds if np.isscalar(beta_ds) else np.atleast_1d(beta_ds)
|
|
62
|
+
return beta_ds * k_h * eps_cd_0
|
|
63
|
+
|
|
64
|
+
|
|
65
|
+
def beta_ds(t: npt.ArrayLike, t_s: float, h_0: float):
|
|
66
|
+
"""Calculate the coefficient taking into account the time of drying.
|
|
67
|
+
|
|
68
|
+
EN 1992-1-1:2004, Eq. (3.10).
|
|
69
|
+
|
|
70
|
+
Args:
|
|
71
|
+
t (npt.ArrayLike): The age of the concrete in days.
|
|
72
|
+
t_s (float): The age of the concrete in days at the start of drying
|
|
73
|
+
(normally this is the point in time when curing measures end).
|
|
74
|
+
h_0 (float): The effective cross section thichkness in mm.
|
|
75
|
+
|
|
76
|
+
Returns:
|
|
77
|
+
npt.ArrayLike: The coefficient taking into account the time of drying.
|
|
78
|
+
"""
|
|
79
|
+
t = t if np.isscalar(t) else np.atleast_1d(t)
|
|
80
|
+
t_drying = t - t_s
|
|
81
|
+
if np.isscalar(t_drying):
|
|
82
|
+
t_drying = max(t_drying, 0.0)
|
|
83
|
+
else:
|
|
84
|
+
t_drying[t_drying < 0.0] = 0.0
|
|
85
|
+
return t_drying / (t_drying + 0.04 * h_0 ** (3 / 2))
|
|
86
|
+
|
|
87
|
+
|
|
88
|
+
def k_h(h_0: float) -> float:
|
|
89
|
+
"""Calculate the coefficient depending on the notional size.
|
|
90
|
+
|
|
91
|
+
EN 1992-1-1:2004, Tab. 3.3.
|
|
92
|
+
|
|
93
|
+
Args:
|
|
94
|
+
h_0 (float): The notional size of the cross-section in mm.
|
|
95
|
+
|
|
96
|
+
Returns:
|
|
97
|
+
float: The coefficient depending on the notional size.
|
|
98
|
+
"""
|
|
99
|
+
return np.interp(h_0, [100, 200, 300, 500], [1.0, 0.85, 0.75, 0.7])
|
|
100
|
+
|
|
101
|
+
|
|
102
|
+
def eps_cd_0(
|
|
103
|
+
alpha_ds1: float,
|
|
104
|
+
alpha_ds2: float,
|
|
105
|
+
fcm: float,
|
|
106
|
+
beta_RH: float,
|
|
107
|
+
fcm_0: float = 10,
|
|
108
|
+
) -> float:
|
|
109
|
+
"""Calculate the nominal value of drying shrinkage.
|
|
110
|
+
|
|
111
|
+
EN 1992-1-1:2004, Eq. (B.11).
|
|
112
|
+
|
|
113
|
+
Args:
|
|
114
|
+
alpha_ds1 (float): A coefficient depending on the cement type, defined
|
|
115
|
+
in EC2 (2004), Sec. B.2.
|
|
116
|
+
alpha_ds2 (float): A coefficient depending on the cement type, defined
|
|
117
|
+
in EC2 (2004), Sec. B.2.
|
|
118
|
+
fcm (float): The mean compressive strength in MPa.
|
|
119
|
+
beta_RH (float): A factor describing the effect of relative humidity,
|
|
120
|
+
defined in Eq. (B.12).
|
|
121
|
+
|
|
122
|
+
Keyword Args:
|
|
123
|
+
fcm_0 (float): A reference strength in MPa, default 10 MPa.
|
|
124
|
+
|
|
125
|
+
Returns:
|
|
126
|
+
float: The nominal value of drying shrinkage.
|
|
127
|
+
"""
|
|
128
|
+
return (
|
|
129
|
+
0.85
|
|
130
|
+
* ((220 + 110 * alpha_ds1) * np.exp(-alpha_ds2 * fcm / fcm_0))
|
|
131
|
+
* 1e-6
|
|
132
|
+
* beta_RH
|
|
133
|
+
)
|
|
134
|
+
|
|
135
|
+
|
|
136
|
+
def alpha_ds1(cement_class: t.Literal['S', 'N', 'R']) -> float:
|
|
137
|
+
"""Return a coefficient depending on the cement class.
|
|
138
|
+
|
|
139
|
+
EN 1992-1-1:2004, Sec. B.2.
|
|
140
|
+
|
|
141
|
+
Args:
|
|
142
|
+
cement_class (str): The cement class, either 'S', 'N' or 'R'.
|
|
143
|
+
|
|
144
|
+
Returns:
|
|
145
|
+
float: The exponent that depends on the cement type.
|
|
146
|
+
|
|
147
|
+
Raises:
|
|
148
|
+
ValueError: If an invalid cement class is provided.
|
|
149
|
+
"""
|
|
150
|
+
_alpha_ds = _get_alpha_ds_dict(cement_class=cement_class)
|
|
151
|
+
return _alpha_ds['alpha_ds1']
|
|
152
|
+
|
|
153
|
+
|
|
154
|
+
def alpha_ds2(cement_class: t.Literal['S', 'N', 'R']) -> float:
|
|
155
|
+
"""Return a coefficient depending on the cement class.
|
|
156
|
+
|
|
157
|
+
EN 1992-1-1:2004, Sec. B.2.
|
|
158
|
+
|
|
159
|
+
Args:
|
|
160
|
+
cement_class (str): The cement class, either 'S', 'N' or 'R'.
|
|
161
|
+
|
|
162
|
+
Returns:
|
|
163
|
+
float: The exponent that depends on the cement type.
|
|
164
|
+
|
|
165
|
+
Raises:
|
|
166
|
+
ValueError: If an invalid cement class is provided.
|
|
167
|
+
"""
|
|
168
|
+
_alpha_ds = _get_alpha_ds_dict(cement_class=cement_class)
|
|
169
|
+
return _alpha_ds['alpha_ds2']
|
|
170
|
+
|
|
171
|
+
|
|
172
|
+
def _get_alpha_ds_dict(cement_class: str) -> t.Dict:
|
|
173
|
+
"""Return a dictionary with values for aplha_ds1 and alpha_ds2."""
|
|
174
|
+
_alpha_ds = ALPHA_DS_DICT.get(cement_class.upper().strip())
|
|
175
|
+
|
|
176
|
+
if _alpha_ds is None:
|
|
177
|
+
raise ValueError(
|
|
178
|
+
(
|
|
179
|
+
f'"{cement_class}" is not a valid cement class. '
|
|
180
|
+
'Use either S, N or R.'
|
|
181
|
+
)
|
|
182
|
+
)
|
|
183
|
+
return _alpha_ds
|
|
184
|
+
|
|
185
|
+
|
|
186
|
+
def beta_RH(RH: float, RH_0: float = 100) -> float:
|
|
187
|
+
"""Calculate the factor describing the effect of relative humidity.
|
|
188
|
+
|
|
189
|
+
EN 1992-1-1:2004, Eq. (B.12).
|
|
190
|
+
|
|
191
|
+
Args:
|
|
192
|
+
RH (float): The relative humidity in percent.
|
|
193
|
+
|
|
194
|
+
Keyword Args:
|
|
195
|
+
RH_0 (float): The reference relative humidity, default: 100%.
|
|
196
|
+
|
|
197
|
+
Returns:
|
|
198
|
+
float: The factor taking into account the relative humidity.
|
|
199
|
+
"""
|
|
200
|
+
return 1.55 * (1 - (RH / RH_0) ** 3)
|
|
201
|
+
|
|
202
|
+
|
|
203
|
+
def eps_ca(beta_as: npt.ArrayLike, eps_ca_inf: float) -> npt.ArrayLike:
|
|
204
|
+
"""Calculate the autogenous shrinkage.
|
|
205
|
+
|
|
206
|
+
EN 1992-1-1:2004, Eq. (3.11).
|
|
207
|
+
|
|
208
|
+
Args:
|
|
209
|
+
beta_as (npt.ArrayLike): A factor describing the autogenous shrinkage
|
|
210
|
+
development.
|
|
211
|
+
eps_ca_inf (float): The final autogenous shrinkage.
|
|
212
|
+
|
|
213
|
+
Returns:
|
|
214
|
+
npt.ArrayLike: The autogenous shrinkage.
|
|
215
|
+
|
|
216
|
+
Note:
|
|
217
|
+
In EC2 (2004), the shrinkage strain is calculated as a positive number.
|
|
218
|
+
"""
|
|
219
|
+
beta_as = beta_as if np.isscalar(beta_as) else np.atleast_1d(beta_as)
|
|
220
|
+
return beta_as * eps_ca_inf
|
|
221
|
+
|
|
222
|
+
|
|
223
|
+
def eps_ca_inf(fck: float) -> float:
|
|
224
|
+
"""Calculate the final autogenous shrinkage.
|
|
225
|
+
|
|
226
|
+
EN 1992-1-1:2004, Eq. 3.12.
|
|
227
|
+
|
|
228
|
+
Args:
|
|
229
|
+
fck (float): The characteristic compressive strength in MPa.
|
|
230
|
+
|
|
231
|
+
Returns:
|
|
232
|
+
float: The final autogenous shrinkage.
|
|
233
|
+
"""
|
|
234
|
+
return 2.5 * (fck - 10) * 1e-6
|
|
235
|
+
|
|
236
|
+
|
|
237
|
+
def beta_as(t: npt.ArrayLike) -> npt.ArrayLike:
|
|
238
|
+
"""Calculate the factor describing the development of autogenous
|
|
239
|
+
shrinkage.
|
|
240
|
+
|
|
241
|
+
EN 1992-1-1:2004, Eq. (3.13).
|
|
242
|
+
|
|
243
|
+
Args:
|
|
244
|
+
t (npt.ArrayLike): The age of the concrete in days.
|
|
245
|
+
|
|
246
|
+
Returns:
|
|
247
|
+
npt.ArrayLike: The factor describing the development of autogenous
|
|
248
|
+
shrinkage.
|
|
249
|
+
"""
|
|
250
|
+
t = t if np.isscalar(t) else np.atleast_1d(t)
|
|
251
|
+
return 1 - np.exp(-0.2 * t**0.5)
|
|
252
|
+
|
|
253
|
+
|
|
254
|
+
def phi(phi_0: float, beta_c: npt.ArrayLike) -> npt.ArrayLike:
|
|
255
|
+
"""Calculate the creep number.
|
|
256
|
+
|
|
257
|
+
EN 1992-1-1:2004, Eq. (B.1).
|
|
258
|
+
|
|
259
|
+
Args:
|
|
260
|
+
phi_0 (float): The standardized creep number defined in Eq. B.2.
|
|
261
|
+
beta_c (npt.ArrayLike): A factor taking into account the creep
|
|
262
|
+
development as a function of time after loading defined in Eq.
|
|
263
|
+
(B.7).
|
|
264
|
+
|
|
265
|
+
Returns:
|
|
266
|
+
float: The creep number.
|
|
267
|
+
"""
|
|
268
|
+
beta_c = beta_c if np.isscalar(beta_c) else np.atleast_1d(beta_c)
|
|
269
|
+
return phi_0 * beta_c
|
|
270
|
+
|
|
271
|
+
|
|
272
|
+
def phi_0(phi_RH: float, beta_fcm: float, beta_t0: float) -> float:
|
|
273
|
+
"""Calculate the standardized creep number.
|
|
274
|
+
|
|
275
|
+
EN 1992-1-1:2004, Eq. (B.2).
|
|
276
|
+
|
|
277
|
+
Args:
|
|
278
|
+
phi_RH (float): The effect of relative humidity defined in Eq. B.3.
|
|
279
|
+
beta_fcm (float): The effect of the concrete strength defined in Eq.
|
|
280
|
+
B.4.
|
|
281
|
+
beta_t0 (float): The effect of the age at loading defined in Eq. B.5.
|
|
282
|
+
|
|
283
|
+
Returns:
|
|
284
|
+
float: The standardized creep number.
|
|
285
|
+
"""
|
|
286
|
+
return phi_RH * beta_fcm * beta_t0
|
|
287
|
+
|
|
288
|
+
|
|
289
|
+
def phi_RH(
|
|
290
|
+
h_0: float, fcm: float, RH: float, alpha_1: float, alpha_2: float
|
|
291
|
+
) -> float:
|
|
292
|
+
"""Calculate the effect of relative humidity on the standardized creep
|
|
293
|
+
number.
|
|
294
|
+
|
|
295
|
+
EN 1992-1-1:2004, Eq. (B.3).
|
|
296
|
+
|
|
297
|
+
Args:
|
|
298
|
+
h_0 (float): The effective cross sectional thickness in mm, Equation
|
|
299
|
+
(B.6).
|
|
300
|
+
fcm (float): The mean concrete strength in MPa.
|
|
301
|
+
RH (float): The relative humidity in percent.
|
|
302
|
+
alpha_1 (float): A factor describing the effect of concrete strength
|
|
303
|
+
defined in Eq. (B.8c).
|
|
304
|
+
alpha_2 (float): A factor describing the effect of concrete strength
|
|
305
|
+
defined in Eq. (B.8c).
|
|
306
|
+
|
|
307
|
+
Returns:
|
|
308
|
+
float: The calculation parameter (B.3).
|
|
309
|
+
"""
|
|
310
|
+
if fcm <= 35:
|
|
311
|
+
return 1 + (1 - RH / 100) / (0.1 * h_0 ** (1 / 3))
|
|
312
|
+
return (1 + (1 - RH / 100) / (0.1 * h_0 ** (1 / 3)) * alpha_1) * alpha_2
|
|
313
|
+
|
|
314
|
+
|
|
315
|
+
def beta_fcm(fcm: float) -> float:
|
|
316
|
+
"""Calculate the effect of the concrete strength on the standardized creep
|
|
317
|
+
number.
|
|
318
|
+
|
|
319
|
+
EN 1992-1-1:2004, Eq. (B.4).
|
|
320
|
+
|
|
321
|
+
Args:
|
|
322
|
+
fcm (float): The mean concrete strength in MPa.
|
|
323
|
+
|
|
324
|
+
Returns:
|
|
325
|
+
float: The effect of concrete strength.
|
|
326
|
+
"""
|
|
327
|
+
return 16.8 / fcm**0.5
|
|
328
|
+
|
|
329
|
+
|
|
330
|
+
def beta_t0(t0: float) -> float:
|
|
331
|
+
"""Calculate the effect of age at loading on the notional creep
|
|
332
|
+
coefficient.
|
|
333
|
+
|
|
334
|
+
EN 1992-1-1:2004, Eq. (B.5).
|
|
335
|
+
|
|
336
|
+
Args:
|
|
337
|
+
t0 (float): The age at loading in days.
|
|
338
|
+
|
|
339
|
+
Returns:
|
|
340
|
+
float: The effect of age at loading.
|
|
341
|
+
"""
|
|
342
|
+
return 1 / (0.1 + t0**0.20)
|
|
343
|
+
|
|
344
|
+
|
|
345
|
+
def h_0(Ac: float, u: float) -> float:
|
|
346
|
+
"""Calculate the effective thickness of the cross section.
|
|
347
|
+
|
|
348
|
+
EN 1992-1-1:2004, Eq. (B.6).
|
|
349
|
+
|
|
350
|
+
Args:
|
|
351
|
+
Ac (float): The cross section area.
|
|
352
|
+
u (float): The part of the circumference of the cross section subject
|
|
353
|
+
to drying.
|
|
354
|
+
|
|
355
|
+
Returns:
|
|
356
|
+
float: The effective thickness.
|
|
357
|
+
|
|
358
|
+
Note:
|
|
359
|
+
The unit of the return will be consistent with the input. E.g. if Ac is
|
|
360
|
+
mm ** 2 and u is mm, the return is mm.
|
|
361
|
+
"""
|
|
362
|
+
return 2 * Ac / u
|
|
363
|
+
|
|
364
|
+
|
|
365
|
+
def beta_c(t0: float, t: npt.ArrayLike, beta_H: float) -> float:
|
|
366
|
+
"""Calculate the factor that describes the creep development as a function
|
|
367
|
+
of time after loading.
|
|
368
|
+
|
|
369
|
+
EN 1992-1-1:2004, Eq. (B.7).
|
|
370
|
+
|
|
371
|
+
Args:
|
|
372
|
+
t0 (float): The concrete age in days a the time of loading.
|
|
373
|
+
t (ArrayLike): The concrete age in days at the evaluated time.
|
|
374
|
+
beta_H (float): Parameter defined in (B.8).
|
|
375
|
+
|
|
376
|
+
Returns:
|
|
377
|
+
float: Parameter defined by Equation (B.7), beta_c.
|
|
378
|
+
"""
|
|
379
|
+
t = t if np.isscalar(t) else np.atleast_1d(t)
|
|
380
|
+
t_load = t - t0
|
|
381
|
+
if np.isscalar(t_load):
|
|
382
|
+
t_load = max(t_load, 0.0)
|
|
383
|
+
else:
|
|
384
|
+
t_load[t_load < 0.0] = 0.0
|
|
385
|
+
return (t_load / (beta_H + t_load)) ** 0.3
|
|
386
|
+
|
|
387
|
+
|
|
388
|
+
def beta_H(h_0: float, fcm: float, RH: float, alpha_3) -> float:
|
|
389
|
+
"""Calculate the effect of relative humidity and the effective thickness
|
|
390
|
+
of the structural element.
|
|
391
|
+
|
|
392
|
+
EN 1992-1-1:2004, Eq. (B.8a and b).
|
|
393
|
+
|
|
394
|
+
Args:
|
|
395
|
+
h_0 (float): The effective cross sectional thickness in mm, Equation
|
|
396
|
+
(B.6).
|
|
397
|
+
fcm (float): The mean concrete strength in MPa.
|
|
398
|
+
RH (float): The relative humidity in percent.
|
|
399
|
+
alpha_3 (float): A factor describing the effect of concrete strength
|
|
400
|
+
defined in Eq. B.8c.
|
|
401
|
+
|
|
402
|
+
Returns:
|
|
403
|
+
float: The effect of humidity and the effective thickness of the
|
|
404
|
+
element.
|
|
405
|
+
"""
|
|
406
|
+
if fcm <= 35:
|
|
407
|
+
# (B.8a)
|
|
408
|
+
return min(1.5 * (1 + (0.012 * RH) ** 18) * h_0 + 250, 1500)
|
|
409
|
+
# (B.8b)
|
|
410
|
+
return min(
|
|
411
|
+
1.5 * (1 + (0.012 * RH) ** 18) * h_0 + 250 * alpha_3,
|
|
412
|
+
1500 * alpha_3,
|
|
413
|
+
)
|
|
414
|
+
|
|
415
|
+
|
|
416
|
+
def alpha_1(fcm: float) -> float:
|
|
417
|
+
"""Return a factor taking into account the effect of concrete strength.
|
|
418
|
+
|
|
419
|
+
EN 1992-1-1:2004, Eq. (B.8c).
|
|
420
|
+
|
|
421
|
+
Args:
|
|
422
|
+
fcm (float): The mean concrete strength in MPa.
|
|
423
|
+
"""
|
|
424
|
+
return (35 / fcm) ** 0.7
|
|
425
|
+
|
|
426
|
+
|
|
427
|
+
def alpha_2(fcm: float) -> float:
|
|
428
|
+
"""Return a factor taking into account the effect of concrete strength.
|
|
429
|
+
|
|
430
|
+
EN 1992-1-1:2004, Eq. (B.8c).
|
|
431
|
+
|
|
432
|
+
Args:
|
|
433
|
+
fcm (float): The mean concrete strength in MPa.
|
|
434
|
+
"""
|
|
435
|
+
return (35 / fcm) ** 0.2
|
|
436
|
+
|
|
437
|
+
|
|
438
|
+
def alpha_3(fcm: float) -> float:
|
|
439
|
+
"""Return a factor taking into account the effect of concrete strength.
|
|
440
|
+
|
|
441
|
+
EN 1992-1-1:2004, Eq. (B.8c).
|
|
442
|
+
|
|
443
|
+
Args:
|
|
444
|
+
fcm (float): The mean concrete strength in MPa.
|
|
445
|
+
"""
|
|
446
|
+
return (35 / fcm) ** 0.5
|
|
447
|
+
|
|
448
|
+
|
|
449
|
+
def t0_adj(t0: float, alpha_cement: float) -> float:
|
|
450
|
+
"""Calculate the adjusted age of the concrete.
|
|
451
|
+
|
|
452
|
+
EN 1992-1-1:2004, Eq. (B.9).
|
|
453
|
+
|
|
454
|
+
Args:
|
|
455
|
+
t0 (float): The concrete age in days at the time of loading.
|
|
456
|
+
alpha_cement (float): Exponent derived from the sement type.
|
|
457
|
+
|
|
458
|
+
Returns:
|
|
459
|
+
float: The adjusted age of the concrete.
|
|
460
|
+
"""
|
|
461
|
+
return max(t0 * (9 / (2 + t0**1.2) + 1) ** alpha_cement, 0.5)
|
|
462
|
+
|
|
463
|
+
|
|
464
|
+
def t_T(T: npt.ArrayLike, dt: npt.ArrayLike) -> float:
|
|
465
|
+
"""Calculate the maturity of the concrete.
|
|
466
|
+
|
|
467
|
+
EN 1992-1-1:2004, Eq. (B.10).
|
|
468
|
+
|
|
469
|
+
Args:
|
|
470
|
+
T (npt.ArrayLike): The curing temperature history in degrees Celcius.
|
|
471
|
+
dt (npt.ArrayLike): The number of days with temperature T.
|
|
472
|
+
|
|
473
|
+
Returns:
|
|
474
|
+
float: The maturity of the concrete.
|
|
475
|
+
|
|
476
|
+
Note:
|
|
477
|
+
The two arrays T and dt should have the same length. Each item in dt
|
|
478
|
+
represents a time interval, and the corresponding item in T represents
|
|
479
|
+
the average temperature in that time interval.
|
|
480
|
+
"""
|
|
481
|
+
# Prepare the input
|
|
482
|
+
T = T if np.isscalar(T) else np.atleast_1d(T)
|
|
483
|
+
dt = dt if np.isscalar(dt) else np.atleast_1d(dt)
|
|
484
|
+
|
|
485
|
+
# Check that both are scalar or both are arrays
|
|
486
|
+
if any(np.isscalar(this_check) for this_check in (T, dt)) and any(
|
|
487
|
+
not np.isscalar(this_check) for this_check in (T, dt)
|
|
488
|
+
):
|
|
489
|
+
raise ValueError(
|
|
490
|
+
(
|
|
491
|
+
f'T ({type(T)}) and dt ({type(dt)}) should either both be '
|
|
492
|
+
'ArrayLike or scalars.'
|
|
493
|
+
)
|
|
494
|
+
)
|
|
495
|
+
|
|
496
|
+
# Check the shape of the input arrays
|
|
497
|
+
if not all((np.isscalar(T), np.isscalar(dt))) and T.shape != dt.shape:
|
|
498
|
+
raise ValueError(
|
|
499
|
+
f'T {T.shape} and dt {dt.shape} should have the same shape.'
|
|
500
|
+
)
|
|
501
|
+
|
|
502
|
+
# Return the sum of the temperature adjusted time increments
|
|
503
|
+
if not all((np.isscalar(T), np.isscalar(dt))):
|
|
504
|
+
return float(np.sum(np.exp(13.65 - 4000 / (273 + T)) * dt))
|
|
505
|
+
return np.exp(13.65 - 4000 / (273 + T)) * dt
|
|
506
|
+
|
|
507
|
+
|
|
508
|
+
def alpha_cement(cement_class: t.Literal['S', 'N', 'R']) -> float:
|
|
509
|
+
"""Return an exponent that depends on the cement type.
|
|
510
|
+
|
|
511
|
+
Args:
|
|
512
|
+
cement_class (str): The cement class, either 'S', 'N' or 'R'.
|
|
513
|
+
|
|
514
|
+
Returns:
|
|
515
|
+
float: The exponent that depends on the cement type.
|
|
516
|
+
|
|
517
|
+
Raises:
|
|
518
|
+
ValueError: If an invalid cement class is provided.
|
|
519
|
+
"""
|
|
520
|
+
_alpha_cement = ALPHA_CEMENT_DICT.get(cement_class.upper())
|
|
521
|
+
|
|
522
|
+
if _alpha_cement is None:
|
|
523
|
+
raise ValueError(
|
|
524
|
+
(
|
|
525
|
+
f'"{cement_class}" is not a valid cement class. '
|
|
526
|
+
'Use either S, N or R.'
|
|
527
|
+
)
|
|
528
|
+
)
|
|
529
|
+
return _alpha_cement
|
|
@@ -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:
|