Jump to content

0.90 Kerbal Weather Systems! Alpha 0.5.3 WIP! (Jan 2)


silverfox8124

Recommended Posts

Eve is much hotter (as should be expected as a Venus analogue) than Kerbin due to a much thicker atmosphere that traps a ton more greenhouse gases. Jool should be a Hydrogen-based atmosphere; so not dense but due to gravitational fluctuations should be violently fast-moving. (Think Category 5 hurricane winds for a start...)

Link to comment
Share on other sites

@Shad0wCatcher, thanks but I already have my team working on the details of what makes up Eve and Jool, as well as Laythe. Venus and Jupiter are different colours than Jool and Eve. Also the thicker atmosphere doesn't necessarily mean it traps more gases, it just means there's potential for more of them in a set space.

Link to comment
Share on other sites

Eve is much hotter (as should be expected as a Venus analogue) than Kerbin due to a much thicker atmosphere that traps a ton more greenhouse gases. Jool should be a Hydrogen-based atmosphere; so not dense but due to gravitational fluctuations should be violently fast-moving. (Think Category 5 hurricane winds for a start...)

Actually the default stock atmospheric model for Eve could not physically exist. Lets take the most simple model of the atmosphere, isothermic, and calculate the scale height from the physical properties of the planet. The scale height of a planet is equal to the (Blotzman constant (k) * Temperature in Kelvin) / (average molecular weight of air * gravity). Assuming that Eve atmosphere is mostly CO2 you end of with a scale height of 4.88 km which is way smaller than Venus of 15.9 km. The scale height is smaller than the one for Kerbin which means the atmosphere is heavier and closer to the surface of the planet. If you do the same thing with Duna you will find the scale height is 15.921 which means Duna's atmosphere which is thin extends far from the surface of the planet, over 200km in fact. Now if model the lower atmosphere with a adiabatic model then the atmosphere extends a bit further out for all cases.

As for why a planet atmosphere is hot is not the thickness but the opacity in the infrared range of the atmosphere. The opacity = 1 - (Effective Temperature/Surface temperature)^4. Plug in the number for venus and you get .98 which means 98% of the solar radiation reaching the planet is absorbed. For earth only 40% of the energy from the sun is absorbed. Now if you take Mars its opacity is 17% but its atmosphere is .06 ours which shows the power of CO2 at retaining heat.

- - - Updated - - -

@Everyone, Wow this thread just BOOMED up over night. I'd like to say that while yes, cars and planes are engineered to take lightning strikes, but you have to ask yourself, are kerbals that prepared for it? Lightning in the least damages what it touches in some way or another. The bolt itself is quite hot and packs a ton of punch. Having parts explode and break would encourage the player to not fly in storms.

On the topic of Rbray's clouds, rbray and I have been talking a tad more since he's picking back up on EVE. One problem we're facing is having individual cloud segments and controlling each separately. It's a tad harder than you all may think, as even the both of us are stumped for ideas.

I have thought about this as well but it will be a great amount of work to do. Especially since cumulus clouds seem to generate over the ocean travel a bit building up moisture and then dumping it as rain. Unlike the current Eve cloud model those clouds don't travel very far before then break up. If you look at this GEOS simulation

you can see what I mean. Well that is for a later time.

Another great thing we realized is that there aren't any reliable weather patterns for Mars. The climate isn't as studied as Earth's, same with Jupiter and Saturn. So we're going out on a limb when we try and simulate those, sadly we can't guarantee how accurate those planets(Eve and Jool) may behave in game.

To add to that, Laythe is an entirely new planet with no IRL analogue, we'd be tackling that salty water ball with blind eyes.

Actually I was just discussing this in the 10x kerbol forum. Their exist an excellent paper on why stratospheric inversion happens. The research discovered that the lower atmosphere obeys a adiabatic behavior until the atmospheric pressure reaches .1 atm then switches to a isothermic behavior. The reason is convection is no longer the dominate influence at that pressure and this behavior is true for all worlds independent of position in the star system or atmospheric composition. The paper can be found here : http://faculty.washington.edu/dcatling/Robinson2014_0.1bar_Tropopause.pdf. So models do exist for exoplanet atmospheres.

As you are aware the stock star Kerbol is totally messed up. If you want to perverse the 1360 W/m^2 radiance on Kerbin and use its surface temp of 5840K this will change the properties of

the star as well as the amount of radiation reaching all the other planets. This impacts the range of temperatures a planet can experience. Remember energy has to balance.

[QUOTA]

Also note that Kerbin != Earth. It's close, but it's not there, it tries to be, but it's not there. Kerbin's geographical layout is also MUCH different than Earth's. So don't go into KWS expecting to get Earth's weather(excluding RSS because that's a whole other bucket of worms).

Link to comment
Share on other sites

@jsimmons, what a fountain of knowledge you are. I've open the paper you have linked and will give it a thorough read-through soon enough. It's an interesting find to see a similarity in the way the atmospheres are on different planets. However, what I mean by not greatly studied is that we have live maps of the weather and ocean currents here on earth that are easily accessible by the public. We also have weather simulations being run everyday for the planet to give us weather reports. We as the public don't really have access to that same kind of data for other planets, if there's even the same data for the other planets, so to study the behaviour in weather on other planets is a tad more challenging for me to do with a lack of data.

On the note of kerbin being different from Earth, I stick by my point of the geography being different. It will almost certainly produce a different weather flow than what we see on Earth.

On another note, how long have you been interested in weather stuffs?

~SilverFox8124

Link to comment
Share on other sites

I'd like to say that while yes, cars and planes are engineered to take lightning strikes, but you have to ask yourself, are kerbals that prepared for it? Lightning in the least damages what it touches in some way or another. The bolt itself is quite hot and packs a ton of punch. Having parts explode and break would encourage the player to not fly in storms.

Have to argue, the most serious issue about storms that makes you avoid them is extreme turbulence breaking your vessel apart, not the lightning. I think much more noticable effect of the lightning strike would be stunning vessel's avionics and comms.

Here's the whole report of NASA specialist on lightning strike hazards for a rocket and protection methods dated by the year 1982.

As I tell my team, it doesn't matter how long it takes(within reason), as long as it's done right. I want to give you guys (and myself) a proper sim and not something crudely thrown together for visual effect. This mod has potential to be BIG, and we're making sure that KWS can withstand that pressure (haha get it ;D) as it gets nearer to it's goal. We don't want the project collapsing on itself from lack of foundation.

May be the better way is to move step by step? Targeting a big goal from the beginning may end up in the final thing just too big for Unity to cope with or the team starting to lose enthusiasm half way to finish. Just my thoughts though, I really wish you luck with it and can't wait to try something when it's ready.

Edited by Ser
Link to comment
Share on other sites

@Ser When I worked on KWS alone, I had the end goal in mind the whole time and couldn't stop trying to add ideas to it and make it "better". I do this with everything and it's sort of the bane to my existence. However I have a small team of people who are working on what they need to be, and I do my best to contribute and make sure that everything is on track. We at KWS also try to focus on the immediate next goal once nearing the completion of the current goal, so we get a tiny leg ahead of it. We try to stay away from the end goal too much unless the end goal would be preventing us from doing KWS in a meaningful manner.

As we are trying to run a weather sim on home computers, through unity, through a single-cored physics thread, used by another program and mods simulataneously, we have a lot to manage when it comes to making it work, and taking it step by step is the best way to do this.

On another note, I am still very open to people who have vast knowledge in the weather fields to come and join, as the larger our knowledge base, the better we can tackle problems that may arise.

~SilverFox8124

Link to comment
Share on other sites

As we are trying to run a weather sim on home computers, through unity, through a single-cored physics thread, used by another program and mods simulataneously, we have a lot to manage when it comes to making it work, and taking it step by step is the best way to do this.

This mod seriously has the potential to become the FAR best Kerbalspace Weather System ;)

Having this run on a home computer, through Unity, with the proper application "running in the background" is actually working in your favour, there is no control environment for the weather you create... it's not like you're trying to use Unity to predict tomorrow's weather on Earth.

Mad props for attempting this.

I can already see the temples the Kerbals erect to appease their new weather god.

- - - Updated - - -

Just an afterthought when I reread your post... what if you externalized the simulation, and connected to it via some messaging system, such that you weren't restricted to Unity, or a single thread... you could even run the sim on NASA's supercomputers :)

As long as the sim uses a cross-platform environment, you wouldn't even be bound to Mono.

Link to comment
Share on other sites

@Corax, I've debated having a central server in my home or whatnot that I run and then have all the clients connect to it, but it's a little iffy on that as the bandwidth needed may be a bit higher than I want and I definitely don't have the bandwidth to support tons of players. If I had a server on one of those server racks at those database centers that have intense bandwidth it may be another story, but I'd also have to pay for their usage; money I can't spare each month because of going to college in a month.

I have thought of externalizing the system, and I have tried that before, and it's a lot more challenging for me than one may think. There were bugs and the sim just wasn't cooperating.

However, with the new model we may be able to squeeze in some multi-threading and see how it goes.

This mod is still very early in it's days and we're making progress, so don't worry. We're just sorting out the kinks of the system and what all would be needed for weather to be properly stable. Once we get our stuff sorted out, it'll make it's way to code.

Sidenote: "...it's not like you're trying to use Unity to predict tomorrow's weather on Earth" Teeeechnically we are. And we could. If the weather sim is built properly, it'll have to handle RSS(Real Solar System), which replaces Kerbin with Earth. I also plan on somehow shoehorning in weather predicting. I mean, if you're experienced enough in the meteorology field, then you could do it with some work from the current state of the sim, but for the layman to predict the weather would require a bit more processing on our end, and I don't fully know if the sim could handle that.

TL;DR progress is being made, multi-threading is being looked into, but is difficult because Unity API isn't thread-safe. KWS *could* be used for weather prediction on Earth, server weather not looking too hot.

~SilverFox8124

Link to comment
Share on other sites

@Corax, I've debated having a central server in my home or whatnot that I run and then have all the clients connect to it, but it's a little iffy on that as the bandwidth needed may be a bit higher than I want and I definitely don't have the bandwidth to support tons of players. If I had a server on one of those server racks at those database centers that have intense bandwidth it may be another story, but I'd also have to pay for their usage; money I can't spare each month because of going to college in a month.

I have thought of externalizing the system, and I have tried that before, and it's a lot more challenging for me than one may think. There were bugs and the sim just wasn't cooperating.

It wasn't my intention to make you run a central weather server for the entire community :D

The idea was to have a separate process on the user's own machine, but outside of KSP itself, in order to get rid of Unity's restrictions. Of course that could then potentially allow to run the weather server process on another machine, but it would come more as a side effect. I can see how inter-process communication can be a tough nut to crack though.

And of course you have already considered all that, I just wanted to put it out in the open to free up the headspace ;)

Link to comment
Share on other sites

@Corax, The thing is, Unity provides plenty of useful stuff that I'd have to use manually. Like Vector3's and Vector2's, all the functions that come with them, and all other sorts of things as well. There's plenty that would be lost if I made it a standalone, but then again there's also some gain there as well. All this will come into thought at a later date.

@Everyone, It has come to my attention that the planets in KSP aren't particularly accurate in their atmospheric height to gravity to molar mass of air to other related stuff, the model as we have it would say that Duna's atmosphere is realistically 300km instead of 50k. Just wanting to get some feedback on what you guys think if KWS altered some of the planets to better fit realism in weather.

~Silverfox8124

Link to comment
Share on other sites

My first thought was that most people installing this mod would probably be more interested in realism.

Second thought was 300KM for Duna? Would it be possible to scale them all by a factor like Current_Kerbin/Realistic_Kerbin - in other word if Kerbins atmosphere should be 800Km then scale Duna by (70/800) x 300.

Edit: third thought - when calculating Duna at 300Km does use the increased density of everything in the Kerbol system?

Edited by wasml
Link to comment
Share on other sites

I'd actually prefer it if the atmospheres were kept as they are. I'd rather not lose compatibility with old saves, and we already have a mod for orbital decay. Plus, 800km is a bit high for kerbin. That's above the high orbit threshold, so we would be unable to acess low orbit science, and the delta V required to achieve a stable orbit around kerbin would increase dramatically. Just my opinion though.

Edited by ThatOneBritishGuy...
Link to comment
Share on other sites

@wasml, I can't rescale the entire kerbol system because all the planets are different. There isn't a universal scale size, last I recall.

Sorry - wasn't clear - I meant scale the atmosphere heights using your calculated "should be" height (you said 300Km for Duna).

Link to comment
Share on other sites

@wasml, it's hard to say what the other planets will be in terms of predicted atmosphere height, but Kerbin would definitely not be 800km....

I think i geting what are u saing

on kerbin atmospher will have less heigth but will be thicker on duna cause it has low gravity it will be much higher but lov density on eve probably even smaller but even more dense

Link to comment
Share on other sites

I've always been under the impression that KSP pretty much just cuts atmospheres off at the Karman-line equivalent, effectively ditching the atmo (on Kerbin anyway) much above the mesopause. As far as a weather model is concerned (for Kerbin anyway), we could probably get away with not having to model much of anything once the pressure gets much below 100 mb / 10,000 Pa (i.e. approximately the level of the tropopause, the level around which balloon-launched rawinsondes start measuring a significant temperature inversion). That's somewhere in the neighborhood of 12 kilometers for Kerbin; they used to have the formula on the wiki or I'd figure the exact amount. As far as the other planets are concerned, I would need to do some more research.

TL: DR - I think we should leave the atmos as is.

Link to comment
Share on other sites

About atmosphere heights.

Atmosphere height is a practical limit for where atmospheric density gets low enough to not have effects for our purposes. But really depends on what we are interested in, e.g. in case the purpose is to study particles interaction with the Solar wind (at the limits of magnetosphere), the densities are a lot less than what is considered affecting drag and spaceflight.

Density is function of Pressure P, Temperature T, and Molar mass M: ÃÂ(z) = P(z) * M / (R * T(z)), where R is the universal gas constant, of course both P and T change with altitude z.

The variance of Pressure with altitude is commonly represented with Scale height H. Now, H(z) = Kb * T(z) / ( M/Na * g(z)), where Kb is Boltzmann constant, Na = R/Kb the Avogadro constant. It is clear then Scale height depends from the Temperature profile with altitude, varies (but very slowly) due to gravity change with altitude, and is tied to Molar mass of the atmosphere.

Now, computing the Scale height and comparing with values in KSP shows what this atmosphere height issue is really about.

Kerbin atmosphere has a Molar mass = 28.9644 g/mol. Its temperature averaged for altitude is = 233.22°K. The true value for H (averaged from ground to 70Km) is then = 6829m.

Known that p(z) = P(0)exp(-z/H), P(70km) = 3.58 Pa and ÃÂ(70Km) = 6.57E-5 Kg/m3, a density value still too high to be dismissed when considering drag.

To alleviate that, KSP was designed so that atmospheres don't really scale with H, but with a differnt scale height. In the case of Kerbin, the correct data for pressure correspond to a scale height (averaged with altitude) = 5463m, 20% less than the "natural" value. The resulting ÃÂ(70Km) is then = 5.06E-6 Kg/m3 (7.7% of the non-corrected value), considered low enough for practical purposes.

But if H was uncorrected, the same density would be found at atmosphere height z= 87500m.

Other bodies in KSP are more extreme in the "correction" applied.

Laythe has same M as Kerbin = 28.9644 g/mol, an averaged T = 214.42°K, g(0)=7.85m/s2 and P(0)=60795 Pa. The resulting H (averaged) = 7843m would make ÃÂ(50Km) = 1.69E-3 Kg/m3, a lot higher than acceptable. The "corrected" values in KSP are in accordance with H (averaged)=3250m, 58.5% lower than the natural number. Conversely, the atmosphere height with the "natural" H would be = 120.5Km instead of 50Km.

Jool has M = 2.8 g/mol, averaged T = 200°K, g(0)= 7.85m/s2, P(0)=1519880 Pa. The resulting "natural" H = 75680m; in KSP the atmosphere is modelled in accordance to a corrected H = 29858m, 60.5% lower.

With the "natural" H, the atmosphere limit would be = 507Km, for the same pressure and density found just lower of the limit in KSP (200Km).

Duna exhibits a Molar mass = 14g/mol, averaged T = 173.02°K, g(0)= 2.94 m/s2 and P(0)= 20265 Pa. The natural H (averaged) = 34952m, would make for ÃÂ(50Km) = 0.05 Kg/m3. The corrected values in KSP are in accordance with H(averaged)=2750m, 92.13% lower! Here the atmosphere height for the same density limit would be = 635,5Km.

Eve M=43 g/mol, averaged T = 233.33°K, g(0)=16.7m/s2, P(0)= 506,625 Pa. Natural (averaged) H = 2701.6m, would result in ÃÂ(90Km) = 3.57E-14 Kg/m3, a lot lower than in KSP. KSP has a pressure profile compatible with a H (averaged) = 4363m, 61.5% larger than the natural. With the natural H, atmosphere limit would be = 55730m.

So, to keep those atmospheric properties we know from KSP (in particular density and atmosphere height), there is need to bend the laws of physics in KWS.

Link to comment
Share on other sites

@wasml, it's hard to say what the other planets will be in terms of predicted atmosphere height, but Kerbin would definitely not be 800km....

Kerbin used to have an atmosphere which cut out at 40km (back in the 0.08 days). Scott Manley has some good videos of how easy it was to break your ship apart on contact with in due to the drastic increase in density. To put it in his words: "It was like hitting a brick wall". So lets just make sure that isn't possible with whatever model you put in, though I'd prefer it if the atmospheric height wasn't changed in the first place.

Link to comment
Share on other sites

As diomedea put it, it would be impossible for a natural model to model the Kerbol system.... with that being said, if you all are adamant on keeping things as is, then we're going to need some time to "Correct" our model. Since you guys asked for changes, don't be surprised if it takes us longer to do it.

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