diff --git a/blueprints/codes/eurocode/nen_en_1992_1_1_c2_2011/chapter_4_durability_and_cover/formula_4_2.py b/blueprints/codes/eurocode/nen_en_1992_1_1_c2_2011/chapter_4_durability_and_cover/formula_4_2.py index 816d00ca..809bd845 100644 --- a/blueprints/codes/eurocode/nen_en_1992_1_1_c2_2011/chapter_4_durability_and_cover/formula_4_2.py +++ b/blueprints/codes/eurocode/nen_en_1992_1_1_c2_2011/chapter_4_durability_and_cover/formula_4_2.py @@ -17,9 +17,9 @@ def __init__( self, c_min_b: MM, c_min_dur: MM, - delta_c_dur_gamma: MM, - delta_c_dur_st: MM, - delta_c_dur_add: MM, + delta_c_dur_gamma: MM = 0, + delta_c_dur_st: MM = 0, + delta_c_dur_add: MM = 0, ) -> None: """[:math:`c_{min}`] Calculates the minimum concrete cover [:math:`mm`]. @@ -35,10 +35,16 @@ def __init__( [:math:`c_{min,dur}`] The minimum concrete cover based on environmental conditions based on art. 4.4.1.2 (5) [:math:`mm`]. delta_c_dur_gamma: MM [:math:`Δc_{dur,γ}`] An additional safety requirement based on art. 4.4.1.2 (6) [:math:`mm`]. + The value of [:math:`Δc_{dur,γ}`] for use in a Country may be found in its National Annex. + The recommended value is O mm. 0 mm is the default value in the formula if not specified otherwise. delta_c_dur_st: MM [:math:`Δc_{dur,st}`] A reduction of minimum concrete cover when using stainless steel based on art. 4.4.1.2 (7) [:math:`mm`]. + The value of [:math:`Δc_{dur,st}`] for use in a Country may be found in its National Annex. + The recommended value, without further specification, is 0 mm. 0 mm is the default value in the formula if not specified otherwise. delta_c_dur_add: MM [:math:`Δc_{dur,add}`] A reduction of minimum concrete cover when using additional protection based on art. 4.4.1.2 (8) [:math:`mm`]. + The value of [:math:`Δc_{dur,add}`] for use in a Country may be found in its National Annex. + The recommended value, without further specification, is 0 mm. 0 mm is the default value in the formula if not specified otherwise. """ super().__init__() self.c_min_b = c_min_b @@ -51,9 +57,9 @@ def __init__( def _evaluate( c_min_b: MM, c_min_dur: MM, - delta_c_dur_gamma: MM, - delta_c_dur_st: MM, - delta_c_dur_add: MM, + delta_c_dur_gamma: MM = 0, + delta_c_dur_st: MM = 0, + delta_c_dur_add: MM = 0, ) -> MM: """For more detailed documentation see the class docstring.""" raise_if_negative( diff --git a/tests/codes/eurocode/nen_en_1992_1_1_c2_2011/chapter_4_durability_and_cover/test_formula_4_2.py b/tests/codes/eurocode/nen_en_1992_1_1_c2_2011/chapter_4_durability_and_cover/test_formula_4_2.py index e7aa41c8..f3e87145 100644 --- a/tests/codes/eurocode/nen_en_1992_1_1_c2_2011/chapter_4_durability_and_cover/test_formula_4_2.py +++ b/tests/codes/eurocode/nen_en_1992_1_1_c2_2011/chapter_4_durability_and_cover/test_formula_4_2.py @@ -30,6 +30,21 @@ def test_evaluation(self) -> None: assert form_4_2 == pytest.approx(expected=manually_calculated_result, rel=1e-4) + def test_evaluation_default_values(self) -> None: + """Test the evaluation of the result using the default values for delta parameters.""" + # Example values + c_min_b = 15 # mm + c_min_dur = 20 # mm + form_4_2 = Form4Dot2MinimumConcreteCover( + c_min_b=c_min_b, + c_min_dur=c_min_dur, + ) + + # Expected result, manually calculated + manually_calculated_result = 20 + + assert form_4_2 == pytest.approx(expected=manually_calculated_result, rel=1e-4) + def test_raise_error_when_negative_c_min_b_is_given(self) -> None: """Test the evaluation of the result.""" # Example values