Skip to content

Conversation

@FranzYuri
Copy link
Contributor

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?

burnout time is a required variable

What is the new behavior?

Now the variable is called burn time and can be a tupple with starting and ending times.

Does this introduce a breaking change?

The only beaking change is that the name of the variable burnOut changed to burn_time

  • Yes
  • No

Other information

Enter text here...

@MateusStano MateusStano added this to the Release v1.0.0 milestone Mar 11, 2023
@Gui-FernandesBR Gui-FernandesBR linked an issue Mar 15, 2023 that may be closed by this pull request
@MateusStano MateusStano requested a review from phmbressan March 16, 2023 23:28
and improved if else structure
@MateusStano
Copy link
Member

Hey, I just commited a few big changes in the code you had made. First I added the use of Function.setDiscrete to remove the while loops. Then I improved some of the if else structure to have no repetitions.

There is one big problem still. When using the burn_time as tuple the propellant mass does not go to zero.
Here is an example, using the Calisto thrust curve with burn_time = (1,3) the thrust curve is:

image

And the propellant mass:

image

@phmbressan can you confirm this is a problem and maybe fix it? I think you will understand what is going on here much faster than me.

@giovaniceotto giovaniceotto changed the base branch from beta/v1.0.0 to enh/liquid-motors March 22, 2023 22:13
@giovaniceotto
Copy link
Member

giovaniceotto commented Mar 22, 2023

  • Document new attributes

giovaniceotto and others added 3 commits April 7, 2023 14:54
Co-authored-by: MateusStano <69485049+MateusStano@users.noreply.github.com>
Co-authored-by: phmbressan <69485049+phmbressan@users.noreply.github.com>
@review-notebook-app
Copy link

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

@phmbressan
Copy link
Collaborator

@MateusStano

The issue of negative propellant mass is fixed now. As you can see in my earlier commits, the main cause were some methods that still considered all burns starting at zero seconds.

On top of that, there were some issues with the type checking and conversion for the parameter burn_time, I changed it a bit. It is not the most elegant code since a wide range of input types must checked and converted, but I believe it is working. As always, additional reviews of these changes are important.

@Gui-FernandesBR Gui-FernandesBR changed the title burnout time changes. Breaking changes ENH: burnout time changes. Breaking changes Apr 14, 2023
@Gui-FernandesBR
Copy link
Member

What do we need to do in order to get this PR ready for review?

Btw shouldn't it go straight to the beta/v1.0.0 branch?

@MateusStano
Copy link
Member

MateusStano commented Apr 22, 2023

@phmbressan to merge this one we need two more things:

  • Change motor.thrust to only take into account the thrust curve during burn time
  • Merge enh/liquid-motors branch into this one

@phmbressan
Copy link
Collaborator

phmbressan commented Apr 24, 2023

There are still some issues regarding this PR:

  • The tests for SolidMotor are extremely tight in some cases (e.g. tolerances of 1e-16), thus, due to the new usage of a termination event in grain geometry, there are tests that do not pass.
  • Perhaps some revisions of nomenclature and definitions of old methods, such as reshapeThrustCurve, may be necessary. I am not sure why the test for this method also does not pass.

@phmbressan
Copy link
Collaborator

@MateusStano Thank you for your suggestions. I believe the issues you raised were solved, however another review is always important, so I ask you to review these latest changes.

@phmbressan phmbressan requested a review from MateusStano June 6, 2023 22:32
@Gui-FernandesBR Gui-FernandesBR added Motors Every propulsion related issue or PR Refactor labels Jun 13, 2023
Copy link
Member

@giovaniceotto giovaniceotto left a comment

Choose a reason for hiding this comment

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

IMPORTANT: I have reviewed only rocketpy.motors.Motor.reshapeThrustCurve().

Two simple issues need to be addressed. Once they have been solved, feel free to automatically consider this approved.

@giovaniceotto giovaniceotto self-requested a review June 21, 2023 03:18
@phmbressan
Copy link
Collaborator

Sorry for submitting a new review, I had an issue with github pending comments.

The tests are not passing due to the really odd lack of a library in github actions, I have not been able to comprehend why this is happening. Locally they are fine for me.

@Gui-FernandesBR
Copy link
Member

Sorry for submitting a new review, I had an issue with github pending comments.

The tests are not passing due to the really odd lack of a library in github actions, I have not been able to comprehend why this is happening. Locally they are fine for me.

What library? Can you describe it better?

@phmbressan
Copy link
Collaborator

phmbressan commented Jun 24, 2023

Sorry for submitting a new review, I had an issue with github pending comments.
The tests are not passing due to the really odd lack of a library in github actions, I have not been able to comprehend why this is happening. Locally they are fine for me.

What library? Can you describe it better?

From the testing log in github actions.

../../../hostedtoolcache/Python/3.7.17/x64/lib/python3.7/bz2.py:19: in <module>
    from _bz2 import BZ2Compressor, BZ2Decompressor
E   ModuleNotFoundError: No module named '_bz2'

I searched a bit and it seems related to the pandas import in ndrt_2020 testing. This is odd, since those were not altered and are alright in other branches.

Edit: this seems to be a known issue of github actions. After updating and merging the liquid motors branch it was fixed with the bump to Python 3.8. The tests are passing now.

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.

Great solving!

@Gui-FernandesBR Gui-FernandesBR merged commit 57e0222 into enh/liquid-motors Jun 25, 2023
@Gui-FernandesBR Gui-FernandesBR deleted the enh/auto_burn_out_time branch June 27, 2023 13:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Motors Every propulsion related issue or PR Refactor

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Auto burn out time

7 participants