Jump to content

[0.20] Modular Fuel System 1.3/realistic fuels, reconfigurable fuel tanks and engines


Recommended Posts

Splitting this off from my other mod thread.

Modular Fuel System v1.3 - Advanced AND Basic Version, now with B9 support!

Changes in 1.3

- fixed a bug where Isp wouldn't set properly when choosing engine configurations

- changed TANK_DEFINITION format for proportional tanks from 'maxAmount = number * volume' to 'maxAmount = number%'

- added 'utilization' as a synonym for 'efficiency'

- added ModuleHybridEngines as a replacement for ExsurgentEngineering's HydraEngineController, with improved fuel gauges

- abandoned experimental modular RCS blocks.

- removed ASAS from pods, since adding ASAS apparently disables the pod's gyro.

Changes in 1.2

- fixed a bug where tanks couldn't be configured empty

- fixed a bug where the UI would sometimes glitch

Changes in 1.1

- Now comes packaged in a convenient /GameData folder for clearer installation!

- Added a 'fillable = false' line to TANK_DEFINITIONS, to support resources like Kethane that shouldn't be fillable in the VAB

- Added configurable ASAS modules! Now, when you click on a customizable ASAS module in the Action Group editor, you will have the option to configure up to 3 PID settings for that ASAS module. If you configure 2 or more PID settings, a set of Actions will appear that can be assigned to Action Groups, which will allow you to switch between PID settings in-flight. For example, you could set up an ASAS module with an Avionics setting (Ki = 0.0, Kp = 0.2, Kd = 0.2) and an ASAS setting (Ki = 1.0, Kp = 0.6, Kd = 1.0), and assign the switch to the same button that changes your SABRE rocket settings - so that when you switch to air-breathing mode, your ASAS changes to the Avionics control scheme, and when you switch to rocket mode, your ASAS changes back to the Rocket control scheme. You could also set up two separate control schemes for low-mach and high-mach, or for early-stage and late-stage for rockets that drastically change their control authority as they stage.

Changes in 1.0

- merged Advanced and Basic distributions; the Advanced version is now simply a set of configuration files in RealFuels.zip - if you want to play with LOX and LH2 and realistic nuclear engines, unzip RealFuels.zip after unzipping ModularFuelTanks.zip

- moved the install folder to /GameData/ModularFuelTanks instead of /GameData/Ialdabaoth (doesn't change anything, but people can read it better)

- ditched using Liters in the advanced version, because apparently I suck at the maths.

- Xenon is no longer absurdly heavy.

- All engine heats are halved, so that they won't explode in DeadlyReentry 2.0

What it does:

Advanced Version Only:

1. It redefines the resource density of LiquidFuel and Oxidizer to match the weights of RP-1 (Kerosene) and N2O4 (a real-world oxidizer).

2. It identifies three new resources: LiquidH2, which is an extremely light cryogenic fuel, LiquidOxygen, which is a highly efficient but cryogenic oxidizer, and nuclearFuel, which is a heavy resource used by RNGs and nuclear engines. "Cryogenic" means that you will be able to store slightly less of them (usually 99%) than regular LiquidFuel/LiquidOxygen, and that they will slowly evaporate over time (usually on the order of about 1% per week, depending on temperature).

3. It redefines the fuel ratios for all stock, KSPX, and KW engines from 0.9 LiquidFuel/1.1 Oxidizer to one of four possibilities, each of which are used by real-world rockets (hey, if it's good enough for NASA...)

- 0.4 LiquidFuel / 0.6 Oxidizer (for cheap rockets)

- 0.35 LiquidFuel / 0.65 LiquidOxygen (for big boosters)

- 0.73 LiquidH2 / 0.27 LiquidOxygen (for high-Isp rockets)

- 1.0 LiquidH2 / 0.00000000000001 nuclearFuel (for nuclear rockets)

4. It adds a new submenu on the 'Action Group Editor' menu of the VAB whenever you select a liquid fuel rocket, that allows you to switch fuel types for that rocket - so you can change a rocket's fuel type from 0.4LiquidFuel/0.6Oxidizer to 0.35LiquidFuel/0.65LiquidOxygen, which will adjust the rocket's Isp and thrust. In general:

LiquidFuel/Oxidizer is what you're used to.

LiquidFuel/LiquidOxygen will give you slightly higher thrust and slightly higher Isp, but the fuel is cryogenic so you'll hold a little less.

LiquidH2/LiquidOxygen will give you moderately lower thrust but MUCH higher Isp, and again the fuel is cryogenic.

NuclearRockets cannot currently be changed, but I might change this since apparently there are real-world mods to NERVA that use LH2/LOX.

Advanced and Basic Versions:

5. It adds a new submenu on the 'Action Group Editor' menu of the VAB whenever you select a fuel tank, which allows you to completely customize what (and how much) fuel goes into that tank. Most tanks can hold any ratio of LiquidFuel, Oxidizer, LiquidH2, LiquidOxygen, XenonGas and MonoPropellant that you desire, but some tanks will be more efficient at holding some resources than others. There is also a button for "Remove All Tanks", and a series of buttons for "Configure Remaining Volume to {engine mixture}" which appear whenever you add an engine - i.e., if you add an engine that takes 35% LiquidFuel and 65% LiquidOxygen, a button will appear that allows you to fill any remaining volume with that ratio of resources.


Things to keep in mind with this mod:

1. You really don't appreciate how light LH2 is until you start using it. Nuclear rockets require an INSANE amount of space for fuel, although they'll be incredibly light compared to other rockets of the same bulk. Don't be afraid to put some big orange tanks on and fill them with LH2; they'll barely weigh as much as a standard-size tank.

2. Symmetry is automatically preserved as you edit, so if you have 3 identical tanks in a 3-fold symmetry and attach a rocket to the bottom of each, then change one of those rocket's fuel mixtures, all three rockets will automatically match. Likewise with the tanks.

3. With so many options (each with their own advantage and disadvantage), the Advanced version really does put you in "hard mode". Only install this if you're looking for a challenge. Otherwise, if you just want to customize tanks but don't want to worry about LH2 or LOX, download the "Basic" version.

Edited by ialdabaoth
Link to post
Share on other sites

Sweet. I don't know if I'm ready to take the 'advanced' plunge yet, but the basic one will be great for emptying fuel tanks for space station parts and the like. Mostly my apprehension with the advanced one is the modification of the core LF+Oxi fuel usage. I want to ensure that any rockets I build will be viable with and without the mod, not sure if that can be promised if the basic functionality is changed. This same problem occurred with the 'Silisko Edition' - once you made the tweaks, you couldn't go back because anything that used to work would no longer. Isn't this mod effectively doubling the capacity of all the basic tanks?

BTW I think you definitely zipped up way more than you were supposed to on the basic edition. I don't think we need all the basic unity.dll files and your saved projects for the source, just the .cs would work :)

Edited by Frostiken
Link to post
Share on other sites

gaaaah yeah, Xamarin's been a bit of a putz lately.

And I'm not actually doubling any of the fuel tank volumes that I'm aware of; also, removing the mod (even the advanced version) shouldn't hurt anything, since the mod is what adjusts the engines *and* the fuel tanks. I'll have to investigate this further.

Link to post
Share on other sites

If the default is 0.9 fuel and 1.1 oxidizer, what does 0.4 fuel and 0.6 oxidizer change? The former suggests 2 units per 'thrust unit', whereas the latter suggests 1.

Also, I seem to have a problem with the 'basic' setup in that it tries to 'reoptimize' my fuel tanks. We know that the default tanks work just fine and empty completely, however, when I click 'autofill 45% / 55% it gives me values fairly different from vanilla that don't empty properly.

Link to post
Share on other sites
If the default is 0.9 fuel and 1.1 oxidizer, what does 0.4 fuel and 0.6 oxidizer change? The former suggests 2 units per 'thrust unit', whereas the latter suggests 1.

Oh! No, it doesn't work that way. ModuleEngines normalizes everything before computing the mass pull from Isp.

TLDR: 0.9 / 1.1 is identical to 0.45/0.55; I have tested this extensively.

Also, I seem to have a problem with the 'basic' setup in that it tries to 'reoptimize' my fuel tanks. We know that the default tanks work just fine and empty completely, however, when I click 'autofill 45% / 55% it gives me values fairly different from vanilla that don't empty properly.

Interesting! How far off are they?

EDIT: I have just installed a fresh version of 0.20, then installed the Basic version of ModularFuelTanks. Grabbing JumboMax-64, clicking "Remove All Tanks" and then autofilling for 45%/55% fills it with 2879 units of LiquidFuel and 3520 units of Oxidizer, which is only one point off from the default of 2880/3520.

Do you already have some LiquidFuel or Oxidizer in the part before you click 'autofill'? Because if you do, it'll partition the REMAINING volume to 45/55, and then add that to whatever was already there.

Edited by ialdabaoth
Link to post
Share on other sites

How do I install this?

EDIT: Could we get this for the Spherical Fuel Tanks mod?

EDIT 2: Using the liquid fuel and liquid oxygen option universally reduces total Delta V according to MechJeb and Kerbal Engineer. I must ask, what's the point? The same is true with the H2/LO2 mixture, even accounting for the fact that you can carry about 3x more fuel for the same mass.

The H2/LOX is good for saving weight for payloads, but other than that...

Edited by Morrigi
Link to post
Share on other sites
How do I install this?

EDIT: Could we get this for the Spherical Fuel Tanks mod?

EDIT 2: Using the liquid fuel and liquid oxygen option universally reduces total Delta V according to MechJeb and Kerbal Engineer. I must ask, what's the point? The same is true with the H2/LO2 mixture, even accounting for the fact that you can carry about 3x more fuel for the same mass.

The H2/LOX is good for saving weight for payloads, but other than that...

Using real life fuels, at real life weights and mix ratios, and real life problems like cryo-based fuels to evaporate....I think 'the point' is an added layer of realism to KSP.

I've only been playing a couple months, so don't think im ready for this yet, but maybe a bit down the road (or accent path ) ill pick it up, and keep my eyes on this thread till then

Link to post
Share on other sites

ialdabaoth - regarding the fuel mixtures, if the ratios are the same, why even change the original setup? Is there any benefit to be gained in going from 0.45:0.55 to 0.4:0.6? Like I said, this dynamic is the only thing stopping me from using the 'advanced' mode, because I'm wary of mods that change the core underlying game. I got boned on this one once before with the Silisko Edition.

Also, I'm a little confused on some functionality here, especially in regard to the 'vanilla' parts. For example, the KW3mNoseCone by default weighs 0.05. Pretty underweight, but that's how it is. Your addon simply adds 3200 volume.

If I leave this volume empty, shouldn't it stand to reason that the cone remains at the default weight of 0.05? If I remove all the tanks from a part, it's not just 'empty', there are in fact no tanks at all (you cannot later transfer materials into it). I'd like it if, when all tanks are removed completely from a part, it either returns to its original mass (in the case of modded parts that were given fuel tanks) or an even lighter mass (in the case of fuel tanks that have never been configured without tanks, only 'empty tanks'). Otherwise this is just wasted weight. Sometimes I really just want a nose cone, not a fuel tank, you know? Again this goes into my wariness of mods that change core functionality, just so I can be assured that I can configure a ship and have future compatibility with or without the mod. With the basemass tweak it does contribute some considerable weight to various parts that really adds up.

EDIT - I found the 'basemass' configuration file, and where it's getting these heavier weights. Simply adding an 'if' that checks if it has ANY tanks configured, it will revert to the original mass, would be most excellent and I'd love you forever.

From my POV, if you made the fuel ratios the same and tweaked how the mass is calculated, you wouldn't even actually need to have a separate 'advanced' and 'basic' install, since the advanced features would be the optional use of LH2/LO2, etc.

Edited by Frostiken
Link to post
Share on other sites

Great mod!

A couple of questions and suggestions:

If I do a custom fill with basic, then distribute the .craft file, do people need this mod to load the craft?

How about adding a UI that is always visible - one slider per tank (or symmetry set)

The slider is 0-100% of the fill you set using the current method.

Has no effect on amount you launch with, just allows you to see weight distribution as you use fuel.

Could you maybe make it work with tanks for the B9 pack?

Link to post
Share on other sites
Great mod!

A couple of questions and suggestions:

If I do a custom fill with basic, then distribute the .craft file, do people need this mod to load the craft?

Theoretically no, but try it and find out! I would like to know for sure whether that works.

How about adding a UI that is always visible - one slider per tank (or symmetry set)

The slider is 0-100% of the fill you set using the current method.

Has no effect on amount you launch with, just allows you to see weight distribution as you use fuel.

Maybe, but something like that would be a ways off.

Could you maybe make it work with tanks for the B9 pack?

That should be coming soon.

Link to post
Share on other sites

ialdabaoth: Did you intend for the stock Xenon tank to weigh 13 tons? ;)

That one apparently doesn't get overwritten by the new fuel tank module, and with the change in density to Xenon its rather... heavy. To say the least.

Link to post
Share on other sites

I love this, but there exist one tiny bug that is nonetheless very frustrating. While the engine seems to be using the proper thrust and ISP, it's reporting the stock value for ISP to the GUI and (worse still) to Engineer and MechJeb, making the deltaV calculations totally wrong (at best). This makes it hard to plan out complicated missions.

I suspect the problem is not entirely yours.

--

Edit: Manual Calculations using your given ISPs is more accurate, so it's usable. It's just very frustrating. :)

Edited by J_Davis
added final line
Link to post
Share on other sites

Can somebody please explain to me how to properly install this? It sounds very interesting but I cant seem to get it to work.

EDIT: nevermind, I figured it out.

1. unzip ModularFielTanks

2. go into the folder and find RealFuels.zip

3. place the folder you get in the Game Data folder

4. place the folder you got from the ModularFuelTanks.zip in the GameData folder

Edited by wrothmonk
Link to post
Share on other sites

Unzip ModularFuelTanks.zip into {KSP}/GameData. You should have:

{KSP}/GameData/ModuleManager.dll

{KSP}/GameData/ModularFuelTanks/KSPX_ModularFuelTanks.cfg

{KSP}/GameData/ModularFuelTanks/KW_ModularFuelTanks.cfg

{KSP}/GameData/ModularFuelTanks/Squad_ModularFuelTanks.cfg

{KSP}/GameData/ModularFuelTanks/Plugins/ModularFuelTanks.dll

{KSP}/GameData/ModularFuelTanks/Resources/TankTypes.cfg

{KSP}/GameData/ModularFuelTanks/RealFuels.zip

Then, if you want to play with LOX and LH2 and all the goodies, unzip RealFuels.zip - otherwise leave it zipped to stick with LiquidFuel and Oxidizer.

Link to post
Share on other sites

Back in the 0.18 i made a custom version of all tanks and all engines to simulate RP-1 + O2 and LH2 + O2 engines and fuel tanks.

NERVA runned only on H2 and didn´t need Oxidizer, like the RL counterpart. They also had a permanent generator within then.

Orbital and sps Engines i made run with LH2 and have a higher efficience. I think the dynamic of the game became much more interesting. However, it was troublesome to mantain such a thing. Everytime i planned a new mission i had to manually adjust the cfg files of the tanks to fill the correct amount of fuel i wanted and that meant reloading the game all over again. Also, every new update of NP, KW and the game, i had to manually update all dozens of config files because usually many other things in the .cfgs were changed so i was afraid of simply overwriting the .cfg files.

If this mod does all what it promotes, itll be very nice to have such kind of realism back!

However, i don´t get your choice of fuel mixtures:

AFAIK the 3 more common fuel types mixtures are:

1) RP1 + O2, Fuel mixture 1: 2.56 Maximum Theoretical ISP: ~353s (tough soyuz SM reaches 359s)

2) LH2 + O2, Fuel mixture 1:4 Maximum Theoretical ISP: 451s

3) (Non cryogenic) Hydrazines derivatives: Hydrazine, UMDH and it's mixtures like Aerozine 50/50, and UH25. All witch use Nitrogen Tetroxide. (Never heard of RP1 using NTO as Oxidizer like you main fuel type) Ratio: 1:1.34, 1.2:56 Maximum theoretical ISP: 339s (For simplicity sake, i would chose only Aerozine 50/50 mixture.)

Hypergolic Monoproppelants:

4) (Non Cryogenic) Monopropellants; Hydrazine or Hydrogen Peroxide. Maximum Theoretical ISP: 235s

5) NTR Solid: LH2. No oxidant needed. The Radioactive reactor witch contains the "Nuclear Fuel" is already built in in the Rocket Engine and doesn´t need to be replaced for dozens of years, so a "nuclear fuel" makes not much sense unless you talk about Liquid/Gas core designs that never left paper.

Nevertheless this is a great mod and i'll sure give it a try. Can i customize it to use my custom set of fuel types?

Edited by sephirotic
Link to post
Share on other sites

Is there any way to set it up so that the gases don't have to be cryogenic? I want to play with ISP and thrust but not decay of fuel over time.

Link to post
Share on other sites
Back in the 0.18 i made a custom version of all tanks and all engines to simulate RP-1 + O2 and LH2 + O2 engines and fuel tanks.

NERVA runned only on H2 and didn´t need Oxidizer, like the RL counterpart. They also had a permanent generator within then.

Orbital and sps Engines i made run with LH2 and have a higher efficience. I think the dynamic of the game became much more interesting. However, it was troublesome to mantain such a thing. Everytime i planned a new mission i had to manually adjust the cfg files of the tanks to fill the correct amount of fuel i wanted and that meant reloading the game all over again. Also, every new update of NP, KW and the game, i had to manually update all dozens of config files because usually many other things in the .cfgs were changed so i was afraid of simply overwriting the .cfg files.

If this mod does all what it promotes, itll be very nice to have such kind of realism back!

However, i don´t get your choice of fuel mixtures:

AFAIK the 3 more common fuel types mixtures are:

1) RP1 + O2, Fuel mixture 1: 2.56 Maximum Theoretical ISP: ~353s (tough soyuz SM reaches 359s)

2) LH2 + O2, Fuel mixture 1:4 Maximum Theoretical ISP: 451s

3) (Non cryogenic) Hydrazines derivatives: Hydrazine, UMDH and it's mixtures like Aerozine 50/50, and UH25. All witch use Nitrogen Tetroxide. (Never heard of RP1 using NTO as Oxidizer like you main fuel type) Ratio: 1:1.34, 1.2:56 Maximum theoretical ISP: 339s (For simplicity sake, i would chose only Aerozine 50/50 mixture.)

Hypergolic Monoproppelants:

4) (Non Cryogenic) Monopropellants; Hydrazine or Hydrogen Peroxide. Maximum Theoretical ISP: 235s

5) NTR Solid: LH2. No oxidant needed. The Radioactive reactor witch contains the "Nuclear Fuel" is already built in in the Rocket Engine and doesn´t need to be replaced for dozens of years, so a "nuclear fuel" makes not much sense unless you talk about Liquid/Gas core designs that never left paper.

Nevertheless this is a great mod and i'll sure give it a try. Can i customize it to use my custom set of fuel types?

Absolutely you can! And as for mixtures, you'll find that my fuel mixtures are actually derived from the figures you quoted (your mod was actually the inspiration for mine). For example:

73% LH2 + 27% O2 by volume. With LH2 density at 0.00045 and LOX density at 0.007 (which are actually their real densities in Kerbos, where one Kerbo = 1 volume unit (6.25 Liters, if you measure the tanks and do the math), that actually works out to a 5.76 fuel ratio by mass, which is well within the range (1:4 to 1:8) that LH2/LOX engines run. Likewise, if you look at the Isp of all the LH2+LOX mixes, they're in the 390 - 460 range.

35% RP1 + 65% LOX by volume. With RP1 density at 0.005 and LOX density at 0.007, that's a mass ratio of 1:2.6 - pretty close to the 1:2.56 listed above. If you look at the Isp of the RP1+LOX mixes, they're in the 300 - 370 range.

45% RP1 + 55% N2O4. You're right that that's not a common fuel mix, but I didn't want to add too many fuel types, and I figure "Oxidizer" isn't NECESSARILY N2O4, it's just some non-cryogenic oxidizer (who knows, maybe it's even H2O2). In any case, with an Oxidizer density of 0.008, that's a mass ratio of just about 1:2, and they all have Isps in the 250 - 330 range.

As for the Nuclear engines, note that the amount of NuclearMaterial used as propulsion is so close to 0 as to BE 0; the rest of it is just used for the Generator and Alternator, where it gets turned into NuclearWaste. And all of it is non-pumpable; it's just there to track how much there is in case I ever make a mod that lets you scavenge parts.

Edited by ialdabaoth
Link to post
Share on other sites
Guest
This topic is now closed to further replies.
×
×
  • Create New...