Open carsonwmoon opened 2 months ago
Hi @carsonwmoon ,
This is a good idea! Unfortunately it gets a little bit challenging on the implementation, though, for two reasons:
twist
of the WingXSec
should affect the centroid location. This seems easy enough to adjust for, except...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.