ENH: Implement only_radial_burn feature for SolidMotor and HybridMotor classes#850
Closed
ENH: Implement only_radial_burn feature for SolidMotor and HybridMotor classes#850
Conversation
…r classes Co-authored-by: Gui-FernandesBR <63590233+Gui-FernandesBR@users.noreply.github.com>
Co-authored-by: Gui-FernandesBR <63590233+Gui-FernandesBR@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Please help me telling me what is needed to finish and close PR ENH: Enable only radial burning #815
ENH: Implement only_radial_burn feature for SolidMotor and HybridMotor classes
Sep 21, 2025
Copilot stopped work on behalf of
Gui-FernandesBR due to an error
September 21, 2025 01:00
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR implements the
only_radial_burnfeature requested in issue #801, allowing users to simulate solid rocket motors with axially inhibited grains that burn only radially (cylindrical inner surface) rather than both radially and axially.Motivation
In real rocket motors, grains can be axially inhibited to prevent burning from the top and bottom faces, forcing propellant consumption to occur only through the cylindrical inner surface. This is common in:
The existing RocketPy implementation always assumed both radial and axial burning, limiting simulation accuracy for these motor types.
Implementation
SolidMotor Changes
only_radial_burnparameter (default:Falsefor backward compatibility)evaluate_geometry()differential equations:only_radial_burn=True: grain height remains constant (derivative = 0)only_radial_burn=False: existing behavior with both radial and axial burningburn_area()method to calculate surface area based on burning mode:2π × inner_radius × height × grain_numberto_dict/from_dict) to preserve the settingHybridMotor Changes
only_radial_burnparameter that propagates to the internal SolidMotorPhysics Validation
The implementation correctly handles the physics:
Example Usage
Testing
Breaking Changes
None - the feature is opt-in with
only_radial_burn=Falseas the default.Closes #801
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.