mirror of
https://gitlab.com/Anson-Projects/projects.git
synced 2025-06-15 22:46:48 +00:00
40 lines
3.1 KiB
JSON
40 lines
3.1 KiB
JSON
[
|
||
{
|
||
"path": "posts/welcome/",
|
||
"title": "Welcome to Anson's Projects",
|
||
"description": "Welcome to our new blog, Anson's Projects. We hope you enjoy \nreading what we have to say!",
|
||
"author": [
|
||
{
|
||
"name": "Nora Jones",
|
||
"url": "https://example.com/norajones"
|
||
}
|
||
],
|
||
"date": "2021-04-01",
|
||
"categories": [],
|
||
"contents": "\n\n\n\n",
|
||
"preview": {},
|
||
"last_modified": "2021-04-01T20:38:44-07:00",
|
||
"input_file": {}
|
||
},
|
||
{
|
||
"path": "posts/2021-04-01-air-propulsion-simulation/",
|
||
"title": "Air Propulsion Simulation",
|
||
"description": "Simulating the performace of an air propulsion system as an alternative to solid rocket motors.",
|
||
"author": [
|
||
{
|
||
"name": "Anson Biggs",
|
||
"url": "https://ansonbiggs.com"
|
||
}
|
||
],
|
||
"date": "2021-04-01",
|
||
"categories": [
|
||
"Julia",
|
||
"Capstone"
|
||
],
|
||
"contents": "\nBoilerplate intro about why all of this was done\n\n\nShow code\nusing Plots\nplotly()\ntheme(:ggplot2); # In true R spirit\n\nusing Unitful\nusing DataFrames\nusing Measurements\nusing Measurements: value, uncertainty\n\nThis code is just the setup the setup, using values scraped from various parts of the world wide web.\n\n# Tank https://www.amazon.com/Empire-Paintball-BASICS-Pressure-Compressed/dp/B07B6M48SR/\nV = (85 ± 5)u\"inch^3\"\nP0 = (4200.0 ± 300)u\"psi\"\nWtank = (2.3 ± 0.2)u\"lb\"\nPmax = (250 ± 50)u\"psi\" # Max Pressure that can come out the nozzle\n\nWsolenoid = 1.5u\"kg\"\n\n# Params\nd_nozzle = ((1 // 18) ± 0.001)u\"inch\"\na_nozzle = (pi / 4) * d_nozzle^2\n\n# Universal Stuff\nP_amb = (1 ± 0.2)u\"atm\"\nγ = 1.4 ± 0.05\nR = 287.05u\"J/(kg * K)\"\nT = (300 ± 20)u\"K\"\n\nThis is the actual simulation. Maybe throw some references in and explain some equations.\nThe rocket equation is pretty sick:\n\\[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.\n\nlet\nt = 0.0u\"s\"\nP = P0 |> u\"Pa\"\nM = V * (P / (R * T)) |> u\"kg\"\nts = 1u\"ms\"\nglobal df = DataFrame(Thrust=(0 ± 0)u\"N\", Pressure=P0, Time=0.0u\"s\", Mass=M)\n while M > 0.005u\"kg\"\n # while t < 30u\"s\"\n # Calculate what is leaving tank\n P = minimum([P, Pmax])\n ve = sqrt((2 * γ / (γ - 1)) * R * T * (1 - P_amb / P)^((γ - 1) / γ)) |> u\"m/s\"\n ρ = P / (R * T) |> u\"kg/m^3\"\n ṁ = ρ * a_nozzle * ve |> u\"kg/s\"\n \n Thrust = ṁ * ve + a_nozzle * (P - P_amb) |> u\"N\"\n \n # Calculate what is still in the tank\n M = M - ṁ * ts |> u\"kg\"\n P = (M * R * T) / V |> u\"Pa\"\n t = t + ts\n \n df_step = DataFrame(Thrust=Thrust, Pressure=P, Time=t, Mass=M)\n append!(df, df_step)\n end\nend\n\nHeres the results plotted. Notice the massive error once the tank starts running low.\n\n\n\n\n\n\n",
|
||
"preview": "posts/2021-04-01-air-propulsion-simulation/air-propulsion-simulation_files/figure-html5/unnamed-chunk-4-J1.png",
|
||
"last_modified": "2021-04-01T22:49:43-07:00",
|
||
"input_file": "air-propulsion-simulation.utf8.md"
|
||
}
|
||
]
|