robbievanleeuwen / section-properties

Analysis of an arbitrary cross-section in python using the finite element method.
https://sectionproperties.rtfd.io
MIT License
430 stars 94 forks source link

Undesirable Behavior - First Moment of Area #34

Closed Czarified closed 4 years ago

Czarified commented 4 years ago

Describe the bug First moment of area (Qx, Qy) results seem to be summed over the entire cross-section, which results is a zero-value. Is there a way to get just the Qx, Qy over the top half or bottom half? If you were calculating transverse shear over the section (VQ/Ib), what property do you use to get non-zero results?

To Reproduce

import sectionproperties.pre.nastran_sections as sections
from sectionproperties.analysis.cross_section import CrossSection

shape = sections.ZSection(DIM1=.4, DIM2=0.2, DIM3=.8, DIM4=1.2, shift=[-.2,0])
mesh = shape.create_mesh(mesh_sizes=[0.0005])

xsect = CrossSection(shape, mesh)
xsect.calculate_geometric_properties()
xsect.display_results()

Expected behaviour Since top and bottom first moments of area should be equal, why not provide one or the other, instead of summing over the whole cross-section?

Desktop (please complete the following information):

Additional context Possibly not a bug. I may not fully understand how to interpret the results.

Czarified commented 4 years ago

Thinking about this just a bit more, shouldn't the get_q method have an input for (x, y) coordinates? I guess you just handle that all with your own get_stress method at the element level... I was trying to implement my own stress methods and just use this library for properties. I'm a bit fuzzier on the analysis methods than I thought... 😳

robbievanleeuwen commented 4 years ago

HI @Czarified,

The implementation of the first moment of area is as per its mathematical definition, which involves the integral over the entire area of the cross-section:

Screen Shot 2020-09-24 at 2 49 04 pm

The first moment of area in sectionproperties is taken about the global coordinate axis, i.e. x-y axis centred at (0,0). Therefore if the centroid of your geometry coincides with (0,0), the first moment of areas will be zero. However, this is a special case and the first moments of area are generally not equal to zero. For an example where the centroid of the section does not coincide with the origin see the results from this example.

The formula you're referring to comes from a number of assumptions which results in the 'shear flow' across the section. The shear flow is converted into an 'average stress' by dividing by the width of the section at that point. Gives pretty good results for thin-walled standard sections but is certainly not a formula that can be applied for arbitrary sections. The way sectionproperties calculates shear stresses is based on a more complete elasticity formulation (see 'Analysis and Design of Elastic Beams' by W. Pilkey) involving shear functions and the Poisson's ratio:

Screen Shot 2020-09-24 at 3 02 05 pm

If you want to calculate first moments of area for only half of a section, or whatever portion of the section you want, this is still possible with sectionproperties but there isn't a function that easily does this for you as there isn't really a use case for this that I can see. The process would involve only modelling the portion of area you want and ensuring that the centroid of your full cross-section is at (0,0).

For example if you wanted to know the first moment of area of the top portion of the below cruciform, you could model just that top portion, ensuring the nodes were located such that the origin of the entire cruciform was at (0,0). The first moment of top portion would then be calculated about the neutral axis and would ignore the rest of the section. Bad markup below:

cruciform_geometry

Let me know if this makes sense/answers your question.

robbievanleeuwen commented 4 years ago

In thinking about what you are trying to achieve with calculating stresses; a summary of how sectionproperties works:

Czarified commented 4 years ago

Robbie, thanks for the thorough explanation. I think I'm following now. So for my purposes, I may stick to the thin-walled assumption. I'll have to read up on Peery/Bruhn/etc to confirm this. It seems like the easiest solution is to just always make sure my section is shifted like your example, to give a conservative Q, and therefore a conservative shear stress across the section. Or I guess I could use the max nodal stress from sectionproperties' calculations.

I'm gonna read up on the theory some more, experiment with different options, and see what will work best for me. Thanks again for walking me through it, and documenting the library so well!!