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

generated stuff

This commit is contained in:
Anson 2021-04-03 16:55:37 -07:00
parent b29800d648
commit 7a9d970a49
23 changed files with 2961 additions and 2415 deletions

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

View File

@ -88,7 +88,7 @@ code span.wa { color: #5e5e5e; font-style: italic; } /* Warning */
<!--radix_placeholder_meta_tags-->
<title>Air Propulsion Simulation</title>
<meta property="description" itemprop="description" content="Simulating the performace of an air propulsion system as an alternative to solid rocket motors."/>
<meta property="description" itemprop="description" content="Simulating the performance of an air propulsion system as an alternative to solid rocket motors."/>
<!-- https://schema.org/Article -->
@ -99,26 +99,25 @@ code span.wa { color: #5e5e5e; font-style: italic; } /* Warning */
<!-- https://developers.facebook.com/docs/sharing/webmasters#markup -->
<meta property="og:title" content="Air Propulsion Simulation"/>
<meta property="og:type" content="article"/>
<meta property="og:description" content="Simulating the performace of an air propulsion system as an alternative to solid rocket motors."/>
<meta property="og:description" content="Simulating the performance of an air propulsion system as an alternative to solid rocket motors."/>
<meta property="og:locale" content="en_US"/>
<!-- https://dev.twitter.com/cards/types/summary -->
<meta property="twitter:card" content="summary"/>
<meta property="twitter:title" content="Air Propulsion Simulation"/>
<meta property="twitter:description" content="Simulating the performace of an air propulsion system as an alternative to solid rocket motors."/>
<meta property="twitter:description" content="Simulating the performance of an air propulsion system as an alternative to solid rocket motors."/>
<!--/radix_placeholder_meta_tags-->
<meta name="citation_reference" content="citation_title=Orbital mechanics for engineering students;citation_publication_date=2020;citation_publisher=Butterworth-Heinemann Publications;citation_author=Howard D Curtis"/>
<!--radix_placeholder_rmarkdown_metadata-->
<script type="text/json" id="radix-rmarkdown-metadata">
{"type":"list","attributes":{"names":{"type":"character","attributes":{},"value":["title","description","author","repository_url","date","fig_width","fig_align","output","categories","bibliography"]}},"value":[{"type":"character","attributes":{},"value":["Air Propulsion Simulation"]},{"type":"character","attributes":{},"value":["Simulating the performace of an air propulsion system as an alternative to solid rocket motors. \n"]},{"type":"list","attributes":{},"value":[{"type":"list","attributes":{"names":{"type":"character","attributes":{},"value":["name","url"]}},"value":[{"type":"character","attributes":{},"value":["Anson Biggs"]},{"type":"character","attributes":{},"value":["https://ansonbiggs.com"]}]}]},{"type":"character","attributes":{},"value":["https://gitlab.com/lander-team/air-prop-simulation"]},{"type":"character","attributes":{},"value":["04-01-2021"]},{"type":"integer","attributes":{},"value":[6]},{"type":"character","attributes":{},"value":["center"]},{"type":"list","attributes":{"names":{"type":"character","attributes":{},"value":["distill::distill_article"]}},"value":[{"type":"list","attributes":{"names":{"type":"character","attributes":{},"value":["self_contained"]}},"value":[{"type":"logical","attributes":{},"value":[false]}]}]},{"type":"character","attributes":{},"value":["Julia","Capstone"]},{"type":"character","attributes":{},"value":["../../citations.bib"]}]}
{"type":"list","attributes":{"names":{"type":"character","attributes":{},"value":["title","description","author","repository_url","date","fig_width","fig_align","output","categories","bibliography"]}},"value":[{"type":"character","attributes":{},"value":["Air Propulsion Simulation"]},{"type":"character","attributes":{},"value":["Simulating the performance of an air propulsion system as an alternative to solid rocket motors. \n"]},{"type":"list","attributes":{},"value":[{"type":"list","attributes":{"names":{"type":"character","attributes":{},"value":["name","url"]}},"value":[{"type":"character","attributes":{},"value":["Anson Biggs"]},{"type":"character","attributes":{},"value":["https://ansonbiggs.com"]}]}]},{"type":"character","attributes":{},"value":["https://gitlab.com/lander-team/air-prop-simulation"]},{"type":"character","attributes":{},"value":["04-01-2021"]},{"type":"integer","attributes":{},"value":[6]},{"type":"character","attributes":{},"value":["center"]},{"type":"list","attributes":{"names":{"type":"character","attributes":{},"value":["distill::distill_article"]}},"value":[{"type":"list","attributes":{"names":{"type":"character","attributes":{},"value":["self_contained"]}},"value":[{"type":"logical","attributes":{},"value":[false]}]}]},{"type":"character","attributes":{},"value":["Julia","Capstone"]},{"type":"character","attributes":{},"value":["../../citations.bib"]}]}
</script>
<!--/radix_placeholder_rmarkdown_metadata-->
<script type="text/json" id="radix-resource-manifest">
{"type":"character","attributes":{},"value":["air-propulsion-simulation_files/anchor-4.2.2/anchor.min.js","air-propulsion-simulation_files/bowser-1.9.3/bowser.min.js","air-propulsion-simulation_files/distill-2.2.21/template.v2.js","air-propulsion-simulation_files/figure-html5/unnamed-chunk-4-J1.png","air-propulsion-simulation_files/figure-html5/unnamed-chunk-5-1.png","air-propulsion-simulation_files/figure-html5/unnamed-chunk-5-2.png","air-propulsion-simulation_files/header-attrs-2.7/header-attrs.js","air-propulsion-simulation_files/jquery-1.11.3/jquery.min.js","air-propulsion-simulation_files/popper-2.6.0/popper.min.js","air-propulsion-simulation_files/tippy-6.2.7/tippy-bundle.umd.min.js","air-propulsion-simulation_files/tippy-6.2.7/tippy-light-border.css","air-propulsion-simulation_files/tippy-6.2.7/tippy.css","air-propulsion-simulation_files/tippy-6.2.7/tippy.umd.min.js","air-propulsion-simulation_files/webcomponents-2.0.0/webcomponents.js","figure/-J2.png","figure/-J3.png","figure/-J4.png"]}
{"type":"character","attributes":{},"value":["AeroTech_F10.csv","AeroTech_G8ST.csv","air-propulsion-simulation_files/anchor-4.2.2/anchor.min.js","air-propulsion-simulation_files/bowser-1.9.3/bowser.min.js","air-propulsion-simulation_files/distill-2.2.21/template.v2.js","air-propulsion-simulation_files/figure-html5/unnamed-chunk-4-J1.png","air-propulsion-simulation_files/figure-html5/unnamed-chunk-5-1.png","air-propulsion-simulation_files/figure-html5/unnamed-chunk-5-2.png","air-propulsion-simulation_files/figure-html5/unnamed-chunk-5-J1.png","air-propulsion-simulation_files/figure-html5/unnamed-chunk-5-J2.png","air-propulsion-simulation_files/figure-html5/unnamed-chunk-5-J3.png","air-propulsion-simulation_files/figure-html5/unnamed-chunk-5-J4.png","air-propulsion-simulation_files/figure-html5/unnamed-chunk-6-J1.png","air-propulsion-simulation_files/figure-html5/unnamed-chunk-7-J1.png","air-propulsion-simulation_files/figure-html5/unnamed-chunk-8-J1.png","air-propulsion-simulation_files/header-attrs-2.7/header-attrs.js","air-propulsion-simulation_files/jquery-1.11.3/jquery.min.js","air-propulsion-simulation_files/popper-2.6.0/popper.min.js","air-propulsion-simulation_files/tippy-6.2.7/tippy-bundle.umd.min.js","air-propulsion-simulation_files/tippy-6.2.7/tippy-light-border.css","air-propulsion-simulation_files/tippy-6.2.7/tippy.css","air-propulsion-simulation_files/tippy-6.2.7/tippy.umd.min.js","air-propulsion-simulation_files/webcomponents-2.0.0/webcomponents.js","Estes_F15.csv","figure/-J2.png","figure/-J3.png","figure/-J4.png"]}
</script>
<!--radix_placeholder_navigation_in_header-->
<!--/radix_placeholder_navigation_in_header-->
@ -1457,7 +1456,7 @@ code span.wa { color: #5e5e5e; font-style: italic; } /* Warning */
<!--radix_placeholder_front_matter-->
<script id="distill-front-matter" type="text/json">
{"title":"Air Propulsion Simulation","description":"Simulating the performace of an air propulsion system as an alternative to solid rocket motors.","authors":[{"author":"Anson Biggs","authorURL":"https://ansonbiggs.com","affiliation":"&nbsp;","affiliationURL":"#","orcidID":""}],"publishedDate":"2021-04-01T00:00:00.000-07:00","citationText":"Biggs, 2021"}
{"title":"Air Propulsion Simulation","description":"Simulating the performance of an air propulsion system as an alternative to solid rocket motors.","authors":[{"author":"Anson Biggs","authorURL":"https://ansonbiggs.com","affiliation":"&nbsp;","affiliationURL":"#","orcidID":""}],"publishedDate":"2021-04-01T00:00:00.000-07:00","citationText":"Biggs, 2021"}
</script>
<!--/radix_placeholder_front_matter-->
@ -1474,7 +1473,7 @@ code span.wa { color: #5e5e5e; font-style: italic; } /* Warning */
<div class="dt=tag">Capstone</div>
</div>
<!--/radix_placeholder_categories-->
<p><p>Simulating the performace of an air propulsion system as an alternative to solid rocket motors.</p></p>
<p><p>Simulating the performance of an air propulsion system as an alternative to solid rocket motors.</p></p>
</div>
<div class="d-byline">
@ -1484,7 +1483,7 @@ code span.wa { color: #5e5e5e; font-style: italic; } /* Warning */
</div>
<div class="d-article">
<p>Boilerplate intro about why all of this was done</p>
<p>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 <em>napkin math</em> to determine if the system is even feasibly and is not meant to be a rigorous study of an air propulsion system which would easily keep a capstone team busy by itself.</p>
<div class="layout-chunk" data-layout="l-body">
<details>
<summary>
@ -1497,69 +1496,305 @@ Show code
<span id="cb1-5"><a href="#cb1-5" aria-hidden="true" tabindex="-1"></a><span class="kw">using</span> Unitful</span>
<span id="cb1-6"><a href="#cb1-6" aria-hidden="true" tabindex="-1"></a><span class="kw">using</span> DataFrames</span>
<span id="cb1-7"><a href="#cb1-7" aria-hidden="true" tabindex="-1"></a><span class="kw">using</span> Measurements</span>
<span id="cb1-8"><a href="#cb1-8" aria-hidden="true" tabindex="-1"></a><span class="kw">using</span> Measurements<span class="op">:</span> value<span class="op">,</span> uncertainty</span></code></pre></div>
<span id="cb1-8"><a href="#cb1-8" aria-hidden="true" tabindex="-1"></a><span class="kw">using</span> Measurements<span class="op">:</span> value<span class="op">,</span> uncertainty</span>
<span id="cb1-9"><a href="#cb1-9" aria-hidden="true" tabindex="-1"></a><span class="kw">using</span> CSV</span></code></pre></div>
</details>
</div>
<p>This code is just the setup, using values scraped from various parts of the world wide web.</p>
<p>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.</p>
<div class="layout-chunk" data-layout="l-body">
<div class="sourceCode" id="cb2"><pre class="sourceCode julia"><code class="sourceCode julia"><span id="cb2-1"><a href="#cb2-1" aria-hidden="true" tabindex="-1"></a><span class="co"># Tank https://www.amazon.com/Empire-Paintball-BASICS-Pressure-Compressed/dp/B07B6M48SR/</span></span>
<span id="cb2-2"><a href="#cb2-2" aria-hidden="true" tabindex="-1"></a>V <span class="op">=</span> (<span class="fl">85</span> ± <span class="fl">5</span>)u<span class="st">&quot;inch^3&quot;</span></span>
<span id="cb2-3"><a href="#cb2-3" aria-hidden="true" tabindex="-1"></a>P0 <span class="op">=</span> (<span class="fl">4200.0</span> ± <span class="fl">300</span>)u<span class="st">&quot;psi&quot;</span></span>
<span id="cb2-4"><a href="#cb2-4" aria-hidden="true" tabindex="-1"></a>Wtank <span class="op">=</span> (<span class="fl">2.3</span> ± <span class="fl">0.2</span>)u<span class="st">&quot;lb&quot;</span></span>
<span id="cb2-5"><a href="#cb2-5" aria-hidden="true" tabindex="-1"></a>Pmax <span class="op">=</span> (<span class="fl">250</span> ± <span class="fl">50</span>)u<span class="st">&quot;psi&quot;</span> <span class="co"># Max Pressure that can come out the nozzle</span></span>
<span id="cb2-6"><a href="#cb2-6" aria-hidden="true" tabindex="-1"></a></span>
<span id="cb2-7"><a href="#cb2-7" aria-hidden="true" tabindex="-1"></a>Wsolenoid <span class="op">=</span> <span class="fl">1.5</span>u<span class="st">&quot;kg&quot;</span></span>
<span id="cb2-8"><a href="#cb2-8" aria-hidden="true" tabindex="-1"></a></span>
<span id="cb2-9"><a href="#cb2-9" aria-hidden="true" tabindex="-1"></a><span class="co"># Params</span></span>
<span id="cb2-10"><a href="#cb2-10" aria-hidden="true" tabindex="-1"></a>d_nozzle <span class="op">=</span> ((<span class="fl">1</span> <span class="op">//</span> <span class="fl">18</span>) ± <span class="fl">0.001</span>)u<span class="st">&quot;inch&quot;</span></span>
<span id="cb2-11"><a href="#cb2-11" aria-hidden="true" tabindex="-1"></a>a_nozzle <span class="op">=</span> (<span class="cn">pi</span> <span class="op">/</span> <span class="fl">4</span>) <span class="op">*</span> d_nozzle<span class="op">^</span><span class="fl">2</span></span>
<span id="cb2-12"><a href="#cb2-12" aria-hidden="true" tabindex="-1"></a></span>
<span id="cb2-13"><a href="#cb2-13" aria-hidden="true" tabindex="-1"></a><span class="co"># Universal Stuff</span></span>
<span id="cb2-14"><a href="#cb2-14" aria-hidden="true" tabindex="-1"></a>P_amb <span class="op">=</span> (<span class="fl">1</span> ± <span class="fl">0.2</span>)u<span class="st">&quot;atm&quot;</span></span>
<span id="cb2-15"><a href="#cb2-15" aria-hidden="true" tabindex="-1"></a>γ <span class="op">=</span> <span class="fl">1.4</span> ± <span class="fl">0.05</span></span>
<span id="cb2-16"><a href="#cb2-16" aria-hidden="true" tabindex="-1"></a>R <span class="op">=</span> <span class="fl">287.05</span>u<span class="st">&quot;J/(kg * K)&quot;</span></span>
<span id="cb2-17"><a href="#cb2-17" aria-hidden="true" tabindex="-1"></a>T <span class="op">=</span> (<span class="fl">300</span> ± <span class="fl">20</span>)u<span class="st">&quot;K&quot;</span></span></code></pre></div>
<span id="cb2-5"><a href="#cb2-5" aria-hidden="true" tabindex="-1"></a>Pmax <span class="op">=</span> (<span class="fl">250</span> ± <span class="fl">50</span>)u<span class="st">&quot;psi&quot;</span> <span class="co"># Max Pressure that can come out the nozzle</span></span></code></pre></div>
</div>
<p>The nozzle diameter was changed until the air prop system had a <em>burn time</em> similar to a G18ST rocket motor.</p>
<div class="layout-chunk" data-layout="l-body">
<div class="sourceCode" id="cb3"><pre class="sourceCode julia"><code class="sourceCode julia"><span id="cb3-1"><a href="#cb3-1" aria-hidden="true" tabindex="-1"></a><span class="co"># Params</span></span>
<span id="cb3-2"><a href="#cb3-2" aria-hidden="true" tabindex="-1"></a>d_nozzle <span class="op">=</span> ((<span class="fl">1</span> <span class="op">//</span> <span class="fl">18</span>) ± <span class="fl">0.001</span>)u<span class="st">&quot;inch&quot;</span></span>
<span id="cb3-3"><a href="#cb3-3" aria-hidden="true" tabindex="-1"></a>a_nozzle <span class="op">=</span> (<span class="cn">pi</span> <span class="op">/</span> <span class="fl">4</span>) <span class="op">*</span> d_nozzle<span class="op">^</span><span class="fl">2</span></span></code></pre></div>
</div>
<p>These are just universal values for what a normal day would look like in Arizona. <span class="citation" data-cites="cengel_thermodynamics">(<a href="#ref-cengel_thermodynamics" role="doc-biblioref">Çengel and Boles 2015</a>)</span></p>
<div class="layout-chunk" data-layout="l-body">
<div class="sourceCode" id="cb4"><pre class="sourceCode julia"><code class="sourceCode julia"><span id="cb4-1"><a href="#cb4-1" aria-hidden="true" tabindex="-1"></a><span class="co"># Universal Stuff</span></span>
<span id="cb4-2"><a href="#cb4-2" aria-hidden="true" tabindex="-1"></a>P_amb <span class="op">=</span> (<span class="fl">1</span> ± <span class="fl">0.2</span>)u<span class="st">&quot;atm&quot;</span></span>
<span id="cb4-3"><a href="#cb4-3" aria-hidden="true" tabindex="-1"></a>γ <span class="op">=</span> <span class="fl">1.4</span> ± <span class="fl">0.05</span></span>
<span id="cb4-4"><a href="#cb4-4" aria-hidden="true" tabindex="-1"></a>R <span class="op">=</span> <span class="fl">287.05</span>u<span class="st">&quot;J/(kg * K)&quot;</span></span>
<span id="cb4-5"><a href="#cb4-5" aria-hidden="true" tabindex="-1"></a>T <span class="op">=</span> (<span class="fl">300</span> ± <span class="fl">20</span>)u<span class="st">&quot;K&quot;</span></span></code></pre></div>
</div>
<p>This is the actual simulation. Maybe throw some references in and explain some equations.</p>
<p>The rocket equation is pretty sick:</p>
<p><span class="math display">\[T = \dot{m} \cdot v_\text{Exit} + A_\text{Nozzle} \cdot (P - P_\text{Ambient}) \]</span> And thats about all you need to get to the moon<span class="citation" data-cites="curtis_orbital">(<a href="#ref-curtis_orbital" role="doc-biblioref">Curtis 2020</a>)</span>.</p>
<p>The following equations also came from <span class="citation" data-cites="cengel_thermodynamics">(<a href="#ref-cengel_thermodynamics" role="doc-biblioref">Çengel and Boles 2015</a>)</span></p>
<p>The rocket equation is pretty sick<span class="citation" data-cites="sutton_rocket_2001">(<a href="#ref-sutton_rocket_2001" role="doc-biblioref">Sutton and Biblarz 2001</a>, eq: 2-14)</span>:</p>
<p><span class="math display">\[T = \dot{m} \cdot v_\text{Exit} + A_\text{Nozzle} \cdot (P - P_\text{Ambient}) \]</span> And thats about all you need to get to the Moon<span class="citation" data-cites="curtis_orbital">(<a href="#ref-curtis_orbital" role="doc-biblioref">Curtis 2020</a>)</span>.</p>
<div class="layout-chunk" data-layout="l-body">
<div class="sourceCode" id="cb3"><pre class="sourceCode julia"><code class="sourceCode julia"><span id="cb3-1"><a href="#cb3-1" aria-hidden="true" tabindex="-1"></a><span class="kw">let</span></span>
<span id="cb3-2"><a href="#cb3-2" aria-hidden="true" tabindex="-1"></a>t <span class="op">=</span> <span class="fl">0.0</span>u<span class="st">&quot;s&quot;</span></span>
<span id="cb3-3"><a href="#cb3-3" aria-hidden="true" tabindex="-1"></a>P <span class="op">=</span> P0 <span class="op">|&gt;</span> u<span class="st">&quot;Pa&quot;</span></span>
<span id="cb3-4"><a href="#cb3-4" aria-hidden="true" tabindex="-1"></a>M <span class="op">=</span> V <span class="op">*</span> (P <span class="op">/</span> (R <span class="op">*</span> T)) <span class="op">|&gt;</span> u<span class="st">&quot;kg&quot;</span></span>
<span id="cb3-5"><a href="#cb3-5" aria-hidden="true" tabindex="-1"></a>ts <span class="op">=</span> <span class="fl">1</span>u<span class="st">&quot;ms&quot;</span></span>
<span id="cb3-6"><a href="#cb3-6" aria-hidden="true" tabindex="-1"></a><span class="kw">global</span> df <span class="op">=</span> DataFrame(Thrust<span class="op">=</span>(<span class="fl">0</span> ± <span class="fl">0</span>)u<span class="st">&quot;N&quot;</span><span class="op">,</span> Pressure<span class="op">=</span>P0<span class="op">,</span> <span class="dt">Time</span><span class="op">=</span><span class="fl">0.0</span>u<span class="st">&quot;s&quot;</span><span class="op">,</span> Mass<span class="op">=</span>M)</span>
<span id="cb3-7"><a href="#cb3-7" aria-hidden="true" tabindex="-1"></a> <span class="kw">while</span> M <span class="op">&gt;</span> <span class="fl">0.005</span>u<span class="st">&quot;kg&quot;</span></span>
<span id="cb3-8"><a href="#cb3-8" aria-hidden="true" tabindex="-1"></a> <span class="co"># while t &lt; 30u&quot;s&quot;</span></span>
<span id="cb3-9"><a href="#cb3-9" aria-hidden="true" tabindex="-1"></a> <span class="co"># Calculate what is leaving tank</span></span>
<span id="cb3-10"><a href="#cb3-10" aria-hidden="true" tabindex="-1"></a> P <span class="op">=</span> minimum([P<span class="op">,</span> Pmax])</span>
<span id="cb3-11"><a href="#cb3-11" aria-hidden="true" tabindex="-1"></a> ve <span class="op">=</span> sqrt((<span class="fl">2</span> <span class="op">*</span> γ <span class="op">/</span> (γ <span class="op">-</span> <span class="fl">1</span>)) <span class="op">*</span> R <span class="op">*</span> T <span class="op">*</span> (<span class="fl">1</span> <span class="op">-</span> P_amb <span class="op">/</span> P)<span class="op">^</span>((γ <span class="op">-</span> <span class="fl">1</span>) <span class="op">/</span> γ)) <span class="op">|&gt;</span> u<span class="st">&quot;m/s&quot;</span></span>
<span id="cb3-12"><a href="#cb3-12" aria-hidden="true" tabindex="-1"></a> ρ <span class="op">=</span> P <span class="op">/</span> (R <span class="op">*</span> T) <span class="op">|&gt;</span> u<span class="st">&quot;kg/m^3&quot;</span></span>
<span id="cb3-13"><a href="#cb3-13" aria-hidden="true" tabindex="-1"></a><span class="op">=</span> ρ <span class="op">*</span> a_nozzle <span class="op">*</span> ve <span class="op">|&gt;</span> u<span class="st">&quot;kg/s&quot;</span></span>
<span id="cb3-14"><a href="#cb3-14" aria-hidden="true" tabindex="-1"></a> </span>
<span id="cb3-15"><a href="#cb3-15" aria-hidden="true" tabindex="-1"></a> Thrust <span class="op">=</span><span class="op">*</span> ve <span class="op">+</span> a_nozzle <span class="op">*</span> (P <span class="op">-</span> P_amb) <span class="op">|&gt;</span> u<span class="st">&quot;N&quot;</span></span>
<span id="cb3-16"><a href="#cb3-16" aria-hidden="true" tabindex="-1"></a> </span>
<span id="cb3-17"><a href="#cb3-17" aria-hidden="true" tabindex="-1"></a> <span class="co"># Calculate what is still in the tank</span></span>
<span id="cb3-18"><a href="#cb3-18" aria-hidden="true" tabindex="-1"></a> M <span class="op">=</span> M <span class="op">-</span><span class="op">*</span> ts <span class="op">|&gt;</span> u<span class="st">&quot;kg&quot;</span></span>
<span id="cb3-19"><a href="#cb3-19" aria-hidden="true" tabindex="-1"></a> P <span class="op">=</span> (M <span class="op">*</span> R <span class="op">*</span> T) <span class="op">/</span> V <span class="op">|&gt;</span> u<span class="st">&quot;Pa&quot;</span></span>
<span id="cb3-20"><a href="#cb3-20" aria-hidden="true" tabindex="-1"></a> t <span class="op">=</span> t <span class="op">+</span> ts</span>
<span id="cb3-21"><a href="#cb3-21" aria-hidden="true" tabindex="-1"></a> </span>
<span id="cb3-22"><a href="#cb3-22" aria-hidden="true" tabindex="-1"></a> df_step <span class="op">=</span> DataFrame(Thrust<span class="op">=</span>Thrust<span class="op">,</span> Pressure<span class="op">=</span>P<span class="op">,</span> <span class="dt">Time</span><span class="op">=</span>t<span class="op">,</span> Mass<span class="op">=</span>M)</span>
<span id="cb3-23"><a href="#cb3-23" aria-hidden="true" tabindex="-1"></a> <span class="cn">append</span><span class="op">!</span>(df<span class="op">,</span> df_step)</span>
<span id="cb3-24"><a href="#cb3-24" aria-hidden="true" tabindex="-1"></a> <span class="kw">end</span></span>
<span id="cb3-25"><a href="#cb3-25" aria-hidden="true" tabindex="-1"></a><span class="kw">end</span></span></code></pre></div>
<div class="sourceCode" id="cb5"><pre class="sourceCode julia"><code class="sourceCode julia"><span id="cb5-1"><a href="#cb5-1" aria-hidden="true" tabindex="-1"></a>df <span class="op">=</span> <span class="kw">let</span></span>
<span id="cb5-2"><a href="#cb5-2" aria-hidden="true" tabindex="-1"></a>t <span class="op">=</span> <span class="fl">0.0</span>u<span class="st">&quot;s&quot;</span></span>
<span id="cb5-3"><a href="#cb5-3" aria-hidden="true" tabindex="-1"></a>P <span class="op">=</span> P0 <span class="op">|&gt;</span> u<span class="st">&quot;Pa&quot;</span></span>
<span id="cb5-4"><a href="#cb5-4" aria-hidden="true" tabindex="-1"></a>M <span class="op">=</span> V <span class="op">*</span> (P <span class="op">/</span> (R <span class="op">*</span> T)) <span class="op">|&gt;</span> u<span class="st">&quot;kg&quot;</span></span>
<span id="cb5-5"><a href="#cb5-5" aria-hidden="true" tabindex="-1"></a>ts <span class="op">=</span> <span class="fl">1</span>u<span class="st">&quot;ms&quot;</span></span>
<span id="cb5-6"><a href="#cb5-6" aria-hidden="true" tabindex="-1"></a>df <span class="op">=</span> DataFrame(Thrust<span class="op">=</span>(<span class="fl">0</span> ± <span class="fl">0</span>)u<span class="st">&quot;N&quot;</span><span class="op">,</span> Pressure<span class="op">=</span>P0<span class="op">,</span> <span class="dt">Time</span><span class="op">=</span><span class="fl">0.0</span>u<span class="st">&quot;s&quot;</span><span class="op">,</span> Mass<span class="op">=</span>M)</span>
<span id="cb5-7"><a href="#cb5-7" aria-hidden="true" tabindex="-1"></a> <span class="kw">while</span> M <span class="op">&gt;</span> <span class="fl">0.005</span>u<span class="st">&quot;kg&quot;</span></span>
<span id="cb5-8"><a href="#cb5-8" aria-hidden="true" tabindex="-1"></a> <span class="co"># while t &lt; 30u&quot;s&quot;</span></span>
<span id="cb5-9"><a href="#cb5-9" aria-hidden="true" tabindex="-1"></a> <span class="co"># Calculate what is leaving tank</span></span>
<span id="cb5-10"><a href="#cb5-10" aria-hidden="true" tabindex="-1"></a> P <span class="op">=</span> minimum([P<span class="op">,</span> Pmax])</span>
<span id="cb5-11"><a href="#cb5-11" aria-hidden="true" tabindex="-1"></a> ve <span class="op">=</span> sqrt((<span class="fl">2</span> <span class="op">*</span> γ <span class="op">/</span> (γ <span class="op">-</span> <span class="fl">1</span>)) <span class="op">*</span> R <span class="op">*</span> T <span class="op">*</span> (<span class="fl">1</span> <span class="op">-</span> P_amb <span class="op">/</span> P)<span class="op">^</span>((γ <span class="op">-</span> <span class="fl">1</span>) <span class="op">/</span> γ)) <span class="op">|&gt;</span> u<span class="st">&quot;m/s&quot;</span></span>
<span id="cb5-12"><a href="#cb5-12" aria-hidden="true" tabindex="-1"></a> ρ <span class="op">=</span> P <span class="op">/</span> (R <span class="op">*</span> T) <span class="op">|&gt;</span> u<span class="st">&quot;kg/m^3&quot;</span></span>
<span id="cb5-13"><a href="#cb5-13" aria-hidden="true" tabindex="-1"></a><span class="op">=</span> ρ <span class="op">*</span> a_nozzle <span class="op">*</span> ve <span class="op">|&gt;</span> u<span class="st">&quot;kg/s&quot;</span></span>
<span id="cb5-14"><a href="#cb5-14" aria-hidden="true" tabindex="-1"></a> </span>
<span id="cb5-15"><a href="#cb5-15" aria-hidden="true" tabindex="-1"></a> Thrust <span class="op">=</span><span class="op">*</span> ve <span class="op">+</span> a_nozzle <span class="op">*</span> (P <span class="op">-</span> P_amb) <span class="op">|&gt;</span> u<span class="st">&quot;N&quot;</span></span>
<span id="cb5-16"><a href="#cb5-16" aria-hidden="true" tabindex="-1"></a> </span>
<span id="cb5-17"><a href="#cb5-17" aria-hidden="true" tabindex="-1"></a> <span class="co"># Calculate what is still in the tank</span></span>
<span id="cb5-18"><a href="#cb5-18" aria-hidden="true" tabindex="-1"></a> M <span class="op">=</span> M <span class="op">-</span><span class="op">*</span> ts <span class="op">|&gt;</span> u<span class="st">&quot;kg&quot;</span></span>
<span id="cb5-19"><a href="#cb5-19" aria-hidden="true" tabindex="-1"></a> P <span class="op">=</span> (M <span class="op">*</span> R <span class="op">*</span> T) <span class="op">/</span> V <span class="op">|&gt;</span> u<span class="st">&quot;Pa&quot;</span></span>
<span id="cb5-20"><a href="#cb5-20" aria-hidden="true" tabindex="-1"></a> t <span class="op">=</span> t <span class="op">+</span> ts</span>
<span id="cb5-21"><a href="#cb5-21" aria-hidden="true" tabindex="-1"></a> </span>
<span id="cb5-22"><a href="#cb5-22" aria-hidden="true" tabindex="-1"></a> df_step <span class="op">=</span> DataFrame(Thrust<span class="op">=</span>Thrust<span class="op">,</span> Pressure<span class="op">=</span>P<span class="op">,</span> <span class="dt">Time</span><span class="op">=</span>t<span class="op">,</span> Mass<span class="op">=</span>M)</span>
<span id="cb5-23"><a href="#cb5-23" aria-hidden="true" tabindex="-1"></a> <span class="cn">append</span><span class="op">!</span>(df<span class="op">,</span> df_step)</span>
<span id="cb5-24"><a href="#cb5-24" aria-hidden="true" tabindex="-1"></a> <span class="kw">end</span></span>
<span id="cb5-25"><a href="#cb5-25" aria-hidden="true" tabindex="-1"></a> df</span>
<span id="cb5-26"><a href="#cb5-26" aria-hidden="true" tabindex="-1"></a><span class="kw">end</span></span></code></pre></div>
</div>
<p>breakdown of the data</p>
<div class="layout-chunk" data-layout="l-body">
"
<table class="\&quot;data-frame\&quot;">
<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>
20.0±2.0 N
</td>
<td>
0.0±0.0 N
</td>
<td>
21.1±4.7 N
</td>
<td>
21.1±4.7 N
</td>
<td>
0
</td>
<td>
Quantity{Measurement{Float64}, 𝐋 𝐌 𝐓^-2, FreeUnits{(N,), 𝐋 𝐌 𝐓^-2, nothing}}
</td>
</tr>
<tr>
<th>
2
</th>
<td>
Pressure
</td>
<td>
2020.0±520.0 psi
</td>
<td>
40.0±160.0 psi
</td>
<td>
2010.0±570.0 psi
</td>
<td>
4200.0±300.0 psi
</td>
<td>
0
</td>
<td>
Quantity{Measurement{Float64}, 𝐌 𝐋^-1 𝐓^-2, FreeUnits{(psi,), 𝐌 𝐋^-1 𝐓^-2, nothing}}
</td>
</tr>
<tr>
<th>
3
</th>
<td>
Time
</td>
<td>
10.1515 s
</td>
<td>
0.0 s
</td>
<td>
10.1515 s
</td>
<td>
20.303 s
</td>
<td>
0
</td>
<td>
Quantity{Float64, 𝐓, FreeUnits{(s,), 𝐓, nothing}}
</td>
</tr>
<tr>
<th>
4
</th>
<td>
Mass
</td>
<td>
0.225±0.066 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>
<p>"</p>
</div>
<p>Heres the results plotted. Notice the massive error once the tank starts running low.</p>
<div class="layout-chunk" data-layout="l-body">
<p><img src="air-propulsion-simulation_files/figure-html5/unnamed-chunk-4-J1.png" width="350" /></p>
<div class="layout-chunk" data-layout="l-body-outset">
<details>
<summary>
Show code
</summary>
<div class="sourceCode" id="cb6"><pre class="sourceCode julia"><code class="sourceCode julia"><span id="cb6-1"><a href="#cb6-1" aria-hidden="true" tabindex="-1"></a></span>
<span id="cb6-2"><a href="#cb6-2" aria-hidden="true" tabindex="-1"></a>thrust_values <span class="op">=</span> df.Thrust .<span class="op">|&gt;</span> ustrip .<span class="op">|&gt;</span> value<span class="op">;</span></span>
<span id="cb6-3"><a href="#cb6-3" aria-hidden="true" tabindex="-1"></a>thrust_uncertainties <span class="op">=</span> df.Thrust .<span class="op">|&gt;</span> ustrip .<span class="op">|&gt;</span> uncertainty<span class="op">;</span></span>
<span id="cb6-4"><a href="#cb6-4" aria-hidden="true" tabindex="-1"></a></span>
<span id="cb6-5"><a href="#cb6-5" aria-hidden="true" tabindex="-1"></a>air <span class="op">=</span> DataFrame(Thrust<span class="op">=</span>thrust_values<span class="op">,</span> Uncertainty<span class="op">=</span>thrust_uncertainties<span class="op">,</span> <span class="dt">Time</span><span class="op">=</span>df.<span class="dt">Time</span> .<span class="op">|&gt;</span> u<span class="st">&quot;s&quot;</span> .<span class="op">|&gt;</span> ustrip)<span class="op">;</span></span>
<span id="cb6-6"><a href="#cb6-6" aria-hidden="true" tabindex="-1"></a></span>
<span id="cb6-7"><a href="#cb6-7" aria-hidden="true" tabindex="-1"></a></span>
<span id="cb6-8"><a href="#cb6-8" aria-hidden="true" tabindex="-1"></a>plot(df.<span class="dt">Time</span> .<span class="op">|&gt;</span> ustrip<span class="op">,</span> thrust_values<span class="op">,</span> </span>
<span id="cb6-9"><a href="#cb6-9" aria-hidden="true" tabindex="-1"></a> title<span class="op">=</span><span class="st">&quot;Thrust Over Time&quot;</span><span class="op">,</span> </span>
<span id="cb6-10"><a href="#cb6-10" aria-hidden="true" tabindex="-1"></a> ribbon<span class="op">=</span>(thrust_uncertainties<span class="op">,</span> thrust_uncertainties)<span class="op">,</span> </span>
<span id="cb6-11"><a href="#cb6-11" aria-hidden="true" tabindex="-1"></a> fillalpha<span class="op">=</span><span class="fl">.2</span><span class="op">,</span>label<span class="op">=</span><span class="st">&quot;Thrust&quot;</span><span class="op">,</span></span>
<span id="cb6-12"><a href="#cb6-12" aria-hidden="true" tabindex="-1"></a> xlabel<span class="op">=</span><span class="st">&quot;Time (s)&quot;</span><span class="op">,</span> </span>
<span id="cb6-13"><a href="#cb6-13" aria-hidden="true" tabindex="-1"></a> ylabel<span class="op">=</span><span class="st">&quot;Thrust (N)&quot;</span><span class="op">,</span></span>
<span id="cb6-14"><a href="#cb6-14" aria-hidden="true" tabindex="-1"></a> size <span class="op">=</span> (<span class="fl">1200</span><span class="op">,</span> <span class="fl">800</span>)<span class="op">,</span></span>
<span id="cb6-15"><a href="#cb6-15" aria-hidden="true" tabindex="-1"></a> )</span></code></pre></div>
</details>
<div class="figure"><span id="fig:unnamed-chunk-7"></span>
<img src="air-propulsion-simulation_files/figure-html5/unnamed-chunk-7-J1.png" alt="Air Proplsion Simulation" width="350" />
<p class="caption">
Figure 1: Air Proplsion Simulation
</p>
</div>
</div>
<p>Here the air prop is plotted along with rocket motors that are being</p>
<div class="layout-chunk" data-layout="l-body-outset">
<details>
<summary>
Show code
</summary>
<div class="sourceCode" id="cb7"><pre class="sourceCode julia"><code class="sourceCode julia"><span id="cb7-1"><a href="#cb7-1" aria-hidden="true" tabindex="-1"></a></span>
<span id="cb7-2"><a href="#cb7-2" aria-hidden="true" tabindex="-1"></a>f10 <span class="op">=</span> CSV.<span class="cn">read</span>(<span class="st">&quot;AeroTech_F10.csv&quot;</span><span class="op">,</span> DataFrame)<span class="op">;</span></span>
<span id="cb7-3"><a href="#cb7-3" aria-hidden="true" tabindex="-1"></a>f15 <span class="op">=</span> CSV.<span class="cn">read</span>(<span class="st">&quot;Estes_F15.csv&quot;</span><span class="op">,</span> DataFrame)<span class="op">;</span></span>
<span id="cb7-4"><a href="#cb7-4" aria-hidden="true" tabindex="-1"></a>g8 <span class="op">=</span> CSV.<span class="cn">read</span>(<span class="st">&quot;AeroTech_G8ST.csv&quot;</span><span class="op">,</span> DataFrame)<span class="op">;</span></span>
<span id="cb7-5"><a href="#cb7-5" aria-hidden="true" tabindex="-1"></a></span>
<span id="cb7-6"><a href="#cb7-6" aria-hidden="true" tabindex="-1"></a></span>
<span id="cb7-7"><a href="#cb7-7" aria-hidden="true" tabindex="-1"></a>plot(air.<span class="dt">Time</span><span class="op">,</span> air.Thrust<span class="op">,</span> label<span class="op">=</span><span class="st">&quot;Air Propulsion&quot;</span><span class="op">,</span> fillalpha<span class="op">=</span><span class="fl">.1</span><span class="op">,</span> legend<span class="op">=:</span>topleft<span class="op">,</span> size <span class="op">=</span> (<span class="fl">1200</span><span class="op">,</span> <span class="fl">800</span>))<span class="op">;</span></span>
<span id="cb7-8"><a href="#cb7-8" aria-hidden="true" tabindex="-1"></a></span>
<span id="cb7-9"><a href="#cb7-9" aria-hidden="true" tabindex="-1"></a><span class="kw">for</span> (d<span class="op">,</span> l) <span class="kw">in</span> [(f10<span class="op">,</span> <span class="st">&quot;F10&quot;</span>)<span class="op">,</span> (f15<span class="op">,</span> <span class="st">&quot;F15&quot;</span>)<span class="op">,</span> (g8<span class="op">,</span> <span class="st">&quot;G8ST&quot;</span>)]</span>
<span id="cb7-10"><a href="#cb7-10" aria-hidden="true" tabindex="-1"></a> plot<span class="op">!</span>(d[<span class="op">!,</span><span class="st">&quot;Time (s)&quot;</span>]<span class="op">,</span> d[<span class="op">!,</span> <span class="st">&quot;Thrust (N)&quot;</span>]<span class="op">,</span> label<span class="op">=</span>l)<span class="op">;</span></span>
<span id="cb7-11"><a href="#cb7-11" aria-hidden="true" tabindex="-1"></a><span class="kw">end</span></span>
<span id="cb7-12"><a href="#cb7-12" aria-hidden="true" tabindex="-1"></a></span>
<span id="cb7-13"><a href="#cb7-13" aria-hidden="true" tabindex="-1"></a>title<span class="op">!</span>(<span class="st">&quot;Propulsion Comparison&quot;</span>)<span class="op">;</span></span>
<span id="cb7-14"><a href="#cb7-14" aria-hidden="true" tabindex="-1"></a>xlabel<span class="op">!</span>(<span class="st">&quot;Time (s)&quot;</span>)<span class="op">;</span></span>
<span id="cb7-15"><a href="#cb7-15" aria-hidden="true" tabindex="-1"></a>ylabel<span class="op">!</span>(<span class="st">&quot;Thrust (N)&quot;</span>)</span></code></pre></div>
</details>
<div class="figure"><span id="fig:unnamed-chunk-8"></span>
<img src="air-propulsion-simulation_files/figure-html5/unnamed-chunk-8-J1.png" alt="Rocket Motor Data: [@thrustcurve]" width="350" />
<p class="caption">
Figure 2: Rocket Motor Data: <span class="citation" data-cites="thrustcurve">(<a href="#ref-thrustcurve" role="doc-biblioref">Coker, n.d.</a>)</span>
</p>
</div>
</div>
<p>Big conclusion about things.</p>
<div class="sourceCode" id="cb4"><pre class="sourceCode r distill-force-highlighting-css"><code class="sourceCode r"></code></pre></div>
<div class="sourceCode" id="cb8"><pre class="sourceCode r distill-force-highlighting-css"><code class="sourceCode r"></code></pre></div>
<div id="refs" class="references csl-bib-body hanging-indent" role="doc-bibliography">
<div id="ref-thrustcurve" class="csl-entry" role="doc-biblioentry">
Coker, John. n.d. <span>“Rocket <span>Motor</span> <span>Data</span>.”</span> <a href="https://www.thrustcurve.org/">https://www.thrustcurve.org/</a>.
</div>
<div id="ref-curtis_orbital" class="csl-entry" role="doc-biblioentry">
Curtis, Howard D. 2020. <em>Orbital Mechanics for Engineering Students</em>. Fourth edition. Butterworth-Heinemann Publications.
</div>
<div id="ref-cengel_thermodynamics" class="csl-entry" role="doc-biblioentry">
Çengel, Yunus A., and Michael A. Boles. 2015. <em>Thermodynamics: An Engineering Approach</em>. Eighth edition. New York: McGraw-Hill Education.
</div>
<div id="ref-sutton_rocket_2001" class="csl-entry" role="doc-biblioentry">
Sutton, George P., and Oscar Biblarz. 2001. <em>Rocket Propulsion Elements</em>. 7th ed. New York: John Wiley &amp; Sons.
</div>
</div>
<!--radix_placeholder_article_footer-->
<!--/radix_placeholder_article_footer-->

Binary file not shown.

Before

Width:  |  Height:  |  Size: 28 KiB

After

Width:  |  Height:  |  Size: 25 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 26 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 41 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 40 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 41 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 42 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 26 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 45 KiB

View File

@ -2215,16 +2215,14 @@ function init_posts_list() {
<div class="dt-author">Anson Biggs</div>
</div>
</div>
<div class="thumbnail">
<img src="posts/2021-04-01-air-propulsion-simulation/air-propulsion-simulation_files/figure-html5/unnamed-chunk-4-J1.png"/>
</div>
<div class="thumbnail"></div>
<div class="description">
<h2>Air Propulsion Simulation</h2>
<div class="dt-tags">
<div class="dt-tag">Julia</div>
<div class="dt-tag">Capstone</div>
</div>
<p>Simulating the performace of an air propulsion system as an alternative to solid rocket motors.</p>
<p>Simulating the performance of an air propulsion system as an alternative to solid rocket motors.</p>
</div>
</a>
<a href="posts/welcome/" class="post-preview">

Binary file not shown.

Before

Width:  |  Height:  |  Size: 28 KiB

After

Width:  |  Height:  |  Size: 25 KiB

View File

@ -88,7 +88,7 @@ code span.wa { color: #5e5e5e; font-style: italic; } /* Warning */
<!--radix_placeholder_meta_tags-->
<title>Anson's Projects: Air Propulsion Simulation</title>
<meta property="description" itemprop="description" content="Simulating the performace of an air propulsion system as an alternative to solid rocket motors."/>
<meta property="description" itemprop="description" content="Simulating the performance of an air propulsion system as an alternative to solid rocket motors."/>
<!-- https://schema.org/Article -->
@ -99,27 +99,26 @@ code span.wa { color: #5e5e5e; font-style: italic; } /* Warning */
<!-- https://developers.facebook.com/docs/sharing/webmasters#markup -->
<meta property="og:title" content="Anson&#39;s Projects: Air Propulsion Simulation"/>
<meta property="og:type" content="article"/>
<meta property="og:description" content="Simulating the performace of an air propulsion system as an alternative to solid rocket motors."/>
<meta property="og:description" content="Simulating the performance of an air propulsion system as an alternative to solid rocket motors."/>
<meta property="og:locale" content="en_US"/>
<meta property="og:site_name" content="Anson&#39;s Projects"/>
<!-- https://dev.twitter.com/cards/types/summary -->
<meta property="twitter:card" content="summary"/>
<meta property="twitter:title" content="Anson&#39;s Projects: Air Propulsion Simulation"/>
<meta property="twitter:description" content="Simulating the performace of an air propulsion system as an alternative to solid rocket motors."/>
<meta property="twitter:description" content="Simulating the performance of an air propulsion system as an alternative to solid rocket motors."/>
<!--/radix_placeholder_meta_tags-->
<meta name="citation_reference" content="citation_title=Orbital mechanics for engineering students;citation_publication_date=2020;citation_publisher=Butterworth-Heinemann Publications;citation_author=Howard D Curtis"/>
<!--radix_placeholder_rmarkdown_metadata-->
<script type="text/json" id="radix-rmarkdown-metadata">
{"type":"list","attributes":{"names":{"type":"character","attributes":{},"value":["title","description","author","repository_url","date","fig_width","fig_align","output","categories","bibliography"]}},"value":[{"type":"character","attributes":{},"value":["Air Propulsion Simulation"]},{"type":"character","attributes":{},"value":["Simulating the performace of an air propulsion system as an alternative to solid rocket motors."]},{"type":"list","attributes":{},"value":[{"type":"list","attributes":{"names":{"type":"character","attributes":{},"value":["name","url"]}},"value":[{"type":"character","attributes":{},"value":["Anson Biggs"]},{"type":"character","attributes":{},"value":["https://ansonbiggs.com"]}]}]},{"type":"character","attributes":{},"value":["https://gitlab.com/lander-team/air-prop-simulation"]},{"type":"character","attributes":{},"value":["04-01-2021"]},{"type":"integer","attributes":{},"value":[6]},{"type":"character","attributes":{},"value":["center"]},{"type":"list","attributes":{"names":{"type":"character","attributes":{},"value":["distill::distill_article"]}},"value":[{"type":"list","attributes":{"names":{"type":"character","attributes":{},"value":["self_contained"]}},"value":[{"type":"logical","attributes":{},"value":[false]}]}]},{"type":"character","attributes":{},"value":["Julia","Capstone"]},{"type":"character","attributes":{},"value":["../../citations.bib"]}]}
{"type":"list","attributes":{"names":{"type":"character","attributes":{},"value":["title","description","author","repository_url","date","fig_width","fig_align","output","categories","bibliography"]}},"value":[{"type":"character","attributes":{},"value":["Air Propulsion Simulation"]},{"type":"character","attributes":{},"value":["Simulating the performance of an air propulsion system as an alternative to solid rocket motors."]},{"type":"list","attributes":{},"value":[{"type":"list","attributes":{"names":{"type":"character","attributes":{},"value":["name","url"]}},"value":[{"type":"character","attributes":{},"value":["Anson Biggs"]},{"type":"character","attributes":{},"value":["https://ansonbiggs.com"]}]}]},{"type":"character","attributes":{},"value":["https://gitlab.com/lander-team/air-prop-simulation"]},{"type":"character","attributes":{},"value":["04-01-2021"]},{"type":"integer","attributes":{},"value":[6]},{"type":"character","attributes":{},"value":["center"]},{"type":"list","attributes":{"names":{"type":"character","attributes":{},"value":["distill::distill_article"]}},"value":[{"type":"list","attributes":{"names":{"type":"character","attributes":{},"value":["self_contained"]}},"value":[{"type":"logical","attributes":{},"value":[false]}]}]},{"type":"character","attributes":{},"value":["Julia","Capstone"]},{"type":"character","attributes":{},"value":["../../citations.bib"]}]}
</script>
<!--/radix_placeholder_rmarkdown_metadata-->
<script type="text/json" id="radix-resource-manifest">
{"type":"character","attributes":{},"value":["air-propulsion-simulation_files/anchor-4.2.2/anchor.min.js","air-propulsion-simulation_files/bowser-1.9.3/bowser.min.js","air-propulsion-simulation_files/distill-2.2.21/template.v2.js","air-propulsion-simulation_files/figure-html5/unnamed-chunk-4-J1.png","air-propulsion-simulation_files/figure-html5/unnamed-chunk-5-1.png","air-propulsion-simulation_files/figure-html5/unnamed-chunk-5-2.png","air-propulsion-simulation_files/header-attrs-2.7/header-attrs.js","air-propulsion-simulation_files/jquery-1.11.3/jquery.min.js","air-propulsion-simulation_files/popper-2.6.0/popper.min.js","air-propulsion-simulation_files/tippy-6.2.7/tippy-bundle.umd.min.js","air-propulsion-simulation_files/tippy-6.2.7/tippy-light-border.css","air-propulsion-simulation_files/tippy-6.2.7/tippy.css","air-propulsion-simulation_files/tippy-6.2.7/tippy.umd.min.js","air-propulsion-simulation_files/webcomponents-2.0.0/webcomponents.js","figure/-J2.png","figure/-J3.png","figure/-J4.png"]}
{"type":"character","attributes":{},"value":["AeroTech_F10.csv","AeroTech_G8ST.csv","air-propulsion-simulation_files/anchor-4.2.2/anchor.min.js","air-propulsion-simulation_files/bowser-1.9.3/bowser.min.js","air-propulsion-simulation_files/distill-2.2.21/template.v2.js","air-propulsion-simulation_files/figure-html5/unnamed-chunk-4-J1.png","air-propulsion-simulation_files/figure-html5/unnamed-chunk-5-1.png","air-propulsion-simulation_files/figure-html5/unnamed-chunk-5-2.png","air-propulsion-simulation_files/figure-html5/unnamed-chunk-5-J1.png","air-propulsion-simulation_files/figure-html5/unnamed-chunk-5-J2.png","air-propulsion-simulation_files/figure-html5/unnamed-chunk-5-J3.png","air-propulsion-simulation_files/figure-html5/unnamed-chunk-5-J4.png","air-propulsion-simulation_files/figure-html5/unnamed-chunk-6-J1.png","air-propulsion-simulation_files/figure-html5/unnamed-chunk-7-J1.png","air-propulsion-simulation_files/figure-html5/unnamed-chunk-8-J1.png","air-propulsion-simulation_files/header-attrs-2.7/header-attrs.js","air-propulsion-simulation_files/jquery-1.11.3/jquery.min.js","air-propulsion-simulation_files/popper-2.6.0/popper.min.js","air-propulsion-simulation_files/tippy-6.2.7/tippy-bundle.umd.min.js","air-propulsion-simulation_files/tippy-6.2.7/tippy-light-border.css","air-propulsion-simulation_files/tippy-6.2.7/tippy.css","air-propulsion-simulation_files/tippy-6.2.7/tippy.umd.min.js","air-propulsion-simulation_files/webcomponents-2.0.0/webcomponents.js","Estes_F15.csv","figure/-J2.png","figure/-J3.png","figure/-J4.png"]}
</script>
<!--radix_placeholder_navigation_in_header-->
<meta name="distill:offset" content="../.."/>
@ -2064,7 +2063,7 @@ document.addEventListener('DOMContentLoaded', function() {
<!--radix_placeholder_front_matter-->
<script id="distill-front-matter" type="text/json">
{"title":"Air Propulsion Simulation","description":"Simulating the performace of an air propulsion system as an alternative to solid rocket motors.","authors":[{"author":"Anson Biggs","authorURL":"https://ansonbiggs.com","affiliation":"&nbsp;","affiliationURL":"#","orcidID":""}],"publishedDate":"2021-04-01T00:00:00.000-07:00","citationText":"Biggs, 2021"}
{"title":"Air Propulsion Simulation","description":"Simulating the performance of an air propulsion system as an alternative to solid rocket motors.","authors":[{"author":"Anson Biggs","authorURL":"https://ansonbiggs.com","affiliation":"&nbsp;","affiliationURL":"#","orcidID":""}],"publishedDate":"2021-04-01T00:00:00.000-07:00","citationText":"Biggs, 2021"}
</script>
<!--/radix_placeholder_front_matter-->
@ -2095,7 +2094,7 @@ document.addEventListener('DOMContentLoaded', function() {
<a href="../../index.html#category:Capstone" class="dt-tag">Capstone</a>
</div>
<!--/radix_placeholder_categories-->
<p><p>Simulating the performace of an air propulsion system as an alternative to solid rocket motors.</p></p>
<p><p>Simulating the performance of an air propulsion system as an alternative to solid rocket motors.</p></p>
</div>
<div class="d-byline">
@ -2105,7 +2104,7 @@ document.addEventListener('DOMContentLoaded', function() {
</div>
<div class="d-article">
<p>Boilerplate intro about why all of this was done</p>
<p>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 <em>napkin math</em> to determine if the system is even feasibly and is not meant to be a rigorous study of an air propulsion system which would easily keep a capstone team busy by itself.</p>
<div class="layout-chunk" data-layout="l-body">
<details>
<summary>
@ -2118,69 +2117,305 @@ Show code
<span id="cb1-5"><a href="#cb1-5" aria-hidden="true" tabindex="-1"></a><span class="kw">using</span> Unitful</span>
<span id="cb1-6"><a href="#cb1-6" aria-hidden="true" tabindex="-1"></a><span class="kw">using</span> DataFrames</span>
<span id="cb1-7"><a href="#cb1-7" aria-hidden="true" tabindex="-1"></a><span class="kw">using</span> Measurements</span>
<span id="cb1-8"><a href="#cb1-8" aria-hidden="true" tabindex="-1"></a><span class="kw">using</span> Measurements<span class="op">:</span> value<span class="op">,</span> uncertainty</span></code></pre></div>
<span id="cb1-8"><a href="#cb1-8" aria-hidden="true" tabindex="-1"></a><span class="kw">using</span> Measurements<span class="op">:</span> value<span class="op">,</span> uncertainty</span>
<span id="cb1-9"><a href="#cb1-9" aria-hidden="true" tabindex="-1"></a><span class="kw">using</span> CSV</span></code></pre></div>
</details>
</div>
<p>This code is just the setup, using values scraped from various parts of the world wide web.</p>
<p>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.</p>
<div class="layout-chunk" data-layout="l-body">
<div class="sourceCode" id="cb2"><pre class="sourceCode julia"><code class="sourceCode julia"><span id="cb2-1"><a href="#cb2-1" aria-hidden="true" tabindex="-1"></a><span class="co"># Tank https://www.amazon.com/Empire-Paintball-BASICS-Pressure-Compressed/dp/B07B6M48SR/</span></span>
<span id="cb2-2"><a href="#cb2-2" aria-hidden="true" tabindex="-1"></a>V <span class="op">=</span> (<span class="fl">85</span> ± <span class="fl">5</span>)u<span class="st">&quot;inch^3&quot;</span></span>
<span id="cb2-3"><a href="#cb2-3" aria-hidden="true" tabindex="-1"></a>P0 <span class="op">=</span> (<span class="fl">4200.0</span> ± <span class="fl">300</span>)u<span class="st">&quot;psi&quot;</span></span>
<span id="cb2-4"><a href="#cb2-4" aria-hidden="true" tabindex="-1"></a>Wtank <span class="op">=</span> (<span class="fl">2.3</span> ± <span class="fl">0.2</span>)u<span class="st">&quot;lb&quot;</span></span>
<span id="cb2-5"><a href="#cb2-5" aria-hidden="true" tabindex="-1"></a>Pmax <span class="op">=</span> (<span class="fl">250</span> ± <span class="fl">50</span>)u<span class="st">&quot;psi&quot;</span> <span class="co"># Max Pressure that can come out the nozzle</span></span>
<span id="cb2-6"><a href="#cb2-6" aria-hidden="true" tabindex="-1"></a></span>
<span id="cb2-7"><a href="#cb2-7" aria-hidden="true" tabindex="-1"></a>Wsolenoid <span class="op">=</span> <span class="fl">1.5</span>u<span class="st">&quot;kg&quot;</span></span>
<span id="cb2-8"><a href="#cb2-8" aria-hidden="true" tabindex="-1"></a></span>
<span id="cb2-9"><a href="#cb2-9" aria-hidden="true" tabindex="-1"></a><span class="co"># Params</span></span>
<span id="cb2-10"><a href="#cb2-10" aria-hidden="true" tabindex="-1"></a>d_nozzle <span class="op">=</span> ((<span class="fl">1</span> <span class="op">//</span> <span class="fl">18</span>) ± <span class="fl">0.001</span>)u<span class="st">&quot;inch&quot;</span></span>
<span id="cb2-11"><a href="#cb2-11" aria-hidden="true" tabindex="-1"></a>a_nozzle <span class="op">=</span> (<span class="cn">pi</span> <span class="op">/</span> <span class="fl">4</span>) <span class="op">*</span> d_nozzle<span class="op">^</span><span class="fl">2</span></span>
<span id="cb2-12"><a href="#cb2-12" aria-hidden="true" tabindex="-1"></a></span>
<span id="cb2-13"><a href="#cb2-13" aria-hidden="true" tabindex="-1"></a><span class="co"># Universal Stuff</span></span>
<span id="cb2-14"><a href="#cb2-14" aria-hidden="true" tabindex="-1"></a>P_amb <span class="op">=</span> (<span class="fl">1</span> ± <span class="fl">0.2</span>)u<span class="st">&quot;atm&quot;</span></span>
<span id="cb2-15"><a href="#cb2-15" aria-hidden="true" tabindex="-1"></a>γ <span class="op">=</span> <span class="fl">1.4</span> ± <span class="fl">0.05</span></span>
<span id="cb2-16"><a href="#cb2-16" aria-hidden="true" tabindex="-1"></a>R <span class="op">=</span> <span class="fl">287.05</span>u<span class="st">&quot;J/(kg * K)&quot;</span></span>
<span id="cb2-17"><a href="#cb2-17" aria-hidden="true" tabindex="-1"></a>T <span class="op">=</span> (<span class="fl">300</span> ± <span class="fl">20</span>)u<span class="st">&quot;K&quot;</span></span></code></pre></div>
<span id="cb2-5"><a href="#cb2-5" aria-hidden="true" tabindex="-1"></a>Pmax <span class="op">=</span> (<span class="fl">250</span> ± <span class="fl">50</span>)u<span class="st">&quot;psi&quot;</span> <span class="co"># Max Pressure that can come out the nozzle</span></span></code></pre></div>
</div>
<p>The nozzle diameter was changed until the air prop system had a <em>burn time</em> similar to a G18ST rocket motor.</p>
<div class="layout-chunk" data-layout="l-body">
<div class="sourceCode" id="cb3"><pre class="sourceCode julia"><code class="sourceCode julia"><span id="cb3-1"><a href="#cb3-1" aria-hidden="true" tabindex="-1"></a><span class="co"># Params</span></span>
<span id="cb3-2"><a href="#cb3-2" aria-hidden="true" tabindex="-1"></a>d_nozzle <span class="op">=</span> ((<span class="fl">1</span> <span class="op">//</span> <span class="fl">18</span>) ± <span class="fl">0.001</span>)u<span class="st">&quot;inch&quot;</span></span>
<span id="cb3-3"><a href="#cb3-3" aria-hidden="true" tabindex="-1"></a>a_nozzle <span class="op">=</span> (<span class="cn">pi</span> <span class="op">/</span> <span class="fl">4</span>) <span class="op">*</span> d_nozzle<span class="op">^</span><span class="fl">2</span></span></code></pre></div>
</div>
<p>These are just universal values for what a normal day would look like in Arizona. <span class="citation" data-cites="cengel_thermodynamics">(<a href="#ref-cengel_thermodynamics" role="doc-biblioref">Çengel and Boles 2015</a>)</span></p>
<div class="layout-chunk" data-layout="l-body">
<div class="sourceCode" id="cb4"><pre class="sourceCode julia"><code class="sourceCode julia"><span id="cb4-1"><a href="#cb4-1" aria-hidden="true" tabindex="-1"></a><span class="co"># Universal Stuff</span></span>
<span id="cb4-2"><a href="#cb4-2" aria-hidden="true" tabindex="-1"></a>P_amb <span class="op">=</span> (<span class="fl">1</span> ± <span class="fl">0.2</span>)u<span class="st">&quot;atm&quot;</span></span>
<span id="cb4-3"><a href="#cb4-3" aria-hidden="true" tabindex="-1"></a>γ <span class="op">=</span> <span class="fl">1.4</span> ± <span class="fl">0.05</span></span>
<span id="cb4-4"><a href="#cb4-4" aria-hidden="true" tabindex="-1"></a>R <span class="op">=</span> <span class="fl">287.05</span>u<span class="st">&quot;J/(kg * K)&quot;</span></span>
<span id="cb4-5"><a href="#cb4-5" aria-hidden="true" tabindex="-1"></a>T <span class="op">=</span> (<span class="fl">300</span> ± <span class="fl">20</span>)u<span class="st">&quot;K&quot;</span></span></code></pre></div>
</div>
<p>This is the actual simulation. Maybe throw some references in and explain some equations.</p>
<p>The rocket equation is pretty sick:</p>
<p><span class="math display">\[T = \dot{m} \cdot v_\text{Exit} + A_\text{Nozzle} \cdot (P - P_\text{Ambient}) \]</span> And thats about all you need to get to the moon<span class="citation" data-cites="curtis_orbital">(<a href="#ref-curtis_orbital" role="doc-biblioref">Curtis 2020</a>)</span>.</p>
<p>The following equations also came from <span class="citation" data-cites="cengel_thermodynamics">(<a href="#ref-cengel_thermodynamics" role="doc-biblioref">Çengel and Boles 2015</a>)</span></p>
<p>The rocket equation is pretty sick<span class="citation" data-cites="sutton_rocket_2001">(<a href="#ref-sutton_rocket_2001" role="doc-biblioref">Sutton and Biblarz 2001</a>, eq: 2-14)</span>:</p>
<p><span class="math display">\[T = \dot{m} \cdot v_\text{Exit} + A_\text{Nozzle} \cdot (P - P_\text{Ambient}) \]</span> And thats about all you need to get to the Moon<span class="citation" data-cites="curtis_orbital">(<a href="#ref-curtis_orbital" role="doc-biblioref">Curtis 2020</a>)</span>.</p>
<div class="layout-chunk" data-layout="l-body">
<div class="sourceCode" id="cb3"><pre class="sourceCode julia"><code class="sourceCode julia"><span id="cb3-1"><a href="#cb3-1" aria-hidden="true" tabindex="-1"></a><span class="kw">let</span></span>
<span id="cb3-2"><a href="#cb3-2" aria-hidden="true" tabindex="-1"></a>t <span class="op">=</span> <span class="fl">0.0</span>u<span class="st">&quot;s&quot;</span></span>
<span id="cb3-3"><a href="#cb3-3" aria-hidden="true" tabindex="-1"></a>P <span class="op">=</span> P0 <span class="op">|&gt;</span> u<span class="st">&quot;Pa&quot;</span></span>
<span id="cb3-4"><a href="#cb3-4" aria-hidden="true" tabindex="-1"></a>M <span class="op">=</span> V <span class="op">*</span> (P <span class="op">/</span> (R <span class="op">*</span> T)) <span class="op">|&gt;</span> u<span class="st">&quot;kg&quot;</span></span>
<span id="cb3-5"><a href="#cb3-5" aria-hidden="true" tabindex="-1"></a>ts <span class="op">=</span> <span class="fl">1</span>u<span class="st">&quot;ms&quot;</span></span>
<span id="cb3-6"><a href="#cb3-6" aria-hidden="true" tabindex="-1"></a><span class="kw">global</span> df <span class="op">=</span> DataFrame(Thrust<span class="op">=</span>(<span class="fl">0</span> ± <span class="fl">0</span>)u<span class="st">&quot;N&quot;</span><span class="op">,</span> Pressure<span class="op">=</span>P0<span class="op">,</span> <span class="dt">Time</span><span class="op">=</span><span class="fl">0.0</span>u<span class="st">&quot;s&quot;</span><span class="op">,</span> Mass<span class="op">=</span>M)</span>
<span id="cb3-7"><a href="#cb3-7" aria-hidden="true" tabindex="-1"></a> <span class="kw">while</span> M <span class="op">&gt;</span> <span class="fl">0.005</span>u<span class="st">&quot;kg&quot;</span></span>
<span id="cb3-8"><a href="#cb3-8" aria-hidden="true" tabindex="-1"></a> <span class="co"># while t &lt; 30u&quot;s&quot;</span></span>
<span id="cb3-9"><a href="#cb3-9" aria-hidden="true" tabindex="-1"></a> <span class="co"># Calculate what is leaving tank</span></span>
<span id="cb3-10"><a href="#cb3-10" aria-hidden="true" tabindex="-1"></a> P <span class="op">=</span> minimum([P<span class="op">,</span> Pmax])</span>
<span id="cb3-11"><a href="#cb3-11" aria-hidden="true" tabindex="-1"></a> ve <span class="op">=</span> sqrt((<span class="fl">2</span> <span class="op">*</span> γ <span class="op">/</span> (γ <span class="op">-</span> <span class="fl">1</span>)) <span class="op">*</span> R <span class="op">*</span> T <span class="op">*</span> (<span class="fl">1</span> <span class="op">-</span> P_amb <span class="op">/</span> P)<span class="op">^</span>((γ <span class="op">-</span> <span class="fl">1</span>) <span class="op">/</span> γ)) <span class="op">|&gt;</span> u<span class="st">&quot;m/s&quot;</span></span>
<span id="cb3-12"><a href="#cb3-12" aria-hidden="true" tabindex="-1"></a> ρ <span class="op">=</span> P <span class="op">/</span> (R <span class="op">*</span> T) <span class="op">|&gt;</span> u<span class="st">&quot;kg/m^3&quot;</span></span>
<span id="cb3-13"><a href="#cb3-13" aria-hidden="true" tabindex="-1"></a><span class="op">=</span> ρ <span class="op">*</span> a_nozzle <span class="op">*</span> ve <span class="op">|&gt;</span> u<span class="st">&quot;kg/s&quot;</span></span>
<span id="cb3-14"><a href="#cb3-14" aria-hidden="true" tabindex="-1"></a> </span>
<span id="cb3-15"><a href="#cb3-15" aria-hidden="true" tabindex="-1"></a> Thrust <span class="op">=</span><span class="op">*</span> ve <span class="op">+</span> a_nozzle <span class="op">*</span> (P <span class="op">-</span> P_amb) <span class="op">|&gt;</span> u<span class="st">&quot;N&quot;</span></span>
<span id="cb3-16"><a href="#cb3-16" aria-hidden="true" tabindex="-1"></a> </span>
<span id="cb3-17"><a href="#cb3-17" aria-hidden="true" tabindex="-1"></a> <span class="co"># Calculate what is still in the tank</span></span>
<span id="cb3-18"><a href="#cb3-18" aria-hidden="true" tabindex="-1"></a> M <span class="op">=</span> M <span class="op">-</span><span class="op">*</span> ts <span class="op">|&gt;</span> u<span class="st">&quot;kg&quot;</span></span>
<span id="cb3-19"><a href="#cb3-19" aria-hidden="true" tabindex="-1"></a> P <span class="op">=</span> (M <span class="op">*</span> R <span class="op">*</span> T) <span class="op">/</span> V <span class="op">|&gt;</span> u<span class="st">&quot;Pa&quot;</span></span>
<span id="cb3-20"><a href="#cb3-20" aria-hidden="true" tabindex="-1"></a> t <span class="op">=</span> t <span class="op">+</span> ts</span>
<span id="cb3-21"><a href="#cb3-21" aria-hidden="true" tabindex="-1"></a> </span>
<span id="cb3-22"><a href="#cb3-22" aria-hidden="true" tabindex="-1"></a> df_step <span class="op">=</span> DataFrame(Thrust<span class="op">=</span>Thrust<span class="op">,</span> Pressure<span class="op">=</span>P<span class="op">,</span> <span class="dt">Time</span><span class="op">=</span>t<span class="op">,</span> Mass<span class="op">=</span>M)</span>
<span id="cb3-23"><a href="#cb3-23" aria-hidden="true" tabindex="-1"></a> <span class="cn">append</span><span class="op">!</span>(df<span class="op">,</span> df_step)</span>
<span id="cb3-24"><a href="#cb3-24" aria-hidden="true" tabindex="-1"></a> <span class="kw">end</span></span>
<span id="cb3-25"><a href="#cb3-25" aria-hidden="true" tabindex="-1"></a><span class="kw">end</span></span></code></pre></div>
<div class="sourceCode" id="cb5"><pre class="sourceCode julia"><code class="sourceCode julia"><span id="cb5-1"><a href="#cb5-1" aria-hidden="true" tabindex="-1"></a>df <span class="op">=</span> <span class="kw">let</span></span>
<span id="cb5-2"><a href="#cb5-2" aria-hidden="true" tabindex="-1"></a>t <span class="op">=</span> <span class="fl">0.0</span>u<span class="st">&quot;s&quot;</span></span>
<span id="cb5-3"><a href="#cb5-3" aria-hidden="true" tabindex="-1"></a>P <span class="op">=</span> P0 <span class="op">|&gt;</span> u<span class="st">&quot;Pa&quot;</span></span>
<span id="cb5-4"><a href="#cb5-4" aria-hidden="true" tabindex="-1"></a>M <span class="op">=</span> V <span class="op">*</span> (P <span class="op">/</span> (R <span class="op">*</span> T)) <span class="op">|&gt;</span> u<span class="st">&quot;kg&quot;</span></span>
<span id="cb5-5"><a href="#cb5-5" aria-hidden="true" tabindex="-1"></a>ts <span class="op">=</span> <span class="fl">1</span>u<span class="st">&quot;ms&quot;</span></span>
<span id="cb5-6"><a href="#cb5-6" aria-hidden="true" tabindex="-1"></a>df <span class="op">=</span> DataFrame(Thrust<span class="op">=</span>(<span class="fl">0</span> ± <span class="fl">0</span>)u<span class="st">&quot;N&quot;</span><span class="op">,</span> Pressure<span class="op">=</span>P0<span class="op">,</span> <span class="dt">Time</span><span class="op">=</span><span class="fl">0.0</span>u<span class="st">&quot;s&quot;</span><span class="op">,</span> Mass<span class="op">=</span>M)</span>
<span id="cb5-7"><a href="#cb5-7" aria-hidden="true" tabindex="-1"></a> <span class="kw">while</span> M <span class="op">&gt;</span> <span class="fl">0.005</span>u<span class="st">&quot;kg&quot;</span></span>
<span id="cb5-8"><a href="#cb5-8" aria-hidden="true" tabindex="-1"></a> <span class="co"># while t &lt; 30u&quot;s&quot;</span></span>
<span id="cb5-9"><a href="#cb5-9" aria-hidden="true" tabindex="-1"></a> <span class="co"># Calculate what is leaving tank</span></span>
<span id="cb5-10"><a href="#cb5-10" aria-hidden="true" tabindex="-1"></a> P <span class="op">=</span> minimum([P<span class="op">,</span> Pmax])</span>
<span id="cb5-11"><a href="#cb5-11" aria-hidden="true" tabindex="-1"></a> ve <span class="op">=</span> sqrt((<span class="fl">2</span> <span class="op">*</span> γ <span class="op">/</span> (γ <span class="op">-</span> <span class="fl">1</span>)) <span class="op">*</span> R <span class="op">*</span> T <span class="op">*</span> (<span class="fl">1</span> <span class="op">-</span> P_amb <span class="op">/</span> P)<span class="op">^</span>((γ <span class="op">-</span> <span class="fl">1</span>) <span class="op">/</span> γ)) <span class="op">|&gt;</span> u<span class="st">&quot;m/s&quot;</span></span>
<span id="cb5-12"><a href="#cb5-12" aria-hidden="true" tabindex="-1"></a> ρ <span class="op">=</span> P <span class="op">/</span> (R <span class="op">*</span> T) <span class="op">|&gt;</span> u<span class="st">&quot;kg/m^3&quot;</span></span>
<span id="cb5-13"><a href="#cb5-13" aria-hidden="true" tabindex="-1"></a><span class="op">=</span> ρ <span class="op">*</span> a_nozzle <span class="op">*</span> ve <span class="op">|&gt;</span> u<span class="st">&quot;kg/s&quot;</span></span>
<span id="cb5-14"><a href="#cb5-14" aria-hidden="true" tabindex="-1"></a> </span>
<span id="cb5-15"><a href="#cb5-15" aria-hidden="true" tabindex="-1"></a> Thrust <span class="op">=</span><span class="op">*</span> ve <span class="op">+</span> a_nozzle <span class="op">*</span> (P <span class="op">-</span> P_amb) <span class="op">|&gt;</span> u<span class="st">&quot;N&quot;</span></span>
<span id="cb5-16"><a href="#cb5-16" aria-hidden="true" tabindex="-1"></a> </span>
<span id="cb5-17"><a href="#cb5-17" aria-hidden="true" tabindex="-1"></a> <span class="co"># Calculate what is still in the tank</span></span>
<span id="cb5-18"><a href="#cb5-18" aria-hidden="true" tabindex="-1"></a> M <span class="op">=</span> M <span class="op">-</span><span class="op">*</span> ts <span class="op">|&gt;</span> u<span class="st">&quot;kg&quot;</span></span>
<span id="cb5-19"><a href="#cb5-19" aria-hidden="true" tabindex="-1"></a> P <span class="op">=</span> (M <span class="op">*</span> R <span class="op">*</span> T) <span class="op">/</span> V <span class="op">|&gt;</span> u<span class="st">&quot;Pa&quot;</span></span>
<span id="cb5-20"><a href="#cb5-20" aria-hidden="true" tabindex="-1"></a> t <span class="op">=</span> t <span class="op">+</span> ts</span>
<span id="cb5-21"><a href="#cb5-21" aria-hidden="true" tabindex="-1"></a> </span>
<span id="cb5-22"><a href="#cb5-22" aria-hidden="true" tabindex="-1"></a> df_step <span class="op">=</span> DataFrame(Thrust<span class="op">=</span>Thrust<span class="op">,</span> Pressure<span class="op">=</span>P<span class="op">,</span> <span class="dt">Time</span><span class="op">=</span>t<span class="op">,</span> Mass<span class="op">=</span>M)</span>
<span id="cb5-23"><a href="#cb5-23" aria-hidden="true" tabindex="-1"></a> <span class="cn">append</span><span class="op">!</span>(df<span class="op">,</span> df_step)</span>
<span id="cb5-24"><a href="#cb5-24" aria-hidden="true" tabindex="-1"></a> <span class="kw">end</span></span>
<span id="cb5-25"><a href="#cb5-25" aria-hidden="true" tabindex="-1"></a> df</span>
<span id="cb5-26"><a href="#cb5-26" aria-hidden="true" tabindex="-1"></a><span class="kw">end</span></span></code></pre></div>
</div>
<p>breakdown of the data</p>
<div class="layout-chunk" data-layout="l-body">
"
<table class="\&quot;data-frame\&quot;">
<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>
20.0±2.0 N
</td>
<td>
0.0±0.0 N
</td>
<td>
21.1±4.7 N
</td>
<td>
21.1±4.7 N
</td>
<td>
0
</td>
<td>
Quantity{Measurement{Float64}, 𝐋 𝐌 𝐓^-2, FreeUnits{(N,), 𝐋 𝐌 𝐓^-2, nothing}}
</td>
</tr>
<tr>
<th>
2
</th>
<td>
Pressure
</td>
<td>
2020.0±520.0 psi
</td>
<td>
40.0±160.0 psi
</td>
<td>
2010.0±570.0 psi
</td>
<td>
4200.0±300.0 psi
</td>
<td>
0
</td>
<td>
Quantity{Measurement{Float64}, 𝐌 𝐋^-1 𝐓^-2, FreeUnits{(psi,), 𝐌 𝐋^-1 𝐓^-2, nothing}}
</td>
</tr>
<tr>
<th>
3
</th>
<td>
Time
</td>
<td>
10.1515 s
</td>
<td>
0.0 s
</td>
<td>
10.1515 s
</td>
<td>
20.303 s
</td>
<td>
0
</td>
<td>
Quantity{Float64, 𝐓, FreeUnits{(s,), 𝐓, nothing}}
</td>
</tr>
<tr>
<th>
4
</th>
<td>
Mass
</td>
<td>
0.225±0.066 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>
<p>"</p>
</div>
<p>Heres the results plotted. Notice the massive error once the tank starts running low.</p>
<div class="layout-chunk" data-layout="l-body">
<p><img src="air-propulsion-simulation_files/figure-html5/unnamed-chunk-4-J1.png" width="350" /></p>
<div class="layout-chunk" data-layout="l-body-outset">
<details>
<summary>
Show code
</summary>
<div class="sourceCode" id="cb6"><pre class="sourceCode julia"><code class="sourceCode julia"><span id="cb6-1"><a href="#cb6-1" aria-hidden="true" tabindex="-1"></a></span>
<span id="cb6-2"><a href="#cb6-2" aria-hidden="true" tabindex="-1"></a>thrust_values <span class="op">=</span> df.Thrust .<span class="op">|&gt;</span> ustrip .<span class="op">|&gt;</span> value<span class="op">;</span></span>
<span id="cb6-3"><a href="#cb6-3" aria-hidden="true" tabindex="-1"></a>thrust_uncertainties <span class="op">=</span> df.Thrust .<span class="op">|&gt;</span> ustrip .<span class="op">|&gt;</span> uncertainty<span class="op">;</span></span>
<span id="cb6-4"><a href="#cb6-4" aria-hidden="true" tabindex="-1"></a></span>
<span id="cb6-5"><a href="#cb6-5" aria-hidden="true" tabindex="-1"></a>air <span class="op">=</span> DataFrame(Thrust<span class="op">=</span>thrust_values<span class="op">,</span> Uncertainty<span class="op">=</span>thrust_uncertainties<span class="op">,</span> <span class="dt">Time</span><span class="op">=</span>df.<span class="dt">Time</span> .<span class="op">|&gt;</span> u<span class="st">&quot;s&quot;</span> .<span class="op">|&gt;</span> ustrip)<span class="op">;</span></span>
<span id="cb6-6"><a href="#cb6-6" aria-hidden="true" tabindex="-1"></a></span>
<span id="cb6-7"><a href="#cb6-7" aria-hidden="true" tabindex="-1"></a></span>
<span id="cb6-8"><a href="#cb6-8" aria-hidden="true" tabindex="-1"></a>plot(df.<span class="dt">Time</span> .<span class="op">|&gt;</span> ustrip<span class="op">,</span> thrust_values<span class="op">,</span> </span>
<span id="cb6-9"><a href="#cb6-9" aria-hidden="true" tabindex="-1"></a> title<span class="op">=</span><span class="st">&quot;Thrust Over Time&quot;</span><span class="op">,</span> </span>
<span id="cb6-10"><a href="#cb6-10" aria-hidden="true" tabindex="-1"></a> ribbon<span class="op">=</span>(thrust_uncertainties<span class="op">,</span> thrust_uncertainties)<span class="op">,</span> </span>
<span id="cb6-11"><a href="#cb6-11" aria-hidden="true" tabindex="-1"></a> fillalpha<span class="op">=</span><span class="fl">.2</span><span class="op">,</span>label<span class="op">=</span><span class="st">&quot;Thrust&quot;</span><span class="op">,</span></span>
<span id="cb6-12"><a href="#cb6-12" aria-hidden="true" tabindex="-1"></a> xlabel<span class="op">=</span><span class="st">&quot;Time (s)&quot;</span><span class="op">,</span> </span>
<span id="cb6-13"><a href="#cb6-13" aria-hidden="true" tabindex="-1"></a> ylabel<span class="op">=</span><span class="st">&quot;Thrust (N)&quot;</span><span class="op">,</span></span>
<span id="cb6-14"><a href="#cb6-14" aria-hidden="true" tabindex="-1"></a> size <span class="op">=</span> (<span class="fl">1200</span><span class="op">,</span> <span class="fl">800</span>)<span class="op">,</span></span>
<span id="cb6-15"><a href="#cb6-15" aria-hidden="true" tabindex="-1"></a> )</span></code></pre></div>
</details>
<div class="figure"><span id="fig:unnamed-chunk-7"></span>
<img src="air-propulsion-simulation_files/figure-html5/unnamed-chunk-7-J1.png" alt="Air Proplsion Simulation" width="350" />
<p class="caption">
Figure 1: Air Proplsion Simulation
</p>
</div>
</div>
<p>Here the air prop is plotted along with rocket motors that are being</p>
<div class="layout-chunk" data-layout="l-body-outset">
<details>
<summary>
Show code
</summary>
<div class="sourceCode" id="cb7"><pre class="sourceCode julia"><code class="sourceCode julia"><span id="cb7-1"><a href="#cb7-1" aria-hidden="true" tabindex="-1"></a></span>
<span id="cb7-2"><a href="#cb7-2" aria-hidden="true" tabindex="-1"></a>f10 <span class="op">=</span> CSV.<span class="cn">read</span>(<span class="st">&quot;AeroTech_F10.csv&quot;</span><span class="op">,</span> DataFrame)<span class="op">;</span></span>
<span id="cb7-3"><a href="#cb7-3" aria-hidden="true" tabindex="-1"></a>f15 <span class="op">=</span> CSV.<span class="cn">read</span>(<span class="st">&quot;Estes_F15.csv&quot;</span><span class="op">,</span> DataFrame)<span class="op">;</span></span>
<span id="cb7-4"><a href="#cb7-4" aria-hidden="true" tabindex="-1"></a>g8 <span class="op">=</span> CSV.<span class="cn">read</span>(<span class="st">&quot;AeroTech_G8ST.csv&quot;</span><span class="op">,</span> DataFrame)<span class="op">;</span></span>
<span id="cb7-5"><a href="#cb7-5" aria-hidden="true" tabindex="-1"></a></span>
<span id="cb7-6"><a href="#cb7-6" aria-hidden="true" tabindex="-1"></a></span>
<span id="cb7-7"><a href="#cb7-7" aria-hidden="true" tabindex="-1"></a>plot(air.<span class="dt">Time</span><span class="op">,</span> air.Thrust<span class="op">,</span> label<span class="op">=</span><span class="st">&quot;Air Propulsion&quot;</span><span class="op">,</span> fillalpha<span class="op">=</span><span class="fl">.1</span><span class="op">,</span> legend<span class="op">=:</span>topleft<span class="op">,</span> size <span class="op">=</span> (<span class="fl">1200</span><span class="op">,</span> <span class="fl">800</span>))<span class="op">;</span></span>
<span id="cb7-8"><a href="#cb7-8" aria-hidden="true" tabindex="-1"></a></span>
<span id="cb7-9"><a href="#cb7-9" aria-hidden="true" tabindex="-1"></a><span class="kw">for</span> (d<span class="op">,</span> l) <span class="kw">in</span> [(f10<span class="op">,</span> <span class="st">&quot;F10&quot;</span>)<span class="op">,</span> (f15<span class="op">,</span> <span class="st">&quot;F15&quot;</span>)<span class="op">,</span> (g8<span class="op">,</span> <span class="st">&quot;G8ST&quot;</span>)]</span>
<span id="cb7-10"><a href="#cb7-10" aria-hidden="true" tabindex="-1"></a> plot<span class="op">!</span>(d[<span class="op">!,</span><span class="st">&quot;Time (s)&quot;</span>]<span class="op">,</span> d[<span class="op">!,</span> <span class="st">&quot;Thrust (N)&quot;</span>]<span class="op">,</span> label<span class="op">=</span>l)<span class="op">;</span></span>
<span id="cb7-11"><a href="#cb7-11" aria-hidden="true" tabindex="-1"></a><span class="kw">end</span></span>
<span id="cb7-12"><a href="#cb7-12" aria-hidden="true" tabindex="-1"></a></span>
<span id="cb7-13"><a href="#cb7-13" aria-hidden="true" tabindex="-1"></a>title<span class="op">!</span>(<span class="st">&quot;Propulsion Comparison&quot;</span>)<span class="op">;</span></span>
<span id="cb7-14"><a href="#cb7-14" aria-hidden="true" tabindex="-1"></a>xlabel<span class="op">!</span>(<span class="st">&quot;Time (s)&quot;</span>)<span class="op">;</span></span>
<span id="cb7-15"><a href="#cb7-15" aria-hidden="true" tabindex="-1"></a>ylabel<span class="op">!</span>(<span class="st">&quot;Thrust (N)&quot;</span>)</span></code></pre></div>
</details>
<div class="figure"><span id="fig:unnamed-chunk-8"></span>
<img src="air-propulsion-simulation_files/figure-html5/unnamed-chunk-8-J1.png" alt="Rocket Motor Data: [@thrustcurve]" width="350" />
<p class="caption">
Figure 2: Rocket Motor Data: <span class="citation" data-cites="thrustcurve">(<a href="#ref-thrustcurve" role="doc-biblioref">Coker, n.d.</a>)</span>
</p>
</div>
</div>
<p>Big conclusion about things.</p>
<div class="sourceCode" id="cb4"><pre class="sourceCode r distill-force-highlighting-css"><code class="sourceCode r"></code></pre></div>
<div class="sourceCode" id="cb8"><pre class="sourceCode r distill-force-highlighting-css"><code class="sourceCode r"></code></pre></div>
<div id="refs" class="references csl-bib-body hanging-indent" role="doc-bibliography">
<div id="ref-thrustcurve" class="csl-entry" role="doc-biblioentry">
Coker, John. n.d. <span>“Rocket <span>Motor</span> <span>Data</span>.”</span> <a href="https://www.thrustcurve.org/">https://www.thrustcurve.org/</a>.
</div>
<div id="ref-curtis_orbital" class="csl-entry" role="doc-biblioentry">
Curtis, Howard D. 2020. <em>Orbital Mechanics for Engineering Students</em>. Fourth edition. Butterworth-Heinemann Publications.
</div>
<div id="ref-cengel_thermodynamics" class="csl-entry" role="doc-biblioentry">
Çengel, Yunus A., and Michael A. Boles. 2015. <em>Thermodynamics: An Engineering Approach</em>. Eighth edition. New York: McGraw-Hill Education.
</div>
<div id="ref-sutton_rocket_2001" class="csl-entry" role="doc-biblioentry">
Sutton, George P., and Oscar Biblarz. 2001. <em>Rocket Propulsion Elements</em>. 7th ed. New York: John Wiley &amp; Sons.
</div>
</div>
<!--radix_placeholder_article_footer-->
<!--/radix_placeholder_article_footer-->

File diff suppressed because one or more lines are too long