|
2 | 2 | according to Table 4.1 from EN 1992-1-1:2004: Chapter 4 - Durability and cover to reinforcement. |
3 | 3 | """ |
4 | 4 |
|
| 5 | +from dataclasses import dataclass, field |
5 | 6 | from functools import total_ordering |
6 | 7 |
|
7 | 8 | from blueprints.codes.eurocode.en_1992_1_1_2004.chapter_4_durability_and_cover._base_classes.exposure_classes import ( |
@@ -211,36 +212,29 @@ def description_of_the_environment(self) -> str: |
211 | 212 | return "Not applicable" |
212 | 213 |
|
213 | 214 |
|
| 215 | +@dataclass(frozen=True) |
214 | 216 | class Table4Dot1ExposureClasses(ExposureClassesBase): |
215 | | - """Class representing table 4.1 from EN 1992-1-1:2004.""" |
216 | | - |
217 | | - def __init__( |
218 | | - self, |
219 | | - carbonation: Carbonation = Carbonation.NA, |
220 | | - chloride: Chloride = Chloride.NA, |
221 | | - chloride_seawater: ChlorideSeawater = ChlorideSeawater.NA, |
222 | | - freeze_thaw: FreezeThaw = FreezeThaw.NA, |
223 | | - chemical: Chemical = Chemical.NA, |
224 | | - ) -> None: |
225 | | - """Implementation of table 4.1 from EN 1992-1-1:2004 par. 4.2. |
226 | | -
|
227 | | - Exposure classes related to environmental conditions in accordance with EN 206-1 |
228 | | -
|
229 | | - Parameters |
230 | | - ---------- |
231 | | - carbonation : Carbonation |
232 | | - The carbonation exposure class. Defaults to Carbonation.NA. |
233 | | - chloride : Chloride |
234 | | - The chloride exposure class. Defaults to Chloride.NA. |
235 | | - chloride_seawater : ChlorideSeawater |
236 | | - The chloride seawater exposure class. Defaults to ChlorideSeawater.NA. |
237 | | - freeze_thaw : FreezeThaw |
238 | | - The freeze/thaw exposure class. Defaults to FreezeThaw.NA. |
239 | | - chemical : Chemical |
240 | | - The chemical exposure class. Defaults to Chemical.NA. |
241 | | - """ |
242 | | - self.carbonation = carbonation |
243 | | - self.chloride = chloride |
244 | | - self.chloride_seawater = chloride_seawater |
245 | | - self.freeze_thaw = freeze_thaw |
246 | | - self.chemical = chemical |
| 217 | + """Class representing table 4.1 from EN 1992-1-1:2004. |
| 218 | +
|
| 219 | + Exposure classes related to environmental conditions in accordance with EN 206-1 |
| 220 | +
|
| 221 | + Arguments |
| 222 | + --------- |
| 223 | + carbonation : Carbonation |
| 224 | + The carbonation exposure class. Defaults to Carbonation.NA. |
| 225 | + chloride : Chloride |
| 226 | + The chloride exposure class. Defaults to Chloride.NA. |
| 227 | + chloride_seawater : ChlorideSeawater |
| 228 | + The chloride seawater exposure class. Defaults to ChlorideSeawater.NA. |
| 229 | + freeze_thaw : FreezeThaw |
| 230 | + The freeze/thaw exposure class. Defaults to FreezeThaw.NA. |
| 231 | + chemical : Chemical |
| 232 | + The chemical exposure class. Defaults to Chemical.NA. |
| 233 | +
|
| 234 | + """ |
| 235 | + |
| 236 | + carbonation: Carbonation = field(default=Carbonation.NA) |
| 237 | + chloride: Chloride = field(default=Chloride.NA) |
| 238 | + chloride_seawater: ChlorideSeawater = field(default=ChlorideSeawater.NA) |
| 239 | + freeze_thaw: FreezeThaw = field(default=FreezeThaw.NA) |
| 240 | + chemical: Chemical = field(default=Chemical.NA) |
0 commit comments