1
0
mirror of https://gitlab.com/Anson-Projects/projects.git synced 2025-06-16 15:06:53 +00:00

added plot prop comparison plot

This commit is contained in:
Anson 2021-04-03 16:55:21 -07:00
parent fba584e1d8
commit b29800d648
4 changed files with 131 additions and 12 deletions

View File

@ -1,7 +1,7 @@
---
title: "Air Propulsion Simulation"
description: |
Simulating the performace of an air propulsion system as an alternative to solid rocket motors.
Simulating the performance of an air propulsion system as an alternative to solid rocket motors.
author:
- name: Anson Biggs
url: https://ansonbiggs.com
@ -18,13 +18,12 @@ categories:
bibliography: ../../citations.bib
---
Boilerplate intro about why all of this was done
For my team was tasked with designing a system capable of moving mining equipment and materials around the surface of the Moon using a propolsive landing. The system had to be tested on earth with something that was feasible for our team to build in 2 semesters. One of the first considerations my capstone advisor wanted was to test the feasibility of an air propulsion system instead of the obvious solution that of using solid rocket motors. This document is really just _napkin math_ to determine if the system is even feasibly and is not mean't to be a rigorous study of an air propulsion system which would easily keep a capstone team busy by itself.
```{r setup, include=FALSE}
library(ggplot2)
knitr::opts_chunk$set(echo = TRUE, results = 'hide')
library(JuliaCall)
julia_setup(JULIA_HOME = "/opt/julia-1.6.0/bin/")
#julia_setup(JULIA_HOME = "/opt/julia-1.6.0/bin/")
```
```{julia, code_folding=TRUE}
@ -36,9 +35,10 @@ using Unitful
using DataFrames
using Measurements
using Measurements: value, uncertainty
using CSV
```
This code is just the setup, using values scraped from various parts of the world wide web.
An off the shelf paintball gun tank was used for the pressure vessel. This was chosen because they are very high pressure for their weight, and are designed to be bumped around.
```{julia}
# Tank https://www.amazon.com/Empire-Paintball-BASICS-Pressure-Compressed/dp/B07B6M48SR/
@ -46,13 +46,19 @@ V = (85 ± 5)u"inch^3"
P0 = (4200.0 ± 300)u"psi"
Wtank = (2.3 ± 0.2)u"lb"
Pmax = (250 ± 50)u"psi" # Max Pressure that can come out the nozzle
```
Wsolenoid = 1.5u"kg"
The nozzle diameter was changed until the air prop system had a _burn time_ similar to a G18ST rocket motor.
```{julia}
# Params
d_nozzle = ((1 // 18) ± 0.001)u"inch"
a_nozzle = (pi / 4) * d_nozzle^2
```
These are just universal values for what a normal day would look like in Arizona. [@cengel_thermodynamics]
```{julia}
# Universal Stuff
P_amb = (1 ± 0.2)u"atm"
γ = 1.4 ± 0.05
@ -62,18 +68,20 @@ T = (300 ± 20)u"K"
This is the actual simulation. Maybe throw some references in and explain some equations.
The rocket equation is pretty sick:
The following equations also came from [@cengel_thermodynamics]
The rocket equation is pretty sick[@sutton_rocket_2001, eq: 2-14]:
$$T = \dot{m} \cdot v_\text{Exit} + A_\text{Nozzle} \cdot (P - P_\text{Ambient}) $$
And thats about all you need to get to the moon[@curtis_orbital].
And thats about all you need to get to the Moon[@curtis_orbital].
```{julia}
let
df = let
t = 0.0u"s"
P = P0 |> u"Pa"
M = V * (P / (R * T)) |> u"kg"
ts = 1u"ms"
global df = DataFrame(Thrust=(0 ± 0)u"N", Pressure=P0, Time=0.0u"s", Mass=M)
df = DataFrame(Thrust=(0 ± 0)u"N", Pressure=P0, Time=0.0u"s", Mass=M)
while M > 0.005u"kg"
# while t < 30u"s"
# Calculate what is leaving tank
@ -92,17 +100,28 @@ global df = DataFrame(Thrust=(0 ± 0)u"N", Pressure=P0, Time=0.0u"s", Mass=M)
df_step = DataFrame(Thrust=Thrust, Pressure=P, Time=t, Mass=M)
append!(df, df_step)
end
df
end
```
breakdown of the data
```{julia, layout="l-body", echo=FALSE, results='asis'}
b = IOBuffer();
t = TextDisplay(b);
display(t, "text/html", describe(df));
table = String(take!(b)); # https://stackoverflow.com/a/60443621/8774114
```
Heres the results plotted. Notice the massive error once the tank starts running low.
```{julia, echo=FALSE, results='show'}
```{julia, code_folding=TRUE, results='show',layout="l-body-outset", fig.cap = "Air Proplsion Simulation"}
thrust_values = df.Thrust .|> ustrip .|> value;
thrust_uncertainties = df.Thrust .|> ustrip .|> uncertainty;
out = DataFrame(Thrust=thrust_values, Uncertainty=thrust_uncertainties, Time=df.Time .|> u"s" .|> ustrip);
air = DataFrame(Thrust=thrust_values, Uncertainty=thrust_uncertainties, Time=df.Time .|> u"s" .|> ustrip);
plot(df.Time .|> ustrip, thrust_values,
@ -111,9 +130,31 @@ plot(df.Time .|> ustrip, thrust_values,
fillalpha=.2,label="Thrust",
xlabel="Time (s)",
ylabel="Thrust (N)",
size = (1200, 800),
)
```
Here the air prop is plotted along with rocket motors that are being
```{julia, code_folding=TRUE, results='show',layout="l-body-outset",fig.cap= "Rocket Motor Data: [@thrustcurve]"}
f10 = CSV.read("AeroTech_F10.csv", DataFrame);
f15 = CSV.read("Estes_F15.csv", DataFrame);
g8 = CSV.read("AeroTech_G8ST.csv", DataFrame);
plot(air.Time, air.Thrust, label="Air Propulsion", fillalpha=.1, legend=:topleft, size = (1200, 800));
for (d, l) in [(f10, "F10"), (f15, "F15"), (g8, "G8ST")]
plot!(d[!,"Time (s)"], d[!, "Thrust (N)"], label=l);
end
title!("Propulsion Comparison");
xlabel!("Time (s)");
ylabel!("Thrust (N)")
```
Big conclusion about things.

View File

@ -0,0 +1,28 @@
"Time (s)","Thrust (N)"
0.01,16.81
0.03,22.34
0.11,22.23
0.26,21.49
0.37,20
0.47,20.21
0.67,18.09
0.99,15.74
1.31,13.4
1.81,10.85
2.49,10.21
3.13,8.94
3.6,8.83
4.11,8.62
4.95,8.62
5.45,8.62
5.58,8.51
5.88,8.72
6.22,8.51
6.46,8.51
6.6,7.77
6.71,7.02
6.79,5.64
6.91,3.83
6.95,2.23
7,0.96
7.05,0
1 Time (s) Thrust (N)
2 0.01 16.81
3 0.03 22.34
4 0.11 22.23
5 0.26 21.49
6 0.37 20
7 0.47 20.21
8 0.67 18.09
9 0.99 15.74
10 1.31 13.4
11 1.81 10.85
12 2.49 10.21
13 3.13 8.94
14 3.6 8.83
15 4.11 8.62
16 4.95 8.62
17 5.45 8.62
18 5.58 8.51
19 5.88 8.72
20 6.22 8.51
21 6.46 8.51
22 6.6 7.77
23 6.71 7.02
24 6.79 5.64
25 6.91 3.83
26 6.95 2.23
27 7 0.96
28 7.05 0

View File

@ -0,0 +1,22 @@
"Time (s)","Thrust (N)"
0.024,0.3704
0.066,0.8746
0.138,4.5044
0.246,6.6207
0.426,6.7351
1.218,7.3232
2.082,7.423
3.306,7.183
5.322,6.8385
6.978,6.7193
8.632,6.5512
10.144,6.4792
12.088,6.4254
15.472,6.3333
17.632,6.1305
19.108,6.0385
19.511,5.9607
19.804,4.4295
19.867,1.6687
19.937,0.3341
19.964,0
1 Time (s) Thrust (N)
2 0.024 0.3704
3 0.066 0.8746
4 0.138 4.5044
5 0.246 6.6207
6 0.426 6.7351
7 1.218 7.3232
8 2.082 7.423
9 3.306 7.183
10 5.322 6.8385
11 6.978 6.7193
12 8.632 6.5512
13 10.144 6.4792
14 12.088 6.4254
15 15.472 6.3333
16 17.632 6.1305
17 19.108 6.0385
18 19.511 5.9607
19 19.804 4.4295
20 19.867 1.6687
21 19.937 0.3341
22 19.964 0

View File

@ -0,0 +1,28 @@
"Time (s)","Thrust (N)"
0,0
0.148,7.638
0.228,12.253
0.294,16.391
0.353,20.21
0.382,22.756
0.419,25.26
0.477,23.074
0.52,20.845
0.593,19.093
0.688,17.5
0.855,16.225
1.037,15.427
1.205,14.948
1.423,14.627
1.452,15.741
1.503,14.785
1.736,14.623
1.955,14.303
2.21,14.141
2.494,13.819
2.763,13.338
3.12,13.334
3.382,13.013
3.404,9.352
3.418,4.895
3.45,0
1 Time (s) Thrust (N)
2 0 0
3 0.148 7.638
4 0.228 12.253
5 0.294 16.391
6 0.353 20.21
7 0.382 22.756
8 0.419 25.26
9 0.477 23.074
10 0.52 20.845
11 0.593 19.093
12 0.688 17.5
13 0.855 16.225
14 1.037 15.427
15 1.205 14.948
16 1.423 14.627
17 1.452 15.741
18 1.503 14.785
19 1.736 14.623
20 1.955 14.303
21 2.21 14.141
22 2.494 13.819
23 2.763 13.338
24 3.12 13.334
25 3.382 13.013
26 3.404 9.352
27 3.418 4.895
28 3.45 0