Jump to content

So teach me how to calculate Delta-V in KSP


LegoDino77

Recommended Posts

I think this belongs into The Science Labs.

So I would like to know how to count the Delta-V in the game, I know that you can use mods like MechJeb to do this but I just think it would be cool if I could do it myself. So if somebody would be nice enough to help me to understand how to do it, and start explaining from the beginning.

Thank you ;)

(or send me links to sites like "Rocket science for dummies")

Link to comment
Share on other sites

You can use the rocket equation to calculate the delta-v of a rocket.

Delta-v = V_e * ln ( M_full / M_empty )

V_e is the exhaust velocity of your propellant, which is always = 9.8 * Isp, where Isp is the specific impulse (800 for an LV-N, 390 for a LV-909, etc), and 9.8 is a constant (it's not based on your gravity or anything else).

M_full is the total mass of your spacecraft. M_empty is the mass of your spacecraft after you've burned off the propellant ( M_empty = M_full - M_propellant ). It doesn't matter what units the mass is given in as long as both the full and the empty mass are in the same units.

As an example, if you have a 50 ton ship which includes 30 tons of propellant, then M_full = 50 and M_empty = 50-30 = 20. If it has an LV-N, its Isp is 800. So you get its delta-v to be:

delta-v = 800 * 9.8 * ln (50/20) = 7189 m/s

So that ship can make propulsive maneuvers coming out to a total of 7189 m/s before it runs out of propellant.

If you have multiple stages, you can calculate the delta-v for each stage and add them together. For example, if the previous 50 ton rocket also had a 80 ton first stage including 60 tons of propellant with a mainsail engine, then M_full = 80 + 50 = 130 tons, M_empty = (80 - 60) + 50 = 70 tons, and the Isp of a mainsail is 330, so the delta-v would be:

delta-v = 330 * 9.8 * ln (130/70) = 2003 m/s

So the first stage has 2003 m/s, and the second stage has 7189 m/s, so the whole ship has a delta-v of 2003+7189 = 9192 m/s.

Link to comment
Share on other sites

Another point is that if you have multiple engines with the same Isp, you use that Isp in the rocket equation: 3 LV-N's, use 800 seconds.

If you have multiple engines with different Isp's you have weight the individual Isps by the thrust they generate. The formula is here under "Combined Specific Impulse"

http://wiki.kerbalspaceprogram.com/wiki/Cheat_Sheet

So if you have 2 LV-Ns (Isp = 800, F=2.7) and 4 Mainsails (Isp=330, F=25.5), you get:

(25.5*4 + 2.7*2)/((25.5/330)*4+(2.7/900)*2)=341

which you can see is dominated by the Mainsails because their thrust is so much higher.

Link to comment
Share on other sites

delta-v = 800 * 9.8 * ln (50/20) = 7189 m/s

So I got this far and now I have few questions. What that "*" means? And what Specific impulse means?

And how do you calculate that Math thingy (Brain cant english today) in calculator? But yeah this is cool ;D

Link to comment
Share on other sites

So I got this far and now I have few questions. What that "*" means? And what Specific impulse means?

And how do you calculate that Math thingy (Brain cant english today) in calculator? But yeah this is cool ;D

All engines has an specific impulse, its how fuel efficient they are. The LV-N has 800 in vacuum and so on, part of the engine specifications in the VAB together with trust and weight.

You find ln on the scientific calculator in windows.

Link to comment
Share on other sites

Okay... So another question, is there any way to calculate that... (DAMN BRAIN) thing? (Yes yes but I just wanna know)

If you mean the ln() thingy, that is called a "natural logarithm". It is generally not calculated, in olden days it was looked up in a book of logarithm tables, nowadays people use spreadsheets and calculators.

In MS Windows, there is a calcuator application. When you run it, you can drag down the View menu and set it to "Scientific".

So:

delta-v = 800 * 9.8 * ln (50/20)

50/20 = 2.5

You type 2.4 into the calculator, then press the ln key:

calc.jpg

delta-v = 800 * 9.8 * ln (50/20)

delta-v = 7,840 * ln (2.5)

delta-v = 7,840 * 0.91629073187415506518352721176801

delta-v = 7184 m/s

Link to comment
Share on other sites

  • 2 years later...

Also I've created a public spreadsheet of this calculation here with a Google spreadsheet. It contains some of the engine Isp's for reference as well.
http://tinyurl.com/ksp-deltav

Enjoy, and please subscribe to 
https://www.youtube.com/channel/UCBNHHEoiSF8pcLgqLKVugOw
and Follow me on Twitter - @MarcusHouseGame
if you like find it useful and would like to see more.

Link to comment
Share on other sites

  • 6 months later...

I need help reversing this equation when I know the dv I want to acheive but want to know the mass of the aberration I will have to build (the dv I want is 90km/s). I can figure out dividing dv by g x isp but don't know what to then do with the answer to that. Can anyone help?

Link to comment
Share on other sites

59 minutes ago, SOURanger said:

I need help reversing this equation when I know the dv I want to acheive but want to know the mass of the aberration I will have to build (the dv I want is 90km/s). I can figure out dividing dv by g x isp but don't know what to then do with the answer to that. Can anyone help?

Raise the number e to that answer. It should look like ex.

That gives you the mass ratio you need. Not the empty mass or the wet mass.

Edited by Bill Phil
Link to comment
Share on other sites

On 8/10/2013 at 8:11 PM, LegoDino77 said:

Okay... So another question, is there any way to calculate that... (DAMN BRAIN) thing? (Yes yes but I just wanna know)

I'll try a practical example:

since dv = Isp*g0 ln(m_full/m_empty)

In flight, right click the engine in your current stage and it will display the Isp (specific impulse). Then right click your tanks that are feeding that engine to see how much fuel they have left. We need one more thing: hit 'm' to go to map view, and click the little 'i' button; the information box tells you your vessel's total mass. Now we have all the information you need :) Let's say your total mass is 5 tons, you have 180lf and 220ox, and your Isp is 320.

So, the calculation: in KSP, liquid fuel and oxidizer both weigh 5kg per unit. So if you have 180 units of fuel and 220 units of oxidizer, mass of your fuel is (220+180) * 5kg = 2000kg

Divide your total mass, five tons, with your total mass minus the fuel's mass; 5000 / (5000 - 2000) = 1.666...

Next find that 'ln' button on your calculator (or put =ln(1.666) in a spreadsheet) for ln(1.66) = 0.5108...

That is the number you need to multiply with specific impulse and g, so 9.81 * 320 * 0.5108 = 1604 m/s

 

hope that helps :)

Link to comment
Share on other sites

On 03/11/2016 at 0:46 AM, Bill Phil said:

Raise the number e to that answer. It should look like ex.

That gives you the mass ratio you need. Not the empty mass or the wet mass.

Thanks for replying and helping me to understand that this is not going to happen using stock parts. Turns out my part count would exceed 20k at the most conservative estimate.

Link to comment
Share on other sites

  • 11 months later...

I'd like to ask something along the lines of this thread, but from a different approach.

Suppose I have a ship in orbit around a certain planet (or landed, which is an easier way of saying 'synchronous low orbit`). I want to move my ship to orbit another planet, which happens to orbit the same star as the planet my ship is currently orbiting. I also plan to do all maneuvering by my ship's engines alone, so no tricks like gravity assists and aerobraking.

How do I know how much deltaV I am going to need, without ever looking at a deltaV map?

Link to comment
Share on other sites

Delta-v breaks into two groups. First to delta-v to create a hohmann transition and second the delta-v to circularize the orbit.

First let me say to things about the question. The simple assumption is that you are moving from one nearly circular orbit to another. I almost never do this and I generally find ways not to do this. There is a simple reason for this. Lets take the Kerbin Duna example. Once a duna launch window is optimized we are going to wait until a certain kerbin 'Angle to prograde' (as in MechJeb) and theoretically you want to burn a certain amount of DV from as low a kerbin orbit as possible. I strongly recommend not doing this below 70k because if your acceleration is high enough and the target is DeltaE high enough, you are going to have a heat problem. 70.00001 km suffices to avoid that.

That ideal transfer from kerbin is never going to happen, there are acceleration limits and the exact shape of the transition is hard to estimate. So typically for example from Kerbin you might be on angle to prograde of 150' and start at 2 minute burn at 0.3 TWR. As your burning your spacecraft is lifting and you get less of the oberth like gravity well effect. So different rockets will produce slightly different dV.

The idea here is this. Keeping kerbin in mind. From any given circular orbit you need to add x V to leave kerbin (meaning you escape but linger close to kerbin). removing m, E/m = 1/2v^2. Lets say at 70k the orbital velocity is 2300. So here is a little trick for any given circular orbit, the velocity required to escape is SQRT(2)* circular velocity. 3252 therefore gets you out of the Kerbin system. At circular orbit your KE is 2.65E6 J/kg (or 2.65 MJ/kg) and you need a KE of 5.29 MJ/Kg to leave the system from that orbit. SO lets say at Kerbin orbit (Kerbol) radius you need 1000 dV to reach duna radius. That translates into 500,000 j/kg of KE. So lets add .5 MJ/kg to escape energy of 5.29 MJ and that equals 5.79 MJ. That tidbit tells us how much energy we need a kerbin 70K orbit. SQRT(5.79 MJ/kg * 2) = 3402 m/sec. You started with  2300 and you need 1102 or slightly more than your orbit breaking speed. Had you created an orbit 80M meters (essentially requiring  950 dv for the transition and a few dV to make orbit. YOu would have need to add a trace less than 1000 dV at the angle to prograde of 90' to reach Duna.

How come it is cheaper to burn from low kerbin than high kerbin. How does a high kerbin orbit loose energy. High kerbin orbit did not loose energy, what you do in a low kerbin orbital burn is you increase Apoapsis without increasing Periapsis. In a high orbital burn you  have put (thermodynamic) energy into the periapsis altitude and increased apoapsis. The way I like to look at this once you are in a circular orbit your centipedal force and gravitational forces (two very interesting faux forces) cancel. The time you spend fighting gravity to reach a higher orbit. If you throw all the energy you need in at once, you spend less time fighting kerbins gravity and when you leave the system you get that energy back to use to fight Kerbols gravity. If you raise your orbit in bits and then transfer you have spent unnecessary bits of time fighting gravity which you could have simply escaped from quickly. This is the weakness of ION drive, although have very high ISP, because of the very low acceleration of true Ion drives, they waste almost half there ISP in interplanetary transfers fighting their way out of the gravitational well before they transfer. Transfers are also a problem with NTR because the low thrust to weight of these rockets means they spend a considerable amount of energy raising their departure planets gravity well. Where both excel is moving between bodies in which time spent near pE is long. For example an Ion drive burning close to the sun might generate good system leaving velocities (getting to closer to the sun and not poofing is the problem, lol)

OK so now how do we find out the cost of reaching Duna. The amount of energy in an orbit is a function of mu of the central body, semimajor axis of the orbit, and the keplarian laws of motion. Its not easy to calculate except at periapsis and apoapsis. We assume that kerbin is the periapsis and Duna is apoapsis. The Major axis is 13.3Gm + (19 to 21)Gm + diameter of kerbol + radii of kerbin and duna. Resulting semi-major is about 17Gm. From there you can calculate based upon keplarian laws of planetary motion what your velocity should be at 13.3Gm and subtract kerbins orbital velocity. For planets with relatively close orbits that budget is not so high.

So thats that bit.  Unless you have started your transfer on an ascending or descending node and calculated that into your kerbin burn. you need to make roughly 80 dV of plane change burn.

The next bit is harder and a place were many space-flight end in ruin. In the case of an a prograde burn from low orbit you know where you are and you simply need to burn until you intercept the next orbit, your burn is not idea, but your going to lose a few dV as your vertical velocity increases during the burn. On entry you need to do several things.

1. Determine the closest point you can retrograde burn. This may differ based on mission (atmospheric reentry versus complex landing and docking) you need to determine the orbital velocity of that altitude. (r = altitude + surface radius). This is omega^2 * r = mu/r^2  also written as v^2/r = mu/r^2. We can rewrite the second as v = SQRT(mu/r). For Duna at 50 km altitude (r = 370,000) this translates into 920 m/sec orbital speed. You put into the system 1000 dV to get from kerbin to duna, more or less you have to take it out, its not as important as you think because on Duna entry 0.5 MJ but  2 x .451 MJ added from duna escape to duna 50km alt of which we keep 0.451 in the orbit. As a result we get to our burn point with 1674 velocity but we need to burn to 920 and this leaves 750 dV approximately . (Mu = Mass of central body times gravitational constant).

So the problem is where to burn. This is were good engines com in handy. If you are reversing 750 m/s and your accel max is 2g (20 a) then you need 37.5 seconds or lead the periapsis of 52 km with about 18 sec burn prior. Its not going to be perfect because 18 second prior you will be above 50 km. Most efficient deep space engines do not have TWR with fuel load of 2g, so this where sacrifices are made. You burn for to short and you will have to correct apoapsis and reburn at periapsis. you burn too early and your Pe ends up in the atmosphere.

So, My math is not perfect, you should get actual mu from Kerbal wiki, dV spent on plane change will vary. Also on kerbin or duna entry you may have to deal with interfering bodies (like that pest Ike).  You need about 2500 dV to reach Duna, your are not going to nail it (at least if you use stock game) and you should have a flexible system that allows re-purposing fuel, such as for landing or return.  Unless you are using a flight computer, both the velocity and altitude of Planets changes. Its not simply a matter of knowing were a planet will be, but also how fast it is going when you get there.

A word of advice, worry less about dV requires a guess is often good. Worry more about getting good dV. I have found weaknesses in the game in terms of structural parts, I have added my own parts like piping and pipe connectors that allow polyfunctional craft with better efficiency. If a sz0 part will do the job on a sz1 lander, use the size zero. I dont use mono on landers, a sz0 reaction wheel suffices. Less wheel, less battery, fewer panels. Duna is about drag, for instance, dV to land is almost zero if you design the shape of the craft with drag on bottom and aero on top.

Link to comment
Share on other sites

6 hours ago, shynung said:

I'd like to ask something along the lines of this thread, but from a different approach.

Suppose I have a ship in orbit around a certain planet (or landed, which is an easier way of saying 'synchronous low orbit`). I want to move my ship to orbit another planet, which happens to orbit the same star as the planet my ship is currently orbiting. I also plan to do all maneuvering by my ship's engines alone, so no tricks like gravity assists and aerobraking.

How do I know how much deltaV I am going to need, without ever looking at a deltaV map?

I was about to write out a full explanation, but then I remembered that my very first post on this site was a thread explaining how to calculate interplanetary delta-v. I probably shouldn't have picked Moho for my example though as its' inclination and eccentricity mean that it is quite a bit more expensive than this naive method predicts. It works well for everywhere else though.

 

Link to comment
Share on other sites

2 hours ago, tomf said:

I was about to write out a full explanation, but then I remembered that my very first post on this site was a thread explaining how to calculate interplanetary delta-v. I probably shouldn't have picked Moho for my example though as its' inclination and eccentricity mean that it is quite a bit more expensive than this naive method predicts. It works well for everywhere else though.

 

Moho is a special case because of the dV requirement to bend and because its orbital period about the star is fast relative to kerbin.

Two optimizing parameters to look at.

1. Where are the ascending and descending nodes? like you say +/-  bearing burns can reduce the amount of DV need out of kerbins orbit.

2. That the theta of kerbin should intersect as close as possible to Moho's apoapsis in it orbit.

This way when you transit you are going to be as close as possible to its pE when you intersect. Even though you will have more energy trying to intercept a moho Apo, your differential velocity relative to Moho will be less.

This will almost never correspond to a window that allows a transfer to Moho. Fortunately Moho provides a solution. One the planes match look for the 'bugs' that are one above the ships orbit and directly below on moho's orbit. This indicates a retrorgrade dV at Moho's pE while send those bugs counter clockwise to intercept.

If correction in inclination have to be made during the Hohmann transition remember that the amount of dV = Orbital velocity * sin ('change). If the degree change is 7 and you do the plane change at 18,000 m/s that means 2193 dV need to be added. When the craft exits kerbin it is traveling at 6000 or so m/s the amount of dV required is one third.

 

Link to comment
Share on other sites

Just  making a correction to one of the links provided.

For Moho, if you transfer from 70 km kerbin orbit. The best place is the ascending node that is close to Moho apoapsis.

1. Launch at 96 Angle to prograde (6 minutes to midnight ).
2. The angle to use is not 45' This is too steep for plane changing to Moho's plane. instead use 73.5 degrees (heading) from launch and switch to prograde at 36 km altitude. Set circularization altitude for 70.5 km or so. This establishes the maximum heading in orbit of 15 degrees.

3. It takes approximately 2250 dV and the burn should begin between Angle to prograde of 310 to 295 depending on TWR. The apoapsis of the circum kerbol should be about 1.5 days in front of kerbin. A small correction burn in flight may be needed to get an inclination of 7.000. When you cross 270 angle to prograde (high noon) the bearing should be 105'.

4. It takes 2559 dV (moho intersect) and 323 dV (insertion at 500 km altitude) to establish a circular Moho orbit (this is high, I carry three satellites and set up a network on Moho before landing). Another 1000 to land.

Total cost to Moho 4200 + 2250 + 2559 + 323 + 1000 (10,032). Kiss ole Jeb goodbye, you need about an additional 60% dV (~16,000) to get him back to kerbin.

IF we compare this with to intersect Moho using a strait bearing of 090 and then plane change in kerbol orbit. Spend 2173dV to burn to moho near-perapsis on Hohmann transfer. Since leaving kerbin you have initiall  70 km is around 2300 dv (KE = 2.6Mj) to escape is 3252 (5.3 Mj) 2300 + 2173 = 4473 (10Mj) (10Mj-5.29Mj = 4.71 Mj) leaving 3070 m/s.  This means orbital speed around kerbol dropped from 9284 to 6214. The plane change required is 7 degrees at orbits apoapsis is best place to change. 6214 x sin 7' = dv 757 m/s. Consequently a combined burn to intersect Moho and plane change starting in low kerbin orbit (2250 dV) versus a two step burn (2173 + 757 = 2930 dv) saves ~700 dV. There are a few dV lost on the 15' bearing prograde burn because the planets costing about 10 dV.

 

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...