openap 2.2__tar.gz → 2.3__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (180) hide show
  1. {openap-2.2 → openap-2.3}/PKG-INFO +2 -2
  2. {openap-2.2 → openap-2.3}/examples/example_fuel_qar_data.ipynb +1 -1
  3. {openap-2.2 → openap-2.3}/openap/addon/bada4.py +2 -2
  4. {openap-2.2 → openap-2.3}/openap/contrail.py +10 -1
  5. {openap-2.2 → openap-2.3}/openap/data/aircraft/a19n.yml +1 -0
  6. {openap-2.2 → openap-2.3}/openap/data/aircraft/a20n.yml +1 -0
  7. {openap-2.2 → openap-2.3}/openap/data/aircraft/a21n.yml +1 -0
  8. {openap-2.2 → openap-2.3}/openap/data/aircraft/a318.yml +1 -0
  9. {openap-2.2 → openap-2.3}/openap/data/aircraft/a319.yml +2 -1
  10. {openap-2.2 → openap-2.3}/openap/data/aircraft/a320.yml +1 -0
  11. {openap-2.2 → openap-2.3}/openap/data/aircraft/a321.yml +1 -0
  12. {openap-2.2 → openap-2.3}/openap/data/aircraft/a332.yml +1 -0
  13. {openap-2.2 → openap-2.3}/openap/data/aircraft/a333.yml +1 -0
  14. {openap-2.2 → openap-2.3}/openap/data/aircraft/a343.yml +1 -0
  15. {openap-2.2 → openap-2.3}/openap/data/aircraft/a359.yml +1 -0
  16. {openap-2.2 → openap-2.3}/openap/data/aircraft/a388.yml +1 -0
  17. {openap-2.2 → openap-2.3}/openap/data/aircraft/b37m.yml +1 -0
  18. {openap-2.2 → openap-2.3}/openap/data/aircraft/b38m.yml +1 -0
  19. {openap-2.2 → openap-2.3}/openap/data/aircraft/b39m.yml +1 -0
  20. {openap-2.2 → openap-2.3}/openap/data/aircraft/b3xm.yml +1 -0
  21. {openap-2.2 → openap-2.3}/openap/data/aircraft/b734.yml +1 -0
  22. {openap-2.2 → openap-2.3}/openap/data/aircraft/b737.yml +1 -0
  23. {openap-2.2 → openap-2.3}/openap/data/aircraft/b738.yml +1 -0
  24. {openap-2.2 → openap-2.3}/openap/data/aircraft/b739.yml +2 -1
  25. {openap-2.2 → openap-2.3}/openap/data/aircraft/b744.yml +1 -0
  26. {openap-2.2 → openap-2.3}/openap/data/aircraft/b748.yml +1 -0
  27. {openap-2.2 → openap-2.3}/openap/data/aircraft/b752.yml +1 -0
  28. {openap-2.2 → openap-2.3}/openap/data/aircraft/b763.yml +1 -0
  29. {openap-2.2 → openap-2.3}/openap/data/aircraft/b772.yml +1 -0
  30. {openap-2.2 → openap-2.3}/openap/data/aircraft/b773.yml +1 -0
  31. {openap-2.2 → openap-2.3}/openap/data/aircraft/b77w.yml +1 -0
  32. {openap-2.2 → openap-2.3}/openap/data/aircraft/b788.yml +1 -0
  33. {openap-2.2 → openap-2.3}/openap/data/aircraft/b789.yml +1 -0
  34. {openap-2.2 → openap-2.3}/openap/data/aircraft/c550.yml +1 -0
  35. {openap-2.2 → openap-2.3}/openap/data/aircraft/e145.yml +1 -0
  36. {openap-2.2 → openap-2.3}/openap/data/aircraft/e170.yml +1 -0
  37. {openap-2.2 → openap-2.3}/openap/data/aircraft/e190.yml +1 -0
  38. {openap-2.2 → openap-2.3}/openap/data/aircraft/e195.yml +1 -0
  39. {openap-2.2 → openap-2.3}/openap/data/aircraft/e75l.yml +1 -0
  40. {openap-2.2 → openap-2.3}/openap/data/aircraft/glf6.yml +1 -0
  41. openap-2.3/openap/mass.py +37 -0
  42. {openap-2.2 → openap-2.3}/pyproject.toml +2 -2
  43. {openap-2.2 → openap-2.3}/scripts/build_fuel_model.py +6 -0
  44. {openap-2.2 → openap-2.3}/.github/workflows/build-publish.yml +0 -0
  45. {openap-2.2 → openap-2.3}/.gitignore +0 -0
  46. {openap-2.2 → openap-2.3}/LICENSE +0 -0
  47. {openap-2.2 → openap-2.3}/README.md +0 -0
  48. {openap-2.2 → openap-2.3}/examples/data/flight_a319_opensky.csv +0 -0
  49. {openap-2.2 → openap-2.3}/examples/data/flight_a320_qar.csv +0 -0
  50. {openap-2.2 → openap-2.3}/examples/example_fuel_emission_opensky_data.ipynb +0 -0
  51. {openap-2.2 → openap-2.3}/openap/__init__.py +0 -0
  52. {openap-2.2 → openap-2.3}/openap/addon/__init__.py +0 -0
  53. {openap-2.2 → openap-2.3}/openap/base.py +0 -0
  54. {openap-2.2 → openap-2.3}/openap/casadi/__init__.py +0 -0
  55. {openap-2.2 → openap-2.3}/openap/casadi/aero_override.py +0 -0
  56. {openap-2.2 → openap-2.3}/openap/casadi/numpy_override.py +0 -0
  57. {openap-2.2 → openap-2.3}/openap/data/.gitignore +0 -0
  58. {openap-2.2 → openap-2.3}/openap/data/LICENSE +0 -0
  59. {openap-2.2 → openap-2.3}/openap/data/aircraft/_synonym.csv +0 -0
  60. {openap-2.2 → openap-2.3}/openap/data/dragpolar/_synonym.csv +0 -0
  61. {openap-2.2 → openap-2.3}/openap/data/dragpolar/a20n.yml +0 -0
  62. {openap-2.2 → openap-2.3}/openap/data/dragpolar/a319.yml +0 -0
  63. {openap-2.2 → openap-2.3}/openap/data/dragpolar/a320.yml +0 -0
  64. {openap-2.2 → openap-2.3}/openap/data/dragpolar/a321.yml +0 -0
  65. {openap-2.2 → openap-2.3}/openap/data/dragpolar/a332.yml +0 -0
  66. {openap-2.2 → openap-2.3}/openap/data/dragpolar/a333.yml +0 -0
  67. {openap-2.2 → openap-2.3}/openap/data/dragpolar/a343.yml +0 -0
  68. {openap-2.2 → openap-2.3}/openap/data/dragpolar/a359.yml +0 -0
  69. {openap-2.2 → openap-2.3}/openap/data/dragpolar/a388.yml +0 -0
  70. {openap-2.2 → openap-2.3}/openap/data/dragpolar/b38m.yml +0 -0
  71. {openap-2.2 → openap-2.3}/openap/data/dragpolar/b734.yml +0 -0
  72. {openap-2.2 → openap-2.3}/openap/data/dragpolar/b737.yml +0 -0
  73. {openap-2.2 → openap-2.3}/openap/data/dragpolar/b738.yml +0 -0
  74. {openap-2.2 → openap-2.3}/openap/data/dragpolar/b739.yml +0 -0
  75. {openap-2.2 → openap-2.3}/openap/data/dragpolar/b744.yml +0 -0
  76. {openap-2.2 → openap-2.3}/openap/data/dragpolar/b748.yml +0 -0
  77. {openap-2.2 → openap-2.3}/openap/data/dragpolar/b752.yml +0 -0
  78. {openap-2.2 → openap-2.3}/openap/data/dragpolar/b772.yml +0 -0
  79. {openap-2.2 → openap-2.3}/openap/data/dragpolar/b77w.yml +0 -0
  80. {openap-2.2 → openap-2.3}/openap/data/dragpolar/b788.yml +0 -0
  81. {openap-2.2 → openap-2.3}/openap/data/dragpolar/b789.yml +0 -0
  82. {openap-2.2 → openap-2.3}/openap/data/dragpolar/c550.yml +0 -0
  83. {openap-2.2 → openap-2.3}/openap/data/dragpolar/e190.yml +0 -0
  84. {openap-2.2 → openap-2.3}/openap/data/dragpolar/e195.yml +0 -0
  85. {openap-2.2 → openap-2.3}/openap/data/dragpolar/e75l.yml +0 -0
  86. {openap-2.2 → openap-2.3}/openap/data/dragpolar/glf6.yml +0 -0
  87. {openap-2.2 → openap-2.3}/openap/data/engine/engines.csv +0 -0
  88. {openap-2.2 → openap-2.3}/openap/data/fuel/fuel_models.csv +0 -0
  89. {openap-2.2 → openap-2.3}/openap/data/nav/airports.csv +0 -0
  90. {openap-2.2 → openap-2.3}/openap/data/nav/fix.dat +0 -0
  91. {openap-2.2 → openap-2.3}/openap/data/nav/nav.dat +0 -0
  92. {openap-2.2 → openap-2.3}/openap/data/wrap/_synonym.csv +0 -0
  93. {openap-2.2 → openap-2.3}/openap/data/wrap/a319.txt +0 -0
  94. {openap-2.2 → openap-2.3}/openap/data/wrap/a320.txt +0 -0
  95. {openap-2.2 → openap-2.3}/openap/data/wrap/a321.txt +0 -0
  96. {openap-2.2 → openap-2.3}/openap/data/wrap/a332.txt +0 -0
  97. {openap-2.2 → openap-2.3}/openap/data/wrap/a333.txt +0 -0
  98. {openap-2.2 → openap-2.3}/openap/data/wrap/a343.txt +0 -0
  99. {openap-2.2 → openap-2.3}/openap/data/wrap/a388.txt +0 -0
  100. {openap-2.2 → openap-2.3}/openap/data/wrap/b737.txt +0 -0
  101. {openap-2.2 → openap-2.3}/openap/data/wrap/b738.txt +0 -0
  102. {openap-2.2 → openap-2.3}/openap/data/wrap/b739.txt +0 -0
  103. {openap-2.2 → openap-2.3}/openap/data/wrap/b744.txt +0 -0
  104. {openap-2.2 → openap-2.3}/openap/data/wrap/b752.txt +0 -0
  105. {openap-2.2 → openap-2.3}/openap/data/wrap/b763.txt +0 -0
  106. {openap-2.2 → openap-2.3}/openap/data/wrap/b77w.txt +0 -0
  107. {openap-2.2 → openap-2.3}/openap/data/wrap/b788.txt +0 -0
  108. {openap-2.2 → openap-2.3}/openap/data/wrap/b789.txt +0 -0
  109. {openap-2.2 → openap-2.3}/openap/data/wrap/e190.txt +0 -0
  110. {openap-2.2 → openap-2.3}/openap/drag.py +0 -0
  111. {openap-2.2 → openap-2.3}/openap/emission.py +0 -0
  112. {openap-2.2 → openap-2.3}/openap/extra/__init__.py +0 -0
  113. {openap-2.2 → openap-2.3}/openap/extra/aero.py +0 -0
  114. {openap-2.2 → openap-2.3}/openap/extra/filters.py +0 -0
  115. {openap-2.2 → openap-2.3}/openap/extra/fuzzy.py +0 -0
  116. {openap-2.2 → openap-2.3}/openap/extra/nav.py +0 -0
  117. {openap-2.2 → openap-2.3}/openap/extra/statistics.py +0 -0
  118. {openap-2.2 → openap-2.3}/openap/fuel.py +0 -0
  119. {openap-2.2 → openap-2.3}/openap/gen.py +0 -0
  120. {openap-2.2 → openap-2.3}/openap/kinematic.py +0 -0
  121. {openap-2.2 → openap-2.3}/openap/phase.py +0 -0
  122. {openap-2.2 → openap-2.3}/openap/prop.py +0 -0
  123. {openap-2.2 → openap-2.3}/openap/thrust.py +0 -0
  124. {openap-2.2 → openap-2.3}/scripts/README.md +0 -0
  125. {openap-2.2 → openap-2.3}/scripts/acropole_aircraft_params.csv +0 -0
  126. {openap-2.2 → openap-2.3}/scripts/db/airports.csv +0 -0
  127. {openap-2.2 → openap-2.3}/scripts/db/emission.csv +0 -0
  128. {openap-2.2 → openap-2.3}/scripts/db/engines.csv +0 -0
  129. {openap-2.2 → openap-2.3}/scripts/engine2.py +0 -0
  130. {openap-2.2 → openap-2.3}/scripts/extract.py +0 -0
  131. {openap-2.2 → openap-2.3}/scripts/fuel_flow_correction_factor.py +0 -0
  132. {openap-2.2 → openap-2.3}/scripts/gen_airport_database.py +0 -0
  133. {openap-2.2 → openap-2.3}/scripts/gen_engine_cruise_perf.py +0 -0
  134. {openap-2.2 → openap-2.3}/scripts/gen_engine_data_v27.py +0 -0
  135. {openap-2.2 → openap-2.3}/scripts/input/civtfspec.csv +0 -0
  136. {openap-2.2 → openap-2.3}/scripts/input/civtfspec.xls +0 -0
  137. {openap-2.2 → openap-2.3}/scripts/input/edb-emissions-databank v23 (web).xlsx +0 -0
  138. {openap-2.2 → openap-2.3}/scripts/input/edb-emissions-databank v25a (web).xlsx +0 -0
  139. {openap-2.2 → openap-2.3}/scripts/input/edb-emissions-databank v27 (web).xlsx +0 -0
  140. {openap-2.2 → openap-2.3}/scripts/input/edb-emissions-databank v28B (web).xlsx +0 -0
  141. {openap-2.2 → openap-2.3}/scripts/input/engine_cruise_performance.csv +0 -0
  142. {openap-2.2 → openap-2.3}/scripts/input/wrap/a319.csv +0 -0
  143. {openap-2.2 → openap-2.3}/scripts/input/wrap/a320.csv +0 -0
  144. {openap-2.2 → openap-2.3}/scripts/input/wrap/a321.csv +0 -0
  145. {openap-2.2 → openap-2.3}/scripts/input/wrap/a332.csv +0 -0
  146. {openap-2.2 → openap-2.3}/scripts/input/wrap/a333.csv +0 -0
  147. {openap-2.2 → openap-2.3}/scripts/input/wrap/a343.csv +0 -0
  148. {openap-2.2 → openap-2.3}/scripts/input/wrap/a388.csv +0 -0
  149. {openap-2.2 → openap-2.3}/scripts/input/wrap/b737.csv +0 -0
  150. {openap-2.2 → openap-2.3}/scripts/input/wrap/b738.csv +0 -0
  151. {openap-2.2 → openap-2.3}/scripts/input/wrap/b739.csv +0 -0
  152. {openap-2.2 → openap-2.3}/scripts/input/wrap/b744.csv +0 -0
  153. {openap-2.2 → openap-2.3}/scripts/input/wrap/b752.csv +0 -0
  154. {openap-2.2 → openap-2.3}/scripts/input/wrap/b763.csv +0 -0
  155. {openap-2.2 → openap-2.3}/scripts/input/wrap/b77w.csv +0 -0
  156. {openap-2.2 → openap-2.3}/scripts/input/wrap/b788.csv +0 -0
  157. {openap-2.2 → openap-2.3}/scripts/input/wrap/b789.csv +0 -0
  158. {openap-2.2 → openap-2.3}/scripts/input/wrap/e190.csv +0 -0
  159. {openap-2.2 → openap-2.3}/scripts/inspect_engine_ff_emission.py +0 -0
  160. {openap-2.2 → openap-2.3}/scripts/plot_fuel_model.py +0 -0
  161. {openap-2.2 → openap-2.3}/scripts/test_acropole.py +0 -0
  162. {openap-2.2 → openap-2.3}/scripts/wrap_csv_to_fwf.py +0 -0
  163. {openap-2.2 → openap-2.3}/test/data/flight_phase_test.csv +0 -0
  164. {openap-2.2 → openap-2.3}/test/data/flight_phlab.csv +0 -0
  165. {openap-2.2 → openap-2.3}/test/flights/C550/phlab_20170320_08.csv +0 -0
  166. {openap-2.2 → openap-2.3}/test/flights/C550/phlab_20170320_10.csv +0 -0
  167. {openap-2.2 → openap-2.3}/test/flights/C550/phlab_20170320_12.csv +0 -0
  168. {openap-2.2 → openap-2.3}/test/flights/C550/phlab_20170320_14.csv +0 -0
  169. {openap-2.2 → openap-2.3}/test/test_actypes.py +0 -0
  170. {openap-2.2 → openap-2.3}/test/test_bada.py +0 -0
  171. {openap-2.2 → openap-2.3}/test/test_drag.py +0 -0
  172. {openap-2.2 → openap-2.3}/test/test_emission.py +0 -0
  173. {openap-2.2 → openap-2.3}/test/test_fuel.py +0 -0
  174. {openap-2.2 → openap-2.3}/test/test_kinematic.py +0 -0
  175. {openap-2.2 → openap-2.3}/test/test_nav.py +0 -0
  176. {openap-2.2 → openap-2.3}/test/test_phase.py +0 -0
  177. {openap-2.2 → openap-2.3}/test/test_prop.py +0 -0
  178. {openap-2.2 → openap-2.3}/test/test_thrust.py +0 -0
  179. {openap-2.2 → openap-2.3}/test/test_trajectory.py +0 -0
  180. {openap-2.2 → openap-2.3}/uv.lock +0 -0
@@ -1,11 +1,11 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: openap
3
- Version: 2.2
3
+ Version: 2.3
4
4
  Summary: Open Aircraft Performance Model (OpenAP) in Python
5
5
  Project-URL: homepage, https://openap.dev
6
6
  Project-URL: repository, https://github.com/junzis/openap
7
7
  Project-URL: issues, https://github.com/junzis/openap/issues
8
- Author-email: Junzi Sun <j.sun-1@tudelft.nl>
8
+ Author-email: Junzi Sun <git@junzis.com>
9
9
  License: GNU LGPL v3
10
10
  License-File: LICENSE
11
11
  Classifier: Development Status :: 4 - Beta
@@ -235,7 +235,7 @@
235
235
  "name": "python",
236
236
  "nbconvert_exporter": "python",
237
237
  "pygments_lexer": "ipython3",
238
- "version": "3.11.11"
238
+ "version": "3.12.3"
239
239
  }
240
240
  },
241
241
  "nbformat": 4,
@@ -9,14 +9,14 @@ from ..extra import ndarrayconvert
9
9
 
10
10
 
11
11
  # %%
12
- def load_bada4(ac: str, path: str) -> ElementTree:
12
+ def load_bada4(ac: str, path: str) -> ElementTree.ElementTree:
13
13
  """Find and construct the drag polar model.
14
14
  Args:
15
15
  ac (str): aircraft type (for example: A320 or A320-231).
16
16
  bada_path (str): path to BADA4 models.
17
17
 
18
18
  Returns:
19
- xml.etree.ElementTree: BADA4 model XML.
19
+ xml.etree.ElementTree.ElementTree: BADA4 model XML.
20
20
  """
21
21
 
22
22
  ac_options = glob(f"{path}/{ac.upper()}*")
@@ -1,7 +1,8 @@
1
1
  # %%
2
- import numpy as np
3
2
  from scipy import optimize
4
3
 
4
+ import numpy as np
5
+
5
6
  # %%
6
7
  gas_constant_water_vapor = 461.51
7
8
  gas_constant_dry_air = 287.05
@@ -60,6 +61,14 @@ def relative_humidity(specific_humidity, pressure, temperature, to="ice"):
60
61
  )
61
62
 
62
63
 
64
+ def rhw2rhi(relative_humidity_water, temperature):
65
+ return (
66
+ relative_humidity_water
67
+ * saturation_pressure_over_water(temperature)
68
+ / saturation_pressure_over_ice(temperature)
69
+ )
70
+
71
+
63
72
  def critical_temperature_water(pressure):
64
73
  isobaric_mixing_slope = (
65
74
  ei_water
@@ -36,6 +36,7 @@ flaps:
36
36
  cruise:
37
37
  height: 11000
38
38
  mach: 0.78
39
+ range: 7000
39
40
 
40
41
  engine:
41
42
  type: turbofan
@@ -36,6 +36,7 @@ flaps:
36
36
  cruise:
37
37
  height: 11000
38
38
  mach: 0.78
39
+ range: 6300
39
40
 
40
41
  engine:
41
42
  type: turbofan
@@ -36,6 +36,7 @@ flaps:
36
36
  cruise:
37
37
  height: 11000
38
38
  mach: 0.78
39
+ range: 7400
39
40
 
40
41
  engine:
41
42
  type: turbofan
@@ -36,6 +36,7 @@ flaps:
36
36
  cruise:
37
37
  height: 11000
38
38
  mach: 0.78
39
+ range: 2800
39
40
 
40
41
  engine:
41
42
  type: turbofan
@@ -36,12 +36,13 @@ flaps:
36
36
  cruise:
37
37
  height: 11000
38
38
  mach: 0.78
39
+ range: 3300
39
40
 
40
41
  engine:
41
42
  type: turbofan
42
43
  mount: wing
43
44
  number: 2
44
- default: CFM56-5B7
45
+ default: V2524-A5
45
46
  options:
46
47
  A319-111: CFM56-5B5
47
48
  A319-112: CFM56-5B6
@@ -36,6 +36,7 @@ flaps:
36
36
  cruise:
37
37
  height: 11000
38
38
  mach: 0.78
39
+ range: 5000
39
40
 
40
41
  engine:
41
42
  type: turbofan
@@ -36,6 +36,7 @@ flaps:
36
36
  cruise:
37
37
  height: 11000
38
38
  mach: 0.78
39
+ range: 4400
39
40
 
40
41
  engine:
41
42
  type: turbofan
@@ -36,6 +36,7 @@ flaps:
36
36
  cruise:
37
37
  height: 11000
38
38
  mach: 0.82
39
+ range: 12500
39
40
 
40
41
  engine:
41
42
  type: turbofan
@@ -36,6 +36,7 @@ flaps:
36
36
  cruise:
37
37
  height: 11000
38
38
  mach: 0.82
39
+ range: 10500
39
40
 
40
41
  engine:
41
42
  type: turbofan
@@ -36,6 +36,7 @@ flaps:
36
36
  cruise:
37
37
  height: 11000
38
38
  mach: 0.82
39
+ range: 13300
39
40
 
40
41
  engine:
41
42
  type: turbofan
@@ -36,6 +36,7 @@ flaps:
36
36
  cruise:
37
37
  height: 11000
38
38
  mach: 0.85
39
+ range: 15000
39
40
 
40
41
  engine:
41
42
  type: turbofan
@@ -36,6 +36,7 @@ flaps:
36
36
  cruise:
37
37
  height: 12800
38
38
  mach: 0.85
39
+ range: 14800
39
40
 
40
41
  engine:
41
42
  type: turbofan
@@ -36,6 +36,7 @@ flaps:
36
36
  cruise:
37
37
  height: 11000
38
38
  mach: 0.78
39
+ range: 7100
39
40
 
40
41
  engine:
41
42
  type: turbofan
@@ -36,6 +36,7 @@ flaps:
36
36
  cruise:
37
37
  height: 11000
38
38
  mach: 0.79
39
+ range: 6600
39
40
 
40
41
  engine:
41
42
  type: turbofan
@@ -36,6 +36,7 @@ flaps:
36
36
  cruise:
37
37
  height: 11000
38
38
  mach: 0.79
39
+ range: 6600
39
40
 
40
41
  engine:
41
42
  type: turbofan
@@ -36,6 +36,7 @@ flaps:
36
36
  cruise:
37
37
  height: 11000
38
38
  mach: 0.79
39
+ range: 6100
39
40
 
40
41
  engine:
41
42
  type: turbofan
@@ -36,6 +36,7 @@ flaps:
36
36
  cruise:
37
37
  height: 11000
38
38
  mach: 0.78
39
+ range: 3900
39
40
 
40
41
  engine:
41
42
  type: turbofan
@@ -36,6 +36,7 @@ flaps:
36
36
  cruise:
37
37
  height: 11000
38
38
  mach: 0.78
39
+ range: 4600
39
40
 
40
41
  engine:
41
42
  type: turbofan
@@ -36,6 +36,7 @@ flaps:
36
36
  cruise:
37
37
  height: 11000
38
38
  mach: 0.789
39
+ range: 3700
39
40
 
40
41
  engine:
41
42
  type: turbofan
@@ -36,12 +36,13 @@ flaps:
36
36
  cruise:
37
37
  height: 11000
38
38
  mach: 0.79
39
+ range: 5100
39
40
 
40
41
  engine:
41
42
  type: turbofan
42
43
  mount: wing
43
44
  number: 2
44
- default: CFM56-7B26
45
+ default: CFM56-7B27E
45
46
  options:
46
47
  - CFM56-7B24
47
48
  - CFM56-7B26
@@ -36,6 +36,7 @@ flaps:
36
36
  cruise:
37
37
  height: 11000
38
38
  mach: 0.85
39
+ range: 13400
39
40
 
40
41
  engine:
41
42
  type: turbofan
@@ -36,6 +36,7 @@ flaps:
36
36
  cruise:
37
37
  height: 11000
38
38
  mach: 0.85
39
+ range: 14800
39
40
 
40
41
  engine:
41
42
  type: turbofan
@@ -36,6 +36,7 @@ flaps:
36
36
  cruise:
37
37
  height: 11000
38
38
  mach: 0.8
39
+ range: 7200
39
40
 
40
41
  engine:
41
42
  type: turbofan
@@ -36,6 +36,7 @@ flaps:
36
36
  cruise:
37
37
  height: 11000
38
38
  mach: 0.8
39
+ range: 11400
39
40
 
40
41
  engine:
41
42
  type: turbofan
@@ -36,6 +36,7 @@ flaps:
36
36
  cruise:
37
37
  height: 11000
38
38
  mach: 0.84
39
+ range: 9600
39
40
 
40
41
  engine:
41
42
  type: turbofan
@@ -36,6 +36,7 @@ flaps:
36
36
  cruise:
37
37
  height: 11000
38
38
  mach: 0.84
39
+ range: 11000
39
40
 
40
41
  engine:
41
42
  type: turbofan
@@ -36,6 +36,7 @@ flaps:
36
36
  cruise:
37
37
  height: 11000
38
38
  mach: 0.84
39
+ range: 14700
39
40
 
40
41
  engine:
41
42
  type: turbofan
@@ -36,6 +36,7 @@ flaps:
36
36
  cruise:
37
37
  height: 11000
38
38
  mach: 0.85
39
+ range: 14800
39
40
 
40
41
  engine:
41
42
  type: turbofan
@@ -36,6 +36,7 @@ flaps:
36
36
  cruise:
37
37
  height: 11000
38
38
  mach: 0.85
39
+ range: 14000
39
40
 
40
41
  engine:
41
42
  type: turbofan
@@ -36,6 +36,7 @@ flaps:
36
36
  cruise:
37
37
  height: 11000
38
38
  mach: 0.67
39
+ range: 3500
39
40
 
40
41
  engine:
41
42
  type: turbofan
@@ -36,6 +36,7 @@ flaps:
36
36
  cruise:
37
37
  height: 11000
38
38
  mach: 0.72
39
+ range: 2200
39
40
 
40
41
  engine:
41
42
  type: turbofan
@@ -36,6 +36,7 @@ flaps:
36
36
  cruise:
37
37
  height: 11000
38
38
  mach: 0.75
39
+ range: 3900
39
40
 
40
41
  engine:
41
42
  type: turbofan
@@ -36,6 +36,7 @@ flaps:
36
36
  cruise:
37
37
  height: 11000
38
38
  mach: 0.78
39
+ range: 4400
39
40
 
40
41
  engine:
41
42
  type: turbofan
@@ -38,6 +38,7 @@ limits:
38
38
  cruise:
39
39
  height: 11000
40
40
  mach: 0.78
41
+ range: 4300
41
42
 
42
43
  engine:
43
44
  type: turbofan
@@ -36,6 +36,7 @@ flaps:
36
36
  cruise:
37
37
  height: 11000
38
38
  mach: 0.75
39
+ range: 3300
39
40
 
40
41
  engine:
41
42
  type: turbofan
@@ -37,6 +37,7 @@ flaps:
37
37
  cruise:
38
38
  height: 12000
39
39
  mach: 0.85
40
+ range: 13000
40
41
 
41
42
  engine:
42
43
  type: turbofan
@@ -0,0 +1,37 @@
1
+ import numpy as np
2
+
3
+ from . import prop
4
+
5
+
6
+ def from_range(typecode, distance, load_factor=0.8, fraction=False, **kwargs):
7
+ """Compute aircraft mass based on range, load factor, and fraction settings.
8
+
9
+ This function calculates the aircraft mass considering fuel and payload weights
10
+ based on the given flight distance and load factor.
11
+
12
+ Args:
13
+ typecode (str): ICAO aircraft type code (e.g. A320, B738)
14
+ distance (float): Flight distance in nautical miles
15
+ load_factor (float): Load factor between 0 and 1, default 0.8
16
+ fraction (bool): If True, return mass fraction of MTOW, default False
17
+
18
+ Returns:
19
+ float: Aircraft mass in kg, or mass fraction if fraction=True
20
+
21
+ """
22
+ ac = prop.aircraft(typecode, **kwargs)
23
+
24
+ range_fraction = distance / ac["cruise"]["range"]
25
+ range_fraction = np.clip(range_fraction, 0.2, 1)
26
+
27
+ max_fuel_weight = ac["mfc"] * 0.8025 # L->kg
28
+ fuel_weight = range_fraction * max_fuel_weight
29
+
30
+ payload_weight = (ac["mtow"] - max_fuel_weight - ac["oew"]) * load_factor
31
+
32
+ mass = ac["oew"] + fuel_weight + payload_weight
33
+
34
+ if fraction:
35
+ return mass / ac["mtow"]
36
+ else:
37
+ return mass
@@ -1,8 +1,8 @@
1
1
  [project]
2
2
  name = "openap"
3
- version = "2.2"
3
+ version = "2.3"
4
4
  description = "Open Aircraft Performance Model (OpenAP) in Python"
5
- authors = [{ name = "Junzi Sun", email = "j.sun-1@tudelft.nl" }]
5
+ authors = [{ name = "Junzi Sun", email = "git@junzis.com" }]
6
6
  license = { text = "GNU LGPL v3" }
7
7
  readme = "README.md"
8
8
  classifiers = [
@@ -204,6 +204,8 @@ for typecode in acropole_typecodes:
204
204
  ax1.plot(x, func(x, *popt), "r-", label=f"fit: {popt}")
205
205
  ax1.legend()
206
206
  ax1.set_xlim(0, 0.7)
207
+ ax1.set_xlabel("Thrust ratio")
208
+ ax1.set_ylabel("Fuel flow")
207
209
 
208
210
  ax2.scatter(df1.thrust_ratio, df1.fuel_flow, s=5, alpha=0.02, c="tab:green")
209
211
  ax2.scatter(df2.thrust_ratio, df2.fuel_flow, s=5, alpha=0.02, c="tab:orange")
@@ -212,6 +214,8 @@ for typecode in acropole_typecodes:
212
214
  ax2.scatter(df5.thrust_ratio, df5.fuel_flow, s=5, alpha=0.02, c="gray")
213
215
  ax2.plot(x, func(x, *popt), "r-")
214
216
  ax2.set_xlim(0, 0.7)
217
+ ax2.set_xlabel("Thrust ratio")
218
+ ax2.set_ylabel("Fuel flow")
215
219
 
216
220
  plt.suptitle(typecode)
217
221
  plt.tight_layout()
@@ -284,6 +288,8 @@ print("default", popt)
284
288
 
285
289
  x = np.linspace(0, 1, 100)
286
290
  plt.plot(x, func(x, *popt), "b-")
291
+ plt.xlabel("Thrust ratio")
292
+ plt.ylabel("Fuel flow")
287
293
 
288
294
 
289
295
  plt.legend(ncol=3)
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes