Jump to content

Way to see drag vales?


Recommended Posts

So I'm making a spaceplace in the 50-60 ton range, and I don't know what I did, but some relatively minor change now causes it to no longer go to space.

I can't figure out what happened, but I think something is causing massive drag that shouldn't be, as it now feels sluggish and underpowered, and this is compared to another fairly similar spaceplane that's 15 tons heavier, with the same engines, it it goes to space just fine. Even worse, I just now forgot to retract the landing gear, and it still outperformed the lighter plane.

So something's very wrong.

I've tried to figure out what's causing the drag, but no luck.
I'm not even sure if it's really drag, but it seems to be the most likely culprit. So far, I haven't any way to even see drag values.
Supposedly MechJeb shows atmospheric drag, but I can't find that feature. And some other mods I tried were out of date. At any rate, this will only confirm if drag is the issue, not what part is causing it.

Any ideas?
Any suggestions to see the drag of parts?

Link to comment
Share on other sites

Alt-F12 -> Physics -> Aero -> "Display Aero Data in Action Menus"

Now fly the ship, right click on various parts in flight, and read out their individual drag values.  There's also the AeroGUI in that same Alt-F12 menu that shows aggregate values for the whole ship.  And of course, F12 (no Alt) brings up a visual overlay with red arrows for drag, blue for wing lift, light blue for body lift, yellow for control surfaces etc.  The red drag arrows can be a bit confusing though; they're sometimes confused about which parts are shielded in cargo bays. 

Link to comment
Share on other sites

@fourfa
I think the cargo bays are the issue.
I'm seeing huge red lines from the (empty) bays themselves, and quite a bit from a bay that's behind another bay. Additionally, there are a number of parts causing significant drag that should be shielded in the bay.

But let me clarify what you said with regard to shielded parts: Do you mean the red lines might be showing erroneous info? Or that parts are causing drag they shouldn't?
If the latter, how do I fix that?

Link to comment
Share on other sites

Yes, sometimes the arrows are wrong. It's better to go with the action menu values. Especially if the values in the action menus add up to something close to the total drag value in the AeroGui window.

As fourfa said, a really good idea is to compare the action window and AeroGui numbers between your two planes. Also posting the bad plane, if it's unmodded (or only lightly modded), so we can test it a little.

As far as shielding the parts goes, are they attached to the outer skin of the bay? Or the bulkheads? And is this KSP 1.2.2?

 

Link to comment
Share on other sites

@bewing
Well the arrows seem to generally agree with the action menu values.
The largest individual values seems to come from the bays themselves, as well as the "shielded" items collectively. Those items aren't clipping into the outer walls of the bay, and are attached to the inside front and back ends. In the case where two bays are connected, some items cross the empty boundary, and some are attached to the bay nodes. A few parts have some slight clipping into the back end, but into another part, so it should still be covered, no? Either way, they aren't the most significant source of drag.

How does KSP calculate if a part should cause drag?
Is it by the center point of the object, or the bounds of the object?
Would a part with a center point inside of one bay but with bounds that cross into another bay erroneously cause drag?

I also understand that exposed nodes along the ships longitudinal axis causes drag, so does that mean unused bay nodes create drag?

I can post the plane, but it's in a state of disarray at the moment.
No part or physics mods. KSP 1.2.2

Link to comment
Share on other sites

2 minutes ago, Tychonoir said:

How does KSP calculate if a part should cause drag?
Is it by the center point of the object, or the bounds of the object?

Heh. You are asking some of the most difficult technical questions in the game. I don't know most of the answers, and some of my answers are wrong. You can probably learn more by doing a quick test than by asking me. :)

All parts cause drag unless they are inside a cargo or service bay or fairing. If they are inside a cargo or service bay, the first thing the game checks is the attachment point. If the attachment point is on the flat front or back wall, then the part is shielded and has no drag. If the part is attached to the curving outer wall, then the game checks the bounds of the object. (And you should use the "Move" gizmo to move the object a little way in from the wall.)

 

2 minutes ago, Tychonoir said:

I also understand that exposed nodes along the ships longitudinal axis causes drag, so does that mean unused bay nodes create drag?

No. But you should test that because I might be lying.

2 minutes ago, Tychonoir said:

I can post the plane, but it's in a state of disarray at the moment.
No part or physics mods. KSP 1.2.2

 

Link to comment
Share on other sites

Ok, I did some testing.
I'm afraid it's bad news for Mk2 cargo bays. They are almost surely bugged.

The problem plane happens to have 4 of them:
1 large bay centerline, followed by 1 small bay.
1 large bay on both right and left sides.

Well, it turns out that the small centerline bay itself was generating 5 times the drag of the Mk2 cockpit.

So I then emptied all bays, but otherwise had streamlined body parts attached to the front and back, except the centerline bays which are attached to each other, but had streamlined parts in front and back of the combo.

The single most draggy parts are still the large bays, about 10% more than the cockpit when open. And here's the surprising bit, drag increases when the bays are closed by about 50%(!) Now parts inside the bay are shielded when the bay is closed, but closed bays apparently generate so much more drag there really isn't any benefit.

Also when empty, the small bay generates about half as much drag as the large bays.

After attaching nosecones to all the bay nodes, I saw further drag improvement, but the drag is still significantly more than one would expect for a part not directly exposed to the air. Even so, the resulting improvements are dramatic. A plane that struggled to hit 300m/s at 5km in level flight, now hits over 1000m/s at 5km on a 10° climb.

Link to comment
Share on other sites

Definitely sounds like two bugs there -- the open nodes bug, and the open/closed drag reversal bug. I will try reproducing your results and filing two bug reports.

It is nearly impossible to convince the devs that a particular drag value is "inappropriate" however. So don't hold your breath about getting the drag values changed. I understand that it makes MK2 cargo bays pretty useless compared to fairings, but that's KSP for ya.

 

Edited by bewing
Link to comment
Share on other sites

Additionally, I'm finding that most items supposedly shielded are still producing drag in a closed bay.
I haven't been able to isolate what criteria causes them to still produce drag, but so far anything connected to a bay node causes drag. And some items connected to those items cause drag, and some do not. Not sure why. None of the items are clipping into the bay walls. (Although the default position of node-connected items might clip a little bit - the way some objects are shaped, they can't be totally unclipped from the surface with the move tool. However, the nodes between two bays have nowhere to clip into.)

Let me know if you can't reproduce any behavior. If not, we'll have to try to figure out what the differences are.

And as far as appropriate drag values for parts, the bays are producing more drag that the fuselage parts that have exactly the same size and shape, and typically more drag that parts they are connected behind. That alone tells me something is off, but that's a minor point compared to all the other problems.

Link to comment
Share on other sites

Items in cargo bays can be tricky; I know I spent a lot of time working out the rules about node attach, clipping limits, etc. I also recall one mod I had (RCS Sounds) that had no parts and only minor gameplay effects but broke the cargo bay drag model somehow - uninstalled and drag went away. 

At this point maybe you should share the craft and see if others get the same results. 

Link to comment
Share on other sites

Ok, here's where things get weird.

I just made an example plane with the intent of using it as a simple demo, and I could reproduce none of the problems. Not a single one.

So I went back to the problem plane to try to figure it out what was different.
One thing I noticed, is that the bays aren't connect perfectly - there was a teeny tiny overlap. I thought it was odd at the time, but it's where KSP wanted to snap them together despite several tries. Eventually I just shrugged and figured that's just how they were. But on the new plane, there was no such overlap. Hmmm.

So I went back and removed everything from they bay, deleted it and reattached a new part, then put everything back together.
This has appeared to fix the shielded item drag, and the open nodes bug, but I'm still getting inverted open/closed drag values, but I can't reproduce this on the new example plane.

I'm starting to think that there's something wrong with the file, and the solutions is increasingly looking like, "rebuild the plane from scratch."

Link to comment
Share on other sites

Sorry it took me a while. Open/closed bay drag bug confirmed:

850 m/s, closed bay -- note drag = 29.4 kN:

bDAv2ca.jpg

888 m/s, open bay -- drag = 27.4 kN

nnKoI1M.jpg

 

Closed node bug also confirmed. Total Drag on the open bay version dropped from 113.5kN to 75.2kN when I attached type A cones to the nodes in the bay.

 

And the open bay also seems to be providing more lift ....

 

Edited by bewing
Link to comment
Share on other sites

@bewing Well, I didn't expect that.  Perhaps a new bug?

If you have enabled "show aero data in action menus" then at the very top of the right click menu for that part it should show "Shielded : True" or "shielded : false".   If shielded, i've only ever seen the drag be zero.

I've known for a while that mk2 cargo bays aren't very reliable at working out whether they're shielding something or not.

Radially attaching stuff to walls of the bay is asking for trouble, also it's really easy to attach inline parts to the front and back nodes of the bay, only for them to attach to the preceding or following fuselage piece of the stack instead, and end up not shielded.  This is more an issue with items that can attach radially as well as inline, eg. docking ports. (so your docking port, and the satellite attached to it, are actually hooked on to the cockpit radially and are being treated as "outside" the ship, even though it looks like they're in the cargo bay.

It works the other way too.  I flew a spaceplane to Laythe with intakes (engine pre-cooler) that were part of sponsons either side of the cargo bay.  The intakes worked on Kerbin, but when i came to take off from :Laythe - no air, because the intakes were "shielded".   I suspect a minor game update had caused this, or perhaps due to the greater distance from centre of KSP universe (Kerbol) rounding errors were greater, causing issues.

Finally, the mk2 bay can also screw up if you fill it with non-radially attaching parts eg. reaction wheels then try to attach another mk2 bay behind it.     You can end up with the second bay attaching to the cargo (the reaction wheel) instead of the bay that's ahead of it in the stack.   Perhaps this is the reason for the "slightly overlapping" effect @Tychonoir saw

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