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

Feature: Include a xsec_centroid function for the WingXSec class (code provided) #133

Open
carsonwmoon opened this issue Apr 9, 2024 · 2 comments

Comments

@carsonwmoon
Copy link

Description of Proposed Feature

Feature: include a xsec_centroid function for the WingXSec class like this:

def xsec_centroid(self):
        """
        Computes the WingXSec's centroid.

        Returns: The (dimensional) centroid of the WingXSec.
        """
        return self.airfoil.centroid() * self.chord

Alternatives I Have Considered

It's easy enough without it, but it could be a good addition to the class, especially since it already has a xsec_area function.

Additional Context

A project I was working on needed to know the centroid of a WingXSec object.

@carsonwmoon carsonwmoon changed the title Include a xsec_centroid function for the WingXSec class (code provided) Feature: Include a xsec_centroid function for the WingXSec class (code provided) Apr 9, 2024
@peterdsharpe
Copy link
Owner

Hi @carsonwmoon ,

This is a good idea! It gets a little bit challenging on the implementation, though, for two reasons:

  1. The twist of the WingXSec should affect the centroid location. This seems easy enough to adjust for, except...
  2. The twist axis is only determined after the WingXSec is integrated into a Wing. (The exact procedure is a bit complicated, but it's described in the WingXSec docstring. You can read it by running asb.WingXSec?.)

Because of this, computing the centroid accurately (in a general case) purely from WingXSec quantities is a bit complicated. I'll leave this issue open in case others have ideas here, but it seems a bit tricky to do right.

@peterdsharpe
Copy link
Owner

peterdsharpe commented Apr 10, 2024

This also opens up the potential for misunderstanding if the user specifies control_surfaces attached to the WingXSec - do those affect the centroid as they deflect?

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

No branches or pull requests

2 participants