ASEN2012 Project 2 Bottle Rocket solved

$24.99

Original Work ?
Category: You will Instantly receive a download link for .ZIP solution file upon Payment

Description

5/5 - (4 votes)

For this project, students were asked to write a MATLAB script employing ODE45 that usesagivensetofformulastopredictthetrajectoryofabottlerocket. Thisscriptwasrequired to output both a plot of the rocket’s trajectory as well as a plot of the rocket’s thrust profile. Students were then asked to verify their code using a given verification case, as well as study the effects of 4 different parameters: the initial pressure of air, the initial volume fraction of water, the drag coefficient, and the launch parameter on the maximum height and distance achievedbythebottlerocket. Finally,studentswereaskedtopickasetofthesefourparameters suchthatthebottlerocketwouldachieveamaximumdistanceof75meters,withanerrorof1 meter. Subsequently,IwroteaMATLABscriptandasetofcorrespondingfunctionstomodel the trajectory of the rocket, and was able to successfully match the verification. Regarding thefourparameters,Ifoundthatincreasingtheinitialpressure,decreasingtheinitialvolume of water inside the bottle, and decreasing the coefficient of drag from the initial conditions providedintheverificationwillincreasetherocket’smaximumheightanddistance. However, decreasing the initial pressure of air inside the bottle, increasing the initial volume of water insidethebottleandincreasingthecoefficientofdragfromthegiveninitialconditionsinthe verification document will decrease the rocket’s maximum height and distance. As a caveat to the above statement, I found that decreasing the initial volume of water in the rocket only increased its maximum distance up to a certain point, after which it actually decreased the maximumdistance. Regardingthelaunchangle,Idiscoveredthatthegivenangleof45degrees was already optimal, and either increasing or decreasing the angle will lead to a suboptimal maximum height despite being capable of increasing the maximum distance. Finally, the set ofparametersIdiscoveredwouldallowmetoobtainamaximumdistanceof75meterswasan initialairpressureof450kPa, alaunchangleof45degrees, acoefficientofdragof0.45, and aninitialvolumeofwaterof0.00063cubicmeters.
I.Nomenclature
mR = massofrocket a = accelerationoftherocket,withavectorcomponentinthexandzdirection F = thrust,withavectorcomponentinthexandzdirection D = drag,withavectorcomponentinthexandzdirection g = gravitationalacceleration,wherethexcomponentis0 m/s2 andthezcomponentis-9.81m/s2 V = velocityoftherocket,withavectorcomponentinthexandzdirection H = theheadingoftherocketataninstantintime. D = thedragforceactingontherocket CD = dragcoefficientoftherocket AB = cross-sectionalareaofthebottle P = pressureofairinsidethebottle q = dynamicpressureofairinsidethebottle cd = dischargecoefficient ρw = densityofwater Piair = initialpressureofairinsidethebottle viair = initialvolumeofairinsidethebottle Tiair = initialtemperatureofairinsidethebottle At = areaofcrosssectionatthroatofthebottle
∗UndergraduateStudent,AerospaceEngineering
Û mR = rateofchangeofthemassoftherocket mB = massoftheemptybottle P? = criticalpressureofairinsidethebottle Ve = velocityofairexitingthebottle Te = temperatureofairexitingthebottle vB = totalvolumeofbottle ρe = densityofairexitingthebottle Me = machnumberofairexitingthebottle Pa = ambientpressureofairoutsidethebottle T = temperatureofairinsidethebottle ρ = densityofairinsidethebottle γ = ratioofspecificheats R = gasconstantforair Ûmair = rateofchangeoftheairinsidethebottle Pend = pressureofairinsidethebottleattheendofphase1 Tend = temperatureofairinsidethebottleattheendofphase1 ρa = ambientdensityofairoutsidethebottle P0 = initialtotalpressureofairoutsidethebottle v0 = initialvolumeofairinsidethebottle miair = initialmassofairinsidethebottle miR = initialmassofrocket dv/dt = rateofchangeofvolumeofairinsidetherocketwithtime
II.Introduction ÕForces = mR ∗”ax az#= mR Û V = F−D + g (1) h = v |v| , vxq v2 x + v2 z , vzq v2 x + v2 z (2) D = qCDAB = ρa 2 V2CDAB (3)
miair =
Piairviair RTiair
(4)
dv dt = cdAtVe = cdAts2(P−Pa) ρw
= cdAts2 ρw[P0(
vγ 0 vγ)−Pa] (5)
P Piair
= (
viair v )γ (6) F = ÛmVe =s2cd(P−Pa) ρw (7)
Û mR = −Û m = −ρwcdAtVe = −cdAtp2ρw(P−Pa) (8) miR + R = mB + miair + miwater = mB + ρw(vB −viair)+( Piair RTiair)viair (9)
Pend = Piair
viair vB γ
;Tend = Tiair
viair vB
γ−1
(10)
2
P Pend =
mair miair
γ (11)
ρ =
mair vB
;T = P ρR
(12)
P? = P
2 γ +1
γ/(γ−1) (13)
Te =
2 γ +1T;ρe = Pe RTe
;Pe = P?;Ve =pγRTe (14) Ve = MepγRTe (15)
P Pa = 1+(γ−1 2 M2 e)γ/(γ−1); T Te = 1+ γ−1 2 M2 e;ρe = Pa RTe
(16)
F = Û mairVe +(Pe −Pa)At (17) Ûmair = cdρeAtVe; Û mR = − Û mair = −cdρeAtVe (18) This project is meant to serve a preview to the the Bottle Rocket Lab that students will complete in ASEN 2004. Studentswillwritethe2DcodethatanalyzesthetrajectoryoftherocketinASEN2012andtheninASEN2004the codewrittenforthisprojectwillbeadaptedto3Dandadditionalfactorswillbeconsidered. Inbothcases,thegoalis same: thebottlerocketmustbelaunchedfromtheteststandwiththegivensetofinitialconditionsandtouchtheground atdistanceof75mfromtheteststand. However,beforegoinganyfurther,itimportantintroducewhata“bottlerocket”is. Abottlerocketisasimplerocket typicallymadeoutofanempty2-litersodabottle. Thebottleisfilledwithwaterandpressurized,beforebeingreleased. Thewaterandlaterairthatisexpelledoutoftheendofthebottlerocketproducesthrustanddrivestherocketthrough theair. The trajectory of the bottle rocket can be modeled using Newton’s 2nd Law of motion in two dimensions, the horizontal(xdirection)andthevertical(zdirection)usingequation1. Noteherethatthenetforcedependsonthethrust producedbytherocket,thedragactingontherocket,andinthecaseofthezdirection,theaccelerationduetogravity. IfIcanfindwhateachoftheseforcecomponentsare,thenIcanuseODE45tosolvefortheacceleration,velocity,and positionatanygiventimeintherocket’sflight. Infact,thisisexactlywhathappens. Drag and thrust vary depending on the direction, or “heading” of the rocket’s flight. This heading can be found usingtheequation2. Thedragforceactingontherocketcanbecalculatedusingequation3atanytimeduringitsflight. Thedragcoefficienttypicallyvariesfrom0.3to0.5dependingontheaerodynamicspropertiesofthebottle. Equation4isusedtocalculatetheinitialmassofairinsidethebottle,whereR=287J/kgK. Therocketflightcanbeseparatedinto3distinctphases. Inthefirstphase,waterisbeingexpelledoutoftheendof thebottlerocket,producingthrust. Duringthisphase,equation5canbenumericallyintegratedbyODE45tofindthe volume of air inside the bottle at any time during phase 1. With these volume values, we can then calculate the air pressureinsidetherocketusingequation6,wherethespecificheatratiogammaisequalto1.4. Then,equation7canbe usedtocalculatethethrustproducedbytherocketatanytimeduringphase1. Inaddition,equation8canbeusedto calculatetherateofchangeofthemassoftherocketduringphase1. Equation9canbeusedtocalculatetheinitialmass oftherocket. TheseformulaswillproveveryusefullateronforusewithODE45. Inthesecondphaseoftheflight,allofthewaterhasbeenexpelledfromrocketthroat. Instead,thepressurizedair insidethebottleisbeingexpelledtoproducethrust. Inthatcase, tofindthethrustproducedbytherocket,wemust first calculate the pressure and temperature of the air inside the rocket at the end of phase 1 using the two formulas inequation10. Wecanthenuseequation11tocalculatethepressureofthebottlerocketatanytimeduringphase2, andequation12tocalculatethedensityandtemperature. Animportantnotetomakehereisthatthe2ndthrustphase canactuallybefurthersubdividedinto2phases: onewithchokedflow,andonewithoutchokedflow. Todetermine whetherornottherocket’sflowischoked,useequation13tocalculatethecriticalpressureatanyaltitude. Ifthecritical pressureisgreaterthantheambientpressure,thentheflowischokedandthethreeformulasinequation14canbeused
3
tocalculatetheexitvelocity. Ifthecriticalpressureislessthantheatmosphericpressure,thentheflowisnotchoked, theexitpressureisequaltotheambientpressure,andtheexitvelocitycanbecalculatedusingequation15,wherethe exitMachnumberandtemperaturecanbecalculatedusingtheformulasinequation16. Then,thethrustproducedby therocketcanbecalculatedusingequation17. Thetwoformulasinequation18canbeusedtofindboththerateof changeofthemassofairintherocketandtherateofchangeofthemassoftherocket,whichareidentical. Finally,inthethirdphaseofflight,dubbedthe“ballisticphase”,therocketisnolongerproducingthrustandactsas aprojectileflyingthroughtheair. Asexpected,here,thethrustiszero,asaretheratesofchangeofthemassofthe rocketandofthebottle.
III.Methodology Tocompletetheobjective,onescript: “main”,andtwofunctions: “rocket”and“ThrustVec”werecreated. “Main’s”overallpurposeistocalltheODE45functionusingthe“rocketfunction”andagiventimeintervaland initialconditionsasinput. Itrunsthe“ThrustVec”functiontoproduceaseparatevectorofthrustvaluesseparatefrom ODE45. Finally,itusestheoutputsofODE45andthe“ThrustVec”functiontoplotthetrajectoryandthrustprofileof therocket. The“rocket”function’sjobistodeterminethephaseoftherocketatatanygiventimeandtousealloftheequations defined in the introduction to determine a set of 5 differential values for: the x and z position, the x and z velocity, the volume of air in the bottle, the mass of air inside the bottle, and the mass of the rocket, and then outputs these differentialstoODE45in“main”. ODE45thennumericallyintegratesthesedifferentialstocalculatethetrajectoryof therocket,amongotherthings. The“ThrustVec”function’sjobistodeterminethephaseoftherocketandcalculatethethrustoftherocketgivena valueforthemassofairintherocketandvolumeofairinsidetherocket. Itthenoutputsthethrustvalueto“main”for explicituseforplotting. Thealgorithmsforeachofthefunctionsisdefinedbelow.
“Main”scriptalgorithm 1) Defineglobalvariables,usinginitialconditionsdeterminedbytheuser. Thisincludescalculationsfortheinitial massoftherocket,theinitialmassofairinsidetherocket,andthepressureandtemperatureoftheairinsidethe bottleatthetimeallofthewaterisexpelled. 2) Buildinitialconditionsvector. Shouldhavevaluesfortheinitialxposition, zposition, xvelocity, zvelocity, volumeofairinthebottle,massofairinthebottle,andmassoftherocket. 3) CallODE45usingthe“rocket”function,whichcontainscalculationsfortheratesofeachofthe5parameters includedintheinitialconditionsvector. Setthetimeintervalfrom0secondsto5seconds,andmakesureto supplyODE45withtheinitialconditionsvectorbuiltearlier. 4) Parsetheoutputvectorforeaseofgraphing. Forexample,allofthedistancesandheightscalculatedbyODE45 shouldbestoredindependentlyfromoneanotherintheirownseparatevectors. 5) Call the “ThrustVec” function to produce a set of thrust values for plotting purposes. Its internals will look almostidenticaltothe“rocket”function,missingonlythecalculationforeachoftherates. Thisisdonedueto problemsthatarisewhentryingtoabuildavectorofthrustswithintheODE45function. 6) FindthemaximumdistanceusingthedistancevaluesoutputtedbyODE45. 7) FindthemaximumheightusingtheheightvaluesoutputtedbyODE45. 8) Plottheheightoftherocketvs. itsdistanceusingthevaluesoutputtedbyODE45. Makesureitisformatted properly. 9) Plot the thrust of the rocket vs. time using the values outputted by ODE45. Make sure that it is formatted properly.
“Rocket”functionalgorithm 1) Retrieveallnecessaryglobalvariablesfrommain. Thereisnoneedtoredefinethem. 2) Determinetheheadingoftherocket. Therearetwodifferentcalculationsforheadingoftherocketdependingon whethertherocketisontheteststand. 3) Calculatethepressureofairinsidetherocketassumingtherocketisineitherthe2ndthruststage2ortheballistic phase. Thispressurewillbecomparedtotheatmosphericpressuretodeterminewhethertherocketisinthe2nd thrustphaseorintheballisticphase. Toperformthiscalculation,useequation11intheprojectdescription.
4
4) Determineiftherocketisinthrustphase1bycheckingifvolumeofairintherocketislessthanthevolumeof therocket. Thrustphase1isdefinedbywaterbeingexpelledfromtheendofthebottlerocketasthrust. Itends whenthereisnomorewaterleftinsidethebottle,andthustheairinsidetherockettakesuptherocket’sentire volume. Iftherocketisinphase1: 1) Useequation5tocalculatethechangeinthevolumeofairintherocketwithtime. 2) Setthechangeinmassofairintherocketas0. Thisisbecauseduringthe1stthrustphase,onlywateris beingexpelledouttheend. 3) Calculatethepressureofairinsidetherocketusingequation6. 4) Usethiscalculatedpressurevalueinconjunctionwithequation8tocalculatetherateofchangeofthe massofrocketinthebottlewithtime. 5) Useequation7tocalculatethethrustoftherocketinphase1. 5) Determineiftherocketinphase2. Iftherocketisinphase2,thennotonlymustthevolumeofairintherocket equalthevolumeoftherocket,butthepressureofairinsidethebottlemustalsobegreaterthanatmospheric pressure. Thispressuredifferentialiswhatcausesairtobeexpelledoutoftheendoftherocketinphase2. Ifthe rocketisinphase2: 1) Setthechangeofvolumeofairwithtimeas0. Thisisbecauseinphase2,thereisonlyairleftinside the bottle. The volume of this air does not change throughout the duration of flight, only its pressure. Otherwiseavacuumwouldbecreated. 2) Findthedensityofairinsidethebottleusingequation12a. 3) Findthetemperatureofairinsidethebottleusingequation12b. 4) Findthecriticalpressureofairinsidethebottleusingequation13. 5) Determineiftheflowischokedbycomparingthecriticalpressuretotheambientpressure. Ifthecritical pressureisthelargerofthetwo,thentheflowischoked: 1) Settheexitpressureequaltothecriticalpressure 2) Findtheexittemperatureusingequation14a. 3) Findtheexitdensityusingequation14b. 4) Usethesevaluestocalculatetheexitvelocityusingequation14c. 6) Otherwisetheflowischoked: 1) Settheexitpressureequaltotheambientpressure. 2) FindtheexitMachnumberusingequation16a. 3) Findtheexittemperatureusingequation16b. 4) Findtheexitdensityusingequation16c. 5) Findtheexitvelocityusingequation15. 7) Findtherateofchangeofthemassofairintherocketusingequation18. 8) Findthethrustofthebottlerocketusingequation17. 9) Change the sign of the rate of change of mass of air in the rocket so that it is negative. It is initially positiveastopreventthecalculationofanegativethrust. However,fromintuition,weknowthattherate ofchangeofmassofairintherocketshouldbenegativebecausethemassofairinthebottleisdecreasing asitsbeingjettisonedouttheendasthrust. Hencethesignchange. 10) Settherateofchangeofthemassoftherocketequaltotherateofchangeofthemassofairinsidethe rocket. Sinceatthispointtheonlythingchangingabouttherocketistheamountairinsideofit,itmakes sensethatifthemassofairintherocketisdecreasing,themassoftherocketisdecreasingbyanidentical amount. 6) Iftherocketisneitherinphase1norphase2,thenitmustbeinphase3,theballisticphase. 1) Settherateofchangeofthevolumeofairinsidetherocketaszero. Thisisbecauseoncethewaterhas beenexpelled,thevolumeofairinsidethebottlerocketwillnotchange. Settherateofchangeofthe massofairinsidetherocketaszero. Intheballisticphaseairisnolongerbeingexpelledfromtherocket. 2) Settherateofchangeofthemassoftherockettozero. Ifneitherairnorwaterisbeingexpelledfromthe rocket,itsmasswillnotchange. 3) Setthethrustequaltozero. Intheballisticphase,nothrustisbeingproduced. Hencethename. 7) Calculatethedragforceactingontherocketusingequation3. 8) Settherateofchangeofthedistancexequaltothecurrentcomponentofvelocityinthexdirection. 9) Settherateofchangeoftheheightzequaltothecurrentcomponentofvelocityinthezdirection. 10) Usethecalculatedthrust,drag,heading,andmassofairintherockettocalculatethexcomponentofacceleration
5
usingequation1. 11) Use the calculated thrust, drag, heading, and mass of air inside the rocket to calculate the z component of accelerationusingequation1. 12) TransposetheoutputvectorasrequiredbyODE45.
“ThrustVec”Algorithm 1) Retrieveallnecessaryglobalvariablesfrommain. Thereisnoneedtoredefinethem. 2) Calculatethepressureofairinsidetherocketassumingtherocketisineitherthe2ndthruststageortheballistic phase. Thispressurewillbecomparedtotheatmosphericpressuretodeterminewhethertherocketisinthe2nd thrustphaseorintheballisticphase. Toperformthiscalculation,useequation11intheprojectdescription. 3) Determineiftherocketisinthrustphase1bycheckingifvolumeofairintherocketislessthanthevolumeof therocket. Thrustphase1isdefinedbywaterbeingexpelledfromtheendofthebottlerocketasthrust. Itends whenthereisnomorewaterleftinsidethebottle,andthustheairinsidetherockettakesuptherocket’sentire volume. Iftherocketisinphase1: 1) Calculatethepressureofairinsidetherocketusingequation6. 2) Useequation7tocalculatethethrustoftherocketinphase1. 4) Determineiftherocketinphase2. Iftherocketisinphase2,thennotonlymustthevolumeofairintherocket equalthevolumeoftherocket,butthepressureofairinsidethebottlemustalsobegreaterthanatmospheric pressure. Thispressuredifferentialiswhatcausesairtobeexpelledoutoftheendoftherocketinphase2. Ifthe rocketisinphase2: 1) Findthedensityofairinsidethebottleusingequation12a. 2) Findthetemperatureofairinsidethebottleusingequation12b. 3) Findthecriticalpressureofairinsidethebottleusingequation13. 4) Determineiftheflowischokedbycomparingthecriticalpressuretotheambientpressure. 5) Ifthecriticalpressureisthelargerofthetwo,thentheflowischoked: 1) Settheexitpressureequaltothecriticalpressure 2) Findtheexittemperatureusingequation14a. 3) Findtheexitdensityusingequation14b. 4) Usethesevaluestocalculatetheexitvelocityusingequation14c. 6) Otherwisetheflowischoked: 1) Settheexitpressureequaltotheambientpressure 2) FindtheexitMachnumberusingequation16a. 3) Findtheexittemperatureusingequation16b. 4) Findtheexitdensityusingequation16c. 5) Findtheexitvelocityusingequation15a. 7) Usethevaluescalculatedabovetofindthethrustofthebottlerocketusingequation17. 5) Iftherocketisneitherinphase1norphase2,thenitmustbeinphase3,theballisticphase. 1) Setthethrustequaltozero. Intheballisticphase,nothrustisbeingproduced. Hencethename. 6) Outputthecalculatedthrustvalue.
IV.Results Table1listsandcomparesthemaximumdistanceandmaximumheightachievedbytheverificationcasevs. the actualcase. Table 2 lists and compares the 4 dependence parameters: initial pressure of air, initial volume fraction, drag coefficient,andlaunchangledefinedbytheverificationcasevs. theactualcase. Table3,4,5,and6showhowthethemaximumheightanddistanceobtainedbytherocketvariesinregardstothe4 dependenceparameters,determinedbyindependentlyvaryingeachwithallotherparametersheldconstant. Figure 1 and 2 show a plot of the trajectory of the bottle rocket and its thrust profile using the initial conditions providedintheverificationdocument. Inthethrustprofile,thetransitionbetweenphase1andphase2isindicatedbya redasterisk. Thetransitionbetweenphase2andphase3isindicatedbyagreenasterisk. Figure 3 and 4 show a plot of the trajectory of the bottle rocket and its thrust profile using the chosen initial dependenceparametersstatedabove. Inthethrustprofile,thetransitionbetweenphase1andphase2isindicatedbya redasterisk. Thetransitionbetweenphase2andphase3isindicatedbyagreenasterisk.
6
VerificationCase ActualCase MaximumDistance(m) 60.0652 75.0089 MaximumHeight(m) 17.2912 24.7148 Table1 Tablecomparingmaximumdistanceandheightforverificationcasevs. actualcase
VerificationCase ActualCase InitialPressureofAir(Pa) 428160 449660 InitialVolumeFraction(cubicmeters) 0.001 0.00063 DragCoefficient 0.5 0.45 LaunchAngle(degrees) 45 45 Table2 Tablecomparingthe4dependenceparametersbetweentheverificationcaseandtheactualcase
TestNumber InitialPressureofAir(Pa) MaximumDistance(m) MaximumHeight(m) BaseCase 428160 60.0652 17.2912 1 438160 61.0419 17.9070 2 418160 58.2294 16.6242 3 449660 63.1078 18.6443 Table 3 Table showing the effect varying the initial air pressure in the bottle rocket has on its maximum distanceandheight.
TestNumber InitialVolumeFraction(cubicmeters) MaximumDistance(m) MaximumHeight(m) BaseCase 0.001 60.0652 17.2912 1 0.0012 47.0676 11.4874 2 0.0005 67.6990 22.9345 3 0.00063 68.7100 22.4108 Table 4 Table showing the effect varying the initial volume fraction in the bottle rocket has on its maximum distanceandheight.
TestNumber DragCoefficient MaximumDistance(m) MaximumHeight(m) BaseCase 0.5 60.0652 17.2912 1 0.7 51.1383 15.6022 2 0.2 84.3699 21.0816 3 0.45 63.5564 17.8033 Table5 Tableshowingtheeffectvaryingthecoefficientofdragofthebottlerockethasonitsmaximumdistance andheight.
TestNumber LaunchAngle MaximumDistance(m) MaximumHeight(m) BaseCase 45 60.0652 17.2912 1 90 7.4493E-15 36.8884 2 30 54.7285 8.1101 3 20 39.8513 3.1604 Table6 Tableshowingtheeffectthelaunchanglehasonthemaximumdistanceandheightofthebottlerocket.
7
Fig.1 Plotofbottlerockettrajectoryforverificationcase.
Fig.2 Plotofbottlerocketthrustprofileforverificationcase.
Fig.3 Plotofbottlerockettrajectoryforactualcase.
8
Fig.4 Plotofbottlerocketthrustprofileforactualcase.
V.Discussion Afterinvestigatingthe4designparameters: theinitialpressureofair,theinitialvolumefraction,thedragcoefficient, andthelaunchangle, andhowvaryingeachwillaffectthemaximumdistanceandmaximumheighttraveledbythe rocket,thefollowingobservationsweremade:
Effectofinitialpressureofairinsidethebottle: • Asshownbytable3,increasingtheinitialpressure(byalargemagnitude,say10000Pa)insidethebottlewill increaseboththemaximumdistanceandthemaximumheight. Notethatalargepressuredifferenceisrequiredto seeanyeffectoneithertheheightorthedistance. Thismakessenseintuitively. Forexample,ifIfillupaballoon withasmnuchairasIcan,andthenreleaseit,itwillflymuchfartherthanadeflatedballoon,whichmightnotfly atall. Inotherwords,theinitialpressureofairinsidethebottledeterminesits”thrustproductionpotential”inthe 2ndphase. • Againshownbytable3,decreasingtheinitialpressure(byalargemagnitude,say10000Pa)insidethebottlewill decreaseboththemaximumdistanceandthemaximumheight. Notethatalargepressuredifferenceisrequiredto seeanysignificanteffectoneithertheheightorthedistance. Thismakessenseforthesamereasonlistedabove.
Effectofinitialvolumeofwaterinsidethebottle: • As shown by table 4, increasing the initial volume of water inside the bottle will decrease both the maximum distance and maximum height. Even a small change in the initial volume can have a significant effect on the trajectoryoftherocket. IalsonoticethatasIincreasethevolumeofwaterinsidethebottle,thefirstthrustphase (waterexpulsion)becomes“longer”andthe2ndthrustphase(airexpulsion)becomes“shorter”untiliteventually becomesnonexistent. Atthatpointthecodestopsfunctioningaswell. Thisshouldmakesense. Waterisheavy, andsincetheinitialpressureofairinsidethebottleisbeingheldconstant,theincreaseinthemassoftherocket duetogravitywillbeamuchgreaterinfluencetotherocket’strajectorythananyadditionalthrustitcouldhave provided. • Againshownbytable4,decreasingtheinitialvolumeofwaterinsidethebottlewillincreaseboththemaximum distanceandmaximumheightuptoacertainpoint. Inmytesting,Ifoundthatthemaximumdistanceandheight increaseastheinitialvolumeofwaterinsidethebottledecreases,reachingpeakgainsataround0.00063cubic meters. Pastthispoint,decreasingtheinitialvolumeofwaterinsidethebottlewillactuallydecreasethemaximum distanceandheightreachedbytherocketfromthepreviouslyestablishedpeak. IalsonoticethatasIdecreasethe volumeofwaterinsidethebottle,thefirstthrustphase(waterexpulsion)becomes“shorter”andthe2ndthrust phase (air expulsion) becomes “longer” until it eventually becomes nonexistent. At that point the code stops functioningaswell. Thismakessensebecausetheremustbesomeidealcombinationofwaterandairinsidethe bottlerockettoachievemaximumdistance. Isaythisbecauseotherwise,itwouldbemuchmorecommontosee bottlerocketswithonlyairoronlywater. Conceptually,wemustconsiderthatwithregardstobothairandwater,
9
increasingtheinitialamountofeithersubstanceinthebottlemayincreasethethrustproducedbytherocketbut willalsoincreaseitsweight. Itisabalancingact.
Effectofdragcoefficient: • Asshownbytable5,increasingthecoefficientofdragwilldecreaseboththemaximumdistanceandthemaximum heightoftherocket. Thismakessenseintuitivelybecausethecoefficientdagisproportionaltothemagnitudeof dragactingonanobject. Thegreaterthecoefficientofdrag,themoredragwillbeexperiencedbytheobject. If therocketissubjecttogreaterdragforces,theeffectivenessofitsthrust,andthusitsperformancewillbeseverely hindered. • Again shown by table 5, decreasing the coefficient of drag will increase both the maximum distance and the maximumheightoftherocket. Thisalsomakessenseintuitivelyforthereasonsdiscussedabove.
Effectoflaunchangle: • Asshownbytable6,increasingthelaunchanglewillincreasethemaximumheightanddecreasethemaximum distance. Thisshouldmakesenseintuitivelytoanyonewhohaseverthrownaball. Whenthelaunchangleishigh, allofthenetforceproducedbythethrustisbeingusedtoincreasethevelocitycomponentoftherocketinthez direction. Asaresult,itwillflyhigher,butcannotgofar. • Againshownbytable6,decreasingthelaunchanglewilldecreasethemaximumheightanddecreasethemaximum distance. This time, when the launch angle is low, all of the net force produced by the thrust is being used to increasethevelocitycomponentoftherocketinthexdirection. However,becausetherocketisflyingsolowto theground,andbecauseofthepresenceofgravityacceleratingtherocketinthe-zdirection,therocketcannotgo veryfarbeforehittingtheground. • Also, harking back to Physics class, we should know that the optimum angle for launching a projectile is 45 degreesasitoptimizesthetrajectoryoftherocketfordistance.
Giventheseobservations,Iexperimentedheavilytofindacombinationofthese4parametersthatwouldallowthe rocket to fly a distance of exactly 75 meters, as evident by tables 3-6 as well as the comments inside the MATLAB scriptsIwrote. Intheend, asshownintable2andtable1, Ifoundthefollowingsuccessfulcombination: aninitial airpressureof450kPa,alaunchangleof45degrees,acoefficientofdragof0.45,andaninitialvolumeofwaterof 0.00063cubicmeters,whichgivetherocketamaximumheightof24.7148metersandamaximumdistanceof75.0089 meters,whichiswellwithinthe1merrorboundsprescribedbythelabdocument.
Finally,itisperhapsusefultodiscusstheshapeoftheplotsforboththeverificationcaseandthetestcase. Ingeneral, weseefromfigures1and3thatthetrajectoryofthebottlerocketfollowsaroughlyparabolicshape. Thismakessense asthebottlerocketisessentiallyaglorifiedprojectilecapableofproducingalittleadditionalthrustatthebeginningof launch. Figures 2 and 4 show that the thrust profile matches what we’d expect based on the theory discussed in the introduction. Notethatinwhencomparingfigure4tofigure2,weseethatfigure4hasamuchshorterphase1anda longer phase 2. This harks back to the previous paragraphs talking about the effect of the initial volume fraction of wateronthetrajectoryoftherocket.
VI.Conclusion IwasabletosuccessfullywriteaMATLABprogramtomodelthetrajectoryofabottlerocket,givenmycodepassed the verification test. However, more importantly, I was able to carefully study each of the 4 main flight parameters: the initial pressure of air, the initial volume fraction of water, the drag coefficient, and the launch parameter on the maximumheightanddistanceachievedbythebottlerocket,anddeducetheireffectonthemaximumdistanceandheight achievedbytherocket. Morespecifically,distanceandheighthaveadirectrelationshipwithinitialpressure,andan inverserelationshipwiththeinitialvolumeofwaterinsidethebottleandthecoefficientofdrag. Again,itmustbenoted thatdecreasingtheinitialvolumeofwaterintherocketonlyimproveditsdistanceuptoacertainpoint,afterwhichit actuallydecreasesthedistance. Regardingthelaunchangle,Idiscoveredthatthegivenangleof45degreeswasalready optimal,andeitherincreasingordecreasingtheanglewillleadtoasuboptimalmaximumheightdespitebeingcapable ofincreasingthemaximumdistance. Finally,thesetofparametersIdiscoveredwouldallowmetoobtainamaximum distanceof75meterswasaninitialairpressureof450kPa,alaunchangleof45degrees,acoefficientofdragof0.45, andaninitialvolumeofwaterof0.00063cubicmeters.
10
References Jackson,J.,“ASEN2012-Project2-BottleRocketDesign-2017NEWFORMULATION,”Fall2017. Jackson,J.,“VerificationCaseForProject2,”Fall2017.
Appendix ExplicitUseofEngineeringMethodforAlgorithmDevelopment(General) • Problem: TopreparestudentsfortheBottleRocketDesignandPerformanceAnalysisLabinASEN2004andto helpthemunderstandhowtheperformanceofthebottlerocketdependsondifferent“designparameters”. • Knowns: Therearethreephasesofflight. Asetofgivenequationstohelpmecalculatetheflighttrajectoryofthe bottlerocketineachofthethreephases. Theinitialvelocityoftherocketis0m/s. Theteststandis0.5meters in length. The initial height of the rocket is 0.25 m. There are four parameters that affect the performance of the bottle rocket: the initial pressure of air inside the bottle, the initial volume of water in the bottle, the drag coefficient,andthelaunchangle. • Find: Theflightparametersthatwillallowthebottlerockettolandwithin1meterofa75-metermarker. Ialso needtoincludeaplotofthetrajectoryandaplotofmythrustprofilewithtimeovertheflight,andmarkerson the plot to indicate where the transition between the three phases of flight occur. I also must investigate the 4 designparameterstodeterminehowvaryingeachwillaffecttherangeandheightoftherocket. Ialsowillneedto writeareporttodocumentmyfindings. Finally,Iamrequiredtoverifymycodebymatchingittoaprovided “verificationcase”. • Assumptions: ODE45canbeusedtomodelthetrajectoryoftherocket. • Sketch: (SeeFigure1)
Fig.5 Sketch : FreeBodyDiagramofBottleRocket
• Fundamentals: Theprojectdescriptioncontains27differentequationstotobeusedtomodelthetrajectoryof therocketateachofthe3phasesofflight. However,all27equationsresolvearoundonefundamentalconcept: Newton’s 2nd Law. Newton’s 2nd Law says that F = ma. In our case, the acceleration has both an x and z component,andthenetforceisdependentonthreevalues: thethrustproducedbytherocket,thedragactingon therocket,andtheforceduetogravityinthezdirection. Inotherwords,F=ma=F-D+g. • Alternatives: Whilewewerenotexplicitlyprovidedanalternative,Isupposeitispossibletotrytoformulatea singleequationforthetrajectoryoftherocketbasedonexperimentationalone. Theprocessusedinthatcasewill beidenticaltodimensionalanalysismethodshowninclass. • Steps: 1) Usethegivenformulasprovidedinthelabdescriptiontowrite2programs: a“rocket”functionusedto feedintoODE45,andamainfunctiontorunODE5. 2) Verify the code functions properly by running the verification case and comparing it with the answers providedinthelabdescription. 3) Taketurnsvaryingeachofthe4parameters(theinitialpressureofairinsidethebottle,theinitialvolumeof waterinthebottle,thedragcoefficient,andthelaunchangle),andtakenotehoweachaffectthetrajectory oftherocket.
11
4) Designasetofparameterssothatthebottlerocketfallswithin1meterofthe75metertarget. 5) Compileallfindingsinareport. • Check: TheverificationcasewassuccessfullypassedandthecodewascheckedoverbyaTA. • MakesSense?: Boththetrajectoryplotandthrustprofileappearreasonable. ExplicitUseofEngineeringMethodforAlgorithmDevelopment(mainscript) • Problem: TopreparestudentsfortheBottleRocketDesignandPerformanceAnalysisLabinASEN2004andto helpthemunderstandhowtheperformanceofthebottlerocketdependsondifferent“designparameters”. • Knowns: Therearethreephasesofflight. Asetofgivenequationstohelpmecalculatetheflighttrajectoryofthe bottlerocketineachofthethreephases. Theinitialvelocityoftherocketis0m/s. Theteststandis0.5meters in length. The initial height of the rocket is 0.25 m. There are four parameters that affect the performance of the bottle rocket: the initial pressure of air inside the bottle, the initial volume of water in the bottle, the drag coefficient,andthelaunchangle. • Find: AscriptthatusesODE45alongwiththe”rocket”functionandthe”ThrustVec”functiontocalculateand plotthetrajectoryandthrustprofileofabottlerocket. • Assumptions: ThescriptmustuseODE45. • Sketch: (SeeFigure1)
Fig.6 Sketch : FreeBodyDiagramofBottleRocket
• Fundamentals: Theprojectdescriptioncontains27differentequationstotobeusedtomodelthetrajectoryof therocketateachofthe3phasesofflight. However,all27equationsrevolvearoundonefundamentalconcept: Newton’s 2nd Law. Newton’s 2nd Law says that F = ma. In our case, the acceleration has both an x and z component,andthenetforceisdependentonthreevalues: thethrustproducedbytherocket,thedragactingon therocket,andtheforceduetogravityinthezdirection. Inotherwords,F=ma=F-D+g. • Alternatives: Whilewewerenotexplicitlyprovidedanalternative,Isupposeitispossibletotrytoformulatea singleequationforthetrajectoryoftherocketbasedonexperimentationalone. Theprocessusedinthatcasewill beidenticaltodimensionalanalysismethodshowninclass. • Steps: 1) DefineGlobalVariables 2) BuildInitialConditionsVector 3) CallODE45withthe”rocket”functiontodeterminethetrajectoryofthebottlerocket 4) Parseoutputvectorforeaseofgraphing 5) Call”ThrustVec”functiontoproduceasetofthrustvaluesindependentofODE45foreaseofgraphing. 6) Findthemaximumdistance 7) Findthemaximumheight 8) PlotThrustvs. Time • Check: TheverificationcasewassuccessfullypassedandthecodewascheckedoverbyaTA. • MakesSense?: Boththetrajectoryplotandthrustprofileappearreasonable. ExplicitUseofEngineeringMethodforAlgorithmDevelopment(rocketfunction)
12
• Problem: TopreparestudentsfortheBottleRocketDesignandPerformanceAnalysisLabinASEN2004andto helpthemunderstandhowtheperformanceofthebottlerocketdependsondifferent“designparameters”. • Knowns: Therearethreephasesofflight. Asetofgivenequationstohelpmecalculatetheflighttrajectoryofthe bottlerocketineachofthethreephases. Theinitialvelocityoftherocketis0m/s. Theteststandis0.5meters in length. The initial height of the rocket is 0.25 m. There are four parameters that affect the performance of the bottle rocket: the initial pressure of air inside the bottle, the initial volume of water in the bottle, the drag coefficient,andthelaunchangle. • Find: A function that can use the equations provided inside the project description to accurately model the trajectoryofthebottlerocket. • Assumptions: ThefunctionmustbedesignedtoworkwithODE45. • Sketch: (SeeFigure1)
Fig.7 Sketch : FreeBodyDiagramofBottleRocket
• Fundamentals: Theprojectdescriptioncontains27differentequationstotobeusedtomodelthetrajectoryof therocketateachofthe3phasesofflight. However,all27equationsresolvearoundonefundamentalconcept: Newton’s 2nd Law. Newton’s 2nd Law says that F = ma. In our case, the acceleration has both an x and z component,andthenetforceisdependentonthreevalues: thethrustproducedbytherocket,thedragactingon therocket,andtheforceduetogravityinthezdirection. Inotherwords,F=ma=F-D+g. • Alternatives: Whilewewerenotexplicitlyprovidedanalternative,Isupposeitispossibletotrytoformulatea singleequationforthetrajectoryoftherocketbasedonexperimentationalone. Theprocessusedinthatcasewill beidenticaltodimensionalanalysismethodshowninclass. • Steps: 1) RetrieveGlobalVariables 2) DetermineHeadingofRocket 3) DeterminePhaseofRocket 4) DetermineThrustProducedbyRocket 5) DetermineDragFeltbyRocket 6) UseThrustsandDragtoCalculateAccelerationofRocketinxandzdirections. 7) CalculateAllOtherRatesRequiredbyODE45 8) OutputAllCalculatedRates • Check: TheverificationcasewassuccessfullypassedandthecodewascheckedoverbyaTA. • MakesSense?: Boththetrajectoryplotandthrustprofileappearreasonable.
13
Fig.8 MainProgramFlowChart
14
Fig.9 Subroutine1: “rocket”FunctionFlowChart
Fig.10 Subroutine2: “ThrustVec”FunctionFlowChart
15
Fig.11 SecondaryProgram: VerificationCaseFlowChart