-
Notifications
You must be signed in to change notification settings - Fork 22
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: MC2020 30.5.2.4-Limit state of cracking #154
base: dev
Are you sure you want to change the base?
feat: MC2020 30.5.2.4-Limit state of cracking #154
Conversation
Co-authored-by: talledodiego <38036285+talledodiego@users.noreply.github.com>
…codes into ec_2004_crack_control
float: The crack width limit in mm. | ||
|
||
Raises: | ||
ValueError: If exposure_class is invalid. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I cannot see that this is raised by the function.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
related to this, my comment on line 27.
float: The crack width limit en mm. | ||
|
||
Raises: | ||
ValueError: If exposure_class is invalid or |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ValueError
does not seem to be raised by the function.
) -> float: | ||
"""Computes the maximum crack spacing in FRC. | ||
|
||
fib Model Code 2020, eq. (30.5-##) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please complete the reference to the equation in the code.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fib Model Code 2020, eq. (30.5-##) | |
fib Model Code 2020, eq. (30.5-11) |
"""Calculate the minimum reinforcement area | ||
As,min for crack control in FRC. | ||
|
||
fib Model Code 2020, eq. (30.5-##) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please complete the equation reference.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fib Model Code 2020, eq. (30.5-##) | |
fib Model Code 2020, eq. (30.5-25) |
@@ -0,0 +1,689 @@ | |||
"""Tests for fib MC2020 Chapter 30.5.2.4.""" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please add tests to reach complete coverage of the added code.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great contribution as always @DanielGMorenaFhecor 🚀 I have merged dev, fixed docstrings, created a page for the api docs, provided a couple of comments, and asked further review from @talledodiego.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Excellent contribution @DanielGMorenaFhecor.
Just some minor comments here and there.
I will review tests after you implement the changes in the code and after you increase coverage (that now is below 80% for this file).
if protection_level in ('PL2', 'PL3'): | ||
if exposure_class == 'X0': | ||
return 0.4 | ||
return 0.3 | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If I am not wrong I would expect these lines being the same as lines 24-27 since Table 30.5-1 shares the first column. Probably we can return the result directly with:
if protection_level.upper() in ('PL2', 'PL3'):
return wlim_rfc(exposure_class)
Raises: | ||
ValueError: If exposure_class is invalid. | ||
""" | ||
if exposure_class in ('XC', 'XD', 'XS'): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
exposure_class.upper()
?
if exposure_class in ('XC', 'XD', 'XS'): | ||
return 0.3 | ||
|
||
return 0.4 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If I put I wrong exposure class I obtain 0.4. Is this the intended behavior?
from scipy.optimize import newton | ||
|
||
|
||
def wlim_rfc(exposure_class: Literal['X0', 'XC', 'XD', 'XS']) -> float: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
just wondering.. why rfc?
return 0.4 | ||
if exposure_class == 'XC': | ||
return 0.2 | ||
return 0.0 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If user inputs wrong values he obtain 0.0. Is this correct?
) -> float: | ||
"""Calculate the coefficient kfl_simpl for the stress state of the section. | ||
|
||
fib Model Code 2020, related to Eq. (30.5-24) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fib Model Code 2020, related to Eq. (30.5-24) | |
fib Model Code 2020, related to Eq. (30.5-26) |
Raises: | ||
ValueError: If any input is invalid or negative. | ||
""" | ||
if tension == 'two-faces': |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
check lower? Again, what if neither of one-face
or two-faces
is input?
+ 'the cross-section must be positive.' | ||
) | ||
|
||
return min(1 - 3.5 * ry / h, 1) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why the min
is needed? I am subtracting a quantity for sure grater than zero, so my result will always be lower than 1.0, right?
Raises: | ||
ValueError: If any input is invalid or negative. | ||
""" | ||
if state == 'tension': |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same as before...
- check lower?
- check for wrong input?
Returns: | ||
float: The crack width limit in mm. | ||
""" | ||
return 0.15 if not self_healing else 0.2 # mm, fluid-tight conditions |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am not finding exactly this rule in MC2020 that seems a bit more elaborate. for self healing 0.2 is accepted when leakage is limited to a small amount with some surface staining. Otherwise wlim < 0.2 mm should be used. If leakege should be minimal no continous cracks are allowed and compression zone greater than 30 mm or 1.5 times max. aggregate size should be available in characteristic load combination (wlim = 0 then?)
Here I have developed the methods for the Chapter 30.5.2.4 from the new MC2020. This is up to review 👍