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

BUG: EllipticalFins Roll Damping Factor Calculation #398

Merged

Conversation

MateusStano
Copy link
Member

Pull request type

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

Pull request checklist

  • 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?

An EllipticalFins object could be defined if it had the span smaller than the rocket radius, as stated in Issue #390. This was due to the expression used to evaluate the roll_damping_interference_factor that wasn't defined at that domain.

What is the new behavior?

With a whole bunch of calculus, I got the correct expressions for when the span is bigger to the rocket radius and for when the span is equal to the radius.

The new expressions have been added to the documentation and added to the code accordingly

Does this introduce a breaking change?

  • Yes
  • No

@MateusStano MateusStano requested a review from phmbressan August 14, 2023 01:36
@MateusStano MateusStano added this to the Release v1.0.0 milestone Aug 14, 2023
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.

Well done!!

To confirm the correct behavior, I've tested different sets of fins, just to confirm that the roll damping coefficient has a continuous behavior when varied against the span.

To illustrate:

from rocketpy import EllipticalFins
import matplotlib.pyplot as plt


def test_elliptical_fins(rc, span, rr):
    fins = EllipticalFins(
        n=4,
        root_chord=rc,
        span=span,
        rocket_radius=rr,
        cant_angle=0,
        airfoil=None,
        name="Fins",
    )
    return fins.roll_damping_interference_factor


span = range(1, 500, 10)
span = [s / 1000 for s in span]
damping = [] * len(span)

for s in span:
    damping.append(test_elliptical_fins(rc=0.2, span=s, rr=0.1))
plt.scatter(span, damping)
plt.plot(span, damping)
plt.xlabel("Span [m]")
plt.ylabel("Roll Damping Interference Factor")
plt.title("Roll Damping Interference Factor vs Span")
plt.xlim(0, 0.5)
plt.show()

image

As you can see, the point where S==r is the x=0.2, and the roll damping coefficient seems to have an expected behavior (no gaps in the curve)

@MateusStano MateusStano merged commit c8267c8 into beta/v1.0.0 Sep 6, 2023
@MateusStano MateusStano deleted the bug/elliptical-fins-roll-damping-factor-calculation branch September 6, 2023 23:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

BUG: elliptical fins cannot have a span smaller than the rocket radius
3 participants