Jump to content

Using KSP for "fun math"? (Help)


SlabGizor117

Recommended Posts

Hey guys, thanks for checking this post out.

The other day, my older brother came to me while I was playing KSP of course, and asked me if I wanted to do math together. Now, this was the evening after I had finished my school, including dreaded 1980s A Beka Algebra II book with lessons such as... "Precision in Measurement", which at first glance looks like the unspoken rules of social normalities in Math, equivalent to, for example, the unspoken social rule of when to use "lol" in any common conversation, digital or not. The kind of thing that has a ridiculous amount of importance in common Math, but you just have to learn by reading the crappiest explanation ever and stumbling through how to use it like any other social rule. So, just a quick perspective on Math from me. So, we go to the giant whiteboard in our hallway for this kind of thing, and start factoring polynomials... "just for fun". Another quick note, both my brother and dad are math majors and think it's just the coolest thing ever. Don't get me wrong, it's cool to me too... in KSP.

So then, he gets an idea. He looks up physics and math curriculum and came up with just playing with different values of position, speed, acceleration, time, etc. and we graph different speeds and acceleration, on a graph of X Time, and Y Position. Then, we played around with 3 cars: Car A is going slow and speeds up. Car B is going a constant speed the whole time. Car C starts fast and slows down. We graph those, and they all meet at a certain position, and a certain time, and just kinda play around with different aspects of the graph, blah blah blah. Fun stuff.

Then, I thought, since my dad is my "Math tutor"(he does a better job than my brother, so most of the time I need him) and works on and off doing contract IT work, sometime's he's here to help, sometimes not. So I figured, when he's not here, I could do some more "fun math". So, I had an idea to play around with graphing values of Thrust to Weight, or TWR to time, as your TWR gets better as time passes from dropping stages or whatever. So, I'm not an expert at graphing these things, so without telling me everything about how it works, how could I do that? again, I assume I could mess around with Y TWR X Time, but how could I do Thrust and Weight? I assume I should get something like Kerbal Engineer to view that as my rocket is in flight. Anyways, what would be some fun ways to mess around with graphing that kind of thing?

Thanks for reading!

-Slab

Link to comment
Share on other sites

1. Find your start mass and thrust - that gives you initial TWR

2. Find engine Isp - that gives you units (can't remember the mass of 1 unit off-hand) of fuel burnt per second

3. Per second; reduce mass by {fuel burnt according to Isp}, recalculate TWR

Link to comment
Share on other sites

Specific impulse (I_sp) isn't exactly fuel burnt per second, though it is closely related.

The key idea is that the engine's thrust (in, say, newtons) is proportional to the rate at which fuel is burnt (in, say, kilograms per second)--burn fuel faster, and you'll get more thrust.

"Proportional" just means that we can write the thrust force (F_thr) as something times fuel consumption rate (dm/dt):

F_thr = ___ x dm/dt

That something, that constant of proportionality, has units of m/s, meaning it's a velocity--if I remember correctly, it's the velocity of the exhaust that shoots out the back of the rocket engine. That means that the faster the exhaust shoots out, the more efficient the rocket is.

F_thr = v_exh x dm/dt

Divide both sides by the fuel consumption rate (dm/dt) and we get

v_exh = (F_thr) / (dm/dt)

In other words, v_exh is the ratio of thrust force to fuel consumption rate--that is, newtons of thrust per kg/s of fuel consumption.

In any sane world where all engineers use the metric system, we would call that ratio specific impulse (I_sp). However, in our world, some engineers insist on using other units of measurement for distance, meaning that engineers in different countries would get different values for v_exh. To avoid confusion, it is traditional (on Earth and, apparently, on Kerbin) to divide v_exh by Earth's gravity (about 9.8 m/s^2 or 32 ft/s^2) to get units of seconds; that way it doesn't matter what measuring system you use as long as everyone is measuring time in seconds.

So that's I_sp: the exhaust velocity (or ratio of thrust to fuel consumption rate) divided by gravity.

That means if you want the actual ratio of thrust to fuel consumption rate, look up the engine's I_sp and multiply by about 9.8.

- - - Updated - - -

Some other fun math stuff to try out:

Check the current mass of your craft. Check the thrust provided by its engines. Use these to calculate the acceleration it's capable of, and then read the display on the acclerometer (you did include an accelerometer on your craft, right?) to see if your calculations are correct.

Read up on the Tsiolkovsky rocket equation if you haven't already. If you've taken calculus, see if you can use the idea of specific impulse (and perhaps conservation of momentum) to figure out why it works. Whether you've taken calculus or not, you should be able to use the equation ot set up a spreadsheet where you can type in your craft's mass, how much fuel it's carrying, and the I_sp of its engines, and instantly get feedback about how much ∆v it's capable of.

Use the formulas for force of gravity (at a long distance, not just F=mg) and centripetal force to figure out how high and how fast you'll have to be for a perfect kerbosynchronous orbit--that is, a satellite that's always directly above the space center (or any other fixed point on the equator).

Try a suicide burn! Suppose you have a rocket that starts at rest (relative to the planet surface) some very large height above the surface of a planet. The most efficient (and most terrifying) way to land is to freefall (AAAAAAAA! says mission control) until the (very precisely calculated) last possible moment, then set engines to full throttle and slow down just in time so you come to a complete stop at ground level. Try to construct a formula that can determine (given mass and radius of the planet, initial height, mass of the lander, and engine thrust) exactly when you should "hit the brakes" and transition from freefall to full throttle, then test your formula experimentally! (Suggest trying this with an uncrewed probe; your first attempt will almost certainly crash catastrophically--and then you get to try to figure out why!)

Link to comment
Share on other sites

Lol, to be honest, I have no idea what most of that meant, I'm very early in Algebra II also, but calculating a suicide burn looks like fun. Sorry if I'm not explaining what I need very well, but I just thought it'd be fun to play around with graphing the curve of thrust vs. mass as you burn fuel(or maybe velocity vs. mass would be better) or whatever else you could graph, I'm not sure. What I mean is, nothing involved, just something to play around with.

Thanks for the help though!

-Slab

Link to comment
Share on other sites

1. Graph your ships mass over time as the engine burns

2. Then graph your TWR on top of that (use a separate scale for Y)

3. Then graph your acceleration, too

4. Then you could graph your speed

5. And finally travelled distance.

I'm posting from phone right now, so its too difficult to help with the how part for now. The last parts are a bit hazy for me as well, so hopefully someone can step in for me there. I think it would be an interesting exercise though.

Link to comment
Share on other sites

haha, on a side note, I think it's interesting how, at least for me, "lol" has become a word in itself. I never see "lol" and think "Laugh Out Loud" acutally, I never did, but it almost just becomes a word for laughter, not even an acronym... Interesting :P

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