Skip to content
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

Open
wants to merge 35 commits into
base: dev
Choose a base branch
from

Conversation

DanielGMorenaFhecor
Copy link
Collaborator

Here I have developed the methods for the Chapter 30.5.2.4 from the new MC2020. This is up to review 👍

mortenengen and others added 30 commits December 13, 2022 21:01
Co-authored-by: talledodiego <38036285+talledodiego@users.noreply.github.com>
@DanielGMorenaFhecor DanielGMorenaFhecor added enhancement New feature or request MC2020 fib Model Code 2020 labels Aug 23, 2024
@DanielGMorenaFhecor DanielGMorenaFhecor self-assigned this Aug 23, 2024
@DanielGMorenaFhecor DanielGMorenaFhecor linked an issue Aug 23, 2024 that may be closed by this pull request
float: The crack width limit in mm.

Raises:
ValueError: If exposure_class is invalid.
Copy link
Member

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.

Copy link
Collaborator

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
Copy link
Member

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-##)
Copy link
Member

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.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
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-##)
Copy link
Member

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.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
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."""
Copy link
Member

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.

Copy link
Member

@mortenengen mortenengen left a 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.

Copy link
Collaborator

@talledodiego talledodiego left a 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).

Comment on lines +50 to +54
if protection_level in ('PL2', 'PL3'):
if exposure_class == 'X0':
return 0.4
return 0.3

Copy link
Collaborator

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'):
Copy link
Collaborator

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
Copy link
Collaborator

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:
Copy link
Collaborator

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
Copy link
Collaborator

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)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
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':
Copy link
Collaborator

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)
Copy link
Collaborator

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':
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same as before...

  1. check lower?
  2. 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
Copy link
Collaborator

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?)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request MC2020 fib Model Code 2020
Projects
Status: Changes requested 📝
Development

Successfully merging this pull request may close these issues.

MC2020: Limit state of cracking
3 participants