structuralcodes 0.3.0__py3-none-any.whl → 0.4.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.

@@ -5,13 +5,13 @@ import warnings
5
5
 
6
6
  from structuralcodes.codes import ec2_2004
7
7
 
8
+ from ..constitutive_laws import ConstitutiveLaw, create_constitutive_law
8
9
  from ._concrete import Concrete
9
10
 
10
11
 
11
12
  class ConcreteEC2_2004(Concrete): # noqa: N801
12
13
  """Concrete implementation for EC2 2004."""
13
14
 
14
- # computed attributes
15
15
  _fcm: t.Optional[float] = None
16
16
  _fctm: t.Optional[float] = None
17
17
  _fctk_5: t.Optional[float] = None
@@ -34,6 +34,31 @@ class ConcreteEC2_2004(Concrete): # noqa: N801
34
34
  density: float = 2400,
35
35
  gamma_c: t.Optional[float] = None,
36
36
  alpha_cc: t.Optional[float] = None,
37
+ constitutive_law: t.Optional[
38
+ t.Union[
39
+ t.Literal[
40
+ 'elastic',
41
+ 'parabolarectangle',
42
+ 'bilinearcompression',
43
+ 'sargin',
44
+ 'popovics',
45
+ ],
46
+ ConstitutiveLaw,
47
+ ]
48
+ ] = 'parabolarectangle',
49
+ fcm: t.Optional[float] = None,
50
+ fctm: t.Optional[float] = None,
51
+ fctk_5: t.Optional[float] = None,
52
+ fctk_95: t.Optional[float] = None,
53
+ Ecm: t.Optional[float] = None,
54
+ eps_c1: t.Optional[float] = None,
55
+ eps_cu1: t.Optional[float] = None,
56
+ k_sargin: t.Optional[float] = None,
57
+ eps_c2: t.Optional[float] = None,
58
+ eps_cu2: t.Optional[float] = None,
59
+ n_parabolic_rectangular: t.Optional[float] = None,
60
+ eps_c3: t.Optional[float] = None,
61
+ eps_cu3: t.Optional[float] = None,
37
62
  **kwargs,
38
63
  ) -> None:
39
64
  """Initializes a new instance of Concrete for EC2 2004.
@@ -50,6 +75,51 @@ class ConcreteEC2_2004(Concrete): # noqa: N801
50
75
  alpha_cc (float, optional): A factor for considering long-term
51
76
  effects on the strength, and effects that arise from the way
52
77
  the load is applied.
78
+ consitutive_law (ConstitutiveLaw | str): A valid ConstitutiveLaw
79
+ object for concrete or a string defining a valid constitutive
80
+ law type for concrete. (valid options for string: 'elastic',
81
+ 'parabolarectangle', 'bilinearcompression', 'sargin',
82
+ 'popovics').
83
+ fcm (float, optional): The mean compressive strength.
84
+ fctm (float, optional): The mean tensile strength.
85
+ fctk_5 (float, optional): The 5% fractile for the tensile strength.
86
+ fctk_95 (float, optional): The 95% fractile for the tensile
87
+ strength.
88
+ Ecm (float, optional): The mean secant Young's modulus.
89
+ eps_c1 (float, optional): The strain at peak stress for the Sargin
90
+ constitutive law.
91
+ eps_cu1 (float, optional): The ultimate strain for the Sargin
92
+ constitutive law.
93
+ k_sargin (float, optional): The coefficient for the Sargin
94
+ constitutive law.
95
+ eps_c2 (float, optional): The strain at peak stress for the
96
+ parabolic rectangular constitutive law.
97
+ eps_cu2 (float, optional): The ultimate strain for the parabolic
98
+ rectangular constitutive law.
99
+ n_parabolic_rectangular (float, optional): The coefficient for the
100
+ parabolic rectangular constitutive law.
101
+ eps_c3 (float, optional): The strain at peak stress for the
102
+ bilinear constitutive law.
103
+ eps_cu3 (float, optional): The ultimate strain for the bilinear
104
+ constitutive law.
105
+
106
+ Raises:
107
+ ValueError: If fcm is lower than fck.
108
+ ValueError: If k_sargin is negative.
109
+ ValueError: If n_parabolic_rectangular is negative.
110
+ ValueError: If the constitutive law name is not available for the
111
+ material.
112
+ ValueError: If the provided constitutive law is not valid for
113
+ concrete.
114
+ ValueError: If the constitutive law name is unknown.
115
+ Warning: If fctm is larger than 0.5 * fck.
116
+ Warning: If eps_c1 is larger than 0.1.
117
+ Warning: If eps_cu1 is larger than 0.1.
118
+ Warning: If eps_c2 is larger than 0.1.
119
+ Warning: If eps_cu2 is larger than 0.1.
120
+ Warning: If n_parabolic_rectangular is larger than 5.
121
+ Warning: If eps_c3 is larger than 0.1.
122
+ Warning: If eps_cu3 is larger than 0.1.
53
123
  """
54
124
  del kwargs
55
125
  if name is None:
@@ -62,21 +132,126 @@ class ConcreteEC2_2004(Concrete): # noqa: N801
62
132
  gamma_c=gamma_c,
63
133
  )
64
134
  self._alpha_cc = alpha_cc
135
+ self._fcm = abs(fcm) if fcm is not None else None
136
+ self._fctm = abs(fctm) if fctm is not None else None
137
+ self._fctk_5 = abs(fctk_5) if fctk_5 is not None else None
138
+ self._fctk_95 = abs(fctk_95) if fctk_95 is not None else None
139
+ self._Ecm = abs(Ecm) if Ecm is not None else None
140
+ self._eps_c1 = abs(eps_c1) if eps_c1 is not None else None
141
+ self._eps_cu1 = abs(eps_cu1) if eps_cu1 is not None else None
142
+ self._k_sargin = k_sargin if k_sargin is not None else None
143
+ self._eps_c2 = abs(eps_c2) if eps_c2 is not None else None
144
+ self._eps_cu2 = abs(eps_cu2) if eps_cu2 is not None else None
145
+ self._n_parabolic_rectangular = (
146
+ n_parabolic_rectangular
147
+ if n_parabolic_rectangular is not None
148
+ else None
149
+ )
150
+ self._eps_c3 = abs(eps_c3) if eps_c3 is not None else None
151
+ self._eps_cu3 = abs(eps_cu3) if eps_cu3 is not None else None
152
+
153
+ self.__post_init__()
154
+
155
+ # The constitutive law requires valid attributes, so it should be set
156
+ # after validation
157
+ self._constitutive_law = (
158
+ constitutive_law
159
+ if isinstance(constitutive_law, ConstitutiveLaw)
160
+ else create_constitutive_law(
161
+ constitutive_law_name=constitutive_law, material=self
162
+ )
163
+ )
164
+ if 'concrete' not in self._constitutive_law.__materials__:
165
+ raise ValueError(
166
+ 'The provided constitutive law is not valid for concrete.'
167
+ )
168
+
169
+ def __post_init__(self):
170
+ """Validator for the attributes that are set in the constructor."""
171
+ # fcm
172
+ if self._fcm is not None and self._fcm <= self._fck:
173
+ raise ValueError(
174
+ (
175
+ 'Mean compressive strength cannot be lower than',
176
+ 'characteristic strength.\n',
177
+ 'Current characteristing strength: ',
178
+ f'fck = {self._fck}.',
179
+ f'Current value: value = {self._fcm}',
180
+ )
181
+ )
182
+
183
+ # fctm
184
+ if self._fctm is not None and self._fctm > 0.5 * self._fck:
185
+ warnings.warn(
186
+ 'A suspect value of fctm has been input. Please check.'
187
+ )
188
+
189
+ # eps_c1
190
+ if self._eps_c1 is not None and self._eps_c1 >= 0.1:
191
+ warnings.warn(
192
+ 'A suspect value is input for eps_c1 that should be a pure'
193
+ f' number without units. Please check ({self._eps_c1} given).'
194
+ )
195
+
196
+ # eps_cu1
197
+ if self._eps_cu1 is not None and self._eps_cu1 >= 0.1:
198
+ warnings.warn(
199
+ 'A suspect value is input for eps_cu1 that should be a pure'
200
+ f' number without units. Please check ({self._eps_cu1} given).'
201
+ )
202
+
203
+ # k_sargin
204
+ if self._k_sargin is not None and self._k_sargin < 0:
205
+ raise ValueError(
206
+ f'k_sargin should be a positive value ({self._k_sargin} given)'
207
+ )
208
+
209
+ # eps_c2
210
+ if self._eps_c2 is not None and self._eps_c2 >= 0.1:
211
+ warnings.warn(
212
+ 'A suspect value is input for eps_c2 that should be a pure'
213
+ f' number without units. Please check ({self._eps_c2} given).'
214
+ )
215
+
216
+ # eps_cu2
217
+ if self._eps_cu2 is not None and self._eps_cu2 >= 0.1:
218
+ warnings.warn(
219
+ 'A suspect value is input for eps_cu2 that should be a pure'
220
+ f' number without units. Please check ({self._eps_cu2} given).'
221
+ )
65
222
 
66
- def _reset_attributes(self):
67
- self._fcm = None
68
- self._fctm = None
69
- self._fctk_5 = None
70
- self._fctk_95 = None
71
- self._Ecm = None
72
- self._eps_c1 = None
73
- self._eps_cu1 = None
74
- self._k_sargin = None
75
- self._eps_c2 = None
76
- self._eps_cu2 = None
77
- self._n_parabolic_rectangular = None
78
- self._eps_c3 = None
79
- self._eps_cu3 = None
223
+ # n_parabolic_rectangular
224
+ if (
225
+ self._n_parabolic_rectangular is not None
226
+ and self._n_parabolic_rectangular < 0
227
+ ):
228
+ raise ValueError(
229
+ 'n should be a positive value '
230
+ f'({self._n_parabolic_rectangular} given)'
231
+ )
232
+ if (
233
+ self._n_parabolic_rectangular is not None
234
+ and self._n_parabolic_rectangular >= 5
235
+ ):
236
+ warnings.warn(
237
+ 'A suspect value is input for n_parabolic_rectangular that '
238
+ 'should be a pure number without units. Please check '
239
+ f'({self._n_parabolic_rectangular} given).'
240
+ )
241
+
242
+ # eps_c3
243
+ if self._eps_c3 is not None and abs(self._eps_c3) >= 0.1:
244
+ warnings.warn(
245
+ 'A suspect value is input for eps_c3 that should be a pure'
246
+ f' number without units. Please check ({self._eps_c3} given).'
247
+ )
248
+
249
+ # eps_cu3
250
+ if self._eps_cu3 is not None and abs(self._eps_cu3) >= 0.1:
251
+ warnings.warn(
252
+ 'A suspect value is input for eps_cu3 that should be a pure'
253
+ f' number without units. Please check ({self._eps_cu3} given).'
254
+ )
80
255
 
81
256
  @property
82
257
  def fcm(self) -> float:
@@ -84,76 +259,44 @@ class ConcreteEC2_2004(Concrete): # noqa: N801
84
259
 
85
260
  Returns:
86
261
  float: The mean compressive strength in MPa.
262
+
263
+ Note:
264
+ The returned value is derived from fck if fcm is not manually
265
+ provided when initializing the object.
87
266
  """
88
267
  if self._fcm is None:
89
- self._fcm = ec2_2004.fcm(self._fck)
268
+ return ec2_2004.fcm(self._fck)
90
269
  return self._fcm
91
270
 
92
- @fcm.setter
93
- def fcm(self, value: float):
94
- """Sets a user defined value for fcm.
95
-
96
- Arguments:
97
- value (float): The value of fcm in MPa.
98
-
99
- Raises:
100
- ValueError: If value is lower than fck.
101
- """
102
- if abs(value) <= self._fck:
103
- raise ValueError(
104
- (
105
- 'Mean compressive strength cannot be lower than',
106
- 'characteristic strength.\n',
107
- 'Current characteristing strength: ',
108
- f'fck = {self._fck}.',
109
- f'Current value: value = {value}',
110
- )
111
- )
112
- self._fcm = abs(value)
113
-
114
271
  @property
115
272
  def fctm(self) -> float:
116
273
  """Returns fctm in MPa.
117
274
 
118
275
  Returns:
119
276
  float: The mean tensile strength in MPa.
277
+
278
+ Note:
279
+ The returned value is derived from fck if fctm is not manually
280
+ provided when initializing the object.
120
281
  """
121
282
  if self._fctm is None:
122
- self._fctm = ec2_2004.fctm(self._fck)
283
+ return ec2_2004.fctm(self._fck)
123
284
  return self._fctm
124
285
 
125
- @fctm.setter
126
- def fctm(self, value: float):
127
- """Sets a user defined value for fctm.
128
-
129
- Arguments:
130
- value (float): The value of fctm in MPa.
131
- """
132
- if value > 0.5 * self._fck:
133
- warnings.warn(
134
- 'A suspect value of fctm has been input. Please check.'
135
- )
136
- self._fctm = abs(value)
137
-
138
286
  @property
139
287
  def fctk_5(self) -> float:
140
288
  """Returns fctk_5 in MPa.
141
289
 
142
290
  Returns:
143
291
  float: The lower bound tensile strength in MPa.
144
- """
145
- if self._fctk_5 is not None:
146
- return self._fctk_5
147
- return ec2_2004.fctk_5(self.fctm)
148
-
149
- @fctk_5.setter
150
- def fctk_5(self, value: float):
151
- """Sets a user defined value for fctk_5.
152
292
 
153
- Arguments:
154
- value (float): The value of fctk_5 in MPa.
293
+ Note:
294
+ The returned value is derived from fctm if fctk_5 is not manually
295
+ provided when initializing the object.
155
296
  """
156
- self._fctk_5 = abs(value)
297
+ if self._fctk_5 is None:
298
+ return ec2_2004.fctk_5(self.fctm)
299
+ return self._fctk_5
157
300
 
158
301
  @property
159
302
  def fctk_95(self) -> float:
@@ -161,20 +304,14 @@ class ConcreteEC2_2004(Concrete): # noqa: N801
161
304
 
162
305
  Returns:
163
306
  float: The upper bound tensile strength in MPa.
164
- """
165
- if self._fctk_95 is not None:
166
- return self._fctk_95
167
-
168
- return ec2_2004.fctk_95(self.fctm)
169
307
 
170
- @fctk_95.setter
171
- def fctk_95(self, value: float):
172
- """Sets a user defined value for fctk_95.
173
-
174
- Arguments:
175
- value (float): The value of fctk_95 in MPa.
308
+ Note:
309
+ The returned value is derived from fctm if fctk_95 is not manually
310
+ provided when initializing the object.
176
311
  """
177
- self._fctk_95 = abs(value)
312
+ if self._fctk_95 is None:
313
+ return ec2_2004.fctk_95(self.fctm)
314
+ return self._fctk_95
178
315
 
179
316
  @property
180
317
  def Ecm(self) -> float:
@@ -182,20 +319,14 @@ class ConcreteEC2_2004(Concrete): # noqa: N801
182
319
 
183
320
  Returns:
184
321
  float: The upper bound tensile strength in MPa.
185
- """
186
- if self._Ecm is not None:
187
- return self._Ecm
188
-
189
- return ec2_2004.Ecm(self.fcm)
190
-
191
- @Ecm.setter
192
- def Ecm(self, value: float):
193
- """Sets a user defined value for Ecm.
194
322
 
195
- Arguments:
196
- value (float): The value of Ecm in MPa.
323
+ Note:
324
+ The returned value is derived from fcm if Ecm is not manually
325
+ provided when initializing the object.
197
326
  """
198
- self._Ecm = abs(value)
327
+ if self._Ecm is None:
328
+ return ec2_2004.Ecm(self.fcm)
329
+ return self._Ecm
199
330
 
200
331
  def fcd(self) -> float:
201
332
  """Return the design compressive strength in MPa.
@@ -230,24 +361,14 @@ class ConcreteEC2_2004(Concrete): # noqa: N801
230
361
 
231
362
  Returns:
232
363
  float: The strain at maximum compressive strength of concrete.
233
- """
234
- self._eps_c1 = self._eps_c1 or ec2_2004.eps_c1(self.fcm)
235
- return self._eps_c1
236
-
237
- @eps_c1.setter
238
- def eps_c1(self, value: float):
239
- """Sets a user defined value for strain at peak strength for Sargin
240
- constitutive law.
241
364
 
242
- Arguments:
243
- value (float): The new value for eps_c1, no units.
365
+ Note:
366
+ The returned value is derived from fcm if eps_c1 is not manually
367
+ provided when initializing the object.
244
368
  """
245
- if abs(value) >= 0.1:
246
- warnings.warn(
247
- 'A suspect value is input for eps_c1 that should be a pure'
248
- ' number without units. Plase check ({value} given).'
249
- )
250
- self._eps_c1 = value
369
+ if self._eps_c1 is None:
370
+ return ec2_2004.eps_c1(self.fcm)
371
+ return self._eps_c1
251
372
 
252
373
  @property
253
374
  def eps_cu1(self) -> float:
@@ -255,23 +376,14 @@ class ConcreteEC2_2004(Concrete): # noqa: N801
255
376
 
256
377
  Returns:
257
378
  float: The maximum strength at failure of concrete.
258
- """
259
- self._eps_cu1 = self._eps_cu1 or ec2_2004.eps_cu1(self.fcm)
260
- return self._eps_cu1
261
-
262
- @eps_cu1.setter
263
- def eps_cu1(self, value: float):
264
- """Sets the nominal ultimate strain for Sargin constitutive law.
265
379
 
266
- Arguments:
267
- value (float): The new value for eps_cu1, no units.
380
+ Note:
381
+ The returned value is derived from fcm if eps_cu1 is not manually
382
+ provided when initializing the object.
268
383
  """
269
- if abs(value) >= 0.1:
270
- warnings.warn(
271
- 'A suspect value is input for eps_cu1 that should be a pure'
272
- ' number without units. Plase check ({value} given).'
273
- )
274
- self._eps_cu1 = value
384
+ if self._eps_cu1 is None:
385
+ return ec2_2004.eps_cu1(self.fcm)
386
+ return self._eps_cu1
275
387
 
276
388
  @property
277
389
  def k_sargin(self) -> float:
@@ -279,27 +391,18 @@ class ConcreteEC2_2004(Concrete): # noqa: N801
279
391
 
280
392
  Returns:
281
393
  float: The plastic coefficient for Sargin law.
282
- """
283
- self._k_sargin = self._k_sargin or ec2_2004.k_sargin(
284
- Ecm=self.Ecm,
285
- fcm=self.fcm,
286
- eps_c1=self.eps_c1,
287
- )
288
- return self._k_sargin
289
-
290
- @k_sargin.setter
291
- def k_sargin(self, value: float):
292
- """Sets the the coefficient for Sargin constitutive law.
293
394
 
294
- Arguments:
295
- value (float): The new value for k, no units.
296
-
297
- Raises:
298
- ValueError: If value < 0.
395
+ Note:
396
+ The returned value is derived from Ecm, fcm and eps_c1 if k_sargin
397
+ is not manually provided when initializing the object.
299
398
  """
300
- if value < 0:
301
- raise ValueError(f'n should be a positive value ({value} given)')
302
- self._k_sargin = value
399
+ if self._k_sargin is None:
400
+ return ec2_2004.k_sargin(
401
+ Ecm=self.Ecm,
402
+ fcm=self.fcm,
403
+ eps_c1=self.eps_c1,
404
+ )
405
+ return self._k_sargin
303
406
 
304
407
  @property
305
408
  def eps_c2(self) -> float:
@@ -308,24 +411,14 @@ class ConcreteEC2_2004(Concrete): # noqa: N801
308
411
 
309
412
  Returns:
310
413
  float: The strain at maximum compressive strength of concrete.
311
- """
312
- self._eps_c2 = self._eps_c2 or ec2_2004.eps_c2(self.fck)
313
- return self._eps_c2
314
-
315
- @eps_c2.setter
316
- def eps_c2(self, value: float):
317
- """Sets the strain at maximum compressive strength of concrete (fcd)
318
- for the Parabola-rectangle constitutive law.
319
414
 
320
- Arguments:
321
- value (float): The new value for eps_c2, no units.
415
+ Note:
416
+ The returned value is derived from fck if eps_c2 is not manually
417
+ provided when initializing the object.
322
418
  """
323
- if abs(value) >= 0.1:
324
- warnings.warn(
325
- 'A suspect value is input for eps_c2 that should be a pure'
326
- ' number without units. Plase check ({value} given).'
327
- )
328
- self._eps_c2 = value
419
+ if self._eps_c2 is None:
420
+ return ec2_2004.eps_c2(self.fck)
421
+ return self._eps_c2
329
422
 
330
423
  @property
331
424
  def eps_cu2(self) -> float:
@@ -334,24 +427,14 @@ class ConcreteEC2_2004(Concrete): # noqa: N801
334
427
 
335
428
  Returns:
336
429
  float: The maximum strain at failure of concrete.
337
- """
338
- self._eps_cu2 = self._eps_cu2 or ec2_2004.eps_cu2(self.fck)
339
- return self._eps_cu2
340
-
341
- @eps_cu2.setter
342
- def eps_cu2(self, value: float):
343
- """Sets the strain at concrete failure of concrete for the
344
- Parabola-rectangle constitutive law.
345
430
 
346
- Arguments:
347
- value (float): The new value for eps_cu2, no units.
431
+ Note:
432
+ The returned value is derived from fck if eps_cu2 is not manually
433
+ provided when initializing the object.
348
434
  """
349
- if abs(value) >= 0.1:
350
- warnings.warn(
351
- 'A suspect value is input for eps_cu2 that should be a pure'
352
- ' number without units. Plase check ({value} given).'
353
- )
354
- self._eps_cu2 = value
435
+ if self._eps_cu2 is None:
436
+ return ec2_2004.eps_cu2(self.fck)
437
+ return self._eps_cu2
355
438
 
356
439
  @property
357
440
  def n_parabolic_rectangular(self) -> float:
@@ -359,31 +442,14 @@ class ConcreteEC2_2004(Concrete): # noqa: N801
359
442
 
360
443
  Returns:
361
444
  float: The exponent for Parabola-rectangle law.
362
- """
363
- self._n_parabolic_rectangular = (
364
- self._n_parabolic_rectangular
365
- or ec2_2004.n_parabolic_rectangular(self.fck)
366
- )
367
- return self._n_parabolic_rectangular
368
-
369
- @n_parabolic_rectangular.setter
370
- def n_parabolic_rectangular(self, value: float):
371
- """Sets the coefficient for Parabola-rectangle constitutive law.
372
445
 
373
- Arguments:
374
- value (float): The new value for n, no units.
375
-
376
- Raises:
377
- ValueError: If value < 0.
446
+ Note:
447
+ The returned value is derived from fck if n_parabolic_rectangular
448
+ is not manually provided when initializing the object.
378
449
  """
379
- if value < 0:
380
- raise ValueError(f'n should be a positive value ({value} given)')
381
- if value >= 5:
382
- warnings.warn(
383
- 'A suspect value is input for eps_cu2 that should be a pure'
384
- ' number without units. Plase check ({value} given).'
385
- )
386
- self._n_parabolic_rectangular = value
450
+ if self._n_parabolic_rectangular is None:
451
+ return ec2_2004.n_parabolic_rectangular(self.fck)
452
+ return self._n_parabolic_rectangular
387
453
 
388
454
  @property
389
455
  def eps_c3(self) -> float:
@@ -392,24 +458,14 @@ class ConcreteEC2_2004(Concrete): # noqa: N801
392
458
 
393
459
  Returns:
394
460
  float: The strain at maximum compressive strength of concrete.
395
- """
396
- self._eps_c3 = self._eps_c3 or ec2_2004.eps_c3(self.fck)
397
- return self._eps_c3
398
-
399
- @eps_c3.setter
400
- def eps_c3(self, value: float):
401
- """Sets the strain at maximum compressive strength of concrete (fcd)
402
- for the Bi-linear constitutive law.
403
461
 
404
- Arguments:
405
- value (float): The new value for eps_c3, no units.
462
+ Note:
463
+ The returned value is derived from eps_c3 if fck is not manually
464
+ provided when initializing the object.
406
465
  """
407
- if abs(value) >= 0.1:
408
- warnings.warn(
409
- 'A suspect value is input for eps_c3 that should be a pure'
410
- ' number without units. Plase check ({value} given).'
411
- )
412
- self._eps_c3 = value
466
+ if self._eps_c3 is None:
467
+ return ec2_2004.eps_c3(self.fck)
468
+ return self._eps_c3
413
469
 
414
470
  @property
415
471
  def eps_cu3(self) -> float:
@@ -418,24 +474,14 @@ class ConcreteEC2_2004(Concrete): # noqa: N801
418
474
 
419
475
  Returns:
420
476
  float: The maximum strain at failure of concrete.
421
- """
422
- self._eps_cu3 = self._eps_cu3 or ec2_2004.eps_cu3(self.fck)
423
- return self._eps_cu3
424
-
425
- @eps_cu3.setter
426
- def eps_cu3(self, value: float):
427
- """Sets the strain at concrete failure of concrete for the Bi-linear
428
- constitutive law.
429
477
 
430
- Arguments:
431
- value (float): The new value for eps_cu3, no units.
478
+ Note:
479
+ The returned value is derived from fck if eps_cu3 is not manually
480
+ provided when initializing the object.
432
481
  """
433
- if abs(value) >= 0.1:
434
- warnings.warn(
435
- 'A suspect value is input for eps_cu3 that should be a pure'
436
- ' number without units. Plase check ({value} given).'
437
- )
438
- self._eps_cu3 = value
482
+ if self._eps_cu3 is None:
483
+ return ec2_2004.eps_cu3(self.fck)
484
+ return self._eps_cu3
439
485
 
440
486
  def __elastic__(self) -> dict:
441
487
  """Returns kwargs for creating an elastic constitutive law."""