-
-
Notifications
You must be signed in to change notification settings - Fork 167
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
ENH: Spherical Caps Included in Total Length #455
Conversation
I understand your motivation and it is fair enough to me. However, this PR technically introduces a breaking change since the Also, the code is considering that the caps will have a perfect sphere at the its both tips. If you give a blind search, it's almost impossible to find a perfect sphere format (https://www.google.com/search?q=cylindrical+tank&sca_esv=581032301&tbm=isch&source=lnms&sa=X&ved=2ahUKEwiw-9vHl7iCAxUpJrkGHYFKBBIQ_AUoAXoECAIQAw&biw=1358&bih=642&dpr=1). Usually it has a height different than the tank radius. Shall we start considering this phenome as well? |
@Gui-FernandesBR @phmbressan added the warning as we talked Please give a re-review here |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## develop #455 +/- ##
==========================================
Coverage ? 69.51%
==========================================
Files ? 55
Lines ? 8999
Branches ? 0
==========================================
Hits ? 6256
Misses ? 2743
Partials ? 0
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good, this way the object creation seems much more intuitive. The docstrings are also much clearer.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice problem solving, the code is clearer now, I'm comfortable with its final state.
Co-authored-by: Pedro Henrique Marinho Bressan <[email protected]>
Co-authored-by: Guilherme <[email protected]>
Pull request type
Checklist
black rocketpy/ tests/
) has passed locallypytest --runslow
) have passed locallyCurrent behavior
When creating a cylindrical tank with spherical caps, the
height
argument only refers to the height of the tank, excluding the tank. This is counterintuitive and just forces the user to measure/calculate impractical stuff.Also, this was not explicit in the documentation
New behavior
The
height
argument now refers to the entire tank, with or without spherical capsBreaking change
Additional information
Seems there was also a bug with some geometries due to numerical errors in the calculations of the spherical caps, so really long tanks could not be defined. This was fixed by adding an
abs
to the calculation of the spherical caps geometry