6

Help! I finished my numerical simulation of falcon 9 launch in google sheets, where I calculate all the value changes with time. But, when I looked at real launch to compare the values, I got really big, and non-understandable for me difference in values

On 5 second of flight, my rocket had velocity of (75,6) kmph, when on the video it only reached 26 kmph On 10 second values were 156 to 95 kmph. Here is the link to the launch video I used to compare values :

And my numerical simulations, with formulas inside : https://docs.google.com/spreadsheets/d/1oBAyEQGJUU6Kpze6J2j8qlJ9HxCKDXyiTmY2s5b2q_E/edit?usp=sharing

I just cant stand where is the problem... All the equations seem to be correct, and values too...

 Time          Predicted          Launch video       
              H (m)     v (m/s)    H         v
  0 s         0         0          0         0 
2.5 s        15        10.7        -         2
  5 s        58        21.5        -         7.8
7.5 s        124.7     32.5        -        16.5 
 10 s        221.5     44          -        26.3

*On the video the height is too low to be displayed accurately

mad.redhead
  • 159
  • 1
  • 7
  • 1
    I'm not able to view that drive link. Could you include the relevant values and formulas of your simulation in the post? – SE - stop firing the good guys Oct 04 '20 at 10:41
  • 1
    That was the wrong link, my bad. Edited and attached right one – mad.redhead Oct 04 '20 at 10:50
  • 3
    You are doing so many things wrong I barely where to start. As a starting point, (1) You are ignoring gravity. (2) This is a three dimensional problem. You only have one. (3) Your use of units is inconsistent. (4) Your time step is far too large. (5) Your atmosphere model is very wrong. – David Hammen Oct 04 '20 at 10:59
  • Im not ignoring gravity at this point. I know that I need to change (g) and thrust with altitude, but I mean the start altitudes are low, I ignore their change. What do you mean under "three dimensional problem"? In my case I wanted only to simulate 2d launch. Rocket goes up or falls down. – mad.redhead Oct 04 '20 at 11:01
  • 1
    A rocket that launches things into orbit has to achieve two things. One is to take the payload above the bulk of the Earth's atmosphere. (This was point #5, "your atmosphere model is very wrong".) The other is to increase the horizontal component of velocity from less than half of a kilometer per second (the Earth's rotational velocity at the equator) to about 7.8 kilometers per second. (This was point #2, "this is a three dimensional problem".) Rockets that launch things into space do not go straight up, – David Hammen Oct 04 '20 at 11:12
  • I didnt know that... So in that case, what do I need to learn, to achieve at least something close to real rocket launch? As I can stand, my numerical simulation is total trash and needs to be rebuilt from a blank sheet of paper. – mad.redhead Oct 04 '20 at 11:16
  • My goal was to make a simple, and lifelike (at least close) 2d simulation of falcon 9th launch in Unity. Maybe adding launch settings with for example other engines connected to the rocket, environment changes (temparature, wind, etc). Now im doing it with only one stage to see how far it can go and how just to make life easier for me. My goal is to create a really simple version of launch, and than improve it to the whole new level, in 3d and a lot more complicated. For educational purposes, and as a hobby ahahah (i`m 16...) – mad.redhead Oct 05 '20 at 12:23

1 Answers1

8

File:Au pfeffernuesse 01.jpg

Source (cropped)

Why do plastic rulers make you measure between two lines, instead of starting at the edge?

tl;dr: Never use the edge of a ruler or the "zero" of any analog measuring device when you are making careful measurements if you can help it. Instead try measuring between two equivalent demarkations.

from this answer; doesn't start moving until T+00:00:07!

Better yet, measure several times, plot it, and draw a line through your measurements and determine the slope.

Newton's $F = ma$ means that $a = F/m$. But $F$ has to be the total force, and there are two big ones in opposite directions, and that's what lifting off the Earth is all about!

acceleration pointing up

This is the thrust of the rocket and Wikipedia's Falcon 9 says that for F9 v1.2 or Full Thrust it is +7,607,000 Newtons where the plus sign means "up".

The loaded mass is 549,054 kg, so

$a_{thrust} = F_{thrust}/m = \text{13.85 m/s}^2$

acceleration pointing down

At liftoff and while it's not going really really fast yet, so gravity is the only important one. Earth's standard gravityis 9.80665 m/s2.

So the rocket will initially accelerate at roughly 13.85 - 9.81 = 4.04 m/s2.

Using $v = at$ and assuming the mass doesn't change too much in the first ten seconds (it does a bit of course) then I get 72.7 and 145.4 kph after 5 and 10 seconds, just like you.

what could be the difference?

Never start a measurement at zero. Never use the zero of a ruler; if something is about 10 cm long, measure from 1 cm to 11 cm, that way if the manufacturer screwed up slightly cutting it it won't make a difference.

Play the video slowly, like 1/4 or 1/8 speed, and stop it each time the timer changes from one seconds digit to the next, and write down the velocity.

Try this:

Plot v vs t on a graph, and you'll see it is probably a fairly straight line but it hits zero at around 1 or 1.5 seconds, not zero.

Then read all the answers and all the comments on What "actually" happens at T-minus-0


update:

You're doing just fine!

I see you are active in Stack Overflow so I'll add some Python script. I took your numbers and did two things:

  1. you have the h and v switched in the 7.5 second line so I switched them back
  2. included a 3.5 second offset between whatever T=0 is in the video and time since the rocket starts moving.
  3. plotted your simulation as solid black line
  4. plotted your video measurements as blue dots
  5. Added a red dashed line for a simple 4.04 m/s2 acceleration

The resulting fit is quite nice; all three agree fairly well already! You are doing just fine and you can extend this further in time now, and check more effects.

quick calc

import numpy as np
import matplotlib.pyplot as plt

time = np.array([0, 2.5, 5, 7.5, 10]) time_smooth = np.arange(0, 16, 0.1)

model_h = np.array([0, 15, 58, 124.7, 221.5]) model_v = np.array([0, 10.7, 21.5, 32.5, 44])

video_v = np.array([0, 2, 7.8, 16.5, 26.3])

T_start = 3.5

a_guess = 4.04

plt.figure() plt.subplot(2, 1, 1) plt.plot(time +T_start, model_v, '-k') plt.plot(time, video_v, 'ob') plt.plot([-1, 14], [0, 0], '-k', linewidth=0.5) plt.plot(time_smooth, a_guess * (time_smooth - T_start).clip(0, None), '--r') plt.xlim(-1, 14) plt.ylim(-2, 42) plt.title('vertical speed (m/s)') plt.subplot(2, 1, 2) plt.plot(time + T_start, model_h, '-k') plt.plot(time_smooth, 0.5 * a_guess * (time_smooth - T_start).clip(0, None)**2, '--r') plt.plot([-1, 14], [0, 0], '-k', linewidth=0.5) plt.xlim(-1, 14) plt.ylim(-10, 210) plt.title('vertical height (m)') plt.xlabel('time (sec)') plt.show()

uhoh
  • 148,791
  • 53
  • 476
  • 1,473
  • Yes but even if ill change the start time... at REAL launch, at 5th second v is 25 kmph, at 10nth its 104... velocity increased in four times. In mine simulation it went from 75 to 150, increased in two times... I guess I just totally messed the calculations :) – mad.redhead Oct 04 '20 at 12:06
  • I mean, compared to the real launch its messed up totally – mad.redhead Oct 04 '20 at 12:08
  • @mad.redhead please post a simple table of numbers in the question. We shouldn't make each user go off-site to see an important part of a question, and Q&A posts here should stand on their own (not rely on external sites) so that even if links break or things are deleted, the questions and answers make sense. Until you show your numbers, I think people may not do much to help. I can't see what is "messed up totally" until you show your numbers clearly in the question. Thanks! – uhoh Oct 04 '20 at 12:09
  • @mad.redhead If you start a line with four blank spaces, you can get equal spaced font (code block) so they are easy to see. Examples here and here – uhoh Oct 04 '20 at 12:13
  • So you mean I need to paste all my sheet with calculations in the post? What do I need to attach to post? – mad.redhead Oct 04 '20 at 12:13
  • @mad.redhead there is a middle between nothing and everything. Right now you have nothing so I can't tell what "compared to the real launch its messed up totally" means. You have height and speed vs time predicted and measured. For 0, 5 and 10 seconds that's 12 numbers. Just show those 12 numbers! – uhoh Oct 04 '20 at 12:17
  • @mad.redhead something like this, or a little more, for example ever 1 or 2 seconds https://i.stack.imgur.com/nVkoc.png up to 10 seconds – uhoh Oct 04 '20 at 12:20
  • 1
    Edited post with tables for 0, 2.5, 5, 7.5 and 10 seconds – mad.redhead Oct 04 '20 at 12:43
  • @mad.redhead looks great to me! :-) – uhoh Oct 04 '20 at 14:54
  • I like all this but what does the New Shepard video have to do with the Falcon 9? – Organic Marble Oct 04 '20 at 15:35
  • 1
    @OrganicMarble it's simply an extreme example of what I've explained. The answer is rocket-agnostic; check the sentence directly above the video. (basically T=0 doesn't mean anything, the rocket starts moving when it decides to start moving) – uhoh Oct 04 '20 at 15:46
  • 1
    Wow... I really surprised you put THAT much effort in explaining some simple (at first look) things in rocket science to a newbie, like me... The world is not without good people :). Im going to look thru this, and write you, if I`ll have more issues. But with answer like this, I guess i wont have any problems :). Thanks also for including code, im familliar with that library for plots. **Im still amazed, and very grateful!!! – mad.redhead Oct 04 '20 at 17:58
  • 2
    "Play the video slowly, like 1/4 or 1/8 speed, and stop it each time the timer changes from one seconds digit to the next, and write down the velocity.". Youtube lets you even step through videos frame-by-frame with . and , ;) (forward and reverse) – Polygnome Oct 04 '20 at 19:11
  • 1
    @mad.redhead I don't know if I'm a good person but I'm basically just addicted to Stack Exchange ;-) You're welcome to follow up here in comments with more clarifications on this question, but if you have a new issue I recommend that you ask about it by posting a new question and linking back to your old question for background. That way it has maximum visibility to everyone which in turn maximizes the quantity/quality/diversity of answers. – uhoh Oct 04 '20 at 22:54
  • @Polygnome I will, no worries :) – mad.redhead Oct 05 '20 at 07:21