karamba3d / K3D_NightlyBuilds

Nightly build versions of Karamba3d
https://karamba3d.com
25 stars 2 forks source link

BUG: kzy factor for uniform members in bending and axial compression (EN 1993-1-1, Annex B) #77

Closed hwatt1 closed 1 year ago

hwatt1 commented 1 year ago

Describe the bug I think the formula for calculating the kzy factor in the Utilisation of Elements component in Karamba3D version 2.2.0.180-230616 for RHINO 7, and found in the C++ script CroSecStateImp_EC3.cpp (line 447) I downloaded from a 2014 forum post. I've attached the .cpp file that I downloaded from this forum post: https://www.grasshopper3d.com/group/karamba3d/forum/topics/bending-moment-utilization-caculations

The line of code in question (line 447) is "return kzy1 < kzy2 ? kzy1 : kzy2;", where, to my understanding (although I don't know C++) the line will set kzy to kzy1 if kzy1 is smaller than kzy2, otherwise to kzy2 (essentially min(kzy1, kzy2) in excel speak). From EN 1993-1-1, Annex B, Table B.2, however, I think the formula should instead return the greater of the two.

This error looks like it is also replicated in line 422, for Class 3/4 sections.

I have validated my I-section design with Appendix A of the thesis referenced in the Karamba3D online manual (Reference [9] from https://manual.karamba3d.com/appendix/bibliography, being https://trepo.tuni.fi/bitstream/handle/123456789/25580/M%C3%A4enp%C3%A4%C3%A4.pdf?sequence=4&isAllowed=y also attached (side note: the link on the online manual bibliography for this thesis doesn't seem to work for me)).

To Reproduce Steps to reproduce the behavior:

  1. In the attached I_section_utilisation_model.gh
  2. Viewing Details output of the Utilisation of Elements component, kzy = 0.8518
  3. Using EN 1993-1-1, Table B.2 formula for Class 1/2, kzy1 = 0.851 and kzy2 = 0.949, therefore kzy = 0.949 (using lambda_z = 2.932 (from Appendix A of referenced thesis), and CmLT = 1.0 and chi_z = 0.104 (from GH Details output))

Notes Attachments:

  1. I-section design thesis from online manual bibliography Mäenpää (2018) – Algorithm-aided structural engineering of steel-framed warehouse.pdf

  2. The beam utilisation code, CroSecStateImp_EC3.cpp (uploaded as .txt as I couldn't seem to upload a .cpp file) CroSecStateImp_EC3.txt

  3. The Grasshopper script that I have taken the numbers from in the above To Reproduce section (zipped as I couldn't upload a .gh file) I_section_utilisation_model.zip

  4. Screenshot of the C++ script and EN 1993-1-1 equations mentioned Screenshot_C++script_EN1993-1-1

Clemens-Preisinger commented 1 year ago

Dear @hwatt1 , thanks for the bug report! you are right, kzy needs to be the larger of the two numbers. Here is the updated source file: UtilChecker_EC3.zip It will be part of the next service release. -- Clemens P.S: Also thanks regarding the report of the broken link. I have updated it.

hwatt1 commented 1 year ago

Hi Clemens,

Thank you for such a speedy reply. Happy to help.

Cheers, Harry