Jump to content

[0.23] Alternis Kerbol - Release thread - [v0.1, Jan. 3] (development halted)


NovaSilisko

Recommended Posts

Preliminary conclusions from a 10-year (315 Ms) simulation, |ÃŽâ€E|/E0 < 2E-7, ||ÃŽâ€p||/||p0|| < 1E-12, ||ÃŽâ€L||/||L0|| < 1.2E-9:

The Jool system loses the Mun a bit after 10 Ms and Bop around 175 Ms. Pol's orbit seems to have moved a bit, but it may stand a chance.

Laythe, Kerbin and Minmus are very stable. The Tylo system doesn't seem to move much, I haven't looked at it closely.

I'm still trying to make gifs out of my animations, but plots of the kinetic energies will have to do for the moment.

Javascript is disabled. View full album
Edited by eggrobin
Link to comment
Share on other sites

So what software are you using to do this again? I kind of want to mess with it, and just write up random solar systems and see how disastrous they are.

Finishing up Alternis v0.1 right now. After that, I'm gonna make LightShifter an independent mod with fully customizable values, and just bundle it with Alternis.

Edit: Hello darkness my old friend...

hZexShl.png

fkLF9.gif

Edited by NovaSilisko
Link to comment
Share on other sites

It's complicated. At the moment (v0.0), the in-game positions of the planets are as good as random, and this causes the spawning in space bug. Stock anomalies + the M0s I gave is what you get from v0.0 + the anomaly fix. This is what I am using at the moment.

To clarify:

...

Yep, those match what I'm using, except that I got the M0 values for Ike and Gilly reversed from what you have in the table (which shouldn't really matter w.r.t Jool's moons) and I had an eccentricity of 0 for Minmus, not 0.03 (which might be significant). In addition, I used the gravitational parameters listed in-game from the info window in the tracking center.

...

EDIT:

Can you give me the RGB values for your planets, so that we use the same conventions?

EDIT 2: Now that I got the times right, it doesn't seem so inconsistent. I'll run the simulation some more.

I don't think I can, unfortunately. They're the standard colors that Octave applies to plots, whatever those are. I haven't seen those colors defined in their documentation, but I haven't been able to look very extensively for them either.

So what software are you using to do this again? I kind of want to mess with it, and just write up random solar systems and see how disastrous they are.

Finishing up Alternis v0.1 right now. After that, I'm gonna make LightShifter an independent mod with fully customizable values, and just bundle it with Alternis.

Edit: Hello darkness my old friend...

http://i.imgur.com/hZexShl.png

http://i.imgur.com/fkLF9.gif

I'm using a C++ program that I wrote from scratch to implement an RK5(4) adaptive solver. It's not user-friendly at all, and all the planet parameters are currently defined in the source code. I've been thinking of trying to clean it up, at least to the point that it pulls parameters from a config file and does a little error checking, and making it available. The program spits out binary position data into a file, and I have a couple of .m files that I use in Octave to read the data in and make the plots.

EDIT:

And here's my simulation animated: http://youtu.be/84Q9GDj25qs

eggrobin, I suggest adding another view that shows a closeup of Jool and its moons, since most of the action happens there.

Edited by Mattasmack
Link to comment
Share on other sites

So what software are you using to do this again? I kind of want to mess with it, and just write up random solar systems and see how disastrous they are.

Finishing up Alternis v0.1 right now. After that, I'm gonna make LightShifter an independent mod with fully customizable values, and just bundle it with Alternis.

I'm using Mathematica's NDSolve (the thing decides what integrator to use and is typically smarter than I am in this regard), the Mathematica file is in the Google Drive folder I just added to my signature (this is the very file I'm working on, so it will sometimes contain random stuff). There's also a .mov file showing the my 10-year simulation. I tried to make it somewhat readable, but you will need Mathematica to use it (you can view some of it with the Mathematica Player, I think). A student (may be free, depending on your institution) or home ($221.25) edition will do.

"Curiously enough, the only thing that went through the mind of the bowl of petunias as it fell was 'Oh no, not again'. Many people have speculated that if we knew exactly why the bowl of petunias had thought that we would know a lot more about the nature of the Universe than we do now."

Why is the MET 4h?

EDIT: explanation of the animation (https://docs.google.com/file/d/0B4y-shYXMH9BemczakhacjZqMFU/edit)

The orbits are the 2-body ones at t=0, the dots are the bodies.

EDIT2: I added a pdf generated from my Mathematica notebook in case someone needs it.

EDIT3: Mathematica crashed while generating the pdf. I need to re-run the simulation... :(

EDIT4: Happy new year!

EDIT5: Whenever you get the 'spawning in solar orbit' bug, take a screenshot of the solar system (with jool and the inner bodies visible) and of the jool system; also note the universal time. Comparing this with the orbital elements from the source, it should be possible to see whether the planets are where they should be.

Edited by eggrobin
Link to comment
Share on other sites

Why is the MET 4h?

I resumed last night's save, and it was busted. If you exit the game then reload your save, it breaks... just like before. You don't spawn in solar orbit anymore it seems, but it still messes up when you reload stuff.

Quickloading fixes it, it seems. I'm wondering though if maybe I could move all this to Awake()? I don't know when the vessels initialize, so if all the proper references exist in Awake (doubtful tbh), then that might work. I'll take screenshots of stuff as it breaks.

Edited by NovaSilisko
Link to comment
Share on other sites

The guy who moved the planets, I'd venture... It's not just this specific ship, tried it with several, on a new save. Originally, I was modifying the epoch so that, on game start the solar system would look better(not as uniform to start). I thought that was the cause and figured I'd just remove it and live with an even solar system except... it still does it. Somehow I never noticed this before, or it only just started. I don't know... It seemed to work perfectly fine when I removed the cb_sun.orbitingbodies.removewhatever thing, but that's a bad solution as was said...

The planets don't seem to be moving much when comparing the quickloaded state, and the broken state.

Edited by NovaSilisko
Link to comment
Share on other sites

@NovaSilisko I'd like to look into it (now I have an easy way of knowing where the planets should be, by just adding n*t to the mean anomaly and plotting), but I would need some steps to reproduce (preferably on a stock + Alternis install), as well as the current state of PlanetShifter.cs.

@shrx, thanks! I'm not sure how this would affect the already slow integration though.

Link to comment
Share on other sites

@eggrobin, maybe you will find this useful for collision handling (my question on mathematica.SE): http://mathematica.stackexchange.com/questions/38687/detecting-a-collision-in-n-body-simulation-with-ndsolve

Well, first you have to decide what the outcome of a collision should be. Your question refers to completely inelastic collisions, but that doesn't seem like a correct outcome for many cases. For example, an extremely glancing collision of two similar-sized bodies might rip them apart due to tidal forces and strew most of their mass in all directions as smaller pieces of debris.

Link to comment
Share on other sites

For example, an extremely glancing collision of two similar-sized bodies might rip them apart due to tidal forces and strew most of their mass in all directions as smaller pieces of debris.

O, that way madness lies.

More data from the 10-year simulation (Besides the fact that it takes an eternity and a half for Mathematica to generate a video from the animations it shows me, I can't find a good solution for the Jool system animation: if I run it faster than 50 000x it is illegible, but at 50 000x it lasts 1 h 45 min):

A new and improved table of the kinetic energies (I left out Eeloo last time, the bodies are now shown depth-first, increased the MaxRecursion so the plots look decent), and a huge (10 000 x 1 000) speed plot (excluding the sun).

Javascript is disabled. View full album

EDIT: I'm a bit puzzled by the low-frequency component in Eve's kinetic energy... Could that be the influence of the Eeloo-Vall system?

Edited by eggrobin
Link to comment
Share on other sites

For what it's worth, I haven't actually found myself ending up in solar orbit on launching. It's only on resuming a save...

Good work on the sims, you guys... cool to see this stuff go on in a real physical environment.

edit: .. okay I haven't even changed anything and it just has decided to work what the hell

edit2: now it's broken again just after restarting the game again make it stop

I have a bit of a hunch... from the printouts I'm getting, it seems that for some godforsaken reason, if you have something set to apply on the main menu, it runs the awake and start functions twice. Can't help but think that's screwing with something. Also going to move it off EveryScene. Forgot that I don't need to do that anymore - that was only because lightshifter needed that.

Edited by NovaSilisko
Link to comment
Share on other sites

I made most of it in 0.22, and 23 didn't really ruin anything so it should be fine.

Edit: Just spawned in solar orbit again...

Okay, literally the only way I can find to fix this bug is by commenting out cb_sun.orbitingBodies.Remove(cb_kerbin)... can somebody please tell me what side effects that might have though

Edited by NovaSilisko
Link to comment
Share on other sites

.. Oh my god I think I just fixed it. CelestialBody.orbitDriver.reverse was enabled on kerbin by default, and only Kerbin. I found that mighty suspicious and instead gave it to only Jool. And, well... my ship that was orbiting kerbin when I exited the game is still orbiting. And I haven't popped up in solar orbit when trying to launch.

nevermind it's still ****ed

okay I think i've tracked down at least something... if you timewarp ahead for a quarter of an orbit of jool around the sun, save, exit game, and reload, any ships in orbit will be at their past position - as in what jool would be at the start

Unless someone can interject with some sort of epiphany on why this damn thing is doing what it's doing, I don't think I can ever say the next release will be done. I am so tired of working with this...

Dres is also ripped from solar orbit and put in orbit around another body, and orbits around that work perfect... what's different?

Edited by NovaSilisko
Link to comment
Share on other sites

The ships in orbit around sun/launching around sun bug has just started cropping up for me repeatedly with Jool in that position. The only thing I can think of is that Kerbin is currently crossing the orbit of Jool around the Sun, which could be causing a problem. (I faintly remember some similar problem being mentioned before to do with crossing orbits, but I can't remember what it actually concerned). Other than that I can't offer any more help :/ perhaps releasing the updated version without the complete fix could help to produce more helpful bug reports?

Link to comment
Share on other sites

A new and improved table of the kinetic energies (I left out Eeloo last time, the bodies are now shown depth-first, increased the MaxRecursion so the plots look decent), and a huge (10 000 x 1 000) speed plot (excluding the sun).

EDIT: I'm a bit puzzled by the low-frequency component in Eve's kinetic energy... Could that be the influence of the Eeloo-Vall system?

I'm guessing it's a resonance with Jool in some way. What happens to Moho at 2.25*10^8 s?

Link to comment
Share on other sites

Preliminary conclusions from a 10-year (315 Ms) simulation, |ÃŽâ€E|/E0 < 2E-7, ||ÃŽâ€p||/||p0|| < 1E-12, ||ÃŽâ€L||/||L0|| < 1.2E-9:

The Jool system loses the Mun a bit after 10 Ms and Bop around 175 Ms. Pol's orbit seems to have moved a bit, but it may stand a chance.

Laythe, Kerbin and Minmus are very stable. The Tylo system doesn't seem to move much, I haven't looked at it closely.

I'm still trying to make gifs out of my animations, but plots of the kinetic energies will have to do for the moment.

Do you know why the energy drift is so high? Earlier you mentioned you were using a symplectic integrator. If that's still the case, that high an energy drift suggests an error, either in the energy calculation or in the simulation. (After all, the point of symplectic integrators is to eliminate energy drift!). It might be helpful to look at a plot of the energy error over time, to see if most of it comes from one particular event or if it is just drift. In my earlier simulations of the stock Kerbol system, I found that tolerances loose enough to allow energy drift in that range definitely had an impact on the fate of Jool's moons. If that energy error does come from drift, then if you can control the solver in Mathematica you should try tightening its tolerances and see if you can get the error down by an order of magnitude or so. I'll wager you see a difference in your results.

Also, what eccentricity were you using for Minmus in that simulation? I believe it's 0 in the Alternis mod, but your table earlier had 0.03.

(replying to posts all out of order, whoops)

Very cool. Anything interesting happening in the Tylo system?

Nope! I didn't show the outer planets in my animation, but I checked on them and absolutely nothing interesting happened around Tylo or Eeloo.

I'm curious to see how long Bop would last with it (optionally) being a moonlet of Kerbin now. I'd guess not more than a day or two.

Let us know just where you want to put Bop, and I'd be happy to try it (... later tonight or tomorrow, probably).

Edited by Mattasmack
Link to comment
Share on other sites

I'm guessing it's a resonance with Jool in some way.

This probably makes more sense.

What happens to Moho at 2.25*10^8 s?

Bad plotting happens. I should increase PlotPoints (MaxRecursion is already at 15).

More on the 'orbiting the sun' bug. It seems in the scenario you describe (reload a save with a ship in Kerbin orbit) is the ship's fault (the bodies are where they should be).

It occurs after reloading the save, and after restarting the game (exiting to main menu and going back to the save won't do it).

These are the orbital elements after restarting the game, but before opening the save (Looks correct):


ORBIT
{
SMA = 680021.630935808
ECC = 4.22982001551599E-05
INC = 0.0886935965917476
LPE = 123.812416691305
LAN = 303.763776806527
MNA = 2.79772644965481
EPH = 159722.345319818
REF = 1
}

After opening the save (this is a highly eccentric orbit around the sun, with its aphelion twice that of Tylo; the ship is around the position of Jool at UT = 0 s):


ORBIT
{
SMA = 26727254086.9888
ECC = 0.999040655797898
INC = 6.04635789986987
LPE = 176.48236550725
LAN = 5.1220573694153
MNA = 6.1027150029262
EPH = 1915783.09934322
REF = 0
}

I'm not sure where such an orbit could be coming from...

Link to comment
Share on other sites

Earlier you mentioned you were using a symplectic integrator. If that's still the case, that high an energy drift suggests an error, either in the energy calculation or in the simulation. (After all, the point of symplectic integrators is to eliminate energy drift!). It might be helpful to look at a plot of the energy error over time, to see if most of it comes from one particular event or if it is just drift. In my earlier simulations of the stock Kerbol system, I found that tolerances loose enough to allow energy drift in that range definitely had an impact on the fate of Jool's moons. If that energy error does come from drift, then if you can control the solver in Mathematica you should try tightening its tolerances and see if you can get the error down by an order of magnitude or so. I'll wager you see a difference in your results.

Also, what eccentricity were you using for Minmus in that simulation? I believe it's 0 in the Alternis mod, but your table earlier had 0.03.

I'm not using a symplectic integrator at the moment, I had trouble getting Mathematica to use one. I might want to try again.

As a result, the energy error is a drift (the plot is pretty boring, the relative error as a function of time is roughly affine). The energy of the system increases.

I can control the solver in Mathematica. This is not the problem. Understanding what the settings do, however, seems nontrivial...

Regarding Minmus, it seems I typed in the inclination. :P

Edited by eggrobin
Link to comment
Share on other sites

@eggrobin, I played around with your simulation, but I used parameters for the stock KSP solar system. In comparison with Mattasmack's simulation, Vall gets ejected at around 13000 ks vs. 2400 ks (from this video

).
Link to comment
Share on other sites

I noticed it was partially mentioned earlier, but I don't suppose you ever plan on making the Light Changes, the redesigned system, and/or the comets all separate features? I really REALLY like the lighting changes, they're simply wonderful. And I love the comets too. That was something I never thought would ever be practical in KSP. And the retextures/new terrain on the planets is phenomenal. I particularly love the new Duna, and The new Tylo. As well, Jool's new coloring is really nice. I always found the stock green to be just a tad too vibrant. But all this said, there's something to be said for the stock solar system. If there was a way to add new planets, similarly to Krag's planet factory, with these awesome retextures and terrain upgrades, with new names, new orbits and new characteristics, leaving the stock system mostly intact, that'd be awesome. Or maybe once interstellar travel is implemented. But I'm rambling. What I'm saying is that I really love this mod, but for now I'd like to keep the default solar system. I'd really like it if I could have the stock system with that lighting though, and if comets could somehow be added that'd be great! All in all, I think this is absolutely fantastic work! Keep it up!

+1 to this :)

Link to comment
Share on other sites

@MarcRan17 & Frostiken - Definitely going to make the light shifter separate! Soon as I get the next version of Alternis proper fixed and released, I'll set up the light shifter as its own mod, and just bundle it with this mod by default. I think I might eventually cave and snag bits of code from PF to expand Alternis even further (Krag said I could, a while ago)

@bulletrhli - I'm going to make an Alternis Lite, with just the terrain changes but no changes to physical properties, again when the current version is done.

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