-
Notifications
You must be signed in to change notification settings - Fork 18
830 feature request check for strength of steel i profiles class 3 - normal force #836
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
base: 840-feature-request-add-first-steel-check-to-blueprints
Are you sure you want to change the base?
Conversation
…cording to Eurocode 3
… class and enhance latex output; add unit tests for validation.
…fy parameters and add details for NormalForceCheck class.
…Steel I-Profile strength class 3
…tor heb_profile fixture
|
Thank you so much for contributing to Blueprints! 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! |
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.
Pull Request Overview
This PR introduces a showcase implementation of automated steel strength checks for Class 3 I-profiles according to Eurocode 3. The implementation demonstrates a structure for performing multiple sub-checks using various formulas, specifically focusing on normal force resistance checks for both tension and compression cases.
Key changes:
- Introduces
LoadCombinationdataclass to represent load combinations with clear sign conventions - Implements
SteelIProfileStrengthClass3with a nestedNormalForceCheckclass for evaluating normal force resistance - Provides comprehensive test coverage for both the main check class and the normal force sub-check
Reviewed Changes
Copilot reviewed 11 out of 11 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
blueprints/checks/loads/load_combination.py |
Defines a frozen dataclass representing load combinations with detailed documentation of axis conventions and sign definitions |
blueprints/checks/steel/strength/steel_i_profile_strength_class_3.py |
Implements the main strength check class with a nested normal force check that applies Eurocode 3 formulas for tension and compression |
tests/checks/loads/test_load_combination.py |
Comprehensive tests for LoadCombination including initialization, equality, and hashability |
tests/checks/steel/strength/test_steel_i_profile_strength_class_3.py |
Tests for both the main check class and the normal force sub-check, including parametrized LaTeX output validation |
tests/checks/steel/strength/conftest.py |
Provides a reusable fixture for creating HEB300 profile instances with section properties |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
blueprints/checks/steel/strength/steel_i_profile_strength_class_3.py
Outdated
Show resolved
Hide resolved
blueprints/checks/steel/strength/steel_i_profile_strength_class_3.py
Outdated
Show resolved
Hide resolved
blueprints/checks/steel/strength/steel_i_profile_strength_class_3.py
Outdated
Show resolved
Hide resolved
…lation; update test fixture documentation.
…eel-i-profiles-class-3
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## 840-feature-request-add-first-steel-check-to-blueprints #836 +/- ##
==========================================================================================
Coverage 100.00% 100.00%
==========================================================================================
Files 404 406 +2
Lines 12643 12746 +103
==========================================================================================
+ Hits 12643 12746 +103 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
…ileStrengthClass3
…enhance LaTeX formatting and improve test cases for compression checks.
…enhance LaTeX formatting for short and detailed outputs.
…improve LaTeX representation and streamline logic for tension and compression checks.
… None area values and ensure correct tension and compression checks.
…leStrengthClass3 for clarity and update corresponding test cases.
…oordinate-system-for-all-strenthstability-checks' into 830-feature-request-check-for-strength-of-steel-i-profiles-class-3
… for load combinations and add single axis bending moment checks.
…Steel I-Profile strength class 3
… Steel I-Profiles
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.
Pull request overview
Copilot reviewed 15 out of 20 changed files in this pull request and generated 1 comment.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
blueprints/checks/eurocode/en_1993_1_1_2005/ultimate_limit_states/normal_force.py
Show resolved
Hide resolved
…use dataclass for improved readability and structure
… variable and adjust test assertions
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.
Pull request overview
Copilot reviewed 15 out of 20 changed files in this pull request and generated 2 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
blueprints/checks/eurocode/steel/strength/steel_i_profile_strength_class_3.py
Outdated
Show resolved
Hide resolved
…include source document and improve constructor documentation
…improve documentation and simplify constructors
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.
Pull request overview
Copilot reviewed 18 out of 23 changed files in this pull request and generated 2 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
…checks for all class cross-sections
- Implement NormalForceClass123 for normal force resistance checks on steel I-profiles of class 1, 2, and 3. - Create SteelIProfileStrengthClass3 to perform overall strength checks for class 3 steel I-profiles, integrating normal force checks. - Add unit tests for normal force checks and overall strength checks for steel I-profiles, ensuring correct functionality and LaTeX output. - Introduce fixtures for HEB profile and properties to streamline testing. - Establish test structure for nominal concrete cover checks in accordance with EN 1992-1-1.
… EN 1993-1-1:2005
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.
Pull request overview
Copilot reviewed 22 out of 27 changed files in this pull request and generated 2 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
blueprints/checks/eurocode/en_1993_1_1_2005/ultimate_limit_states/normal_force.py
Show resolved
Hide resolved
...s/checks/eurocode/en_1993_1_1_2005/ultimate_limit_states/steel_i_profile_strength_class_3.py
Show resolved
Hide resolved
…le strength classes to reflect Eurocode structure
…ode 3 - Implemented SteelIProfileStrengthClass3 for strength checks on class 3 steel I-profiles. - Added calculation steps for normal force, with placeholders for other checks. - Created tests for SteelIProfileStrengthClass3 and NormalForceClass123, covering various scenarios and latex output. - Updated imports in nominal_concrete_cover example to reflect new module structure. - Removed obsolete __init__.py files from concrete and steel test directories. - Added new __init__.py files for EN 1992-1-1:2004 and EN 1993-1-1:2005 test directories.
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.
Pull request overview
Copilot reviewed 22 out of 25 changed files in this pull request and generated 5 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
...s/checks/eurocode/en_1993_1_1_2005/ultimate_limit_states/steel_i_profile_strength_class_3.py
Show resolved
Hide resolved
blueprints/checks/eurocode/en_1993_1_1_2005/ultimate_limit_states/normal_force.py
Show resolved
Hide resolved
blueprints/checks/eurocode/en_1993_1_1_2005/ultimate_limit_states/normal_force.py
Show resolved
Hide resolved
blueprints/checks/eurocode/en_1993_1_1_2005/ultimate_limit_states/normal_force.py
Show resolved
Hide resolved
Co-authored-by: Copilot <[email protected]>
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.
Pull request overview
Copilot reviewed 22 out of 25 changed files in this pull request and generated 2 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
...s/checks/eurocode/en_1993_1_1_2005/ultimate_limit_states/steel_i_profile_strength_class_3.py
Show resolved
Hide resolved
...cks/eurocode/en_1993_1_1_2005/ultimate_limit_states/test_steel_i_profile_strength_class_3.py
Show resolved
Hide resolved
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.
Pull request overview
Copilot reviewed 22 out of 25 changed files in this pull request and generated 5 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| Example | ||
| ------- | ||
| from blueprints.checks.eurocode.en_1993_1_1_2005.ultimate_limit_states.normal_force import NormalForceClass123 |
Copilot
AI
Dec 21, 2025
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.
The import statement on line 37 is duplicated with line 11. Remove the duplicate import from the docstring example section.
| from blueprints.checks.eurocode.en_1993_1_1_2005.ultimate_limit_states.normal_force import NormalForceClass123 |
| from blueprints.structural_sections.steel.steel_cross_sections.i_profile import ISteelProfile | ||
| from blueprints.structural_sections.steel.steel_cross_sections.standard_profiles.heb import HEB | ||
| from blueprints.saf.results.result_internal_force_1d import ResultFor, ResultInternalForce1D, ResultOn | ||
| from blueprints.structural_sections.steel.steel_cross_sections.i_profile import ISteelProfile |
Copilot
AI
Dec 21, 2025
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.
The import statement on line 43 is duplicated with line 14. Remove the duplicate import from the docstring example section.
| from blueprints.structural_sections.steel.steel_cross_sections.i_profile import ISteelProfile |
| from blueprints.structural_sections.steel.steel_cross_sections.i_profile import ISteelProfile | ||
| from blueprints.structural_sections.steel.steel_cross_sections.standard_profiles.heb import HEB | ||
| from blueprints.saf.results.result_internal_force_1d import ResultFor, ResultInternalForce1D, ResultOn | ||
| from blueprints.structural_sections.steel.steel_cross_sections.i_profile import ISteelProfile |
Copilot
AI
Dec 21, 2025
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.
The import statement on line 50 is duplicated with line 20. Remove the duplicate import from the docstring example section.
| from blueprints.structural_sections.steel.steel_cross_sections.i_profile import ISteelProfile |
| load_tension = ResultInternalForce1D( | ||
| result_on=ResultOn.ON_BEAM, member="M1", result_for=ResultFor.LOAD_CASE, load_case="LC1", n=355 * 14908 / 1.0 / 1e3 * 0.99 | ||
| ) # 99% of capacity |
Copilot
AI
Dec 21, 2025
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.
The magic numbers 355, 14908, and 0.99 should be extracted into named constants or calculated from the profile properties to improve readability and maintainability. Similar issue exists in lines 45, 57, and 69.
| # Check (multiple axis) bending and shear interaction (not yet implemented) | ||
| if ( | ||
| max(abs(self.result_internal_force_1d.my), abs(self.result_internal_force_1d.mz)) > 0 | ||
| and max(abs(self.result_internal_force_1d.vy), abs(self.result_internal_force_1d.vz)) > 0 | ||
| ): | ||
| all_latex += r"\newline \newline \text{Warning: bending and shear interaction check not yet implemented.}" | ||
|
|
||
| # Check bending and axial force interaction (not yet implemented) | ||
| if (max(abs(self.result_internal_force_1d.my), abs(self.result_internal_force_1d.mz)) > 0 and abs(self.result_internal_force_1d.n) > 0) or ( | ||
| self.result_internal_force_1d.mz != 0 and self.result_internal_force_1d.my != 0 | ||
| ): | ||
| all_latex += r"\newline \newline \text{Warning: (multiple axis) bending and axial force interaction check not yet implemented.}" | ||
|
|
||
| # Check bending, shear and axial force interaction (not yet implemented) | ||
| if ( | ||
| max(abs(self.result_internal_force_1d.my), abs(self.result_internal_force_1d.mz)) > 0 | ||
| and max(abs(self.result_internal_force_1d.vy), abs(self.result_internal_force_1d.vz)) > 0 | ||
| and abs(self.result_internal_force_1d.n) > 0 | ||
| ): |
Copilot
AI
Dec 21, 2025
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.
This conditional logic is complex and difficult to understand. Consider breaking it into smaller, named boolean variables that clearly express the intent of each condition (e.g., has_bending_moment, has_axial_force, has_biaxial_bending).
| # Check (multiple axis) bending and shear interaction (not yet implemented) | |
| if ( | |
| max(abs(self.result_internal_force_1d.my), abs(self.result_internal_force_1d.mz)) > 0 | |
| and max(abs(self.result_internal_force_1d.vy), abs(self.result_internal_force_1d.vz)) > 0 | |
| ): | |
| all_latex += r"\newline \newline \text{Warning: bending and shear interaction check not yet implemented.}" | |
| # Check bending and axial force interaction (not yet implemented) | |
| if (max(abs(self.result_internal_force_1d.my), abs(self.result_internal_force_1d.mz)) > 0 and abs(self.result_internal_force_1d.n) > 0) or ( | |
| self.result_internal_force_1d.mz != 0 and self.result_internal_force_1d.my != 0 | |
| ): | |
| all_latex += r"\newline \newline \text{Warning: (multiple axis) bending and axial force interaction check not yet implemented.}" | |
| # Check bending, shear and axial force interaction (not yet implemented) | |
| if ( | |
| max(abs(self.result_internal_force_1d.my), abs(self.result_internal_force_1d.mz)) > 0 | |
| and max(abs(self.result_internal_force_1d.vy), abs(self.result_internal_force_1d.vz)) > 0 | |
| and abs(self.result_internal_force_1d.n) > 0 | |
| ): | |
| # Define combined internal force conditions for readability | |
| has_bending_moment: bool = max( | |
| abs(self.result_internal_force_1d.my), | |
| abs(self.result_internal_force_1d.mz), | |
| ) > 0 | |
| has_shear_force: bool = max( | |
| abs(self.result_internal_force_1d.vy), | |
| abs(self.result_internal_force_1d.vz), | |
| ) > 0 | |
| has_axial_force: bool = abs(self.result_internal_force_1d.n) > 0 | |
| has_biaxial_bending: bool = ( | |
| self.result_internal_force_1d.mz != 0 | |
| and self.result_internal_force_1d.my != 0 | |
| ) | |
| # Check (multiple axis) bending and shear interaction (not yet implemented) | |
| if has_bending_moment and has_shear_force: | |
| all_latex += r"\newline \newline \text{Warning: bending and shear interaction check not yet implemented.}" | |
| # Check bending and axial force interaction (not yet implemented) | |
| if (has_bending_moment and has_axial_force) or has_biaxial_bending: | |
| all_latex += r"\newline \newline \text{Warning: (multiple axis) bending and axial force interaction check not yet implemented.}" | |
| # Check bending, shear and axial force interaction (not yet implemented) | |
| if has_bending_moment and has_shear_force and has_axial_force: |
Description
I propose every check class being made from 4 segments:
To solve (1), i moved files into more subfolders so we can seperate by code itself. Furthermore, a check has been written for the Normal Force (class 1, 2 and 3), which is a check made from Formula. I also initiated a steel_i_profile_strenght_class_3 check, which is a check made from other checks. For now just the Normal Force, but when we settle on the format of the Checks, i want to add moments/torsion/etc before pushing it to main.
Type of change
Checklist: