Jump to content

Basic equations


Recommended Posts

Hello, I have just started playing KSP.

I have looked through the games Wikipedia but I am unable to find the information to calculate what I need to know. Any help appreciated:

What is the formula for calculating the speed and altitude a rocket will achieve within an atmosphere? Basically I want to know how high up a very basic rocket will go and how fast it will travel.

I have learned a lot about the theory in this game in the last few hours but I am a bit rusty using formula so please keep things basic.

Thank you for your help.

Link to comment
Share on other sites

M-Industries,

Sadly, there isn't a simple equation for answering that question. Your speed is affected by drag and your drag is affected by speed. It's like a snake eating it's tail and there's no way to get a handle on it.

You have to run a multi- iterative simulation (essentially the same thing as "launch it and see").

Sorry!

-Slashy

Link to comment
Share on other sites

http://www.dummies.com/how-to/content/how-to-calculate-the-maximum-height-of-a-projectil.html

Assuming infinite TWR and zero air drag you get:

final height = -delta v^2 / 2*-g

So with delta v of 1000m/s you'd have 51km.

But for every second you burn you lose 9.8m/s delta v to gravity

So it's final height -delta-v^2/2*-g - gt

Also minus drag, which depends on the rocket and the speed, but generally is MUCH smaller than gravity loss, so you're generally better going super sonic below 5km.

Link to comment
Share on other sites

@Mastikator that site explains it terrible. Sorry but really what is that about. First of all, in the case of rockets you can't consider earth/kerbin "flat", in that case a quadratic equation for the flight path is incorrect, the sub-orbital path is an ellipse. Second and most importantly it doesn't explain where it did get it's formula's from. The forms are highly unstandard and not motivated.

I'd strongly recommend reading about Tjolkowsky's rocket equation. Even the wikipedia page is quite easy & good in it's explanation. This should also make clear that for rocket engineering it's not the altitude that matters - it's the delta-V you achieve, and more formally one could describe the quality of a flight path/rocket by it's Specific orbital energy.

Now the question hence should be "what is the maximum delta-V I can achieve". This is actually quite involved, and as such simplifications have to be made. One such simplification is to simply ignore atmospheric drag, and consider ourselves already in an orbit. This leads to the so important rocket equation:

945a66bb8ac5a46fd959ab6c12eebb00.png

Where v_e is the exhaust velocity, which is by definition: v_e = I_specific * 9.81. And M0 is the starting mass and M1 the final mass (so M0-M1 is the amount of fuel).

Now one can easily adapt this function increase for other effects. A simple improvement is to account for gravitational drag, easy as hell, and it would mean a simple adaption of the formula.

gif.latex?%5CDelta%20v%20%3D%20v_e%20%5Cln%20%5Cfrac%7BM_0%7D%7BM_1%7D%20-%20g%20%5Ccdot%20t_b

A decent explanation and proof of the above formula can be found on the site of MIT. Notice however that for this the gravity is considered constant independent of altitude, and the rocket is going straight up (simplification). The MIT should give you enough pointers to solve it should you want to calculate it manually. - You need to solve the differential equation manually though, you'll have to describe the gravity as a function of time, so it will instead of a first order become a second order differential equation. Probably you have to use numerical methods to solve it.

It starts with equation 14.1 on the MIT site I linked. (Which shows the drag term still being there).

Now as Mastikator said the amount of air drag is small compared to gravitational drag (in the order of a few percent) so it would make much change. However this also can easily be incorporated. Another very important effect is however the change in specific impulse with altitude: rockets become more efficient when higher in the atmosphere. If you account for this you also have to start from the basic physical representation (see once again equation 14.1).

Anyways, you asked for the height. This is something done after you understand the importance of delta-V, as it basically comes down to integrating the rocket equation over the time of burning. This takes a bit more calculations than I would like, but luckily the profs at MIT have done that for us.

img1694.png

Though of course one could also go the easy way, and use the conservation of energy to calculate the height. (Which will apply):

gif.latex?%5Ctfrac%7B1%7D%7B2%7Dm%20%28%20%5CDelta%20v_%7Beff%7D%20+%20v_0%29%20%5E2%20%3D%20m%20g%20h

Where Delta-v_eff is simply the effective delta-V (minus the losses as explained above). The V_0 is the non negative starting velocity you have due to surface rotation. (Once again this considers a constant gravitational acceleration). Oh and don't forget "h" is there the height from the gravitational center: so effectivelly you have to remove the radius of kerbin to get the actual altitude.

Edited by paul23
Link to comment
Share on other sites

Welcome to the forums!

Putting things in simple terms per the OP's request:

You're building a rocket. You have three important questions:

  • How fast will it go? (a.k.a. "How much fuel do I need?")
  • How much engine do I need?
  • OK, I've figured out how fast it'll go. How high/far will I get?

Let's take these one at a time.

How fast will it go? (how much fuel do I need?)

As paul23 describes excellently in detail above: the number you care about here is called delta-V, often abbreviated as "dV".

This is a speed (generally in meters per second, in KSP). It represents the ideal maximum speed your rocket can get. It's determined by the Tsiolkovsky rocket equation.

So, how do you find this number?

Well, one option is to install a very popular mod called Kerbal Engineer Redux (frequently referred to in the forums as KER), which does a lot of calculations for you. If you do that, you can skip the rest of this section. :)

If you want to calculate it yourself: paul23 gives all the math details above, but in simple gameplay terms, if you want to figure out the dV of your rocket, here's what you do:

  1. Find the wet mass of your rocket, in tons.
    • This is total mass including fuel.
    • In the VAB, you can get this from the engineer's report at bottom right.

[*]Find the dry mass of your rocket, in tons.

  • This is the mass of your rocket with empty fuel tanks.
  • In the VAB, you can get this by right-clicking the fuel tanks to temporarily set them to empty, then look at the engineer's report.
  • Or you could just take the wet mass and manually subtract the weight of your fuel, which is .005 tons per unit of LF + O.

[*]Divide wet mass by dry mass. This is your mass ratio.

[*]Take the natural logarithm of the mass ratio (the "ln" button on your calculator).

[*]Multiply by the Isp of your engines.

  • In the VAB, you can get this by right-clicking on the engine icon in the parts list at right.
  • Or you can go to the wiki parts list and look it up there.
  • Important: engines have different Isp in atmosphere or vacuum, see note below.

[*]Multiply by 9.81 (this is Kerbin sea-level gravity).

[*]This is your dV, in meters per second.

Important gotchas about calculating dV:

  • I've just described the process for calculating dV of a single-stage rocket. If you have multiple stages, it's more complicated, basically you have to calculate it separately for each stage and then add the numbers together for the various stages.
  • If you have multiple engines of different Isp values that are firing at the same time, the calculation is more complicated.
  • All of this is just talking about conventional rockets. If you're flying a spaceplane with air-breathing engines, it's a whole different ball game, this post won't help you. ;)
  • Engines get better (higher) Isp values in vacuum than they do in atmosphere. Some engines (like the Swivel or Skipper) change only a little bit. Others (like the Terrier or Poodle) change by a lot and get much worse Isp in air. These are the so-called "vacuum engines" and you shouldn't use them on the launchpad-- use them for upper stages where the air is thin or nonexistent.
  • Each engine tells you both its atmospheric (ASL) Isp and its vacuum Isp. When calculating your dV, be sure to pick the right one. Basically, use atmospheric Isp for any engines that you're firing on the launchpad, and use vacuum Isp for any engines that activate at the second stage when you're over 10 km altitude.

So, that's your dV. It's a good number to know. If you ever are posting a question to the forums about a particular rocketship you've built, be sure to include its dV numbers because folks will want to know.

An interesting thing about your dV: notice that it doesn't depend at all on how powerful your engine is. Thrust doesn't matter at all. All that matters is how much fuel you have, how massive your rocket is, and the efficiency (i.e. Isp) of your engine, not its power. Kind of like, if you want to know how far your car can drive on a full tank of gas, you only care about your mileage, not horsepower.

How much engine will I need?

Even a rocket with lots and lots of dV won't go anywhere if it doesn't have enough engine power to get off the ground. So you need to have the right amount of rocket power (thrust).

Note that I said "right amount", not just "enough". It's not like dV, where more is always better. Having too much rocket power can actually be a bad thing, for two reasons. First, if you have more engine power than you need, it means you're spending a lot of mass on big heavy engines, which means you're wasting fuel dragging them around. (Like there's no point in driving a Lamborghini around city traffic.) Second, when you're taking off from Kerbin, you're going through air. If you're too powerful, you're likely to go too fast while you're still very low where the air is thick, and therefore wasting a lot of fuel fighting drag.

Therefore, you need to find the right compromise between enough power, but not too much. How do you do this?

The important number here is thrust to weight ratio (TWR). This is simple to calculate:

  1. Take the total mass of your ship (including fuel), in tons.
  2. Multiply by 9.81 (Kerbin gravity in m/s2). This is your weight, in kN.
  3. Take the total thrust of all your engines, in kN.
    • You can get the thust numbers in the same places you get the Isp values, i.e. in the VAB or on the wiki.
    • As with Isp, be sure you use the right number (atmospheric or vacuum). Atmospheric, for the launchpad.

[*]Divide the total thrust by your weight.

[*]This is your TWR.

So, what TWR is the right one? A general rule of thumb is to aim for a TWR between 1.3 and 1.5. Myself, I prefer 1.5; other people have their own preferences.

I know my dV and my TWR. How high/far will I get?

So this is the real thing you want to know. Unfortunately, it's also the hardest, for the reasons that GoSlash27 describes above. The amount you lose to air resistance and gravity during launch depends on the particular shape of your ship, as well as your piloting (i.e. how efficient an ascent profile you're following).

However, that doesn't mean you can't get anything useful out of knowing these numbers:

  • It takes approximately 3400 m/s of dV to get to Kerbin orbit (assuming a well-designed ship and good ascent profile). So if you're headed to orbit, make sure you have at least this much dV.
    • So if you're wondering "why can't I get to orbit?", and you don't have at least that much dV, that's why. :P
    • If you do have that much dV and still aren't getting to orbit, it means there's something wrong either with your ship design or your piloting strategy, so that's something you could ask in the forums about. Mention your dV when you do.

    [*]Once you're in Kerbin orbit and don't need to deal with the uncertainties of atmospheric launch, life gets a lot easier: you can calculate things much more exactly, and dV numbers become much more useful.

    [*]In particular, there are lots of good "dV maps" out there that will tell you exactly how much dV you need to get to various places.

    [*]For example, http://ksp.olex.biz is a handy tool that will tell you things like "okay, I'm in a 100km orbit around Kerbin, how much dV do I need to go to Duna". There are other good tools out there, too, that one just happens to be my personal favorite.

Hopefully that's enough to get you started. I know it's a lot, and there's a heckuva lot more stuff to learn beyond that... welcome to the fun world of KSP! Happy flying. :)

Edited by Snark
Link to comment
Share on other sites

This thread is quite old. Please consider starting a new thread rather than reviving this one.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...