You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Feature: include a xsec_centroid function for the WingXSec class like this:
defxsec_centroid(self):
""" Computes the WingXSec's centroid. Returns: The (dimensional) centroid of the WingXSec. """returnself.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.
The text was updated successfully, but these errors were encountered:
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
This is a good idea! Unfortunately it gets a little bit challenging on the implementation, though, for two reasons:
The twist of the WingXSec should affect the centroid location. This seems easy enough to adjust for, except...
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?; excerpt below).
The twist axis is computed with the following procedure:
* The quarter-chord point of this WingXSec and the following one are identified.
* A line is drawn connecting them, and it is normalized to a unit direction vector.
* That direction vector is projected onto the geometry Y-Z plane.
* That direction vector is now the twist axis.
Because of this, computing the centroid accurately (in a general case) purely from WingXSec quantities is a bit complicated. The provided code is roughly correct in the case of an untwisted wing, but not correct in the general case.
I'll leave this issue open in case others have ideas here, but it seems a bit tricky to do right.
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?
Description of Proposed Feature
Feature: include a
xsec_centroid
function for the WingXSec class like this: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.
The text was updated successfully, but these errors were encountered: