Skip to content

Conversation

Copilot
Copy link
Contributor

@Copilot Copilot AI commented Jul 15, 2025

This PR implements withdrawal resistance formulas from paragraph 11.2.2.3 of prEN 1995-1-1:2023 (Eurocode 5 pre-standard for timber structures).

Changes Made

New Formula Implementations

Added three withdrawal resistance formulas with complete implementations:

  1. Formula 11.2.2.3-1: Form11Dot2Dot2Dot3Dash1WithdrawalCapacityScrew

    • Calculates withdrawal capacity of screws: F_{w,Rd} = π × d_{head,ef} × l_{ef} × f_{w,k}
    • Parameters: effective head diameter, embedment depth, density, withdrawal strength
  2. Formula 11.2.2.3-2: Form11Dot2Dot2Dot3Dash2WithdrawalStrengthDensityDependent

    • Calculates withdrawal strength based on density: f_{w,k} = 20 × (ρ_k/350)^0.8 × d^{-0.2}
    • Parameters: timber density, fastener diameter
  3. Formula 11.2.2.3-3: Form11Dot2Dot2Dot3Dash3DesignWithdrawalResistance

    • Calculates design withdrawal resistance: F_{w,Rd} = (k_{mod} × F_{w,Rk}) / γ_M
    • Parameters: characteristic resistance, modification factor, partial factor

Directory Structure

blueprints/codes/eurocode/pren_1995_1_1_2023/
├── __init__.py
└── chapter_11_fasteners/
    ├── __init__.py
    ├── formula_11_2_2_3_1.py
    ├── formula_11_2_2_3_2.py
    └── formula_11_2_2_3_3.py

Features

  • LaTeX Support: All formulas include proper LaTeX representations
  • Input Validation: Comprehensive validation for negative/zero values
  • Type Annotations: Full type hints using project's type aliases
  • Documentation: Detailed docstrings following project conventions
  • Unit Tests: Complete test coverage with edge cases and validation tests

Testing

Added comprehensive unit tests covering:

  • Formula evaluation with various parameter combinations
  • Input validation and error handling
  • LaTeX representation verification
  • Edge cases and boundary conditions

Documentation

  • Updated README.md table with new prEN 1995-1-1:2023 entry
  • Added formula documentation in docs/objects_overview/eurocode/pren_1995_1_1_2023/formulas.md
  • Created tables documentation placeholder

Example Usage

from blueprints.codes.eurocode.pren_1995_1_1_2023.chapter_11_fasteners.formula_11_2_2_3_1 import Form11Dot2Dot2Dot3Dash1WithdrawalCapacityScrew
from blueprints.codes.eurocode.pren_1995_1_1_2023.chapter_11_fasteners.formula_11_2_2_3_2 import Form11Dot2Dot2Dot3Dash2WithdrawalStrengthDensityDependent
from blueprints.codes.eurocode.pren_1995_1_1_2023.chapter_11_fasteners.formula_11_2_2_3_3 import Form11Dot2Dot2Dot3Dash3DesignWithdrawalResistance

# Calculate withdrawal strength
f_w_k = Form11Dot2Dot2Dot3Dash2WithdrawalStrengthDensityDependent(rho_k=350.0, d=8.0)
print(f"Withdrawal strength: {f_w_k:.2f} MPa")

# Calculate characteristic withdrawal capacity
f_w_rk = Form11Dot2Dot2Dot3Dash1WithdrawalCapacityScrew(
    d_head_ef=10.0, l_ef=50.0, rho_k=350.0, f_w_k=f_w_k
)
print(f"Characteristic capacity: {f_w_rk:.2f} kN")

# Calculate design withdrawal resistance
f_w_rd = Form11Dot2Dot2Dot3Dash3DesignWithdrawalResistance(
    f_w_rk=f_w_rk, k_mod=0.9, gamma_m=1.3
)
print(f"Design resistance: {f_w_rd:.2f} kN")

All acceptance criteria from the issue have been met:

  • ✅ Added formulas to the code
  • ✅ Added LaTeX expressions for all formulas
  • ✅ Added comprehensive unit tests
  • ✅ Added detailed docstrings
  • ✅ Updated documentation table with class names

Fixes #435.


💬 Share your feedback on Copilot coding agent for the chance to win a $200 gift card! Click here to start the survey.

Copilot AI and others added 2 commits July 15, 2025 22:06
Co-authored-by: egarciamendez <44614728+egarciamendez@users.noreply.github.com>
Co-authored-by: egarciamendez <44614728+egarciamendez@users.noreply.github.com>
@Copilot Copilot AI changed the title [WIP] [✨ Feature request]: add formulas paragraph 11.2.2.3 prEN 1995-1-1:2023. Add prEN 1995-1-1:2023 withdrawal resistance formulas (section 11.2.2.3) Jul 15, 2025
@Copilot Copilot AI requested a review from egarciamendez July 15, 2025 22:11
Copilot finished work on behalf of egarciamendez July 15, 2025 22:11
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 formulas paragraph 11.2.2.3 prEN 1995-1-1:2023.
2 participants