Skip to content

Commit

Permalink
Update fuselage.py
Browse files Browse the repository at this point in the history
Replace fus_SA_factor by fus_SA_scaler.
  • Loading branch information
xjjiang authored Sep 11, 2024
1 parent ecab0fe commit a752d79
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions aviary/subsystems/geometry/gasp_based/fuselage.py
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ def compute(self, inputs, outputs):
LoverD_nose = inputs[Aircraft.Fuselage.NOSE_FINENESS]
LoverD_tail = inputs[Aircraft.Fuselage.TAIL_FINENESS]
cockpit_len = inputs[Aircraft.Fuselage.PILOT_COMPARTMENT_LENGTH]
fus_SA_factor = inputs[Aircraft.Fuselage.WETTED_AREA_SCALER]
fus_SA_scaler = inputs[Aircraft.Fuselage.WETTED_AREA_SCALER]
nose_height = inputs["nose_height"]
cabin_len = inputs["cabin_len"]
cabin_height = inputs["cabin_height"]
Expand All @@ -180,7 +180,7 @@ def compute(self, inputs, outputs):
+ 2.1 * LoverD_tail * cabin_height
)

fus_SA = fus_SA * fus_SA_factor
fus_SA = fus_SA * fus_SA_scaler

cabin_len_tailboom = fus_len

Expand All @@ -193,7 +193,7 @@ def compute_partials(self, inputs, J):
LoverD_tail = inputs[Aircraft.Fuselage.TAIL_FINENESS]
nose_height = inputs["nose_height"]
cabin_height = inputs["cabin_height"]
fus_SA_factor = inputs[Aircraft.Fuselage.WETTED_AREA_SCALER]
fus_SA_scaler = inputs[Aircraft.Fuselage.WETTED_AREA_SCALER]
cockpit_len = inputs[Aircraft.Fuselage.PILOT_COMPARTMENT_LENGTH]
cabin_len = inputs["cabin_len"]

Expand All @@ -204,26 +204,26 @@ def compute_partials(self, inputs, J):
J[Aircraft.Fuselage.LENGTH, Aircraft.Fuselage.TAIL_FINENESS] = cabin_height
J[Aircraft.Fuselage.LENGTH, "cabin_height"] = LoverD_tail

J[Aircraft.Fuselage.WETTED_AREA, "cabin_height"] = fus_SA_factor * (
J[Aircraft.Fuselage.WETTED_AREA, "cabin_height"] = fus_SA_scaler * (
2.5 * (LoverD_nose * nose_height + cockpit_len)
+ 3.14 * cabin_len
+ 2.1 * LoverD_tail * cabin_height
+ cabin_height * 2.1 * LoverD_tail
)
J[Aircraft.Fuselage.WETTED_AREA, Aircraft.Fuselage.NOSE_FINENESS] = (
fus_SA_factor * cabin_height * 2.5 * nose_height
fus_SA_scaler * cabin_height * 2.5 * nose_height
)
J[Aircraft.Fuselage.WETTED_AREA, "nose_height"] = (
fus_SA_factor * cabin_height * 2.5 * LoverD_nose
fus_SA_scaler * cabin_height * 2.5 * LoverD_nose
)
J[Aircraft.Fuselage.WETTED_AREA, Aircraft.Fuselage.PILOT_COMPARTMENT_LENGTH] = (
fus_SA_factor * cabin_height * 2.5
fus_SA_scaler * cabin_height * 2.5
)
J[Aircraft.Fuselage.WETTED_AREA, "cabin_len"] = (
fus_SA_factor * 3.14 * cabin_height
fus_SA_scaler * 3.14 * cabin_height
)
J[Aircraft.Fuselage.WETTED_AREA, Aircraft.Fuselage.TAIL_FINENESS] = (
fus_SA_factor * 2.1 * cabin_height**2
fus_SA_scaler * 2.1 * cabin_height**2
)
J[Aircraft.Fuselage.WETTED_AREA, Aircraft.Fuselage.WETTED_AREA_SCALER] = cabin_height * (
2.5 * (LoverD_nose * nose_height + cockpit_len)
Expand Down

0 comments on commit a752d79

Please sign in to comment.