-
Notifications
You must be signed in to change notification settings - Fork 2
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
Add formulas from chapter 12 1 to 12 6 from nen en 1992 1 1 #441
base: main
Are you sure you want to change the base?
Add formulas from chapter 12 1 to 12 6 from nen en 1992 1 1 #441
Conversation
Thank you so much for contributing to Blueprints! This is your Pull Request # 1 to this project. Now that you've created your pull request, please don't go away; take a look at the bottom of this page for the automated checks that should already be running. If they pass, great! If not, please click on 'Details' and see if you can fix the problem they've identified. A maintainer should be along shortly to review your pull request and help get it added! |
…_12_6_from_NEN_EN_1992_1_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.
What happened with this file? i'd suggest reverting it to original and then only add the 6 rows that shouldve had changes
|
||
def __init__( | ||
self, | ||
alpha_ct_pl: DIMENSIONLESS, |
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.
expression is with alpha_ct. the pl suffix is only found in the description.
|
||
class Form12Dot1PlainConcreteTensileStrength(Formula): | ||
r"""Class representing formula 12.1 for the calculation of the design tensile strength of plain concrete, | ||
:math:`f_{ctd,pl}`. |
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.
12.1 is for regular f_ctd?
) -> None: | ||
r"""[:math:`f_{ctd,pl}`] Design tensile strength of plain concrete [:math:`MPa`]. | ||
|
||
NEN-EN 1992-1-1+C2:2011 art.12.3.1 - Formula (12.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.
12.3.1(2)
), | ||
("short", r"f_{ctd,pl} = 1.333"), | ||
( | ||
"string", |
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 dont think we're using the string anymore. so no need add it for next Pull Requests
|
||
Parameters | ||
---------- | ||
eta_f_cd_pl : MPa |
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.
12.2 is without the _pl
"""Evaluates the formula, for more information see the __init__ method.""" | ||
raise_if_negative( | ||
v_ed=v_ed, | ||
a_cc=a_cc, |
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.
no need for a_cc here
a_cc: MM2, | ||
) -> MPA: | ||
"""Evaluates the formula, for more information see the __init__ method.""" | ||
raise_if_negative( |
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.
k is missing in this one
"""Helper class for sigma_cp vs sigma_c,lim evaluation.""" | ||
|
||
|
||
class Form12Dot4PlainConcreteShearStressComparison: |
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.
return LatexFormula( | ||
return_symbol=r"f_{cvd}", | ||
result=f"{result:.3f}", | ||
equation=equation, |
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.
how about if done like this?:
example code (didnt test completely):
` def latex(self) -> LatexFormula:
"""Returns LatexFormula object for formula 12.5. / 12.6."""
result = self._evaluate(self.f_ctd_pl, self.sigma_cp, self.sigma_c_lim)
equation_smallor_or_equal = r"\sqrt{f_{ctd, pl} ^ 2 + \sigma_{cp} \cdot f_{ctd, pl}}"
numeric_equation_smallor_or_equal = rf"\sqrt{{{self.f_ctd_pl:.3f} ^ 2 + {self.sigma_cp:.3f} \cdot {self.f_ctd_pl:.3f}}}"
equation_larger = r"\sqrt{f_{ctd, pl} ^ 2 + \sigma_{cp} \cdot f_{ctd, pl} - \left(\frac{\sigma_{cp} - \sigma_{c, lim}}{2}\right) ^ 2}"
part1 = f"{self.f_ctd_pl:.3f} ^ 2"
part2 = rf"{self.sigma_cp:.3f} \cdot {self.f_ctd_pl:.3f}"
part3 = f"\\left(\\frac{{{self.sigma_cp:.3f} - {self.sigma_c_lim:.3f}}}{2}\\right) ^ 2"
numeric_equation_larger = rf"\sqrt{{{part1} + {part2} - {part3}}}"
equation = rf"\begin{{cases}} {equation_smallor_or_equal} & \text{{if }} \sigma_{{cp}} \leq \sigma_{{c, lim}} \\ {equation_larger} & \text{{otherwise}} \end{{cases}}"
numeric_equation = rf"\begin{{cases}} {numeric_equation_smallor_or_equal} & \text{{if }} \sigma_{{cp}} \leq \sigma_{{c, lim}} \\ {numeric_equation_larger} & \text{{otherwise}} \end{{cases}}"
return LatexFormula(
return_symbol=r"f_{cvd}",
result=f"{result:.3f}",
equation=equation,
numeric_equation=numeric_equation,
comparison_operator_label="=",
)`
) | ||
def test_raise_error_when_negative_values_are_given( | ||
self, | ||
alpha_ct_pl: 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.
dimensionless x3
|
||
def __init__( | ||
self, | ||
f_ctd_pl: MPA, |
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.
Description
Type of change
Please delete options that are not relevant.
Checklist: