Skip to content

233 Formula 5.8 from NEN-EN 1993-1-1 #519

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

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

johan-tuls
Copy link
Contributor

Description

Please write a description of the changes you made here.
image

Fixes #233

Type of change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)
  • [X ] New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

Checklist:

  • [X ] I have added tests that prove my fix is effective or that my feature works
  • [ X] I have commented my code, particularly in hard-to-understand areas
  • [ X] I have made corresponding changes to the documentation
  • [X ] New and existing unit tests pass locally with my changes

@johan-tuls johan-tuls requested a review from GerjanDorgelo March 5, 2025 13:13
@johan-tuls johan-tuls linked an issue Mar 5, 2025 that may be closed by this pull request
7 tasks
Copy link

github-actions bot commented Mar 5, 2025

Thank you so much for contributing to Blueprints! This is your Pull Request # 1 to this project.
Your contributions help thousands of engineers work more efficiently and accurately.

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!

@johan-tuls johan-tuls self-assigned this Mar 5, 2025
n_ed: N,
) -> bool:
"""Evaluates the formula, for more information see the __init__ method."""
raise_if_less_or_equal_to_zero(lambda_bar=lambda_bar, A=a, f_y=f_y, N_Ed=n_ed)
Copy link
Contributor

Choose a reason for hiding this comment

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

lambda_bar and A and fy can be zero. use raise_if_negative instead.

def latex(self) -> LatexFormula:
"""Returns LatexFormula object for formula 5.8."""
n = 2
_equation: str = r"\left( \lambda_{bar} > 0.5 \sqrt{\frac{A \cdot f_{y}}{N_{Ed}}} \right)"
Copy link
Contributor

Choose a reason for hiding this comment

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

i personally prefer a \cdot after the 0.5, but its up to you.

(1.0, -1000.0, 355.0, 100000.0), # a is negative
(1.0, 1000.0, -355.0, 100000.0), # f_y is negative
(1.0, 1000.0, 355.0, -100000.0), # n_ed is negative
(0.0, 1000.0, 355.0, 100000.0), # lambda_bar is zero
Copy link
Contributor

Choose a reason for hiding this comment

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

line 35-37 not needed for tests, as they can be zero.

with pytest.raises(LessOrEqualToZeroError):
Form5Dot8CheckSlenderness(lambda_bar, a, f_y, n_ed)

def test_latex(self) -> None:
Copy link
Contributor

Choose a reason for hiding this comment

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

this test is not in line with all other formula latex tests. could you add the full short and complete result?

def latex(self) -> LatexFormula:
"""Returns LatexFormula object for formula 5.8."""
n = 2
_equation: str = r"\left( \lambda_{bar} > 0.5 \sqrt{\frac{A \cdot f_{y}}{N_{Ed}}} \right)"
Copy link
Contributor

Choose a reason for hiding this comment

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

\overline{\lambda}

Parameters
----------
lambda_bar : DIMENSIONLESS
[$\lambda_{bar}$] Non-dimensional slenderness [-].
Copy link
Contributor

Choose a reason for hiding this comment

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

is the in-plane non-dimensional slenderness calculated for the member considered as hinged at
its ends


Parameters
----------
lambda_bar : DIMENSIONLESS
Copy link
Contributor

Choose a reason for hiding this comment

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

\overline{\lambda}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[✨ Feature request]: Add formula 5.8 from NEN_EN_1993_1_1_C2_A1_2016
3 participants