Jump to content

KSP Physics


DiamondExcavater

Are KSP Physics good  

58 members have voted

  1. 1. Are KSP Physics good



Recommended Posts

2 hours ago, Snark said:

That's a completely different problem.  N-body physics are really damn hardBy "hard", I mean "proven to be mathematically impossible to solve."

 

1 hour ago, wumpus said:

I think a mathematician would quibble on your definition of "proof".

Well, I suppose it depends on one's point of view. Heinrich Bruns and Henri Poincaré happened to demonstrate this in 1887.  Do they count as "mathematicians"?  :)

1 hour ago, wumpus said:

In the end, the problem is remarkably similar to the "inertial wheel problem".

If you mean reaction wheels, I wouldn't say so.  Reaction wheels are very easy to model, programmatically.  It's human interaction that's the problem-- it's a confusing and in many ways counterintuitive behavior that's hard for people to grasp.

In comparison, N-body actually makes physical sense to people, at least in the short term of "what does the ship do right now" (if not in the long-term of "where will it be a long time from now).  If you run an N-body simulation of a few bodies on a computer, and watch the objects moving around, it makes perfect intuitive physical sense.  "Things pulling on other things" is a concept that people have pretty good intuitive grasp of.  Angular momentum is not.

1 hour ago, wumpus said:

While doing the physics is *hard*, the reason you need to do hard physics is the UI (KSP players like warp and don't want to sit and watch in realtime).  Basically it comes down to how accurate you want your maneuver nodes.  Computing a maneuver node requires you to simulate all the physics for the entire length of time the maneuver node shows.

It's not just that.  Even without maneuver nodes, simply predicting "where will this ship be over the long term" is going to be hard.  Mathematically hard to compute accurately, computationally hard to calculate efficiently... and also hard to show in a UI.

1 hour ago, wumpus said:

'm sure there are kerbal players at APL (Johns Hopkins Applied Physics Laboratory, the place that runs Hubble), can we find them and ask them how they control Hubble's reaction wheels?

I assume the answer will be "you type target coordinates into a box and it uses its computer program to point it in the right place."

Reaction wheels are an easy computational problem.  They're just a hard human-interaction one, particularly if by "human" you mean "average KSP player" and not "highly trained professional who works with reaction wheels as part of their full-time job."

Link to comment
Share on other sites

I

6 minutes ago, Snark said:

 

Well, I suppose it depends on one's point of view. Heinrich Bruns and Henri Poincaré happened to demonstrate this in 1887.  Do they count as "mathematicians"?

All I know about Henri Poincare is that he was well down the path to Special Relativity but conceded Einstein had precedence, can I call him a physicist instead?  He also comes up in "Zen and the Art of Motorcycle Maintenance" as "producing the same philosophy, but coming from the other direction", so can I claim him as a philosopher?  Note that the proven lack of solution remains for "algebraic and integral" solutions, so it doesn't ignore other solutions.

As far as the "why aren't my inertia wheels working", I wouldn't say that KSP has a tendency to pull the punches of rocket science (past the obvious issues of planetary scaling and related docking assistance).  The early posts on the orbiter forum show that HarvesteR had no intention of exposing the KSP community to the full blast of [COTS/LEGO] rocket science and [SOI based] orbital mechanics.  Making inertial wheels a bit more accurate would be one more thing to learn, but I don't expect it to break the donkey's back.

Link to comment
Share on other sites

5 hours ago, kBob said:

[a bunch of stuff about simulating a simplified model of reaction wheel saturation]

I'd say, if you're refering to counting degrees/minutes/seconds of arc over which torque is applied, that you've almost got the right of it.

Easy mode would be to just use time, though.  Present wheel saturation as the persistent amount of time a wheel can apply torque on a given axis -- say a range of +/- 5 seconds of rotational accleration on each axis, presented to the player as a trio of bars labled pitch, yaw, and roll, matching up with the control authority indicators in the lower left corner, but available in a context menu on any part with a wheel (showing the sum for the whole ship in the resources tab and on the part with control).  The bar starts with an indicator in the middle and numeric value +/-5.00s, the player sets the ship spinning on one of the axes for two seconds, that saturation bar moves to say +2.13s/-7.87s, then to +4.81/-5.19 when they almost but don't quite get themsleves stopped, then down to +/-5 when SAS settles down.  If they want more torque to turn faster, they either leave the wheels off or  use RCS and spin the wheels to saturation as a boost, treating them as a sort of torque capacitor.

I feel this model would be quite intuitive to desaturate -- as soon as the player sees that torqueing in either direction moves the saturation indicator, it's a pretty small hop to think of moving it by hitting the RCS in the opposite direction of the torque.  Throw in a couple of nice shiny buttons in the smarter probe cores to automatically desaturate the wheels in a "wet" (with a gentle RCS burn in the appropriate vectors, to preserve current rotation) or "dry" (spin down the wheels, letting them torque the craft as they will, good for perfectly halting a wheel-induced rotation without SAS's shenanigans) manner, and boom, they're Bob's niece or nephew. 

Link to comment
Share on other sites

11 hours ago, Snark said:

 

No.  I see that you understand the idea of saturation, which is great.  :)  The problem is that the only way to de-saturate is to exert counter-torque on the ship.  That is, every single scrap of torque that the reaction wheel previously generated in one direction, it has to then exert in the opposite direction to de-saturate, completely canceling out any angular momentum it previously imparted.  It is physically impossible to "slow it down with no other side effects", which is the vital point at the center of all this that most folks seem to miss.  If you've got brakes or whatever to slow it down... those brakes are mounted on the ship, and the act of slowing the reaction wheel down will twist the ship.

No, it doesn't work that way.  There's  no limit on "degrees of rotation."  You could have a thousand-ton ship, and a little one-kilogram reaction wheel can rotate that giant ship by as many degrees as you like.  (It will take practically forever, but give it enough time and it'll get there.)  What it can't do (and which the KSP wheels can, which is what makes them impossible) is impart persistent rotation to the ship.

Except that even the ISS needs to expend fuel.  RCS can do two very important things:  1. Adjust the rotational position of the craft.  2.  Adjust the rotational momentum of the craft.  Reaction wheels can do #1, but not #2, which is why you pretty much have to have RCS regardless of whether you have reaction wheels.  Having the reaction wheels just means that they can use them for #1 tasks instead of wasting fuel on that.  The thing that's wrong with KSP reaction wheels is that they can do #2, which in real life is impossible.

Okay, I hear you say, you keep going on and on about how "it's impossible", Snark.  What's so impossible about it?

Here's the deal:

There's a really important law of physics, right up there with the law of conservation of mass-energy, conservation of momentum, and so forth.  Angular momentum is conserved.  Put simply, you can't make an object spin in one direction without making something else spin in the opposite direction.

However, although angular momentum is conserved, angular position is not, which is why reaction wheels are a thing.  Let's say you have a spaceship that has a reaction wheel on board.  The ship is floating in space, and is at a dead standstill, rotationally speaking.  Nothing's rotating at all:  not the ship, not the wheel.  Let's say the ship is pointed east, and you want it to be pointing west.  What do you do?

Simple:  you start the reaction wheel spinning.  To start it spinning, you've got an electric motor mounted on the ship.  It exerts torque on the wheel to start it spinning up to, let's say, 1000 RPM.  Doing that exerts an equal and opposite torque on the motor, which is mounted to the ship, so the ship starts rotating in the opposite direction to the wheel.  But since the ship is much, much bigger and more massive than the wheel, it rotates much more slowly than the wheel does.  Let's say it's rotating at 0.1 RPM.

So... you just wait five minutes (with the wheel spinning the whole time), after which the ship has rotated 180 degrees and is now pointing the direction you want it to.  Now you need to stop the ship.  How do you do this?  Easy:  Just apply brakes to the reaction wheel and stop it.  This torques the wheel in the opposite direction that you did when you spun it up... which means it torques the ship in the opposite direction that you initially started it rotating.  And it's a precisely equal and opposite amount (that's what conservation of angular momentum is all about).  So no high-tech is needed:  just put on the brakes and stop the wheel.  Presto, both ship and wheel are now precisely at a dead halt with no rotation, and the ship is pointed the opposite direction from what it was.

So, that's what a reaction wheel can do.

What it cannot do is supply a torque that permanently affects the rotation of the ship.  In the above scenario, suppose I have a ship that's already slowly rotating at 0.1 RPM, and I want to stop it.  Well, I can stop it with the reaction wheel (by spinning it up to 1000 RPM to counter the rotation)... and now I have the ship happily sitting there, stopped.  That's what I wanted, right?  Except that now my reaction wheel is spinning madly at 1000 RPM and I can't use it anymore for torque in that direction because that's as fast as it can go.  This is what we mean when we say the wheel is "saturated".  And there is no way to de-saturate it without precisely mathematically UNdoing all the work that it just did.  Sure, you can stop the wheel rotating by applying the brakes... which will start the ship rotating again in exactly the direction and speed that it was going before you turned on the wheel.

 

 

Sorry I wasn't bothered to cherry pick certain paragraphs, but I understand how it works now, but what if you had multiple reaction wheels facing the same direction? Once you use one you can't use it again, but you could have spares and use them right? Again I'm no expert and don't yet have a science degree.

Link to comment
Share on other sites

8 minutes ago, DiamondExcavater said:

Sorry I wasn't bothered to cherry pick certain paragraphs, but I understand how it works now, but what if you had multiple reaction wheels facing the same direction? Once you use one you can't use it again, but you could have spares and use them right? Again I'm no expert and don't yet have a science degree.

Well, sure, you could have a few more reaction wheels, but it doesn't really solve the problem.  Taking my "house with garbage can" analogy, it's just adding a few more small garbage cans.  Yes, that means they can hold a bit more trash.  But it doesn't solve the problem of getting rid of the trash-- it's still there, they'll still fill up when used enough.

Link to comment
Share on other sites

8 minutes ago, DiamondExcavater said:

Sorry I wasn't bothered to cherry pick certain paragraphs, but I understand how it works now, but what if you had multiple reaction wheels facing the same direction? Once you use one you can't use it again, but you could have spares and use them right? Again I'm no expert and don't yet have a science degree.

That's not physically impossible, but it's going to be horrendously inefficient weight-wise compared to just bringing some RCS fuel.

Also, those "used" reaction wheels aren't like used batteries. They're spinning away like crazy. With the best design in the world, some of that spin will make it back to the ship, so you'll have to constantly expend energy on keeping them spinning. They're also gyroscopes, of course, so any other rotational maneuver will cause them to exert lateral forces on the frame of the ship.

You could drop them overboard... but, again, if you want to throw something away to get rid of unwanted angular momentum, use RCS.

Link to comment
Share on other sites

"Are KSP Physics good?"

 

Do you mean to ask, "Do KSP physics accurately model the real world"?.. if so, the answer is No, not really.

 

Do you mean to ask, "Do KSP physics approximate real life well enough for a sim-space-game"?..  You betcha! KSP fizzics rocks!

 

Link to comment
Share on other sites

Thinking on the ongoing 'reaction wheel' discussion and hoping my understanding of @Snark's explanations are correct...  (the house and garbage bin analogy is cool by the way)

If a reaction wheel can rotate a ship whilst it is running and the act of stopping it running also stops the ship's rotation then could this be integrated into how they work in game?  Press the WASDQE keys to activate the wheel(s) and rotate the ship, on releasing the key the brakes are applied to the wheel(s) and the ship also stops rotating, presumably an acceleration and deceleration period would also need to be applied, giving a gradual increasing and decreasing effect, also.  To me this works very much like releasing the rotate key with the SAS still on - the ship stops rotating, though I can then turn off the SAS and the ship stays still, which as I understand it is physics wise inaccurate/unrealistic.

Maybe a separate RW toggle would be needed to select the reaction wheels independently, like we currently have for RCS, would be needed if this were applied, but I don't think the 'ship stops rotating when you let go of the key when using just RW' would be a huge issue for most players to grasp.

Apologies if I misunderstood or missed a key point or factor.

Link to comment
Share on other sites

This entire "reaction wheels" and "gyroscope" buisiness I understand to the most basic of principals, but thinking how to implement it or trying to think how it really works in satellites (or why they even use it) causes great confusion and to be honest it is like learning special relativity for the first time (which wasn't too bad but the whole time thing gets confusing)

on a side note for that special relativity, do you guys think it may exist in game? Traveling speed of light somehow and then returning or slow lying down to swap to another ship to check on time? I doubt it because the game clock goes across all ships equally.

and off topic, my friend said there is a barrier in the solar system quite a distance from the sun, is that true? Or is space infinite (or was it not infinite in the past but now is infinite?)

 

edit: @Snark

for your analogy, rubbish is momentum, right?

Edited by DiamondExcavater
Brain pop
Link to comment
Share on other sites

21 hours ago, Snark said:

I'm not trying to say that nobody would enjoy working with realistic reaction wheels.  I'm sure there are some hard-core realism nerds out there who like to use KSP as a simulator rather than a game, and the more realistic the better, and they actually take joy in tricky physical interactions like that.  So maybe a mod would be nice, for people like that.

But that does not describe the overwhelming majority of KSP players (including me), who would merely be confused and annoyed by the complexity.

That was a very informative read Snark and I thank you for it.  On topic.  On the whole KSP psychics are just fine for the purpose of the game, I do wish kerbals wouldn't slide off ladders and or randomly fire themselves off into space when grabbing for a ladder though :(

Link to comment
Share on other sites

2 hours ago, pandaman said:

If a reaction wheel can rotate a ship whilst it is running and the act of stopping it running also stops the ship's rotation then could this be integrated into how they work in game?  Press the WASDQE keys to activate the wheel(s) and rotate the ship, on releasing the key the brakes are applied to the wheel(s) and the ship also stops rotating, presumably an acceleration and deceleration period would also need to be applied, giving a gradual increasing and decreasing effect, also.  To me this works very much like releasing the rotate key with the SAS still on - the ship stops rotating, though I can then turn off the SAS and the ship stays still, which as I understand it is physics wise inaccurate/unrealistic.

Maybe a separate RW toggle would be needed to select the reaction wheels independently, like we currently have for RCS, would be needed if this were applied, but I don't think the 'ship stops rotating when you let go of the key when using just RW' would be a huge issue for most players to grasp.

Apologies if I misunderstood or missed a key point or factor.

<insert sound of jaw hanging open>

<smacks forehead>

Oh.  Derp.

You're absolutely right, and that's a brilliantly simple idea.  It's exactly how it should work, and I take back everything I said about how it would be impossible to implement a UI that's comprehensible.  That.  That right there.

The way to make a UI that works with realistic reaction wheels is that pressing one of the rotation keys gives you a brief spurt of torque in that direction (say, a second or less), which then drops to zero for as long as you hold the key.  Releasing the key would then generate an exactly equal and opposite spurt of torque, which cancels out the initial spurt it generated when pressed.

In terms of what this would look like to the player, for a stationary vessel floating in space:  essentially, the reaction wheel is a constant-speed rotation control rather than an acceleration control like it is now.  The ship is stationary; you press-and-hold E, and the ship pitches down at constant (low) speed until you release E, at which time it comes to a halt.

It's perfect, it's simple and intuitive, and it's exactly how reaction wheels work IRL.

The one complication is that you'd really have to have separate toggles for reaction wheels versus RCS rotation.  It comes back to the "intent" thing I mentioned earlier:

22 hours ago, Snark said:

And an automatic system can't do all the work.  It requires advance planning and understanding by the player.  If I've got my ship at a rotational dead halt, and I start it rotating slowly in one direction... why did I just do that?  Did I do it because I want to change my rotational position and I intend to stop the motion once I've rotated far enough?  Or did I do it because I want to change my rotational momentum and I plan to leave it rotating?  In the former case, I should use the reaction wheel; in the latter case, I should use RCS.

So there would need to be separate toggles for "RCS rotation enabled" and "reaction wheel rotation enabled."  Or maybe you could work out some scheme where holding the SHIFT key makes a difference, or something.  And you'd have to figure out how SAS works with these things.

So there would be some complexity there, and I think it's not obvious what the right UI would be until someone actually tries it (ideas that sound great on paper often turn out to be annoying in practice).  But I expect that something could be worked out, it's just a matter of detail.

The important thing is that you've solved the really hard part of the problem, @pandaman.  Thank you for seeing the answer more clearly than I could.  Two thumbs up.  :)

1 hour ago, DiamondExcavater said:

edit: @Snark

for your analogy, rubbish is momentum, right?

Angular momentum, yes.

 

Link to comment
Share on other sites

the reaktion-wheels are a little bit more realistic...;
it is possible to convert electrical energy to Torque...
you need realy fast spinning Gyroscope, then you can create torque if you try to rotate it...

If there a spinning gyroscope, you can use ist as an "anchor" for your torque...

https://en.wikipedia.org/wiki/Precession

Edited by Sereneti
Link to comment
Share on other sites

46 minutes ago, Sereneti said:

the reaktion-wheels are a little bit more realistic...;
it is possible to convert electrical energy to Torque...
you need realy fast spinning Gyroscope, then you can create torque if you try to rotate it...

If there a spinning gyroscope, you can use ist as an "anchor" for your torque...

https://en.wikipedia.org/wiki/Precession

No, it doesn't work that way.  Gyroscopes do not "create torque", they just act as a sort of storage battery for angular momentum.  They neither create nor destroy it, since that would violate physics (conservation of angular momentum).

Some spacecraft do in fact use gyroscopes as you describe, but it's not a magical angular momentum machine and is still subject to the laws of physics.  Unlike KSP reaction wheels, which do violate the laws of physics.  See the preceding discussion in this thread.

Link to comment
Share on other sites

22 minutes ago, Snark said:

No, it doesn't work that way.  Gyroscopes do not "create torque", they just act as a sort of storage battery for angular momentum.  They neither create nor destroy it, since that would violate physics (conservation of angular momentum).

Some spacecraft do in fact use gyroscopes as you describe, but it's not a magical angular momentum machine and is still subject to the laws of physics.  Unlike KSP reaction wheels, which do violate the laws of physics.  See the preceding discussion in this thread.

No reaction wheels just store angular momentum like an capacitor store electrical charge, its only two reason for it to create angular momentum in KSP, atmospheric drag and engine unbalance. Real world has tidal forces and light pressure who matter over years for satellites. On the other hand real world engines has far more gimbal range  

Link to comment
Share on other sites

2 hours ago, magnemoe said:

No reaction wheels just store angular momentum like an capacitor store electrical charge,

Not quite sure what the "no" here is-- sounds like you're agreeing with me, that's basically what I just said.  :)

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