Jump to content

So the new Drain Valve produces thrust ... and is quite broken.


Xurkitree

Recommended Posts

So now that 1.9 has dropped with the new Drain Valve, I found out and experimented with a few settings with it.

Here's what I found out -

  1. The Drain Valves can run on air. No joke, if you can attach them to an intake, you can drain and produce thrust magically.
  2. The Isp of the Drain valve is independent of atmosphere, so its the same on Eve and Vacuum.
  3. The Isp is dependent on the flow rate, but during normal operating ranges, it doesn't vary much.
  4. The thrust generated is dependent on the fuel tank attached, so if you want a higher thrust you need to attach them to larger tank. When I attached just 2 to a Kerbodyne large tank, it shot up in the air, and built up massive acceleration towards the end.

So, to pass the time, I did some tests to prove that the Isp is dependent on the flow rate, by creating a craft to test stuff out. There are two versions. Both comprise of a Kerbodyne large tank, a Remote Guidance unit and 2 drain valves at the bottom of the tank. The second version also included a KAL-1000 controller, the use of which shall be seen below.

The first thing I did was to teleport them to Minmus's flats to test their DV (The new position cheat is very very good, 10/10 Hyperedit actually is worse) and fired the drain valves with a drain rate of 20 (Corresponding to a drain time of 5 seconds and a fuel flow rate of 2880 units/s). This resulted in a delta-v of 107.78 m/s (used F3 and crosschecked using KER and math). Running the numbers (Wet mass - 81,120 kg, Dry mass - 9,120 kg), I found the Isp to be about 5 seconds (5.027s), which matched up with reports from other players I talked to over discord. I then lowered the Drain rate to 10, which created a marked difference in max altitude(14.7 km to 14.2 km), which I initially attributed to gravity losses due to the increased drain time (10 seconds).

The second thing I did was I took the second version with the KAL-1000 editor, and overclocked the Drain rate to be 98161.52 (The track editor has no cap on the curve, so by changing the tangents of the curve, an arbitrarily high parameter can be attained. This bug is stock, no File editing or craft editing was used to change the drain rate, and the same trick can be used to get negative drain rates, or overclock any other parameter like the thrust limiter for example), and fired the drain valves again. This time, I managed to get up to 387 m/s (I used F3 only since I got up to Escape Velocity and hence wasn't able to cross check). Running the numbers on that (Wet mass - 81,130 kg, Dry mass - 9,130 kg), I got an Isp of 18 seconds - a marked improvement.

Of course, in normal ranges, the difference in Isp isn't probably great, but useful to know.

Ofcourse, these results look trash, but considering their powerful exhaust (do you think 2 Ant engines could lift that tank?), their independence from Atmosphere and the fact that even ignoring the overclock boost, they can be used to run on air (apparently the thrust is about 2.5 kN) by draining the intakes, I'd say the new Drain valve is quite OP. You could say its Krakentech, but eh, that's for you to decide.

What else is there to know of the new part? Is there something wrong with my math by any chance, or have I interpreted the results incorrectly? Have I made any other mistakes? Discuss!

Link to comment
Share on other sites

Have you seen Scott Manley's video on this?

If you look at the generic resources file: Kerbal Space Program\GameData\Squad\Resources\ResourcesGeneric.cfg where IntakeAir is defined, there seems to be a typo too:

RESOURCE_DEFINITION
{
  name = IntakeAir
  displayName = #autoLOC_501005 //#autoLOC_501005 = Intake Air
  abbreviation = #autoLOC_6002101 //#autoLOC_6002101 = Air
  density = 0.005
  unitCost = 0
  hsp = 10
  flowMode = ALL_VESSEL
  transfer = PUMP
  isTweakable = false
  isVisible = false
  iRESOURCE_DRAIN_DEFINITION
  {
	isDrainable = false
	showDrainFX = false
  }
}

See how the node RESOURCE_DRAIN_DEFINITION has a lower-case 'i' at the start, compared to, say:

RESOURCE_DEFINITION
{
  name = LiquidFuel
  displayName = #autoLOC_500999 //#autoLOC_500999 = Liquid Fuel
  abbreviation = #autoLOC_6002095  //#autoLOC_6002095 = LF
  density = 0.005
  unitCost = 0.8
  hsp = 2010
  flowMode = STACK_PRIORITY_SEARCH
  transfer = PUMP
  isTweakable = true
  volume = 5
  RESOURCE_DRAIN_DEFINITION
  {
	isDrainable = true
	showDrainFX = true
	drainFXPriority = 7
	drainForceISP = 5
	drainFXDefinition = gasDraining
  }
}

Which does not (like all the others). So it seems IntakeAir being drainable is a bug and someone fat fingered the config.

This doesn't address all your other concerns but it is still quite funny nonetheless.

Edited by Poodmund
Link to comment
Share on other sites

3 hours ago, klgraham1013 said:

So...you're telling me Squad didn't think something through before implementing it?

To be fair, the major gameplay issues (i.e. getting to space on pure intake air) was thought through... and somebody fat-fingered the config. The crazy drain rate accessible via KAL is kind of a niche thing and doesn't supplant engines except possibly at extremely high drain rates.

2 minutes ago, lajoswinkler said:

Drain valves should not produce thrust, yet these produce very strong thrust capable of knocking sideways a large 2.5 m tank.

Drain valves should produce thrust; you're moving mass from inside your craft to outside your craft. There's velocity imparted. I believe, for example, that the Saturn S-IVB stages deliberately used propellant venting to steer themselves into their final trajectories (either heliocentric orbits or lunar impactors).

Edited by Starman4308
Link to comment
Share on other sites

I agree, it takes careful design to make a flight weight drain valve for pressurized gas or liquid that doesn't produce at least a bit of thrust -- and if you're on a free-fall trajectory, it doesn't take much thrust at all to make a significant (i.e. troublesome or useful) change in your vector velocity.

That said, an Isp of 5 or so seconds isn't going to replace even a tiny RCS thruster in normal use; the S-IVB used propellant venting in that flight stage because it was through pushing the Apollo and didn't have (other) RCS of its own, as well as having propellants that would self-pressurize enough that they had to be vented anyway to avoid tank rupture (which would produce much larger thrust in a roughly random direction, making the hulk a potential hazard -- not to mention the fragments that get blown free).

No disagreement, however, that there should be net drag (roughly equal to that of an intake that's blanked off at the back), rather than net thrust, when attaching a drain vent to an intake, and that overclocking ought to be blocked (a given drain vent will be designed for X flow, and it takes considerable additional pressure to exceed that figure by even a tiny bit).  Presumably the config bug that permits this is an easy, quick fix at the Squad end.

Link to comment
Share on other sites

3 hours ago, klgraham1013 said:

So...you're telling me Squad didn't think something through before implementing it?

In regards to the drain valve, I think you're being entirely unfair.

The IntakeAir bug is just a mistake but sure the actual thrust being produced could be "balanced" a little differently. The biggest issue here is the bug to do with the KAL curve tangents not being clamped to upper and lower bound values... which in turn allows for many rediculous exploits. Screw krakentech of whatever people call it, you are essentially exploiting game bugs.

Link to comment
Share on other sites

I would prefer if they produced no thrust.  A simpler set of code would mean much lower probability of bugs.

I would also prefer if this function was intrinsic to all tanks. 

Or even implemented as an engineer skill.

It would be really nice if it wasn't implemented as a new part.

C'est la vie.


Happy landings!

Link to comment
Share on other sites

2 hours ago, Starhawk said:

I would prefer if they produced no thrust.  A simpler set of code would mean much lower probability of bugs.

I would also prefer if this function was intrinsic to all tanks. 

Or even implemented as an engineer skill.

It would be really nice if it wasn't implemented as a new part.

C'est la vie.


Happy landings!

A simpler way to do fuel vents with thrust would be to use the existing engines code rather than trying to reinvent the wheel with an entirely new fuel venting module that requires resources to be defined as "ventable" or "not ventable".

Link to comment
Share on other sites

49 minutes ago, Starman4308 said:

A simpler way to do fuel vents with thrust would be to use the existing engines code rather than trying to reinvent the wheel with an entirely new fuel venting module that requires resources to be defined as "ventable" or "not ventable".

Venting ore through the valve would be something interesting to see, indeed. :)

anyway, there's always the old and faithful Tac Fuel Balance for this function, if you prefer resources (including ore) to just vanish from the tank. :)

Link to comment
Share on other sites

4 hours ago, 5thHorseman said:

I disagree. They should provide some thrust, ideally the same thrust they would in real life.

At best, it should be less than the minimum setting of the weakest RCS thruster we have.

There are methods to minimize thrust, here's a cross section I just made.

minimum-thrust-valve.png

 

The point is that this would produce minimal force even in vacuum and small pressures in fuel tanks. If the tank is in an atmosphere, thrust would be negligible. In v1.9.0, tanks at launch pads equipped with one valve on their side will flip. That's preposterous.

 

It's funny how people love this supposed accuracy, but when it comes to RTG, oh no, let it be a perpetuum mobile... As I suspected, it's all about cheating.

Link to comment
Share on other sites

38 minutes ago, lajoswinkler said:

At best, it should be less than the minimum setting of the weakest RCS thruster we have.

There are methods to minimize thrust, here's a cross section I just made.

minimum-thrust-valve.png

 

The point is that this would produce minimal force even in vacuum and small pressures in fuel tanks. If the tank is in an atmosphere, thrust would be negligible. In v1.9.0, tanks at launch pads equipped with one valve on their side will flip. That's preposterous.

 

It's funny how people love this supposed accuracy, but when it comes to RTG, oh no, let it be a perpetuum mobile... As I suspected, it's all about cheating.

1) Other than the intake air thing which is clearly the result of a typo, it can't really be considered cheating due to the rubbish Isp of the drain valve. Possibly funny if you set the drain rate crazily high and flip your rocket that way, but you'll use up tremendous amounts of fuel that way. The unlimited drain rate is funny, but hardly OP except in extremely narrow circumstances where even Sepratrons wouldn't give you enough TWR, and you don't mind blowing all your fuel in less than a second.

2) Substantially simpler and less prone to impinge on the tank is... symmetrical vents.

3) I play RO. With RTGs that decay. Please don't lump everybody together.

Link to comment
Share on other sites

43 minutes ago, lajoswinkler said:

It's funny how people love this supposed accuracy, but when it comes to RTG, oh no, let it be a perpetuum mobile... As I suspected, it's all about cheating.

That depends on people as well. I personally have nothing against RTG decay over years (decades?) but there were looong discussions about it already so I'll leave it now.

Link to comment
Share on other sites

4 minutes ago, MisterBennock said:

I hope they never fix this... I am currently experimenting with hovercrafts and """"repulsor"""" technology.

That... is an opinion, I suppose? I'd veer towards "good games should not have weird side parts that wind up vastly superior to mainline jet engines".

And, in the future, if/when they do fix the clearly unintended bug, just get ModuleManager installed and whonk this into a .cfg file somewhere in GameData.

@RESOURCE_DEFINITION[IntakeAir] {
    @RESOURCE_DRAIN_DEFINITION {
        @isDrainable = true
        // Optionally, add @showDrainFX = true
    }
}

 

Link to comment
Share on other sites

40 minutes ago, MisterBennock said:

I hope they never fix this... I am currently experimenting with hovercrafts and """"repulsor"""" technology.

I'm certain they will fix it. The part's config file is supposed to stop it from draining Intake Air, it's just that there's a typo in that file that allows this exploit to happen.

Link to comment
Share on other sites

2 hours ago, lajoswinkler said:

It's funny how people love this supposed accuracy, but when it comes to RTG, oh no, let it be a perpetuum mobile... As I suspected, it's all about cheating.

That seems to come from nowhere but hey. I'm cool with simplifications for gameplay (rtg running forever is probably more accurate than patched conics  for most missions) but right click to make ore disappear (by the way is that still a thing?) has always bugged me.

Link to comment
Share on other sites

The plume of rocks when you drain ore is actually kinda nice.

What do players want for a fix for these four points?  I think :
1. Remove the errant 'i' from 'ResourcesGeneric.cfg' as Poodmond pointed out. so we don't get free energy from intake air.

2. Leave the single value for Isp, regardless of atmosphere; the expansion ratios and resulting Isp are rather low anyway.
The mod Smart Parts also decided to simulate the thrust of vented fuel, and I can see how having that tiny thrust makes the game more fun.
But even 5s Isp is rather large for simple release of pressure, especially for ore where only the out-gassing provides pressure; I can slide ore tanks 20m/s across the runway by venting rocks.  These are individually configurable in 'ResourcesGeneric.cfg' and I like 2s for fuels and 0.1s for ore.

3. I find consistently Isp = 5s (venting velocity 49m/s) for any setting I can reach with the slider itself.    
The experiment above that set the emptying rate to 98000% per second would have emptied tanks in 1msec where a physics time-step is 20msec,  so maybe KSP applied the force from the faster venting for the entire slower time-step.  That is a reason to clamp the curves from the KAL controller.

4. The physical model seems to be constant-exit-velocity through an exit port with variable area. 
One vent can drain a large craft in 5 seconds through (since maxDrainRate = 20%/s ) so that exit port would seem to open unrealistically wide.
Better would be to set the drain rate in kg/s within a limited range, but it might be too late to talk Squad into making such a change.

Edited by OHara
add links to bug-tracker entries; physics time-step is 20ms
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...