Skip to content
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

N-M calculation discrepancies in cross section #142

Open
DanielGMorenaFhecor opened this issue Aug 19, 2024 · 2 comments
Open

N-M calculation discrepancies in cross section #142

DanielGMorenaFhecor opened this issue Aug 19, 2024 · 2 comments
Labels
question Further information is requested

Comments

@DanielGMorenaFhecor
Copy link
Collaborator

Contrasting the results from this library with proven software, the N-M diagram results are inconsistent. When the center of gravity is at the origin, the results are more accurate. It would also be beneficial to obtain the full N-M diagram, not just the lower range of M.

See Point 10 that @MestreCarlos prepared in this notebook for further information and illustrations.

@DanielGMorenaFhecor DanielGMorenaFhecor added the bug Something isn't working label Aug 19, 2024
@talledodiego
Copy link
Collaborator

For the first part, see also #140 and #141 that I think explains the apparent discrepancies.

For the second part:
I remember we have spent some time thinking about it with @mortenengen (there is still a notebook somewhere with my comment saying # Morten: two calls? Or a single call? 🤣)
Since in the API for calculate_nm_interaction_domain we included the angle theta of the neutral axis, it makes sense that only half is drawn sinche with theta equal to pi the other part is returned.

Something like this:

# Morten: two calls? Or a single call?
res_1 = section.section_analyzer.calculate_nm_interaction_domain(theta=0)
res_2 = section.section_analyzer.calculate_nm_interaction_domain(theta=0+np.pi)

fig_mn, ax_mn = plt.subplots()
ax_mn.plot(res_1.n / 1000, res_1.m_y *1e-6)
ax_mn.plot(res_2.n / 1000, res_2.m_y *1e-6)
ax_mn.set_xlabel('N [kN]')
ax_mn.set_ylabel('M [kNm]')
ax_mn.axvline(0.0, linestyle='--', color ='k')
ax_mn.axhline(0.0, linestyle='--', color ='k')
ax_mn.set_xlim([-6500, 1500])
ax_mn.xaxis.set_inverted(True)

i_begin = 0
colors = colormaps['tab20']
j = 2
for i in (3,10,40,10,40,40):
    i_end = i_begin + i + 1
    
    ax_mn.plot(res_1.n[i_begin:i_end] / 1000,res_1.m_y[i_begin:i_end] *1e-6,'-o',markersize=2,color=colors(j))
    
    ax_mn.plot(res_2.n[i_begin:i_end] / 1000,res_2.m_y[i_begin:i_end] *1e-6,'-o',markersize=2,color=colors(j+1))
    ax_mn.plot([0, res_2.n[i_begin:i_end][-1]*1e-3], [0, res_2.m_y[i_begin:i_end][-1]*1e-6], '-k')
    ax_mn.plot([0, res_1.n[i_begin:i_end][-1]*1e-3], [0, res_1.m_y[i_begin:i_end][-1]*1e-6], '-k')
    i_begin = i_end - 1
    j+=2

image

@mortenengen mortenengen added question Further information is requested and removed bug Something isn't working labels Oct 9, 2024
@mortenengen
Copy link
Member

I see the point of returning the full domain in one call, but can we do the following:

  • Return only the domain related to the negative moment, as today.
  • Explicitly state in the docstring that this is the intended behaviour?
  • Include examples in the docs where the full domain is calculated using the method shown by @talledodiego above?

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

No branches or pull requests

3 participants