mirror of
https://gitlab.com/lander-team/air-prop-simulation.git
synced 2025-07-23 06:31:37 +00:00
updated values to match tradestudy
This commit is contained in:
BIN
ThrustCurve.png
BIN
ThrustCurve.png
Binary file not shown.
Before Width: | Height: | Size: 21 KiB After Width: | Height: | Size: 15 KiB |
@@ -1,8 +1,13 @@
|
||||
# Air Prop Thrust
|
||||
Total Impulse: 405.0 ± 39.0 N s
|
||||
|
||||
Total Impulse: 405.0 ± 40.0 N s
|
||||
|
||||
Burn TIme: 16.041999999996623 s
|
||||
|
||||

|
||||
|
||||
More Data:
|
||||
|
||||
<table class="data-frame"><thead><tr><th></th><th>variable</th><th>mean</th><th>min</th><th>median</th><th>max</th><th>nmissing</th><th>eltype</th></tr><tr><th></th><th>Symbol</th><th>Quantity</th><th>Quantity</th><th>Quantity</th><th>Quantity</th><th>Int64</th><th>DataType</th></tr></thead><tbody><p>4 rows × 7 columns</p><tr><th>1</th><td>Thrust</td><td>69.0±6.7 N</td><td>0.0±0.0 N</td><td>86.7±9.2 N</td><td>86.7±9.2 N</td><td>0</td><td>Quantity{Measurement{Float64}, 𝐋 𝐌 𝐓^-2, FreeUnits{(N,), 𝐋 𝐌 𝐓^-2, nothing}}</td></tr><tr><th>2</th><td>Pressure</td><td>1.21e7±2.0e6 Pa</td><td>620000.0±440000.0 Pa</td><td>1.12e7±2.8e6 Pa</td><td>2.9e7±2.1e6 Pa</td><td>0</td><td>Quantity{Measurement{Float64}, 𝐌 𝐋^-1 𝐓^-2, FreeUnits{(Pa,), 𝐌 𝐋^-1 𝐓^-2, nothing}}</td></tr><tr><th>3</th><td>Time</td><td>2.9325 s</td><td>0.0 s</td><td>2.9325 s</td><td>5.865 s</td><td>0</td><td>Quantity{Float64, 𝐓, FreeUnits{(s,), 𝐓, nothing}}</td></tr><tr><th>4</th><td>Mass</td><td>0.196±0.043 kg</td><td>0.01±0.0077 kg</td><td>0.181±0.054 kg</td><td>0.468±0.053 kg</td><td>0</td><td>Quantity{Measurement{Float64}, 𝐌, FreeUnits{(kg,), 𝐌, nothing}}</td></tr></tbody></table>
|
||||
<table class="data-frame"><thead><tr><th></th><th>variable</th><th>mean</th><th>min</th><th>median</th><th>max</th><th>nmissing</th><th>eltype</th></tr><tr><th></th><th>Symbol</th><th>Quantity</th><th>Quantity</th><th>Quantity</th><th>Quantity</th><th>Int64</th><th>DataType</th></tr></thead><tbody><p>4 rows × 7 columns</p><tr><th>1</th><td>Thrust</td><td>25.3±2.5 N</td><td>0.0±0.0 N</td><td>26.7±5.9 N</td><td>26.7±5.9 N</td><td>0</td><td>Quantity{Measurement{Float64}, 𝐋 𝐌 𝐓^-2, FreeUnits{(N,), 𝐋 𝐌 𝐓^-2, nothing}}</td></tr><tr><th>2</th><td>Pressure</td><td>1.39e7±3.6e6 Pa</td><td>300000.0±1.1e6 Pa</td><td>1.38e7±3.9e6 Pa</td><td>2.9e7±2.1e6 Pa</td><td>0</td><td>Quantity{Measurement{Float64}, 𝐌 𝐋^-1 𝐓^-2, FreeUnits{(Pa,), 𝐌 𝐋^-1 𝐓^-2, nothing}}</td></tr><tr><th>3</th><td>Time</td><td>8.021 s</td><td>0.0 s</td><td>8.021 s</td><td>16.042 s</td><td>0</td><td>Quantity{Float64, 𝐓, FreeUnits{(s,), 𝐓, nothing}}</td></tr><tr><th>4</th><td>Mass</td><td>0.225±0.065 kg</td><td>0.005±0.018 kg</td><td>0.224±0.071 kg</td><td>0.468±0.053 kg</td><td>0</td><td>Quantity{Measurement{Float64}, 𝐌, FreeUnits{(kg,), 𝐌, nothing}}</td></tr></tbody></table>
|
||||
|
||||
`readme auto generated`
|
||||
|
19
thrust.jl
19
thrust.jl
@@ -2,7 +2,6 @@ using Unitful
|
||||
using DataFrames
|
||||
using Plots
|
||||
using UnitfulRecipes
|
||||
using Roots
|
||||
using CSV
|
||||
using Measurements
|
||||
using Printf
|
||||
@@ -12,14 +11,13 @@ using Printf
|
||||
V = (85 ± 5)u"inch^3"
|
||||
P0 = (4200.0 ± 300)u"psi"
|
||||
Wtank = (2.3 ± 0.2)u"lb"
|
||||
Pmax = (800 ± 50)u"psi"
|
||||
Pmax = (250 ± 50)u"psi" # Max Pressure that can come out the nozzle
|
||||
|
||||
Wsolenoid = 1.5u"kg"
|
||||
|
||||
# Params
|
||||
d_nozzle = ((1 // 16) ± 0.001)u"inch"
|
||||
a_nozzle = (pi / 4) * d_nozzle^2
|
||||
Poutmax = (800 ± 50)u"psi"
|
||||
|
||||
# Universal Stuff
|
||||
P_amb = (1 ± 0.2)u"atm"
|
||||
@@ -34,7 +32,7 @@ M = V * (P / (R * T)) |> u"kg"
|
||||
ts = 1u"ms"
|
||||
df = DataFrame(Thrust = (0 ± 0)u"N", Pressure = P, Time = t, Mass = M)
|
||||
|
||||
while M > 0.01u"kg"
|
||||
while M > 0.005u"kg"
|
||||
# while t < 30u"s"
|
||||
# Calculate what is leaving tank
|
||||
P = minimum([P, Pmax])
|
||||
@@ -52,7 +50,7 @@ while M > 0.01u"kg"
|
||||
df_step = DataFrame(Thrust = Thrust, Pressure = P, Time = t, Mass = M)
|
||||
append!(df, df_step)
|
||||
end
|
||||
|
||||
final_time = t |> u"s"
|
||||
impulse = sum(df.Thrust) * ts |> u"N*s"
|
||||
println("---------------------------\n\n\n\n")
|
||||
println("Total Impulse: ", impulse)
|
||||
@@ -63,7 +61,7 @@ println("Mass Total: ", Wtank + Wsolenoid + maximum(df.Mass))
|
||||
|
||||
print(describe(df))
|
||||
|
||||
plot(df.Time[1:150:end], df.Thrust[1:150:end], title = "Thrust Over Time")
|
||||
plot(df.Time[1:350:end], df.Thrust[1:350:end], title = "Thrust Over Time")
|
||||
|
||||
### Save data to readme.md
|
||||
|
||||
@@ -77,13 +75,20 @@ table = String(take!(b)); # https://stackoverflow.com/a/60443621/8774114
|
||||
|
||||
readme = Printf.@sprintf """
|
||||
# Air Prop Thrust
|
||||
|
||||
Total Impulse: %s
|
||||
|
||||
Burn TIme: %s
|
||||
|
||||

|
||||
|
||||
More Data:
|
||||
|
||||
%s
|
||||
""" impulse table
|
||||
|
||||
`readme auto generated`
|
||||
""" impulse final_time table
|
||||
|
||||
println(readme)
|
||||
|
||||
write("readme.md", readme)
|
Reference in New Issue
Block a user