summaryrefslogtreecommitdiff
path: root/python-aerosandbox.spec
blob: b0daa2cdb13f5926563951e9bf355c97ca0c74e6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
%global _empty_manifest_terminate_build 0
Name:		python-AeroSandbox
Version:	4.0.7
Release:	1
Summary:	AeroSandbox is a Python package for design optimization of engineered systems such as aircraft.
License:	MIT License
URL:		https://peterdsharpe.github.io/AeroSandbox/
Source0:	https://mirrors.nju.edu.cn/pypi/web/packages/cc/51/511690f9b6a1b548c174fd1e298d8dec76ee6512c8298c4ad2882d83dba9/AeroSandbox-4.0.7.tar.gz
BuildArch:	noarch

Requires:	python3-numpy
Requires:	python3-scipy
Requires:	python3-casadi
Requires:	python3-pandas
Requires:	python3-matplotlib
Requires:	python3-seaborn
Requires:	python3-tqdm
Requires:	python3-sortedcontainers
Requires:	python3-sphinx
Requires:	python3-furo
Requires:	python3-sphinx-autoapi
Requires:	python3-plotly
Requires:	python3-pyvista
Requires:	python3-ipyvtklink
Requires:	python3-trimesh
Requires:	python3-sympy
Requires:	python3-cadquery
Requires:	python3-pytest
Requires:	python3-nbval

%description
### What can I do with AeroSandbox?
Use AeroSandbox to design and optimize entire aircraft:
<table>
    <tr>
        <td width="50%" valign="top">
            <p align="center">
                <a href="https://github.com/peterdsharpe/Feather-RC-Glider"><i>Feather</i> (an ultra-lightweight 1-meter-class RC motor glider)</a>
            </p>
            <img src="https://raw.githubusercontent.com/peterdsharpe/Feather-RC-Glider/master/CAD/feather.png" alt="Feather first page">
        </td>
        <td width="50%" valign="top">
            <p align="center">
                <a href="https://github.com/peterdsharpe/solar-seaplane-preliminary-sizing"><i>SEAWAY-Mini</i> (a solar-electric, 13' wingspan seaplane)</a>
            </p>
            <img src="https://raw.githubusercontent.com/peterdsharpe/solar-seaplane-preliminary-sizing/main/CAD/renders/seaway_mini_packet_Page_1.png" alt="Seaway-Mini first page">
        </td>
    </tr>
</table>
Use AeroSandbox to support real-world aircraft development programs, all the way from your very first sketch to your first-flight and even beyond:
<table>
    <tr>
        <td width="50%" valign="top">
            <p align="center">
                <a href="https://github.com/peterdsharpe/DawnDesignTool">Initial concept sketches + sizing of <i>Dawn</i> (a solar-electric airplane for climate science research) in AeroSandbox, Spring 2020</a>
            </p>
            <img src="./media/images/dawn1-first-sketch.png" alt="Dawn initial design">
        </td>
        <td width="50%" valign="top">
            <p align="center">
                <a href="https://youtu.be/CyTzx9UCvyo"><i>Dawn</i> (later renamed <i>SACOS</i>) in first flight, Fall 2022</a>
            </p>
            <p align="center"><a href="https://www.electra.aero/news/sacos-first-flight">(Thanks to so, so many wonderful people!)</a></p>
            <img src="./media/images/SACOS%20First%20Flight%20Zoomed.jpg" alt="SACOS first flight">
        </td>
    </tr>
</table>
Use AeroSandbox to explore counterintuitive, complicated design tradeoffs, all at the earliest stages of conceptual design *where these insights make the most difference*:
<table>
	<tr>
		<td width="50%" valign="top">
			<p align="center">
				<a href="https://github.com/peterdsharpe/DawnDesignTool">Exploring how big a solar airplane needs to be to fly, as a function of seasonality and latitude</a>
			</p>
			<img src="https://github.com/peterdsharpe/DawnDesignTool/raw/master/docs/30kg_payload.svg" alt="Dawn seasonality latitude tradespace">
		</td>
		<td width="50%" valign="top">
			<p align="center">
				<a href="https://www.popularmechanics.com/military/aviation/a13938789/mit-developing-mach-08-rocket-drone-for-the-air-force/">Exploring how the mission range of <i>Firefly</i>, a Mach 0.8 rocket drone, changes if we add an altitude limit, simultaneously optimizing aircraft design and trajectories</a>
			</p>
			<img src="./media/images/firefly-range-ceiling-trade.png" alt="Firefly range ceiling trade">
		</td>
	</tr>
</table>
Use AeroSandbox as a pure aerodynamics toolkit:
<table>
	<tr>
		<td width="50%" valign="top">
			<p align="center">
				VLM simulation of a glider, aileron deflections of +-30°
			</p>
			<img src="./media/images/vlm3_with_control_surfaces.png" alt="VLM simulation">
		</td>
		<td width="50%" valign="top">
			<p align="center">
				Aerodynamic shape optimization of a wing planform, using an arbitrary objective and constraints
			</p>
			<img src="./media/images/wing_optimization.png" alt="Wing optimization">
		</td>
	</tr>
</table>
Among many other discplines:
<table>
	<tr>
		<td width="50%" valign="top">
			<p align="center">
				Structural optimization of a composite tube spar
			</p>
			<img src="./media/images/beam-optimization.png" alt="Beam optimization">
		</td>
		<td width="50%" valign="top">
			<p align="center">
				Electric motor analysis for propeller matching
			</p>
			<img src="./media/images/motor_perf.png" alt="Motor performance">
		</td>
	</tr>
	<tr>
		<td>
			<p align="center" valign="top">
				<a href="https://github.com/peterdsharpe/transport-aircraft">Tools to analyze unconventional propulsion (e.g., LH2)</a>
			</p>
			<img src="https://github.com/peterdsharpe/transport-aircraft/raw/master/figures/three_view.png" alt="LH2 airplane three-view">
		</td>
		<td>
			<p align="center" valign="top">
				Detailed weights estimation for aircraft ranging from micro-UAVs to airliners
			</p>
			<img src="https://github.com/peterdsharpe/transport-aircraft/raw/master/figures/mass_budget.png" alt="Mass Budget">
		</td>
</tr>
</table>
Easily interface AeroSandbox with all your favorite tools:
<table>
    <tr>
        <td width="33%" valign="top">
            <p align="center">
                Other conceptual design tools (AVL, XFLR5, XFoil, ASWING, MSES, etc.)
            </p>
            <img src="./media/images/airfoil_contours.png" alt="XFoil">
        </td> 
          <td width="33%" valign="top">
                <p align="center">
                    CAD tools via STEP export (SolidWorks, Fusion 360, etc.)
                </p>
				<p align="center">
				(STL, OBJ, etc. supported too)
				</p>
                <img src="https://github.com/peterdsharpe/solar-seaplane-preliminary-sizing/raw/main/CAD/renders/raytrace-lowres.jpg" alt="CAD">
            </td>
          <td width="33%" valign="top">
			<p align="center">
				User-provided models + code (for custom aerodynamics, structures, propulsion, or anything else - e.g., for optimizing flight through a probabilistic wind field, shown below) 
			</p>
			<img src="./media/images/wind_speeds_model.png" alt="Wind speed">
		</td>
	</tr>
</table>
Or, throw all the airplane-design-specific code out entirely, and use AeroSandbox purely as an optimization solver or as a solver for nonlinear systems of equations (or ODEs, or PDEs):
<table>
	<tr>
		<td width="50%" valign="top">
			<p align="center">
				<a href="https://github.com/peterdsharpe/AeroSandbox/blob/develop/tutorial/01%20-%20Optimization%20and%20Math/01%20-%202D%20Rosenbrock.ipynb">Optimize the 2D Rosenbrock function</a>
			</p>
			<img src="./media/images/optimization.png" alt="Optimization">
		</td>
		<td width="50%" valign="top">
			<p align="center">
				<a href="https://github.com/peterdsharpe/AeroSandbox/tree/develop/tutorial/03%20-%20Trajectory%20Optimization%20and%20Optimal%20Control/01%20-%20Solving%20ODEs%20with%20AeroSandbox">Specify the Falkner Skan ODE (nonlinear, 3rd-order BVP) and let AeroSandbox automatically take care of the discretization, solution, and even inverse solving.</a>
			</p>
			<img src="./media/images/falkner-skan.png" alt="FS ODE">
		</td>
</tr>
</table>
And much, much more. Best of all, combine these tools arbitrarily without any loss in optimization speed and without any tedious derivative math, all thanks to AeroSandbox's end-to-end automatic-differentiability.
## Getting Started
### Installation
In short:
* `pip install aerosandbox[full]` for a complete install.
* `pip install aerosandbox` for a lightweight (headless) installation with minimal dependencies. All optimization, numerics, and physics models are included, but optional visualization dependencies are skipped.
For more installation details (e.g., if you're new to Python), [see here](./INSTALLATION.md).
### Tutorials, Examples, and Documentation
To get started, [check out the tutorials folder here](./tutorial/)! All tutorials are viewable in-browser, or you can open them as Jupyter notebooks by cloning this repository.
For a more detailed and theory-heavy introduction to AeroSandbox, [please see this thesis](./tutorial/sharpe-pds-sm-AeroAstro-2021-thesis.pdf).
For a yet-more-detailed developer-level description of AeroSandbox modules, [please see the developer README](aerosandbox/README.md).
For fully-detailed API documentation, see [the documentation website](https://aerosandbox.readthedocs.io/en/master/).
You can print documentation and examples for any AeroSandbox object by using the built-in `help()` function (e.g., `help(asb.Airplane)`). AeroSandbox code is also documented *extensively* in the source and contains hundreds of unit test examples, so examining the source code can also be useful.
### Usage Details
One final point to note: as we're all sensible and civilized here, **all inputs and outputs to AeroSandbox are expressed in base SI units, or derived units thereof** (e.g, m, N, kg, m/s, J, Pa).
The only exception to this rule is when units are explicitly noted via variable name suffix. For example:
* `battery_capacity` -> Joules
* `battery_capacity_watt_hours` -> Watt-hours.
All angles are in radians, except for α and β which are in degrees due to long-standing aerospace convention. (In any case, units are marked on all function docstrings.)
If you wish to use other units, consider using [`aerosandbox.tools.units`](./aerosandbox/tools/units.py) to convert easily.
## Project Details
### Contributing
Please feel free to join the development of AeroSandbox - contributions are always so welcome! If you have a change you'd like to make, the easiest way to do that is by submitting a pull request.
The text file [`CONTRIBUTING.md`](./CONTRIBUTING.md) has more details for developers and power users.
If you've already made several additions and would like to be involved in a more long-term capacity, please message me!
Contact information can be found next to my name near the top of this README.
### Donating
If you like this software, please consider donating to support development [via PayPal](https://paypal.me/peterdsharpe)
or [GitHub Sponsors](https://github.com/sponsors/peterdsharpe/)! Proceeds will go towards more coffee for the grad students.
### Bugs
Please, please report all bugs by [creating a new issue](https://github.com/peterdsharpe/AeroSandbox/issues)!
### Versioning
AeroSandbox loosely uses [semantic versioning](https://semver.org/), which should give you an idea of whether or not you can probably expect backward-compatibility and/or new features from any given update.
For more details, see the [changelog](./CHANGELOG.md).
### Citation & Commercial Use
If you find AeroSandbox useful in a research publication, please cite it using the following BibTeX snippet:
```bibtex
@mastersthesis{aerosandbox,
    title = {AeroSandbox: A Differentiable Framework for Aircraft Design Optimization},
    author = {Sharpe, Peter D.},
    school = {Massachusetts Institute of Technology},
    year = {2021}
}
```
As the MIT License applies, use AeroSandbox for anything you want (attribution appreciated, but not required).
Commercial users: I'm more than happy to discuss consulting work for active AeroSandbox support if this package proves helpful - use the email address in the header of this README to get in touch.
### License
[MIT License, terms here](LICENSE.txt). Basically: use AeroSandbox for anything you want; no warranty express or implied.
## Stargazers over time
[![Stargazers over time](https://starchart.cc/peterdsharpe/AeroSandbox.svg)](https://starchart.cc/peterdsharpe/AeroSandbox) 

%package -n python3-AeroSandbox
Summary:	AeroSandbox is a Python package for design optimization of engineered systems such as aircraft.
Provides:	python-AeroSandbox
BuildRequires:	python3-devel
BuildRequires:	python3-setuptools
BuildRequires:	python3-pip
%description -n python3-AeroSandbox
### What can I do with AeroSandbox?
Use AeroSandbox to design and optimize entire aircraft:
<table>
    <tr>
        <td width="50%" valign="top">
            <p align="center">
                <a href="https://github.com/peterdsharpe/Feather-RC-Glider"><i>Feather</i> (an ultra-lightweight 1-meter-class RC motor glider)</a>
            </p>
            <img src="https://raw.githubusercontent.com/peterdsharpe/Feather-RC-Glider/master/CAD/feather.png" alt="Feather first page">
        </td>
        <td width="50%" valign="top">
            <p align="center">
                <a href="https://github.com/peterdsharpe/solar-seaplane-preliminary-sizing"><i>SEAWAY-Mini</i> (a solar-electric, 13' wingspan seaplane)</a>
            </p>
            <img src="https://raw.githubusercontent.com/peterdsharpe/solar-seaplane-preliminary-sizing/main/CAD/renders/seaway_mini_packet_Page_1.png" alt="Seaway-Mini first page">
        </td>
    </tr>
</table>
Use AeroSandbox to support real-world aircraft development programs, all the way from your very first sketch to your first-flight and even beyond:
<table>
    <tr>
        <td width="50%" valign="top">
            <p align="center">
                <a href="https://github.com/peterdsharpe/DawnDesignTool">Initial concept sketches + sizing of <i>Dawn</i> (a solar-electric airplane for climate science research) in AeroSandbox, Spring 2020</a>
            </p>
            <img src="./media/images/dawn1-first-sketch.png" alt="Dawn initial design">
        </td>
        <td width="50%" valign="top">
            <p align="center">
                <a href="https://youtu.be/CyTzx9UCvyo"><i>Dawn</i> (later renamed <i>SACOS</i>) in first flight, Fall 2022</a>
            </p>
            <p align="center"><a href="https://www.electra.aero/news/sacos-first-flight">(Thanks to so, so many wonderful people!)</a></p>
            <img src="./media/images/SACOS%20First%20Flight%20Zoomed.jpg" alt="SACOS first flight">
        </td>
    </tr>
</table>
Use AeroSandbox to explore counterintuitive, complicated design tradeoffs, all at the earliest stages of conceptual design *where these insights make the most difference*:
<table>
	<tr>
		<td width="50%" valign="top">
			<p align="center">
				<a href="https://github.com/peterdsharpe/DawnDesignTool">Exploring how big a solar airplane needs to be to fly, as a function of seasonality and latitude</a>
			</p>
			<img src="https://github.com/peterdsharpe/DawnDesignTool/raw/master/docs/30kg_payload.svg" alt="Dawn seasonality latitude tradespace">
		</td>
		<td width="50%" valign="top">
			<p align="center">
				<a href="https://www.popularmechanics.com/military/aviation/a13938789/mit-developing-mach-08-rocket-drone-for-the-air-force/">Exploring how the mission range of <i>Firefly</i>, a Mach 0.8 rocket drone, changes if we add an altitude limit, simultaneously optimizing aircraft design and trajectories</a>
			</p>
			<img src="./media/images/firefly-range-ceiling-trade.png" alt="Firefly range ceiling trade">
		</td>
	</tr>
</table>
Use AeroSandbox as a pure aerodynamics toolkit:
<table>
	<tr>
		<td width="50%" valign="top">
			<p align="center">
				VLM simulation of a glider, aileron deflections of +-30°
			</p>
			<img src="./media/images/vlm3_with_control_surfaces.png" alt="VLM simulation">
		</td>
		<td width="50%" valign="top">
			<p align="center">
				Aerodynamic shape optimization of a wing planform, using an arbitrary objective and constraints
			</p>
			<img src="./media/images/wing_optimization.png" alt="Wing optimization">
		</td>
	</tr>
</table>
Among many other discplines:
<table>
	<tr>
		<td width="50%" valign="top">
			<p align="center">
				Structural optimization of a composite tube spar
			</p>
			<img src="./media/images/beam-optimization.png" alt="Beam optimization">
		</td>
		<td width="50%" valign="top">
			<p align="center">
				Electric motor analysis for propeller matching
			</p>
			<img src="./media/images/motor_perf.png" alt="Motor performance">
		</td>
	</tr>
	<tr>
		<td>
			<p align="center" valign="top">
				<a href="https://github.com/peterdsharpe/transport-aircraft">Tools to analyze unconventional propulsion (e.g., LH2)</a>
			</p>
			<img src="https://github.com/peterdsharpe/transport-aircraft/raw/master/figures/three_view.png" alt="LH2 airplane three-view">
		</td>
		<td>
			<p align="center" valign="top">
				Detailed weights estimation for aircraft ranging from micro-UAVs to airliners
			</p>
			<img src="https://github.com/peterdsharpe/transport-aircraft/raw/master/figures/mass_budget.png" alt="Mass Budget">
		</td>
</tr>
</table>
Easily interface AeroSandbox with all your favorite tools:
<table>
    <tr>
        <td width="33%" valign="top">
            <p align="center">
                Other conceptual design tools (AVL, XFLR5, XFoil, ASWING, MSES, etc.)
            </p>
            <img src="./media/images/airfoil_contours.png" alt="XFoil">
        </td> 
          <td width="33%" valign="top">
                <p align="center">
                    CAD tools via STEP export (SolidWorks, Fusion 360, etc.)
                </p>
				<p align="center">
				(STL, OBJ, etc. supported too)
				</p>
                <img src="https://github.com/peterdsharpe/solar-seaplane-preliminary-sizing/raw/main/CAD/renders/raytrace-lowres.jpg" alt="CAD">
            </td>
          <td width="33%" valign="top">
			<p align="center">
				User-provided models + code (for custom aerodynamics, structures, propulsion, or anything else - e.g., for optimizing flight through a probabilistic wind field, shown below) 
			</p>
			<img src="./media/images/wind_speeds_model.png" alt="Wind speed">
		</td>
	</tr>
</table>
Or, throw all the airplane-design-specific code out entirely, and use AeroSandbox purely as an optimization solver or as a solver for nonlinear systems of equations (or ODEs, or PDEs):
<table>
	<tr>
		<td width="50%" valign="top">
			<p align="center">
				<a href="https://github.com/peterdsharpe/AeroSandbox/blob/develop/tutorial/01%20-%20Optimization%20and%20Math/01%20-%202D%20Rosenbrock.ipynb">Optimize the 2D Rosenbrock function</a>
			</p>
			<img src="./media/images/optimization.png" alt="Optimization">
		</td>
		<td width="50%" valign="top">
			<p align="center">
				<a href="https://github.com/peterdsharpe/AeroSandbox/tree/develop/tutorial/03%20-%20Trajectory%20Optimization%20and%20Optimal%20Control/01%20-%20Solving%20ODEs%20with%20AeroSandbox">Specify the Falkner Skan ODE (nonlinear, 3rd-order BVP) and let AeroSandbox automatically take care of the discretization, solution, and even inverse solving.</a>
			</p>
			<img src="./media/images/falkner-skan.png" alt="FS ODE">
		</td>
</tr>
</table>
And much, much more. Best of all, combine these tools arbitrarily without any loss in optimization speed and without any tedious derivative math, all thanks to AeroSandbox's end-to-end automatic-differentiability.
## Getting Started
### Installation
In short:
* `pip install aerosandbox[full]` for a complete install.
* `pip install aerosandbox` for a lightweight (headless) installation with minimal dependencies. All optimization, numerics, and physics models are included, but optional visualization dependencies are skipped.
For more installation details (e.g., if you're new to Python), [see here](./INSTALLATION.md).
### Tutorials, Examples, and Documentation
To get started, [check out the tutorials folder here](./tutorial/)! All tutorials are viewable in-browser, or you can open them as Jupyter notebooks by cloning this repository.
For a more detailed and theory-heavy introduction to AeroSandbox, [please see this thesis](./tutorial/sharpe-pds-sm-AeroAstro-2021-thesis.pdf).
For a yet-more-detailed developer-level description of AeroSandbox modules, [please see the developer README](aerosandbox/README.md).
For fully-detailed API documentation, see [the documentation website](https://aerosandbox.readthedocs.io/en/master/).
You can print documentation and examples for any AeroSandbox object by using the built-in `help()` function (e.g., `help(asb.Airplane)`). AeroSandbox code is also documented *extensively* in the source and contains hundreds of unit test examples, so examining the source code can also be useful.
### Usage Details
One final point to note: as we're all sensible and civilized here, **all inputs and outputs to AeroSandbox are expressed in base SI units, or derived units thereof** (e.g, m, N, kg, m/s, J, Pa).
The only exception to this rule is when units are explicitly noted via variable name suffix. For example:
* `battery_capacity` -> Joules
* `battery_capacity_watt_hours` -> Watt-hours.
All angles are in radians, except for α and β which are in degrees due to long-standing aerospace convention. (In any case, units are marked on all function docstrings.)
If you wish to use other units, consider using [`aerosandbox.tools.units`](./aerosandbox/tools/units.py) to convert easily.
## Project Details
### Contributing
Please feel free to join the development of AeroSandbox - contributions are always so welcome! If you have a change you'd like to make, the easiest way to do that is by submitting a pull request.
The text file [`CONTRIBUTING.md`](./CONTRIBUTING.md) has more details for developers and power users.
If you've already made several additions and would like to be involved in a more long-term capacity, please message me!
Contact information can be found next to my name near the top of this README.
### Donating
If you like this software, please consider donating to support development [via PayPal](https://paypal.me/peterdsharpe)
or [GitHub Sponsors](https://github.com/sponsors/peterdsharpe/)! Proceeds will go towards more coffee for the grad students.
### Bugs
Please, please report all bugs by [creating a new issue](https://github.com/peterdsharpe/AeroSandbox/issues)!
### Versioning
AeroSandbox loosely uses [semantic versioning](https://semver.org/), which should give you an idea of whether or not you can probably expect backward-compatibility and/or new features from any given update.
For more details, see the [changelog](./CHANGELOG.md).
### Citation & Commercial Use
If you find AeroSandbox useful in a research publication, please cite it using the following BibTeX snippet:
```bibtex
@mastersthesis{aerosandbox,
    title = {AeroSandbox: A Differentiable Framework for Aircraft Design Optimization},
    author = {Sharpe, Peter D.},
    school = {Massachusetts Institute of Technology},
    year = {2021}
}
```
As the MIT License applies, use AeroSandbox for anything you want (attribution appreciated, but not required).
Commercial users: I'm more than happy to discuss consulting work for active AeroSandbox support if this package proves helpful - use the email address in the header of this README to get in touch.
### License
[MIT License, terms here](LICENSE.txt). Basically: use AeroSandbox for anything you want; no warranty express or implied.
## Stargazers over time
[![Stargazers over time](https://starchart.cc/peterdsharpe/AeroSandbox.svg)](https://starchart.cc/peterdsharpe/AeroSandbox) 

%package help
Summary:	Development documents and examples for AeroSandbox
Provides:	python3-AeroSandbox-doc
%description help
### What can I do with AeroSandbox?
Use AeroSandbox to design and optimize entire aircraft:
<table>
    <tr>
        <td width="50%" valign="top">
            <p align="center">
                <a href="https://github.com/peterdsharpe/Feather-RC-Glider"><i>Feather</i> (an ultra-lightweight 1-meter-class RC motor glider)</a>
            </p>
            <img src="https://raw.githubusercontent.com/peterdsharpe/Feather-RC-Glider/master/CAD/feather.png" alt="Feather first page">
        </td>
        <td width="50%" valign="top">
            <p align="center">
                <a href="https://github.com/peterdsharpe/solar-seaplane-preliminary-sizing"><i>SEAWAY-Mini</i> (a solar-electric, 13' wingspan seaplane)</a>
            </p>
            <img src="https://raw.githubusercontent.com/peterdsharpe/solar-seaplane-preliminary-sizing/main/CAD/renders/seaway_mini_packet_Page_1.png" alt="Seaway-Mini first page">
        </td>
    </tr>
</table>
Use AeroSandbox to support real-world aircraft development programs, all the way from your very first sketch to your first-flight and even beyond:
<table>
    <tr>
        <td width="50%" valign="top">
            <p align="center">
                <a href="https://github.com/peterdsharpe/DawnDesignTool">Initial concept sketches + sizing of <i>Dawn</i> (a solar-electric airplane for climate science research) in AeroSandbox, Spring 2020</a>
            </p>
            <img src="./media/images/dawn1-first-sketch.png" alt="Dawn initial design">
        </td>
        <td width="50%" valign="top">
            <p align="center">
                <a href="https://youtu.be/CyTzx9UCvyo"><i>Dawn</i> (later renamed <i>SACOS</i>) in first flight, Fall 2022</a>
            </p>
            <p align="center"><a href="https://www.electra.aero/news/sacos-first-flight">(Thanks to so, so many wonderful people!)</a></p>
            <img src="./media/images/SACOS%20First%20Flight%20Zoomed.jpg" alt="SACOS first flight">
        </td>
    </tr>
</table>
Use AeroSandbox to explore counterintuitive, complicated design tradeoffs, all at the earliest stages of conceptual design *where these insights make the most difference*:
<table>
	<tr>
		<td width="50%" valign="top">
			<p align="center">
				<a href="https://github.com/peterdsharpe/DawnDesignTool">Exploring how big a solar airplane needs to be to fly, as a function of seasonality and latitude</a>
			</p>
			<img src="https://github.com/peterdsharpe/DawnDesignTool/raw/master/docs/30kg_payload.svg" alt="Dawn seasonality latitude tradespace">
		</td>
		<td width="50%" valign="top">
			<p align="center">
				<a href="https://www.popularmechanics.com/military/aviation/a13938789/mit-developing-mach-08-rocket-drone-for-the-air-force/">Exploring how the mission range of <i>Firefly</i>, a Mach 0.8 rocket drone, changes if we add an altitude limit, simultaneously optimizing aircraft design and trajectories</a>
			</p>
			<img src="./media/images/firefly-range-ceiling-trade.png" alt="Firefly range ceiling trade">
		</td>
	</tr>
</table>
Use AeroSandbox as a pure aerodynamics toolkit:
<table>
	<tr>
		<td width="50%" valign="top">
			<p align="center">
				VLM simulation of a glider, aileron deflections of +-30°
			</p>
			<img src="./media/images/vlm3_with_control_surfaces.png" alt="VLM simulation">
		</td>
		<td width="50%" valign="top">
			<p align="center">
				Aerodynamic shape optimization of a wing planform, using an arbitrary objective and constraints
			</p>
			<img src="./media/images/wing_optimization.png" alt="Wing optimization">
		</td>
	</tr>
</table>
Among many other discplines:
<table>
	<tr>
		<td width="50%" valign="top">
			<p align="center">
				Structural optimization of a composite tube spar
			</p>
			<img src="./media/images/beam-optimization.png" alt="Beam optimization">
		</td>
		<td width="50%" valign="top">
			<p align="center">
				Electric motor analysis for propeller matching
			</p>
			<img src="./media/images/motor_perf.png" alt="Motor performance">
		</td>
	</tr>
	<tr>
		<td>
			<p align="center" valign="top">
				<a href="https://github.com/peterdsharpe/transport-aircraft">Tools to analyze unconventional propulsion (e.g., LH2)</a>
			</p>
			<img src="https://github.com/peterdsharpe/transport-aircraft/raw/master/figures/three_view.png" alt="LH2 airplane three-view">
		</td>
		<td>
			<p align="center" valign="top">
				Detailed weights estimation for aircraft ranging from micro-UAVs to airliners
			</p>
			<img src="https://github.com/peterdsharpe/transport-aircraft/raw/master/figures/mass_budget.png" alt="Mass Budget">
		</td>
</tr>
</table>
Easily interface AeroSandbox with all your favorite tools:
<table>
    <tr>
        <td width="33%" valign="top">
            <p align="center">
                Other conceptual design tools (AVL, XFLR5, XFoil, ASWING, MSES, etc.)
            </p>
            <img src="./media/images/airfoil_contours.png" alt="XFoil">
        </td> 
          <td width="33%" valign="top">
                <p align="center">
                    CAD tools via STEP export (SolidWorks, Fusion 360, etc.)
                </p>
				<p align="center">
				(STL, OBJ, etc. supported too)
				</p>
                <img src="https://github.com/peterdsharpe/solar-seaplane-preliminary-sizing/raw/main/CAD/renders/raytrace-lowres.jpg" alt="CAD">
            </td>
          <td width="33%" valign="top">
			<p align="center">
				User-provided models + code (for custom aerodynamics, structures, propulsion, or anything else - e.g., for optimizing flight through a probabilistic wind field, shown below) 
			</p>
			<img src="./media/images/wind_speeds_model.png" alt="Wind speed">
		</td>
	</tr>
</table>
Or, throw all the airplane-design-specific code out entirely, and use AeroSandbox purely as an optimization solver or as a solver for nonlinear systems of equations (or ODEs, or PDEs):
<table>
	<tr>
		<td width="50%" valign="top">
			<p align="center">
				<a href="https://github.com/peterdsharpe/AeroSandbox/blob/develop/tutorial/01%20-%20Optimization%20and%20Math/01%20-%202D%20Rosenbrock.ipynb">Optimize the 2D Rosenbrock function</a>
			</p>
			<img src="./media/images/optimization.png" alt="Optimization">
		</td>
		<td width="50%" valign="top">
			<p align="center">
				<a href="https://github.com/peterdsharpe/AeroSandbox/tree/develop/tutorial/03%20-%20Trajectory%20Optimization%20and%20Optimal%20Control/01%20-%20Solving%20ODEs%20with%20AeroSandbox">Specify the Falkner Skan ODE (nonlinear, 3rd-order BVP) and let AeroSandbox automatically take care of the discretization, solution, and even inverse solving.</a>
			</p>
			<img src="./media/images/falkner-skan.png" alt="FS ODE">
		</td>
</tr>
</table>
And much, much more. Best of all, combine these tools arbitrarily without any loss in optimization speed and without any tedious derivative math, all thanks to AeroSandbox's end-to-end automatic-differentiability.
## Getting Started
### Installation
In short:
* `pip install aerosandbox[full]` for a complete install.
* `pip install aerosandbox` for a lightweight (headless) installation with minimal dependencies. All optimization, numerics, and physics models are included, but optional visualization dependencies are skipped.
For more installation details (e.g., if you're new to Python), [see here](./INSTALLATION.md).
### Tutorials, Examples, and Documentation
To get started, [check out the tutorials folder here](./tutorial/)! All tutorials are viewable in-browser, or you can open them as Jupyter notebooks by cloning this repository.
For a more detailed and theory-heavy introduction to AeroSandbox, [please see this thesis](./tutorial/sharpe-pds-sm-AeroAstro-2021-thesis.pdf).
For a yet-more-detailed developer-level description of AeroSandbox modules, [please see the developer README](aerosandbox/README.md).
For fully-detailed API documentation, see [the documentation website](https://aerosandbox.readthedocs.io/en/master/).
You can print documentation and examples for any AeroSandbox object by using the built-in `help()` function (e.g., `help(asb.Airplane)`). AeroSandbox code is also documented *extensively* in the source and contains hundreds of unit test examples, so examining the source code can also be useful.
### Usage Details
One final point to note: as we're all sensible and civilized here, **all inputs and outputs to AeroSandbox are expressed in base SI units, or derived units thereof** (e.g, m, N, kg, m/s, J, Pa).
The only exception to this rule is when units are explicitly noted via variable name suffix. For example:
* `battery_capacity` -> Joules
* `battery_capacity_watt_hours` -> Watt-hours.
All angles are in radians, except for α and β which are in degrees due to long-standing aerospace convention. (In any case, units are marked on all function docstrings.)
If you wish to use other units, consider using [`aerosandbox.tools.units`](./aerosandbox/tools/units.py) to convert easily.
## Project Details
### Contributing
Please feel free to join the development of AeroSandbox - contributions are always so welcome! If you have a change you'd like to make, the easiest way to do that is by submitting a pull request.
The text file [`CONTRIBUTING.md`](./CONTRIBUTING.md) has more details for developers and power users.
If you've already made several additions and would like to be involved in a more long-term capacity, please message me!
Contact information can be found next to my name near the top of this README.
### Donating
If you like this software, please consider donating to support development [via PayPal](https://paypal.me/peterdsharpe)
or [GitHub Sponsors](https://github.com/sponsors/peterdsharpe/)! Proceeds will go towards more coffee for the grad students.
### Bugs
Please, please report all bugs by [creating a new issue](https://github.com/peterdsharpe/AeroSandbox/issues)!
### Versioning
AeroSandbox loosely uses [semantic versioning](https://semver.org/), which should give you an idea of whether or not you can probably expect backward-compatibility and/or new features from any given update.
For more details, see the [changelog](./CHANGELOG.md).
### Citation & Commercial Use
If you find AeroSandbox useful in a research publication, please cite it using the following BibTeX snippet:
```bibtex
@mastersthesis{aerosandbox,
    title = {AeroSandbox: A Differentiable Framework for Aircraft Design Optimization},
    author = {Sharpe, Peter D.},
    school = {Massachusetts Institute of Technology},
    year = {2021}
}
```
As the MIT License applies, use AeroSandbox for anything you want (attribution appreciated, but not required).
Commercial users: I'm more than happy to discuss consulting work for active AeroSandbox support if this package proves helpful - use the email address in the header of this README to get in touch.
### License
[MIT License, terms here](LICENSE.txt). Basically: use AeroSandbox for anything you want; no warranty express or implied.
## Stargazers over time
[![Stargazers over time](https://starchart.cc/peterdsharpe/AeroSandbox.svg)](https://starchart.cc/peterdsharpe/AeroSandbox) 

%prep
%autosetup -n AeroSandbox-4.0.7

%build
%py3_build

%install
%py3_install
install -d -m755 %{buildroot}/%{_pkgdocdir}
if [ -d doc ]; then cp -arf doc %{buildroot}/%{_pkgdocdir}; fi
if [ -d docs ]; then cp -arf docs %{buildroot}/%{_pkgdocdir}; fi
if [ -d example ]; then cp -arf example %{buildroot}/%{_pkgdocdir}; fi
if [ -d examples ]; then cp -arf examples %{buildroot}/%{_pkgdocdir}; fi
pushd %{buildroot}
if [ -d usr/lib ]; then
	find usr/lib -type f -printf "/%h/%f\n" >> filelist.lst
fi
if [ -d usr/lib64 ]; then
	find usr/lib64 -type f -printf "/%h/%f\n" >> filelist.lst
fi
if [ -d usr/bin ]; then
	find usr/bin -type f -printf "/%h/%f\n" >> filelist.lst
fi
if [ -d usr/sbin ]; then
	find usr/sbin -type f -printf "/%h/%f\n" >> filelist.lst
fi
touch doclist.lst
if [ -d usr/share/man ]; then
	find usr/share/man -type f -printf "/%h/%f.gz\n" >> doclist.lst
fi
popd
mv %{buildroot}/filelist.lst .
mv %{buildroot}/doclist.lst .

%files -n python3-AeroSandbox -f filelist.lst
%dir %{python3_sitelib}/*

%files help -f doclist.lst
%{_docdir}/*

%changelog
* Sun Apr 23 2023 Python_Bot <Python_Bot@openeuler.org> - 4.0.7-1
- Package Spec generated