Skip to content

Commit

Permalink
SimPleAC model write-up complete.
Browse files Browse the repository at this point in the history
  • Loading branch information
1ozturkbe committed Oct 17, 2017
1 parent 1b9ba2a commit 2532631
Show file tree
Hide file tree
Showing 3 changed files with 103 additions and 44 deletions.
108 changes: 83 additions & 25 deletions gpkitmodels/SP/SimPleAC/README.md
@@ -1,5 +1,5 @@
# SimPleAC
-------------------------
SimPleAC
========

In this example, we modify the simple wing model proposed by Prof. Warren Hoburg in his thesis to create a simple aircraft model compatible with signomial programming (SP).

Expand All @@ -10,37 +10,75 @@ import matplotlib.pyplot as plt

class SimPleAC(Model):
def setup(self):
# Variable definitions...
```


Aerodynamic model
Weight and Lift model
-----------------

The simple aircraft borrows a majority of its aerodynamic model from Prof. Warren Hoburg's thesis, with some minor adjustments to make the model a SP. The aircraft is assumed to be in steady-level flight so that thrust equals drag, and the lift equals the weight. We use the naive $W \leq L$ model below:
The simple aircraft borrows a majority of its aerodynamic model from Prof. Warren Hoburg's thesis, with some minor adjustments to make the model a SP. The aircraft is assumed to be in steady-level flight so that thrust equals drag, and the lift equals the weight.

The total weight of the aircraft is the sum of the payload weight $W_0$, the wing weight $W_w$, and the fuel weight $W_f$.

\begin{equation}
W \geq W_0 + W_w + W_f
\end{equation}

We use the naive $W \leq L$ model below for steady state flight:

\begin{equation}
W_0 + W_w + 0.5 W_f \leq \frac{1}{2} \rho S C_L V^2
\end{equation}

where the lift of the aircraft is equal to weight of the aircraft with half-fuel. We would also like the fully-fueled aircraft to be able to fly at a minimum speed of $V_{min}$ without stalling , so we add the following constraint:

\begin{equation}
W_0 + W_w + 0.5 W_f <= \frac{1}{2} \rho S C_L V^2
W \leq \frac{1}{2} \rho V_{min}^2 S C_{L_{max}}
\end{equation}

where the lift of the aircraft is equal to the sum of the payload weight $W_0$, the wing weight $W_w$, and half of the fuel weight $W_f$.
The time of flight of the aircraft, which is a useful metric of performance, is simply the range over velocity:

\begin{equation}
T_{flight} \geq \frac{Range}{V}
\end{equation}

The lift-to-drag ratio is also defined:

\begin{equation}
L/D = \frac{C_L}{C_D}
\end{equation}

```python
# Weight and lift model
constraints += [W >= W_0 + W_w + W_f,
W_0 + W_w + 0.5 * W_f <=
0.5 * rho * S * C_L * V ** 2,
W <= 0.5 * rho * S * C_Lmax * V_min ** 2,
T_flight >= Range / V,
LoD == C_L/C_D]
```

Thrust and drag model
----------

We assume a constant thrust specific fuel consumption (TSFC) for the 'engine' of the aircraft, which is assumed to provide as much thrust as needed. Since $T \geq D$:

\begin{equation}
W_f >= TSFC \times T_{flight} \times D
W_f \geq TSFC \times T_{flight} \times D
\end{equation}

the fuel weight required is the product of the TSFC, time of flight, and the total drag on the aircraft. The drag of the aircraft is the product of dynamic pressure ($\frac{1}{2} \rho V^2$), the planform area $S$, and the coefficient of drag of the aircraft:

\begin{equation}
D >= \frac{1}{2} \rho V^2 S C_D
D \geq \frac{1}{2} \rho V^2 S C_D
\label{e:d}
\end{equation}

The drag coefficient of the aircraft is assumed to be the sum of the fuselage drag, the wing profile drag, and the wing induced drag coefficients:

\begin{equation}
C_D >= C_{D_{fuse}} + C_{D_{wpar}} + C_{D_{ind}}
C_D \geq C_{D_{fuse}} + C_{D_{wpar}} + C_{D_{ind}}
\label{e:cd}
\end{equation}

Expand All @@ -60,8 +98,6 @@ where the $CDA_0$ is linearly proportional to the volume of fuel in the fuselage

Note that we correct the dimensionality of the volume here, since GPkit automatically checks units.

(The fuel volume model will be further developed in Section~\ref{s:fuelvolume}).

The wing profile drag is the product of the form factor, the friction drag coefficient, and the wetted area ratio of the wing,

\begin{equation}
Expand Down Expand Up @@ -89,14 +125,20 @@ The induced drag of the wing is calculated with a span efficiency factor e, and
\label{e:cdinduced}
\end{equation}

We also calculate the lift-to-drag ratio of the aircraft as a variable of interest:

\begin{equation}
L/D = \frac{C_L}{C_D}
\label{e:l/d}
\end{equation}
```python
# Thrust and drag model
C_D_fuse = CDA0 / S
C_D_wpar = k * C_f * S_wetratio
C_D_ind = C_L ** 2 / (np.pi * A * e)
constraints += [W_f >= TSFC * T_flight * D,
D >= 0.5 * rho * S * C_D * V ** 2,
C_D >= C_D_fuse + C_D_wpar + C_D_ind,
V_f_fuse <= 10*units('m')*CDA0,
Re <= (rho / mu) * V * (S / A) ** 0.5,
C_f >= 0.074 / Re ** 0.2]
```

Fuel Volume Model
Fuel volume model
-----------------

The fuel volume model is the main difference between simpleWing and SimPleAC, and introduces the only signomial constraints in the model. Firstly we define the required fuel volume using fuel density $\rho_f$.
Expand All @@ -106,7 +148,7 @@ The fuel volume model is the main difference between simpleWing and SimPleAC, an
\label{e:vf}
\end{equation}

We consider wing fuel tanks and fuselage fuel tanks. The fuselage fuel was defined in the Aerodynamic Model, where the fuel volume contributes to drag.
We consider wing fuel tanks and fuselage fuel tanks. The fuselage fuel was defined in the aerodynamic model, where the fuel volume contributes to drag.

\begin{equation}
V_{f_{wing}}^2 \leq 0.0009 \frac{S \tau^2}{AR}
Expand All @@ -127,6 +169,16 @@ We constrain the total fuel volume to be less than the available fuel volume.
\label{e:vfineq}
\end{equation}

```python
# Fuel volume model
with SignomialsEnabled():
constraints +=[V_f == W_f / g / rho_f,
V_f_wing**2 <= 0.0009*S**3/A*tau**2,
# linear with b and tau, quadratic with chord
V_f_avail <= V_f_wing + V_f_fuse, #[SP]
V_f_avail >= V_f]
```

Wing Weight Build-Up
---------------

Expand All @@ -137,7 +189,7 @@ W_{w_{surf}} \geq W_{w_{coeff2}} S
\label{e:wwsurf}
\end{equation}

The wing structural weight is a complex posynomial expression that takes into account the load relief due to presence of fuel in the wings.
The wing structural weight is a complex posynomial expression that takes into account the root bending moment and shear relief due to presence of fuel in the wings.

\begin{equation}
W_{w_{strc}}^2 \geq \frac{W_{w_{coeff1}}^2}{\tau^2} (N_{ult}^2 AR ^ 3 ((W_0+\rho_fgV_{f_{fuse}}) W S))
Expand All @@ -151,17 +203,23 @@ W_w \geq W_{w_{surf}} + W_{w_{strc}}
\label{e:ww}
\end{equation}

Objective
```python
# Wing weight model
constraints += [W_w_surf >= W_W_coeff2 * S,
W_w_strc**2. >= W_W_coeff1**2./ tau**2. *
(N_ult**2. * A ** 3. * ((W_0+V_f_fuse*g*rho_f) * W * S)),
W_w >= W_w_surf + W_w_strc]

```

Valid objective functions
---------

We have tested a variety of potential objectives for the SimpPleAC model, some of which are as follows:
\begin{itemize}
\item $W_f$: Fuel weight, one of the most obvious objectives.
\item $W_f$: Fuel weight, the default objective in the ```main``` method.
\item $W$: Total aircraft weight. Like fuel weight, but also adding extra cost for airframe weight.
\item $D$: Drag.
\item $\frac{W_f}{T_{flight}}$: Product of the fuel weight and the inverse of the time of flight.
\item $W_{f} + c \times T_{flight}$: A linear combination of fuel weight and time of flight. This can simulate recurring costs (fuel and labor), and yield interesting results.
\end{itemize}



39 changes: 20 additions & 19 deletions gpkitmodels/SP/SimPleAC/SimPleAC.py
Expand Up @@ -54,36 +54,37 @@ def setup(self):
V_f_wing = Variable("V_f_wing",'m^3','fuel volume in the wing', fix = True)
V_f_fuse = Variable('V_f_fuse','m^3','fuel volume in the fuselage', fix = True)
constraints = []

# Weight and lift model
constraints += [W >= W_0 + W_w + W_f,
W_0 + W_w + 0.5 * W_f <= 0.5 * rho * S * C_L * V ** 2,
W <= 0.5 * rho * S * C_Lmax * V_min ** 2,
T_flight >= Range / V,
LoD == C_L/C_D]

# Drag model
# Thrust and drag model
C_D_fuse = CDA0 / S
C_D_wpar = k * C_f * S_wetratio
C_D_ind = C_L ** 2 / (np.pi * A * e)
constraints += [C_D >= C_D_fuse + C_D_wpar + C_D_ind]

# Wing weight model
constraints += [W_w >= W_w_surf + W_w_strc,
W_w_strc**2. >= W_W_coeff1**2. * (N_ult**2. * A ** 3. * ((W_0+V_f_fuse*g*rho_f) * W * S)) / tau**2.,
W_w_surf >= W_W_coeff2 * S]

# Weight and aerodynamics model
constraints += [LoD == C_L/C_D,
constraints += [W_f >= TSFC * T_flight * D,
D >= 0.5 * rho * S * C_D * V ** 2,
C_D >= C_D_fuse + C_D_wpar + C_D_ind,
V_f_fuse <= 10*units('m')*CDA0,
Re <= (rho / mu) * V * (S / A) ** 0.5,
C_f >= 0.074 / Re ** 0.2,
T_flight >= Range / V,
W_0 + W_w + 0.5 * W_f <= 0.5 * rho * S * C_L * V ** 2,
W <= 0.5 * rho * S * C_Lmax * V_min ** 2,
W >= W_0 + W_w + W_f]
C_f >= 0.074 / Re ** 0.2]

# Fuel volume model
with SignomialsEnabled():
constraints +=[V_f == W_f / g / rho_f,
V_f_avail <= V_f_wing + V_f_fuse, #[SP]
V_f_wing**2 <= 0.0009*S**3/A*tau**2, # linear with b and tau, quadratic with chord
V_f_fuse <= 10*units('m')*CDA0,
V_f_avail >= V_f,
W_f >= TSFC * T_flight * D]
V_f_avail <= V_f_wing + V_f_fuse, #[SP]
V_f_avail >= V_f
]

# Wing weight model
constraints += [W_w_surf >= W_W_coeff2 * S,
W_w_strc**2. >= W_W_coeff1**2. / tau**2. * (N_ult**2. * A ** 3. * ((W_0+V_f_fuse*g*rho_f) * W * S)),
W_w >= W_w_surf + W_w_strc]

return constraints

Expand Down
Binary file added gpkitmodels/SP/SimPleAC/simpleac.pdf
Binary file not shown.

0 comments on commit 2532631

Please sign in to comment.