From f2cbb3834b9a4bf8de496e4324e9744cb05be855 Mon Sep 17 00:00:00 2001 From: camUrban Date: Thu, 5 Dec 2024 19:13:58 -0500 Subject: [PATCH] I continued updating documentation and writing ToDos for the upcoming change in WingCrossSection definitions. --- pterasoftware/geometry.py | 49 ++++++++++++++++++++++----------------- 1 file changed, 28 insertions(+), 21 deletions(-) diff --git a/pterasoftware/geometry.py b/pterasoftware/geometry.py index f9f305fb..48f82bd8 100644 --- a/pterasoftware/geometry.py +++ b/pterasoftware/geometry.py @@ -223,10 +223,9 @@ def __init__( the wing's symmetry plane in the body frame. It is also the direction vector that the wing's span will be assessed relative to. Additionally, this vector crossed with the "unit_chordwise_vector" defines the normal - vector of the plane that the wing's projected area will reference. It - must be equivalent to this wing's root wing cross section's - "unit_normal_vector" attribute. The default is np.array([0.0, 1.0, 0.0]), - which is the XZ body frame's unit normal vector. + vector of the plane that the wing's projected area will reference. The + default is np.array([0.0, 1.0, 0.0]), which is the XZ body frame's unit + normal vector. :param symmetric: bool, optional Set this to true if the wing is symmetric across the plane defined by its unit normal vector. Set it to false if not. The default is false. @@ -234,9 +233,8 @@ def __init__( This is an (3,) array of floats that represents the unit vector that defines the wing's chordwise direction in the body frame. This vector crossed with the "unit_normal_vector" defines the normal vector of the - plane that the wing's projected area will reference. This vector must be - parallel to the intersection of the wing's symmetry plane with each of - its wing cross section's planes. The default is np.array([1.0, 0.0, 0.0]). + plane that the wing's projected area will reference. The default is + np.array([1.0, 0.0, 0.0]). :param num_chordwise_panels: int, optional This is the number of chordwise panels to be used on this wing. The default is 8. @@ -420,6 +418,8 @@ def wetted_area(self): return wetted_area + # ToDo: Modify this once Wing Cross Section objects are defined in the Wing + # frame. @property def span(self): """This method defines a property for the wing's span. @@ -463,6 +463,8 @@ def standard_mean_chord(self): """ return self.projected_area / self.span + # ToDo: Update this to allow for wing cross section chords that aren't parallel + # to the Wing's chordwise direction. @property def mean_aerodynamic_chord(self): """This method calculates the mean aerodynamic chord of the wing and assigns @@ -566,27 +568,29 @@ def __init__( This is the airfoil to be used at this wing cross section. :param x_le: float, optional This is the x coordinate of the leading edge of the wing cross section - relative to the wing's datum. The default value is 0.0. + in the wing frame of its parent Wing object. The default value is 0.0. :param y_le: float, optional This is the y coordinate of the leading edge of the wing cross section - relative to the wing's leading edge. The default value is 0.0. + in the wing frame of its parent Wing object. The default value is 0.0. :param z_le: float, optional This is the z coordinate of the leading edge of the wing cross section - relative to the wing's datum. The default value is 0.0. + in the wing frame of its parent Wing object. The default value is 0.0. :param chord: float, optional This is the chord of the wing at this wing cross section. The default value is 1.0. - :param unit_normal_vector: array, optional - This is an (3,) array of floats that represents the unit normal vector - of the plane this wing cross section lies on. If this wing cross section - is a wing's root, this vector must be equal to the wing's - unit_normal_vector attribute. Also, every wing cross section - must have a plane that intersects its parent wing's symmetry plane at a - line parallel to the parent wing's "unit_chordwise_vector". The default - is np.array([ 0.0, 1.0, 0.0]), which is the XZ plane's unit normal vector. - :param twist: float, optional - This is the twist of the cross section about the leading edge in degrees. - The default value is 0.0. + :param unit_normal_vector: (3,) array of floats, optional + This is an (3,) array of floats that represents the unit normal vector of + the plane this wing cross section lies on. It is defined in the wing + frame of its parent Wing object. If this wing cross section is a wing's + root, this vector must be np.array([0.0, 1.0, 0.0]), which is (by + definition), the unit normal vector of its parent Wing object's symmetry + plane, as defined in that parent Wing object's frame. + :param unit_chordwise_vector: float, optional + This is an (3,) array of floats that represents the unit chordwise vector + of this wing cross section defined in its parent Wing object's frame. If + this wing cross section is a wing's root, this vector must be np.array([ + 1.0, 0.0, 0.0]), which is (by definition), the unit chordwise vector of + its parent Wing object, as defined in that parent Wing object's frame. :param control_surface_type: str, optional This is type of control surfaces for this wing cross section. It can be "symmetric" or "asymmetric". An example of symmetric control surfaces are @@ -612,6 +616,7 @@ def __init__( self.z_le = z_le self.chord = chord self.unit_normal_vector = unit_normal_vector + # ToDo: Remove this once Wing Cross Section objects are defined by vectors. self.twist = twist self.airfoil = airfoil self.control_surface_type = control_surface_type @@ -645,6 +650,8 @@ def __init__( '"uniform".' ) + # ToDo: Remove this once Wing Cross Section objects are defined by vectors as it + # is pre-defined by the user. @property def unit_chordwise_vector(self): """This method defines a property for the wing cross section's unit chordwise