Skip to content
This repository has been archived by the owner on Oct 30, 2022. It is now read-only.

Issue #09: team-09 - Optimizing drag #108

Open
wants to merge 10 commits into
base: master
Choose a base branch
from

Conversation

KrWanderley
Copy link

Pull request type

Please check the type of change your PR introduces:

  • Code base additions (bugfix, features)
  • Code maintenance (refactoring, formatting, renaming, tests)
  • ReadMe, Docs and GitHub maintenance
  • Other (please describe):

Pull request checklist

Please check if your PR fulfills the following requirements, depending on the type of PR:

  • ReadMe, Docs and GitHub maintenance:

    • Spelling has been verified
    • Code docs are working correctly
  • Code base maintenance (refactoring, formatting, renaming):

    • Docs have been reviewed and added / updated if needed
    • Lint (black rocketpy) has passed locally and any fixes were made
    • All tests (pytest --runslow) have passed locally
  • Code base additions (for bug fixes / features):

    • Tests for the changes have been added
    • Docs have been reviewed and added / updated if needed
    • Lint (black rocketpy) has passed locally and any fixes were made
    • All tests (pytest --runslow) have passed locally

What is the current behavior?

Before the implementation, RocketPy doesn't had a method to optimize the geometrical fin parameters.

What is the new behavior?

This PR implements "finsOptimize", a new method of Rocket Class. The method simulates all combinations of values within the given parameters and returns the best compromise between the desired static margin and smaller fin dimensions.

Does this introduce a breaking change?

  • Yes
  • No

Other information

Simulations were performed and compared between validated notebooks on Colab (like Juno Rocket of LASC 2022) and the code implemented and the results are similar.
The code implemented doesn't change the rocket parameters.

@Gui-FernandesBR Gui-FernandesBR linked an issue Aug 28, 2022 that may be closed by this pull request
@Gui-FernandesBR Gui-FernandesBR changed the title Issue #9 team09 Issue #9: team-09 - Optimizing drag Aug 28, 2022
@Gui-FernandesBR Gui-FernandesBR removed the request for review from giovaniceotto August 28, 2022 23:13
@Gui-FernandesBR Gui-FernandesBR changed the title Issue #9: team-09 - Optimizing drag Issue #09: team-09 - Optimizing drag Aug 28, 2022
@MateusStano
Copy link
Member

Hey! Very well done, this can be a very useful way to optmize drag. However there are a few issues in the code:

  1. You used NULL to define a variable... smells like C in here. In python the correct way of doing this is using None;
  2. Previously added fins sets does not get removed before the optmization loop. This makes the final results of the static margin consider more sets of fins if the rocket object already has one or more fin set;
  3. The function is overall very poorly optmized so it runs very slowly. Also, the need to input max and min for the values takes a bit out of the optmization aspect that the function could give you

I'll grant the 25 points with a small penalty fo the reasons above.

@MateusStano MateusStano added 25 points Medium challenges! penalty Solutions poorly documented or badly coded labels Sep 3, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
25 points Medium challenges! penalty Solutions poorly documented or badly coded team-09
Projects
Development

Successfully merging this pull request may close these issues.

Optimizing drag
6 participants