PriestLizard
Member
Hey guys.
Yesterday I started to work on a small tool to calculate a rocket launch, i.e. calculates some important variables on the way of the rockets climb.
The main tool of my approach is, as the title implies, the rocket equation. The rocket equation gives me the velocity v = v(t) at a certain time t. From this velocity, I can derive the acceleration and the position in a 2-dimensional space (I only calculate vertical and horizontal speed).
Because my programming skills are rather limited, I only use discrete time steps for now. So I'm calculating the for time steps i=1,...,t. I'm using the function
v(t) = vg * ln (m(0) / m(t)) - g*t
Then I derive
a(t) = v(t) - v(t-1)
and
altitude(t) = altitude(t-1)+v(t)
I know its a very basic approach but I think it should work for a certain extend. For now I only cover vertical velocity/acceleration, so for calculations I use the pitch angle to get the cathetus.
This is an example result:
Used parameters:
Gravitational constant: 6.674280000000001E-11
Main body mass: 5.974E24
Vessel mass: 2500000.0
Fuel consumption rate: 12500.0
Pitch angle: 89.0
Specific impulse: 285.4230377166157
(equivalent to a exhaust speed of 2800m/s)
Calculates values: (hopefully the format won't be too messed up - EDIT No its not,
I used the russian Energia rocket in Orbiter for some comparison and my values are not sooo wrong. I already know about some issues though:
1. g is of course dependend on the altitude - I don't have a proper programming solution for this yet but I will def. implement it later on.
2. Pressure and air resistance should come into play later on as well.
Besides that, my questions to you are:
1. Are my values reasonable or are they totally unrealistic?
2. No matter what kind of variables I use for rocket characteristics (i.e. specific impulse and fuel consumption rate), it seems that my vertical speed is always a little bit too low, while my altitude is too high. The issue here might be, that rockets usually start with a slightly lower thrust in the beginning (at least I witnessed that with the Energia rocket) - is that reasonable?
3. What kind of improvements would you suggest?
4. Do you think this is a reasonable way to describe a rocket launch or is the discrete approach a big problem? Usually integrals can be approximated by sums so I thought it cant be too way off.
Thanks for your time and help, see you later
Yesterday I started to work on a small tool to calculate a rocket launch, i.e. calculates some important variables on the way of the rockets climb.
The main tool of my approach is, as the title implies, the rocket equation. The rocket equation gives me the velocity v = v(t) at a certain time t. From this velocity, I can derive the acceleration and the position in a 2-dimensional space (I only calculate vertical and horizontal speed).
Because my programming skills are rather limited, I only use discrete time steps for now. So I'm calculating the for time steps i=1,...,t. I'm using the function
v(t) = vg * ln (m(0) / m(t)) - g*t
Then I derive
a(t) = v(t) - v(t-1)
and
altitude(t) = altitude(t-1)+v(t)
I know its a very basic approach but I think it should work for a certain extend. For now I only cover vertical velocity/acceleration, so for calculations I use the pitch angle to get the cathetus.
This is an example result:
Used parameters:
Gravitational constant: 6.674280000000001E-11
Main body mass: 5.974E24
Vessel mass: 2500000.0
Fuel consumption rate: 12500.0
Pitch angle: 89.0
Specific impulse: 285.4230377166157
(equivalent to a exhaust speed of 2800m/s)
Calculates values: (hopefully the format won't be too messed up - EDIT No its not,
Code:
looking great :) )
Vs: Vertical speed, Va: Vertical acceleration, Alt: Altitude
[code]
T+1 Vs: 4.222979489607894 Va: 4.222336309377167 Alt: 0.0 Hs: 0.24494656812745266
T+2 Vs: 8.516654388279147 Va: 4.293020951187303 Alt: 4.222979489607894 Hs: 0.49112712921023316
T+3 Vs: 12.881740603454247 Va: 4.36442139140176 Alt: 12.73963387788704 Hs: 0.7385541794591978
T+4 Vs: 17.318964972554802 Va: 4.436548558336963 Alt: 25.621374481341288 Hs: 0.9872404058687331
T+5 Vs: 21.82906548661183 Va: 4.509413603903576 Alt: 42.94033945389609 Hs: 1.2371986901202017
T+6 Vs: 26.4127915196529 Va: 4.58302790936446 Alt: 64.76940494050791 Hs: 1.4884421125859106
T+7 Vs: 31.07090406400924 Va: 4.657403091253762 Alt: 91.18219646016081 Hs: 1.7409839564364111
T+8 Vs: 35.8041759717392 Va: 4.732551007492293 Alt: 122.25310052417005 Hs: 1.9948377118545615
T+9 Vs: 40.61339220235176 Va: 4.808483763686679 Alt: 158.05727649590926 Hs: 2.250017080359558
T+10 Vs: 45.499350077037704 Va: 4.88521371963596 Alt: 198.670668698261 Hs: 2.5065359792445525
T+11 Vs: 50.46285953960212 Va: 4.962753496031971 Alt: 244.17001877529873 Hs: 2.7644085461312526
T+12 Vs: 55.50474342432264 Va: 5.041115981383964 Alt: 294.63287831490084 Hs: 3.0236491436453985
T+13 Vs: 60.625837730948945 Va: 5.120314339158828 Alt: 350.1376217392235 Hs: 3.284272364216902
T+14 Vs: 65.82699190707524 Va: 5.200362015152915 Alt: 410.76345947017245 Hs: 3.5462930350086723
T+15 Vs: 71.10906913812644 Va: 5.2812727451046 Alt: 476.5904513772477 Hs: 3.809726222978347
T+16 Vs: 76.47294664519671 Va: 5.36306056254542 Alt: 547.6995205153742 Hs: 4.07458724007708
T+17 Vs: 81.91951599101307 Va: 5.445739806923938 Alt: 624.1724671605709 Hs: 4.34089164859016
T+18 Vs: 87.44968339427098 Va: 5.529325131976423 Alt: 706.091983151584 Hs: 4.608655266623755
T+19 Vs: 93.06437005263919 Va: 5.613831514394799 Alt: 793.541666545855 Hs: 4.877894173742985
T+20 Vs: 98.76451247470632 Va: 5.69927426276699 Alt: 886.6060365984943 Hs: 5.14862471676607
T+21 Vs: 104.55106282117512 Va: 5.785669026823247 Alt: 985.3705490732006 Hs: 5.4208635157198986
T+22 Vs: 110.42498925561651 Va: 5.87303180699442 Alt: 1089.9216118943757 Hs: 5.694627469962463
T+23 Vs: 116.38727630509894 Va: 5.961378964285805 Alt: 1200.3466011499922 Hs: 5.969933764477665
T+24 Vs: 122.43892523104176 Va: 6.050727230499588 Alt: 1316.7338774550913 Hs: 6.246799876348591
T+25 Vs: 128.58095441062574 Va: 6.1410937187903345 Alt: 1439.172802686133 Hs: 6.525243581415052
T+26 Vs: 134.81439972914086 Va: 6.232495934600744 Alt: 1567.7537570967588 Hs: 6.805282961122043
T+27 Vs: 141.14031498363403 Va: 6.324951786959651 Alt: 1702.5681568258997 Hs: 7.08693640956544
T+28 Vs: 147.55977229826016 Va: 6.4184796001837725 Alt: 1843.7084718095336 Hs: 7.370222640741976
T+29 Vs: 154.0738625517439 Va: 6.513098125986434 Alt: 1991.2682441077939 Hs: 7.65516069601062
T+30 Vs: 160.68369581737608 Va: 6.608826556010374 Alt: 2145.342106659538 Hs: 7.941769951772738
I used the russian Energia rocket in Orbiter for some comparison and my values are not sooo wrong. I already know about some issues though:
1. g is of course dependend on the altitude - I don't have a proper programming solution for this yet but I will def. implement it later on.
2. Pressure and air resistance should come into play later on as well.
Besides that, my questions to you are:
1. Are my values reasonable or are they totally unrealistic?
2. No matter what kind of variables I use for rocket characteristics (i.e. specific impulse and fuel consumption rate), it seems that my vertical speed is always a little bit too low, while my altitude is too high. The issue here might be, that rockets usually start with a slightly lower thrust in the beginning (at least I witnessed that with the Energia rocket) - is that reasonable?
3. What kind of improvements would you suggest?
4. Do you think this is a reasonable way to describe a rocket launch or is the discrete approach a big problem? Usually integrals can be approximated by sums so I thought it cant be too way off.
Thanks for your time and help, see you later