Skip to content

Commit

Permalink
autopep8
Browse files Browse the repository at this point in the history
  • Loading branch information
xjjiang committed Dec 31, 2024
1 parent b35ef64 commit 71dcb32
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions aviary/subsystems/geometry/gasp_based/empennage.py
Original file line number Diff line number Diff line change
Expand Up @@ -146,10 +146,12 @@ def setup_partials(self):
self.declare_partials("area", ["vol_coef", Aircraft.Wing.AREA, "r_arm"])
self.declare_partials("span", ["vol_coef", Aircraft.Wing.AREA, "r_arm", "ar"])
self.declare_partials(
"rchord", ["vol_coef", Aircraft.Wing.AREA, "r_arm", "ar", Aircraft.HorizontalTail.TAPER_RATIO]
"rchord", ["vol_coef", Aircraft.Wing.AREA, "r_arm",
"ar", Aircraft.HorizontalTail.TAPER_RATIO]
)
self.declare_partials(
"chord", ["vol_coef", Aircraft.Wing.AREA, "r_arm", "ar", Aircraft.HorizontalTail.TAPER_RATIO]
"chord", ["vol_coef", Aircraft.Wing.AREA, "r_arm",
"ar", Aircraft.HorizontalTail.TAPER_RATIO]
)
self.declare_partials("arm", ["r_arm", "wing_ref"])

Expand Down Expand Up @@ -186,14 +188,16 @@ def compute_partials(self, inputs, J):
J["rchord", Aircraft.Wing.AREA] = vol_coef * r_arm / cse2
J["rchord", "r_arm"] = wing_area * vol_coef / cse2
J["rchord", "ar"] = -vol_coef * wing_area * r_arm / (ar * cse2)
J["rchord", Aircraft.HorizontalTail.TAPER_RATIO] = -2 * vol_coef * wing_area * r_arm / (cse2 * (tr + 1))
J["rchord", Aircraft.HorizontalTail.TAPER_RATIO] = - \
2 * vol_coef * wing_area * r_arm / (cse2 * (tr + 1))

cse3 = tr - (tr / (tr + 1)) + 1
J["chord", "vol_coef"] = 2 / 3.0 * wing_area * r_arm * cse3 / cse2
J["chord", Aircraft.Wing.AREA] = 2 / 3.0 * vol_coef * r_arm * cse3 / cse2
J["chord", "r_arm"] = 2 / 3.0 * vol_coef * wing_area * cse3 / cse2
J["chord", "ar"] = -2 / 3.0 * vol_coef * wing_area * r_arm * cse3 / (ar * cse2)
J["chord", Aircraft.HorizontalTail.TAPER_RATIO] = 4 / 3.0 * cse1 * (tr - 1) / (ar * (tr + 1) ** 3)
J["chord", Aircraft.HorizontalTail.TAPER_RATIO] = 4 / \
3.0 * cse1 * (tr - 1) / (ar * (tr + 1) ** 3)

J["arm", "r_arm"] = -wing_ref / r_arm**2
J["arm", "wing_ref"] = 1.0 / r_arm
Expand Down

0 comments on commit 71dcb32

Please sign in to comment.