Jump to content

Squadcast from 9 June 2016 haunts my dreams...NathanKell...or someone help me with manual Delta V calculation?


Anth

Recommended Posts

Wow...

NathanKell is tapping away at a calculator for delta V like its simple (tapping...like each one is a water drip of torture for me haha)

I tried to do this off the advanced tutorials but the formula never results in the number I am expecting

So first I will make a ship in KSP and use kerbal engineer to give the result for in space...then I will try the formula from

the advanced tutorial on ship bulding

Ship Parts

Mk1 Command Pod: 0.84t

FL-T400 Fuel Tank: 2.25t (0.25t empty or dry)

LV-909 "Terrier" Liquid Fuel Engine: 0.5t. Isp = 345 (Vac)


Kerbal Engineer Result = 2755m/s total Delta V in space...

The formula from the tutorial is DV = Isp . ln(mtotal/mdry)

Total Mass = 3.59t

Fuel Mass = 2t

Dry Mass = 3.59 - 2 = 1.59t

and then noted on the next line it says if the impulse is in seconds to multply that value by 9.82m/s

Now...the dot between Isp and ln is? what is ln?... is ln = 1/2.718.?

 

according to my calculations to start with...

345 x 9.82 x (3.59/1.59) = 7649 WRONG!

What about...

345 x 9.82 x 1/2.718 x (3.59/1.59)

= 1246 x 2.25786164

= 2813.2 m/s

still not the same answer as kerbal engineer...but closer...

I am sooo confused... :wink:

Link to comment
Share on other sites

First of all, the "specific impulse" is actually the exhaust velocity divided by Earth gravity (this standardizes the units so it doesn't mater if you're using metric or, for some bizarre reason, imperial). That's why you need to multiply by 9.8 m/s^2 (Earth gravity) to restore the correct units of m/s.

 

The "ln" is short for "natural logarithm." The natural logarithm of a number basically means "to what power must e (2.718) be raised to produce this number?" and it shows up all the time in calculus due to the way it interacts with rates of change. So you'll need to take the natural logarithm of the FullMass / EmptyMass ratio.

Link to comment
Share on other sites

You're very close.  I get 2,756.36m/s myself, which is just about dead-on.  The tutorial is being dumb, you want 9.81, not 9.82, which gets me 2,759.17m/s, but that's not much of a difference.  "ln" is the natural logarithm of the number, the number of times you can multiply the constant 'e' by itself to generate it.  It's called that because it happens a lot in nature, like with heat transfer and anything else whose rate of change is tied to a value that comprises it.  If you're on Windows, change the calculator to scientific mode in View menu, or hit alt+2.  "ln" will be just the left of the parentheses.

You should wind up seeing things like 

ln(wet/dry)*Isp*g =

ln(3.59/1.59)*345*9.81 =

ln(2.258)*345*9.81 =

= 0.8145*345*9.81 = 2,756.565 (again slightly different, but this time I was rounding a lot and re-entering values from the post).

 

Link to comment
Share on other sites

Hooray for math!

Here's the formula I usually type into my browser's search bar (because that's faster than grabbing my calculator from the next room over):

 

AAAAA * 9.8 * ln ( BBBBB / ( BBBBB - 5 * (CCCCC+DDDDD) ) )


where you'll need to make the following replacements:

AAAAA --> your engine's specific impulse

BBBBB --> your ship's current total mass in kilograms (multiply tonnes by 1000)

CCCCC --> how much liquid fuel your ship intends to burn

DDDDD --> how much oxidizer your ship intends to burn

(The 5 is there because it's the density of both liquid fuel and oxidizer, thus converting "units" into kilograms. If your ship is using monopropellant or xenon or whatever, use a different density as appropriate.)

Link to comment
Share on other sites

 

Oh...so LN is a function...not a variable...any emoticon here for slapping my forehead with my hand?

LN e...im sure i knew this stuff from calculus in high school...ive lost so much of it in 21 years of not doing it.

Thanks guys, now it all makes so much more sense.

Link to comment
Share on other sites

Yeah, it's very much a use-it-or-lose-it sort of thing. I teach math and physics, so I see it all the time.

 

Fun story: a couple of years ago, mere weeks after I started playing KSP, I was teaching an optional support workshop for a first-quarter physics class--mostly just following along with the material covered in the class with better explanations and more practice problems. A week or two before the end of the quarter, the class itself had gone through all the material listed on the official curriculum, so I was sitting in my office an hour before the workshop and wondering what the heck I was going to teach about.

That's when I got an email from a student in the class, saying "In today's workshop could you talk about gravity and orbits and geosynchronous orbits and escape velocity and stuff like that?"

My brain started screaming "YES! I HAVE SPENT THE LAST MONTH PREPARING FOR EXACTLY THIS MOMENT AND DIDN'T EVEN KNOW IT!"

The workshop went remarkably well that day. And that's when I realized that, for me at least, KSP is far more than just a game.

Edited by AbacusWizard
Link to comment
Share on other sites

I enjoyed maths at school....but calculus was the first thing that school seemed to make it apply to real life in a much bigger way.

What i remember the most was using calculus to calculate the minimum amount of material to contain the maximum amount of volume.

So if memory serves (and only if it does)...a standard cocacola can is in the form that will give the most coke...with the least amount of aluminum needed to

contain it....

then derivatives?....what was it... distance to velocity to acceleration, it was like magic how they were related so closely mathematically with a simple adjustment.

and then I left school...didnt do any calculus for 4 years...tried to help someone and was completely lost...such a shame

Link to comment
Share on other sites

I used to like the bug crawling down a moving windshield wiper on a car going down the highway problem. I think that was in dynamics class. I might could do that again, wait a minute, who am I fooling. I still recognize many of the symbols and formulas, but actually getting my "hands dirty", yeah, no chance. It's all gone. Just thinking about doing complex math now freaks me out.

Link to comment
Share on other sites

I personally wrote myself a little TI calculator program to speed up the process, anyone is welcome to use it if they have a TI graphing calculator.

If you don't know how to program your TI, create a new program (PRGM > New), name it RKTEQ or something, and enter the following:

(functions are found by pressing "PRGM" again while in program editing mode, you'll only need the Input and Disp(lay) for this (and ClrHome). variables are stored (->) with the STO> button. All variables and anything else in quotes are just typed using the ALPHA button)

PROGRAM:RKTEQ
:ClrHome
:Disp "ISP (S)"
:Input A
:A*9.81->B
:Disp "WET M (KG)"
:Input C
:Disp "DRY M (KG)"
:Input D
:B*ln(C/D)->E
:Disp "DELTA V:"
:Disp E

Use the program by entering the Isp of your stage's engine, your rocket's mass, and then your rocket's mass with the stage's fuel drained, and it'll give you delta V.

The output of the program will look like this:

ISP (S)
?345
WET M (KG)
?4400
DRY M (KG)
?2400
DELTA V:
		2051.43632
			  Done

 

If you are using multiple engines with different Isp, it'll get more complicated though.

Link to comment
Share on other sites

I wrote a TI-BASIC program for calculating ∆v about a year ago that starts with a menu to allow the user to select engine and type of fuel. It may be out of date; I don't know how many Isp values have been changed since then, but it should be easy to make any required changes.

 

Link to comment
Share on other sites

@AbacusWizard Nice,  much better than mine. You're inspiring me to get better at TI-BASIC.

For a while I really wanted to make a program that could solve for the amount of mass that can be moved given some rocket parameters and required delta v, but I got stuck on the math.

The rocket equation can be adjusted to include a separate payload mass as follows (my calculator program actually works this way but I didn't include it in my post above):

deltaV = Ve*ln((mi + mp)/(mf + mp)) where Ve is mi is initial stage mass (without the payload) and mf is final mass (again without payload).

My calculator program has a simple step that says

:P+C->C
:P+D->D

…where C is wet mass, D is dry mass, and P is payload mass. It just allows you to calculate the delta V of a stage whose parameters you know (such as a stage that you're reading about on Wikipedia or something), and want to see how much delta V it'll have with a given payload. For example, using parameters for the Centaur upper stage with a single engine:

ISP (S)
?450.5
WET M (KG)
?23077
DRY M (KG)
?2247
PAYLOAD M (KG)
?4000
DELTA V:
		6481.425615
        	Done

Not bad, 6481.4 - 3210 is 3271.4 delta V, almost enough for a Jupiter intercept, but not quite. So I wanted to make a program that would do exactly the same thing, except you'd enter delta v and get payload mass as the answer.

Unfortunately, mp in my equation is not easy to solve for:

(deltaV/Ve) = ln((mi + mp)/(mf + mp))

e^(deltaV/Ve) = (mi + mp)/(mf + mp)

(mf + mp)*e^(deltaV/Ve) = (mi + mp)

mf*e^(deltaV/Ve) + mp*e^(deltaV/Ve) = mi + mp

I really don't know if my math checks out so far but I'm stuck here because there isn't a clear way to isolate mp, and I suspect whatever method is involved is going to be really messy.

Link to comment
Share on other sites

5 hours ago, the_Demongod said:

I really don't know if my math checks out so far but I'm stuck here because there isn't a clear way to isolate mp, and I suspect whatever method is involved is going to be really messy.

Move all the terms that contain mp to one side, factor out the mp and then divide by what is left:

mp*e^(dV/Ve) - mp = mi - mf*e^(dV/Ve)

mp*(e^(dV/Ve) - 1) = mi - mf*e^(dV/Ve)

mp = (mi - mf*e^(dV/Ve)) / (e^(dV/Ve) - 1)

e^(dV/Ve) only needs to be calculated once...

Link to comment
Share on other sites

6 hours ago, Bill Phil said:

Ln is natural logarithm. Using the number e as a base for the logarithm. Your calculator should have a "ln" button, if it's a scientific one

Yeah....I felt a little silly after that was made clear, its been years since I used a function on any calculator other than compulsively tapping away at

the squareroot function when im bored and in a room with nothing but a calculator. But seriously thanks guys for the help.

Link to comment
Share on other sites

1 hour ago, Padishar said:

Move all the terms that contain mp to one side, factor out the mp and then divide by what is left:

mp*e^(dV/Ve) - mp = mi - mf*e^(dV/Ve)

mp*(e^(dV/Ve) - 1) = mi - mf*e^(dV/Ve)

mp = (mi - mf*e^(dV/Ve)) / (e^(dV/Ve) - 1)

e^(dV/Ve) only needs to be calculated once...

Wow, that was way easier than I expected it to be, thanks!

Edited by the_Demongod
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...