There is no special function for defining the cross-section of a Beam object. A user can simply pass the geometry object as a parameter instead of the second_moment, and the corresponding second moment would be calculated internally. The example below might explain this better:
>>> b = Beam(l, E, Circle((0, 0), r)) >>> b.second_moment pi*r*Abs(r)**3/4 >>> b.cross_section Circle(Point2D(0, 0), r)
Further, the cross_section attribute can be changed even after the beam is created. Every time the cross_section is assigned a new value, the second_moment gets automatically updated.
Similarly, every time the user changes the second_moment explicitly after the creation of the beam, the previous cross_section gets destroyed, or in other words, the cross_section is set to None.
>>> b = Beam(l, E, Circle((0, 0), r)) >>> I = Symbol(‘I’) >>> b.second_moment = I >>> b.cross_section None >>> b.second_moment = Polygon((0, 0), (a, 0), (a, b), (0, b)) ValueError: To update cross-section geometry use `cross_section` attribute
The PR is complete and just needs the final approval from the mentors.
Simultaneously, I had worked on the column buckling calculations which is a part of the stage –II.
I have opened an issue-cum-discussion for discussing its API and further implementations.
Since the calculations of the Column Buckling are very much different from those of beam bending, we will have to make a separate class Column. The basic API and the way the calculations are supposed to go can be seen from the stage –II in the proposal.
I would be making a PR for column buckling calculations within a day or two, once some initial questions (as mentioned in the issue-cum-discussion) gets clarified.
- Finalizing the basic API and implementations of Column class
- Making a PR for the above implementations
- Documentation and testing
Will keep you updated!