


# Frame selection
*Written by Marc Budinger (INSA Toulouse) and Scott Delbecq (ISAE-SUPAERO), Toulouse, France.*

**Sympy** package permits us to work with symbolic calculation.


```python
from math import pi

from sympy import Symbol
from sympy import *
```

## Design graph 

The following diagram represents the design graph of the frame selection. 




> **Questions:**
* Give the main sizing problems you are able to detect.
* Propose one or multiple solutions (which can request equation manipulation, addition of design variables, addition of constraints) 
* Orientate the arrows
* Give equations order, inputs/outputs at each step of this part of sizing procedure



### Sizing code and optimization

> Exercice: propose a sizing code for the selection of the frame.



```python
# Specifications
N_arm=4.0#[-] Number of arms
N_pro_arm=1.0#[-] Number of propellers per arm (1 or 2)

# Reference parameters for scaling laws
sigma_max = 280e6/4. # [Pa] Composite max stress (2 reduction for dynamic, 2 reduction for stress concentration)
rho_s = 1700. # [kg/m3] Volumic mass of aluminum

# Assumption
D_pro=0.3#[m] Propeller diameter
F_pro_to=1.0#[N] Thrust for one propeller during take off

```

Define the design variables as a symbol under `variableExample= Symbol('variableExample')`


```python
#Design variables
k_D=Symbol('k_D')#[-] aspect ratio e/c (thickness/side) for the beam of the frame (0,0.99)
```


```python
# -----------------------
# equations
# -----------------------
# Length calculation   
alpha_sep = 2*pi / N_arm # [rad] interior angle separation between propellers
L_arm = D_pro / (2.*sin(alpha_sep/2.)) # [m] length of the arm

# Tube diameter & thickness
D_out_arm = (F_pro_to*N_pro_arm/sigma_max*L_arm*32./(pi*(1.-(1.-2.*k_D)**4.)))**(1/3)  # [m] outer diameter of the arm (hollow cylinder)
e_arm = k_D * D_out_arm # [m] thickness of the arm (hollow cylinder) 
D_in_arm = D_out_arm - e_arm # [m] inner diameter of the arm (hollow cylinder) 

# Mass
M_arm = pi/4. * (D_out_arm**2.-(D_out_arm-2.*e_arm)**2)*L_arm*rho_s # [kg] mass of the arm (x1) (beams only)  composite
M_frame = N_arm * M_arm / 0.4 # [kg] mass of the frame (40% of total mass is the arms)

```

dbfcd60ae4907013fcb4292c804f01f8d88ea7cf
ipynb
Jupyter Notebook
notebooks/13_FrameSelection.ipynb
aitorochotorena/multirotor-all
e0820a0fd32f852549ebde54425177156fdf40db
Apache-2.0
2021-01-28T09:57:42.000Z
2021-01-28T09:57:42.000Z
notebooks/13_FrameSelection.ipynb
SizingLab/droneapp-legacy
b7844810107051bc4bb1861ecedc71188d09e881
Apache-2.0
notebooks/13_FrameSelection.ipynb
SizingLab/droneapp-legacy
b7844810107051bc4bb1861ecedc71188d09e881
Apache-2.0
Qwen/Qwen-72B
1. YES
2. YES