Skip to content

Commit

Permalink
update fuel model
Browse files Browse the repository at this point in the history
  • Loading branch information
junzis committed Jun 13, 2022
1 parent 963b925 commit cd8171f
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions openap/fuel.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ def __init__(self, ac, eng=None, **kwargs):
eng (string): Engine type (for example: CFM56-5A3).
Leave empty to use the default engine specified
by in the aircraft database.
polydeg (int): Order of the polynomials for fuel flow model (2 or 3), defaults to 2.
"""
if not hasattr(self, "np"):
Expand All @@ -49,7 +50,7 @@ def __init__(self, ac, eng=None, **kwargs):
self.drag = self.Drag(ac, **kwargs)
self.wrap = self.WRAP(ac, **kwargs)

polydeg = kwargs.get("polydeg", 3)
polydeg = kwargs.get("polydeg", 2)

if polydeg == 2:
a, b = self.engine["fuel_a"], self.engine["fuel_b"]
Expand Down Expand Up @@ -79,9 +80,7 @@ def at_thrust(self, acthr, alt=0, limit=True):
n_eng = self.aircraft["engine"]["number"]
engthr = acthr / n_eng

# use maximum dynamic thrust at see-level as denominator
v_lof_max = self.wrap.takeoff_speed()["maximum"]
maxthr = self.thrust.takeoff(tas=v_lof_max / 0.5144, alt=0)
maxthr = self.thrust.takeoff(tas=0, alt=0)
ratio = acthr / maxthr

if limit:
Expand Down

0 comments on commit cd8171f

Please sign in to comment.