DonBruce64 / MinecraftTransportSimulator

A Minecraft mod that adds planes and automobiles with realistic physics!
Other
113 stars 60 forks source link

[Suggestion] Add support for multi-engine helicopters #624

Closed gyrohero closed 2 years ago

gyrohero commented 3 years ago

Under the current system, there is no way to have a rotor be powered by 2 or more engines simultaneously. I propose using an engine-internal list to track which propellers it is is powering, and a propeller-internal list for tracking the engines that are powering it. Then, logic in the propeller would take into consideration all connected engines, and try to keep up with the fastest of them. This would essentially act as a one-way clutch that allows one engine to continue to power the propeller if another one fails.

I know that the implementation of this may be difficult and it's definitely not top priority, but I wanted to at least get the idea out there. Especially now that there are missiles that can seek engines, it would be good to have the ability for dual-engine helicopters that have that redundancy precisely so they don't crash in an engine-failure situation.

fsendventd commented 3 years ago

how would you handle the additional power of two engines? If the rotor is only trying to keep its RPM matched to the fastest one, I fail to see how it'd be powered by both at once.

gyrohero commented 3 years ago

That gets into the difference between RPM and torque. Especially once your prop overhaul is done, the more a blade is pitched, the more torque it produces because of the additional drag. More torque means that the cold section/compressor section/Ng/whatever you want to call it has to speed up to increase the intake so that more fuel can be burned in order to maintain the same engine output speed. With two engines, the torque is divided equally between the engines, so they don't have to work as hard even if they're maintaining the same output RPM.

DonBruce64 commented 3 years ago

The biggest issue I see here is getting the linking correct. MTS assumes propellers are connected to the engine that they are a subPart or additionalPart to. It's essentially like MTS looks for child parts of the engine and if it's a propeller, the engine knows it's connected to it. There's not an easy way to make MTS say that a propeller is connected to engine A sometimes, or engine B, or engine A and B. The only way I could possibly see this working is if you have two engines, both of which have additional parts, and both additional parts are at the same location. Then MTS would consider the propeller a child of both of those engines, provided the loops are structured properly.

Of course, this doesn't get into the propeller physics and engine linking, but I leave that up to y'all as I'm not good with propeller physics maths. If we want to do this AFTER we get proper propeller force maths, I'll see what I can do to support it from a part-linking standpoint, but I don't want to start on this with bad propeller thrust force right off the bat.

fsendventd commented 3 years ago

That gets into the difference between RPM and torque. Especially once your prop overhaul is done, the more a blade is pitched, the more torque it produces because of the additional drag. More torque means that the cold section/compressor section/Ng/whatever you want to call it has to speed up to increase the intake so that more fuel can be burned in order to maintain the same engine output speed. With two engines, the torque is divided equally between the engines, so they don't have to work as hard even if they're maintaining the same output RPM.

@gyrohero The issue with that is I don't see how your code idea allows for that. If the rotor is always trying to match its RPM to the fastest engine, it'll want to continually switch between the engines. When one engine has a load on it it'll slow down, and then the rotor will disconnect and attach to the other one. Then that one will slow down, and the other one will have sped up, so it'll switch back. It'd continue looping back and forth like that until one or both engines turned off.

gyrohero commented 3 years ago

@gyrohero The issue with that is I don't see how your code idea allows for that. If the rotor is always trying to match its RPM to the fastest engine, it'll want to continually switch between the engines. When one engine has a load on it it'll slow down, and then the rotor will disconnect and attach to the other one. Then that one will slow down, and the other one will have sped up, so it'll switch back. It'd continue looping back and forth like that until one or both engines turned off.

A couple ways to address that: 1) As long as both engines are operational, they try to match each other. So under normal operation, the two engines are operating at the same speed, and to follow that up-- 2) There's a threshold (maybe 1-2% RPM difference between the engines) at which the propeller distributes the load between both engines. If they start to get outside that threshold, then like you said, the increased load on one will cause it to slow until they're equalized. The threshold is still realistic because it's all clutch based. Like the clutch on a car: it doesn't need to perfectly match the RPM of the engine for it to engage--it just has to be close enough.

DonBruce64 commented 2 years ago

So, I'm going to mark this ticket as a wontdo, purely due to the fact it'll wreak havoc with the existing linking system, and the fact vehicle combat has been on the decline with the userbase lately. Seems folks are content to use VMW for hand-held guns, and vehicle-based gun folks don't really show up that often. I also literally don't have time to change it and mess that deeply with the systems.

DonBruce64 commented 2 years ago

Changed my mind. This might actually make it in next update depending on how the new linking code goes.

DonBruce64 commented 2 years ago

Implemented in V22.0.0