Jump to content

Structural tube aerodynamics are bugged


Guest

Recommended Posts

It appears that the aerodynamics of structural tubes don't work as intended. 

To wit: 

(1) Build yourself a rocket consisting of an aerodynamic nose, a structural tube 37, a fuel tank, and an engine, and add a few fins for stability.

(2) Enable aero overlay and fly it.

Observed: absolutely massive drag spike coming out the back.

(3) Remove the structural tube and fly the same rocket.

Observed: drag spike is much more reasonable, rocket accelerates as expected.

If you want to make further experiments, put stuff inside the structural tube (capped at both ends). They will also produce drag spikes.

 

Edited by Guest
Link to comment
Share on other sites

It's a known bug https://bugs.kerbalspaceprogram.com/issues/19376

This is the patch I use to fix drag on hollow parts and shield their contents. It's a combination of patches I found following threads on this topic.

Spoiler

// Make Structural Tubes shield the parts inside them from drag
@PART[Tube*] {
    MODULE,0 {
        name = ModuleColorChanger
        toggleInEditor = false
        toggleInFlight = false
    }
    %MODULE[ModuleCargoBay] {
        DeployModuleIndex = 0
        lookupCenter = 0,-0.5,0 // Tubes extend from 0 to some negative Y
        lookupRadius = #$/MODEL:HAS[#scale[*]]/scale[0]$
        nodeOuterForeID = top2
        nodeOuterAftID = bottom2
        nodeInnerForeID = top1
        nodeInnerAftID = bottom1
    }
}
// Make the engine-plate shrouds shield the parts inside them from drag
@PART[EnginePlate*] {
    %MODULE[ModuleCargoBay] {
        DeployModuleIndex = 3  // Index of the jettison module for all plates as of Aug2018
        lookupCenter = 0,-0.5,0 // Shrouds extend from 0 to some negative Y
        lookupRadius = #$/MODEL:HAS[#scale[*]]/scale[0]$
        nodeOuterForeID = top
        nodeOuterAftID = bottom
        nodeInnerForeID = top
        nodeInnerAftID = bottom
    }
}
// repair bug 19376, missing configuration that is needed for parts with hollow ends
@PART[Tube1] {
	%DRAG_CUBE {
		cube = 0, 0.78,0.78,0.71, 0.78,0.78,0.71, 1.21,0.96,0.10, 1.21,0.96,0.10, 0.78,0.78,0.71, 0.78,0.78,0.71, 0,-0.3125,0, 1.25,0.625,1.25
		cube = 1, 1.56,0.78,0.71, 1.56,0.78,0.71, 1.21,0.96,0.10, 1.21,0.96,0.10, 1.56,0.78,0.71, 1.56,0.78,0.71, 0,-0.625,0,  1.25,1.25,1.25
		cube = 2, 2.36,0.77,0.68, 2.36,0.77,0.68, 1.21,0.96,0.10, 1.21,0.96,0.10, 2.36,0.78,0.68, 2.36,0.78,0.68, 0,-0.9375,0, 1.25,1.875,1.25
		cube = 3, 3.12,0.78,0.69, 3.12,0.78,0.69, 1.21,0.96,0.10, 1.21,0.96,0.10, 3.12,0.78,0.69, 3.12,0.78,0.69, 0,-1.25,0,   1.25,2.5,1.25
		cube = 4, 4.72,0.77,0.60, 4.72,0.77,0.60, 1.21,0.96,0.10, 1.21,0.96,0.10, 4.72,0.77,0.60, 4.72,0.77,0.60, 0,-1.875,0,  1.25,3.75,1.25
	}
}
@PART[Tube1p5] {
	%DRAG_CUBE {
		cube = 0, 1.18,0.77,1.01, 1.18,0.77,1.01, 2.72,0.96,0.10, 2.72,0.96,0.10, 1.18,0.77,1.01, 1.18,0.77,1.01, 0,-0.3125,0, 1.875,0.625,1.875
		cube = 1, 2.36,0.77,1.01, 2.36,0.77,1.01, 2.72,0.96,0.10, 2.72,0.96,0.10, 2.36,0.77,1.01, 2.36,0.77,1.01, 0,-0.625,0,  1.875,1.25,1.875
		cube = 2, 3.52,0.78,1.01, 3.52,0.78,1.01, 2.72,0.96,0.10, 2.72,0.96,0.10, 3.51,0.77,1.00, 3.51,0.77,1.00, 0,-0.9375,0, 1.875,1.875,1.875
		cube = 3, 4.69,0.78,1.00, 4.69,0.78,1.00, 2.72,0.96,0.10, 2.72,0.96,0.10, 4.69,0.78,1.00, 4.69,0.78,1.00, 0,-1.25,0,   1.875,2.5,1.875
		cube = 4, 7.03,0.78,0.98, 7.03,0.78,0.98, 2.72,0.96,0.10, 2.72,0.96,0.10, 7.03,0.78,0.98, 7.03,0.78,0.98, 0,-1.875,0,  1.875,3.75,1.875
	}
}
@PART[Tube2] {
	%DRAG_CUBE {
		cube = 0, 1.56,0.77,1.31, 1.56,0.77,1.31, 4.78,0.95,0.10, 4.78,0.95,0.10, 1.56,0.77,1.31, 1.56,0.77,1.31, 0,-0.3125,0, 2.5,0.625,2.5
		cube = 1, 3.12,0.77,1.31, 3.12,0.77,1.31, 4.78,0.95,0.10, 4.78,0.95,0.10, 3.12,0.77,1.31, 3.12,0.77,1.31, 0,-0.625,0,  2.5,1.25,2.5
		cube = 2, 4.68,0.77,1.31, 4.68,0.77,1.31, 4.78,0.95,0.09, 4.78,0.95,0.09, 4.68,0.77,1.31, 4.68,0.77,1.31, 0,-0.9375,0, 2.5,1.875,2.5
		cube = 3, 6.25,0.77,1.31, 6.25,0.77,1.31, 4.78,0.95,0.09, 4.78,0.95,0.09, 6.25,0.77,1.31, 6.25,0.77,1.31, 0,-1.25,0,   2.5,2.5,2.5
		cube = 4, 9.44,0.77,1.26, 9.44,0.77,1.26, 4.78,0.95,0.09, 4.78,0.95,0.09, 9.44,0.77,1.26, 9.44,0.77,1.26, 0,-1.875,0,  2.5,3.75,2.5
	}
}
@PART[Tube3] {
	%DRAG_CUBE {
		cube = 0, 4.72,0.76,1.92, 4.72,0.76,1.92, 11.00,0.96,0.10, 11.00,0.96,0.10, 4.72,0.76,1.92, 4.72,0.76,1.92,  0,-0.625,0,    3.75,1.25,3.75
		cube = 1, 7.03,0.77,1.92, 7.03,0.77,1.92, 11.00,0.96,0.09, 11.00,0.96,0.09, 7.03,0.77,1.92, 7.03,0.77,1.92,  0,-0.9375,0,   3.75,1.875,3.75
		cube = 2, 9.44,0.77,1.92, 9.44,0.77,1.92, 11.00,0.96,0.09, 11.00,0.96,0.09, 9.44,0.77,1.92, 9.44,0.77,1.92,  0,-1.25,0,     3.75,2.5,3.75
		cube = 3, 14.06,0.77,1.92, 14.06,0.77,1.92, 11.00,0.96,0.09, 11.00,0.96,0.09, 14.06,0.77,1.92, 14.06,0.77,1.92, 0,-1.875,0, 3.75,3.75,3.75
		cube = 4, 18.75,0.77,1.90, 18.75,0.77,1.90, 11.00,0.96,0.10, 11.00,0.96,0.10, 18.75,0.77,1.90, 18.75,0.77,1.90, 0,-2.5,0,   3.75,5,3.75
	}
}
@PART[Tube4] {
	%DRAG_CUBE {
		cube = 0, 6.25,0.77,2.52, 6.25,0.77,2.52, 20,0.95,0.10, 20,0.95,0.10, 6.25,0.77,2.52, 6.25,0.77,2.52,   0,-0.625,0,   5,1.25,5
		cube = 1, 9.37,0.77,2.52, 9.37,0.77,2.52, 20,0.95,0.09, 20,0.95,0.09, 9.37,0.77,2.52, 9.37,0.77,2.52,   0,-0.9375,0,  5,1.875,5
		cube = 2, 12.5,0.77,2.52, 12.5,0.77,2.52, 20,0.95,0.09, 20,0.95,0.09, 12.5,0.77,2.52, 12.5,0.77,2.52,   0,-1.25,0,    5,2.5,5
		cube = 3, 18.75,0.77,2.52, 18.75,0.77,2.52, 20,0.95,0.09, 20,0.95,0.09, 18.75,0.77,2.52, 18.75,0.77,2.52, 0,-1.875,0, 5,3.75,5
		cube = 4, 25.00,0.77,2.52, 25.00,0.77,2.52, 20,0.95,0.10, 20,0.95,0.10, 25.00,0.77,2.52, 25.00,0.77,2.52, 0,-2.5,0,   5,5,5
	}
}
@PART[Mk1FuselageStructural] {
//Mk1FuselageStructural Structural Fuselage
	MODULE,0 {
	// a module of type IScalarModule to report the cargo bay open/closed state
		name = ModuleColorChanger
		toggleInEditor = false
		toggleInFlight = false
	}
	%MODULE[ModuleCargoBay] {
		DeployModuleIndex = 0
		lookupRadius = 1.0
		nodeOuterForeID = top
		nodeOuterAftID = bottom
		nodeInnerForeID = top
		nodeInnerAftID = bottom
	}
}
@PART[adapterSmallMini*|noseCone|pointyNoseCone*|standardNoseCone] {
//adaptersmallminishort FL-A5 adapter
//adapterSmallMiniTall FL-A10 Adapter
//noseCone AerodynamicNoseCone
//pointyNoseConeA Advanced Nose Cone
//pointyNoseConeB Advanced Nose Cone
//standardNoseCone Small Nose Cone
	MODULE,0 {
		name = ModuleColorChanger
		toggleInEditor = false
		toggleInFlight = false
	}
	%MODULE[ModuleCargoBay] {
		DeployModuleIndex = 0
		lookupCenter = 0, 0.1, 0
		lookupRadius = 0.5
	}
}
@PART[largeAdapter|largeAdapter2|rocketNoseCone] {
//largeAdapter Rokomax Brand Adapter
//largeAdapter2 Rokomax Brand Adapter O2
//rocketNoseCone Protective Rocket Nose Cone
	MODULE,0 {
		name = ModuleColorChanger
		toggleInEditor = false
		toggleInFlight = false
	}
	%MODULE[ModuleCargoBay] {
		DeployModuleIndex = 0
		lookupCenter = 0, 0.2, 0
		lookupRadius = 1.0
	}
}
@PART[airplaneTail*|Size3to2Adapter] {
//airplaneTail Tail Connector
//airplaneTailB Tail Connector
//Size3to2Adapter ADTP-2-3
	MODULE,0 {
		name = ModuleColorChanger
		toggleInEditor = false
		toggleInFlight = false
	}
	%MODULE[ModuleCargoBay] {
		DeployModuleIndex = 0
		lookupCenter = 0, -0.2, 0
		lookupRadius = 1.5
	}
}
 

 

 

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