Skip to content

ENH: Calculate Bending Moments on Rail Buttons #893

Description

@Gui-FernandesBR

Is your feature request related to a problem? Please describe.
Currently, the Flight class successfully calculates the forces acting on the rail buttons during the launch phase. We have access to:

  • Flight.rail_button1_normal_force & shear_force
  • Flight.rail_button2_normal_force & shear_force

However, we do not calculate the Bending Moments acting on the rocket structure at the rail button locations. This data is crucial for structural analysis, specifically to determine if the rail button attachment point (or the screw) might fail due to torque or bending loads during launch.

Describe the solution you'd like
I would like to extend the Flight class (specifically the rail phase derivative methods) to calculate and store the bending moments at the upper and lower rail buttons.

New attributes should be added to the class, similar to the existing force attributes:

  • Flight.rail_button1_bending_moment (Function)
  • Flight.max_rail_button1_bending_moment (float)
  • Flight.rail_button2_bending_moment (Function)
  • Flight.max_rail_button2_bending_moment (float)

Mathematical Context & Challenges
As noted by @giovaniceotto:

"The challenge arises when attempting to divide this into two Rail Buttons, assuming they can apply any force and moment, leading to a statically indeterminate system."

To solve this, the contributor needs to define a clear free-body diagram (FBD) assumption. A potential approach:

  1. Use the Normal and Shear forces already calculated in udot_rail1.
  2. Assume the rail buttons act as simple supports (pinned) or sliding supports, but consider the torque generated by the off-axis application of Thrust and Drag relative to the rail line.
  3. Calculate the moment required to balance the rotational equation of motion ($\sum M = I \alpha$) given the geometric positions of Button 1 and Button 2 relative to the Center of Mass.
Image

Implementation Details

  • Target File: rocketpy/flight/flight.py
  • Key Methods: udot_rail1 (and udot_rail2 if implemented).
  • Verification: The sum of moments and forces should balance the calculated linear and angular acceleration of the rocket while on the rail.

Acceptance Criteria

  • Implement the calculation of bending moments for both rail buttons.
  • Expose these values as Function objects in the Flight class.
  • Add unit tests ensuring values are non-zero when off-axis forces (like misalignment or wind) are present.

Additional Context

  • This is the final step to complete the "Rail Buttons Simulation" feature set started in 2019.
  • See Flight.rail_button1_normal_force implementation for reference on how the forces are currently stored.
  • Please read the Rail Buttons Force Calculation #27 for more details

Activity

  1. added
    EnhancementNew feature or request, including adjustments in current codes
    on Nov 29, 2025
  2. Monta120 commented on Dec 2, 2025

    @Monta120
    Contributor

    Hello! Our "contributing to open-source projects" assignment is due next week so I'd like to implement one more feature. I did some quick research on the physics of the problem. My approach is to calculate the internal bending moments in the rocket structure at the rail button attachment points using beam theory. I'll use the already-calculated normal and shear forces (I'll assume the rail buttons are simple supports providing reaction forces but no moments at the contact point i.e ΣF!=0 and M_contact=0), along with the off-axis thrust/drag loads and button geometry(positions), to determine moments via equilibrium (ΣM = Iα). This will provide the structural data needed to assess both airframe stress and fastener loading. The implementation will add the four new Function attributes as specified. Does this approach align with what you're looking for?

  3. Gui-FernandesBR commented on Dec 2, 2025

    @Gui-FernandesBR
    MemberAuthor

    Hello! Our "contributing to open-source projects" assignment is due next week so I'd like to implement one more feature. I did some quick research on the physics of the problem. My approach is to calculate the internal bending moments in the rocket structure at the rail button attachment points using beam theory. I'll use the already-calculated normal and shear forces (I'll assume the rail buttons are simple supports providing reaction forces but no moments at the contact point i.e ΣF!=0 and M_contact=0), along with the off-axis thrust/drag loads and button geometry(positions), to determine moments via equilibrium (ΣM = Iα). This will provide the structural data needed to assess both airframe stress and fastener loading. The implementation will add the four new Function attributes as specified. Does this approach align with what you're looking for?

    @Monta120 You have green light to proceed. Your plan looks good.

    Something I don't know yet how to consider is the rail button height:

    Image

    But you can leave a TODO in the code so we implement rail_button_height in the future.


    When is the deadline exactly? Do you need your contributions to be merged onto the master branch?
    If you or your colleagues need help to speed up the review process please let me know which PRs I should prioritize.

  4. Monta120 commented on Dec 2, 2025

    @Monta120
    Contributor

    Thank you I'll start working on this right away!

    We're a group (@IDL-IMTA-Students) of 5: @Marchma0 @hogatata @C8H10O2 @Bizo883 and myself. Our deadline is a week from now. Our contributions don't have to be merged into the "master" branch. What matters most for our project is that they're reviewed and ideally approved. If they meet the criteria and get merged into any branch, that would be excellent. I really appreciate your willingness to prioritize our PRs. Thank you!

  5. Gui-FernandesBR commented on Dec 2, 2025

    @Gui-FernandesBR
    MemberAuthor

    @Monta120 noted!

    I'm leading reviews at this repo during this month.
    I can approve all your PRs before Dec 9th, but I would like to see most (or all) of them to be merged into develop at least.

    We are planning one final release this month, most likely near Dec 25th, and I would be glad to include your contributions into our next version (rocketpy 1.12.0).

    Thank you for your contributions.

  6. linked a pull request that will close this issueFEAT/Rail Button Bending Moments #901on Dec 3, 2025
  7. moved this from Backlog to Closed in LibDev Roadmapon Dec 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

EnhancementNew feature or request, including adjustments in current codesFlightFlight Class related features

Projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions