fib-international / structuralcodes

A Python library for structural engineering calculations
https://fib-international.github.io/structuralcodes/
Apache License 2.0
66 stars 20 forks source link

calculate_bending_strength results - coordinate axes #163

Open MestreCarlos opened 3 weeks ago

MestreCarlos commented 3 weeks ago

I find the way the results of "calculate_bending_strength" are presented strange. m_y and m_z follow the global axes defined in the section, but chi_y and chi_z follow the rotated 'theta' axes. Is this intentional? What is the reason for this? (See chi_z=0 for rotated n.a pi/6)

import math
from pprint import pprint

from shapely import Polygon

from structuralcodes.geometry import SurfaceGeometry
from structuralcodes.materials.concrete import ConcreteEC2_2004
from structuralcodes.materials.reinforcement import ReinforcementEC2_2023
from structuralcodes.sections._generic import GenericSection
from structuralcodes.sections._reinforcement import add_reinforcement_line

# Materials
concrete = ConcreteEC2_2004(25)
reinforcement = ReinforcementEC2_2023(
    fyk=500, Es=200000, density=7850, ftk=550, epsuk=0.07
)

# Create section
poly = Polygon(((0, 0), (350, 0), (350, 500), (0, 500)))
geo = SurfaceGeometry(poly, concrete)
geo = add_reinforcement_line(
    geo, (50, 450), (300, 450), 20, reinforcement, n=10
)
geo = add_reinforcement_line(geo, (50, 50), (300, 50), 20, reinforcement, n=10)
geo = geo.translate(-175, -250)
sec = GenericSection(geo)

# Draw & print
print('====== SECTION ======')
print('====== Theta = pi/6 ======')
pprint(sec.section_calculator.calculate_bending_strength(theta=math.pi / 6))

====== SECTION ====== ====== Theta = pi/6 ====== UltimateBendingMomentResults(theta=0.5235987755982988, n=-0.003881820593960583, m_y=-537978185.0265349, m_z=-64913391.04673183, chi_y=-1.6762708318650637e-05, chi_z=0, eps_a=0.0015959697879269737)

Another topic that I found confusing is the sign convention for the moments. Normally, it is understood that a positive moment with a horizontal neutral axis compresses the lower block and causes tension in the upper block, but in this case, it doesn’t seem to be that way. I understand the reasoning, which is to be consistent with the coordinate axes (Y horizontal to the right and Z vertical upwards). I just think this should be explained in the documentation to avoid misunderstandings.

This leads me to think that when we use theta = 0 in this function, we get a negative moment (according to fib) and a positive one (according to the standard convention). In this way, theta = 0 leads to a negative m_y result (with an approximate phase shift of 180º between the resultant moments and the neutral fiber angle). Shouldn’t it be the case that when theta = 0, we get a positive My moment and an Mz close to zero? I’m not sure if I explained myself well or if what I’m saying makes sense to you. I hope I’m not causing confusion

mortenengen commented 1 day ago

What are your thoughts on the chi-values, @talledodiego?