Skip to content
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: Generic Surfaces and Generic Linear Surfaces #680

Merged
merged 99 commits into from
Sep 21, 2024

Conversation

MateusStano
Copy link
Member

@MateusStano MateusStano commented Sep 5, 2024

Pull request type

  • Code changes (bugfix, features)

Checklist

  • Tests for the changes have been added (if needed)
  • Docs have been reviewed and added / updated
  • Lint (black rocketpy/ tests/) has passed locally
  • All tests (pytest tests -m slow --runslow) have passed locally
  • CHANGELOG.md has been updated (if relevant)

Description

  • Added the GenericSurface class that takes in coefficients defined by either a function or a .csv

  • Added the LinearGenericSurface class that takes in coefficients derivatives and calculates the total coefficients assuming linearity

  • Changed all add_surfaces position arguments to be 3 dimensional

  • Improved Flight class structure to be indifferent to the type of AeroSurface

  • There is an example simulation in coeff_testing.ipynb of calisto using coefficients that were extracted directly from rocketpy's standard model (Barrowman's). It uses the .csvs that have been committed. These .csvs have a LOT of points, this is due to the shepard interpolation in the Function class, which makes the interpolated values used in the simulation extremely noisy. The files are this big for validation purposes. We should reduce them and create tests with them

Breaking change

  • Yes
  • No

Remaining Tasks

  • 1. Add a representation of GenericSurface in the Drawing.
  • 2. Create Plots and Prints classes for both GenericSurface and LinearGenericSurface
  • 3. Add sideslip and partial angle of attack to flight plots and/or prints
  • 4. Create a method in the Rocket class to define the coefficients of the entire rocket. The method should receive a GenericSurface or LinearGenericSurface and use its coefficients for simulation, overwriting any other added aerodynamic surface. The aerodynamic surfaces should still be used for the drawing though. The received generic surface should be positioned in the center of the dry mass of the rocket for the desired behavior
  • 5. Currently, we receive cL, cD, cQ, however, user's might prefer to input the coefficients relating to the body axes directly (cX, cY, cZ). This should be an optional parameter in the instantiation of the class.
  • 6. Pylint
  • 7. Tests
  • 8. Doc pages

It would be truly great to get some help on these minor tasks

Future Tasks

  1. Create an axisymmetric surface class that needs only cD, cL, either center of pressure or cm, and cl (roll moment coefficient)
  2. The Rocket class should have total coefficient attributes: cL, cQ, cD, cm, cn, cl. They should be included in Plots or Prints
  3. Add lateral stability analysis. The current center of pressure, static, and stability margins only works for axisymmetric configurations. GenericSurfaces and LinearGenericSurfaces are currently not included in those analysis.

Contributors

Special thanks to @kevin-alcaniz and Faraday Rocketry UPV for their contributions!!

@MateusStano MateusStano added Enhancement New feature or request, including adjustments in current codes Aerodynamics Any problem to be worked on top of RocketPy's Aerodynamic labels Sep 5, 2024
@MateusStano MateusStano requested a review from a team as a code owner September 5, 2024 18:03
Copy link

codecov bot commented Sep 5, 2024

Codecov Report

Attention: Patch coverage is 85.51587% with 73 lines in your changes missing coverage. Please review.

Project coverage is 76.02%. Comparing base (bae7cae) to head (b9b44dd).
Report is 101 commits behind head on develop.

Files with missing lines Patch % Lines
rocketpy/simulation/flight.py 66.19% 24 Missing ⚠️
rocketpy/prints/aero_surface_prints.py 33.33% 14 Missing ⚠️
rocketpy/plots/rocket_plots.py 45.00% 11 Missing ⚠️
rocketpy/rocket/rocket.py 76.19% 10 Missing ⚠️
...ocketpy/rocket/aero_surface/fins/free_form_fins.py 94.61% 7 Missing ⚠️
rocketpy/rocket/aero_surface/generic_surface.py 95.60% 4 Missing ⚠️
rocketpy/plots/aero_surface_plots.py 92.00% 2 Missing ⚠️
rocketpy/prints/rocket_prints.py 75.00% 1 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           develop     #680      +/-   ##
===========================================
+ Coverage    75.45%   76.02%   +0.56%     
===========================================
  Files           96       99       +3     
  Lines        10887    11278     +391     
===========================================
+ Hits          8215     8574     +359     
- Misses        2672     2704      +32     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

CHANGELOG.md Outdated Show resolved Hide resolved
Copy link
Member

@Gui-FernandesBR Gui-FernandesBR left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Couldn't review all the files, but I agree with the changes made to the Rocket and Flight classes

@MateusStano MateusStano merged commit c21e2d1 into develop Sep 21, 2024
5 checks passed
@MateusStano MateusStano deleted the enh/generic-surfaces branch September 21, 2024 19:36
@Gui-FernandesBR Gui-FernandesBR linked an issue Nov 2, 2024 that may be closed by this pull request
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Aerodynamics Any problem to be worked on top of RocketPy's Aerodynamic Enhancement New feature or request, including adjustments in current codes
Projects
Status: Closed
Development

Successfully merging this pull request may close these issues.

ENH: Improve for Supersonic Aerodynamics
4 participants