Jump to content

[1.12.x] Cryogenic Engines: Liquid Hydrogen and Methane Rockets! (August 13, 2024)


Nertea

Recommended Posts

Yep, re balancing LH2 to allow other things to work is fine with me.

ive got another install with Rss and real fuels for when i feel like actual densities anyway.

I would be fine with using a firespitter config, i actually know how to edit those

Edit: i actually think it would be worth learning to use ISfuelswicth, is there a tutorial for making configs for it anywhere?

Edited by Shrike99
Link to comment
Share on other sites

I think burn ratio of LH2 to Ox (assuming Ox is LOX) should be 1:8 (2 kg of H2 for every 16kg of O2 to make 18kg of H2O).

Trying to figure out patches to see how that affects things. Will report back.

Link to comment
Share on other sites

I think burn ratio of LH2 to Ox (assuming Ox is LOX) should be 1:8 (2 kg of H2 for every 16kg of O2 to make 18kg of H2O).

Trying to figure out patches to see how that affects things. Will report back.

That's the stoichiometric ratio, but real engines run hydrogen-rich (something like 1 kg H2 to every 4 kg O2) because the lighter atoms are better at turning heat into Isp.

Link to comment
Share on other sites

That's the stoichiometric ratio, but real engines run hydrogen-rich (something like 1 kg H2 to every 4 kg O2) because the lighter atoms are better at turning heat into Isp.

Right, will try that too. Also working on patch changes for tank so can share. Should probably be calculated differently in the fuel switch patch as one does get free space in the mix version.

EDIT to answer joeystar : Per unit mass you do far better, but per volume you do not. But, really what we care about is mass as that is what is fed into the rocket equation. So if you use the same mass of fuel with these you will get superior delta-v.

Edited by helaeon
Link to comment
Share on other sites

Forgive me if this is a dumb question, but why use it if it needs more tanks for the same amount of Delta-V, even if it has more Isp?

"He who asks a question may look stupid for five minutes, but he who never asks remains a fool forever"

-A Chinese proverb

Because although more tanks are/more space is needed, the fuel mass is lower, meaning that you need less lower stage mass to lift it.This is because LqdHydrogen has a low density, so it takes up more space, but still weighs less for the same performance.

In the real world kerosene/RP1 takes up less space than LH2 for a given delta-v requirement, but has a higher mass fraction compared to the payload.

With the new isp values it seems plausible that the default liquidfuel and oxidizer are Rp-1/LOx, so the comparison with this pack is somewhat accurate

Edited by Shrike99
Link to comment
Share on other sites

1kg LH2 to about 6kg OX seems to work pretty nice. In between the 1:4 that was suggested and 1:8 that would be stoichiometric. Also calculating tanks differently so no free space!

Here's what to do if you want to try it in CryoEnginesFuelTanks.cfg splice this in (first and last lines are the same as the one in the .cfg)


@totalCap += #$RESOURCE[Oxidizer]/maxAmount$

%onlyLH2 = #$totalCap$
@onlyLH2 *= 5.5
%mixLH2 = #$onlyLH2$
@mixLH2 *= 0.6875
%mixOX = #$totalCap$
@mixOX *= 0.3125

%tempVar = 0

Then make yourself a MM patch with the following


@PART[cryoengine*]
{
@MODULE[ModuleEnginesFX]{
@PROPELLANT[LqdHydrogen]{
@ratio = 12.1
}
@PROPELLANT[Oxidizer]{
@ratio = 1
}
}
}

Nertea, I don't want to step on your toes. It's your mod and I love it. So if you want to keep doing something else you go ahead, thought I'd do some leg-work for another take if you were interested :)

Link to comment
Share on other sites

very nice mod.

for me, the beauty of the mod is at another point: I use to give my rockets a lot of extra fuel, usually the rocket is overbuilt. adding a reactor and a few vasimr-drives to the payload (or the interplanetary stage) allows using that fuel in a highly efficient way. 10 km/s or more delta v are absolutely realistic. and I can dump the excess oxidizer.

Link to comment
Share on other sites

1kg LH2 to about 6kg OX seems to work pretty nice. In between the 1:4 that was suggested and 1:8 that would be stoichiometric. Also calculating tanks differently so no free space!

Here's what to do if you want to try it in CryoEnginesFuelTanks.cfg splice this in (first and last lines are the same as the one in the .cfg)


@totalCap += #$RESOURCE[Oxidizer]/maxAmount$

%onlyLH2 = #$totalCap$
@onlyLH2 *= 5.5
%mixLH2 = #$onlyLH2$
@mixLH2 *= 0.6875
%mixOX = #$totalCap$
@mixOX *= 0.3125

%tempVar = 0

Then make yourself a MM patch with the following


@PART[cryoengine*]
{
@MODULE[ModuleEnginesFX]{
@PROPELLANT[LqdHydrogen]{
@ratio = 12.1
}
@PROPELLANT[Oxidizer]{
@ratio = 1
}
}
}

Nertea, I don't want to step on your toes. It's your mod and I love it. So if you want to keep doing something else you go ahead, thought I'd do some leg-work for another take if you were interested :)

What kind of effect does this have on tankage volume required for similar DV?

Link to comment
Share on other sites

You still need a lot more tank.

On my test ship using the Ct10, I have 1337 m/s DV VAC (not on purpose) - ship weighs 9.9T.

Volcano, 11T, 1072 m/s DV VAC, excellent TWR.

If I switch it over to use the poodle and LF I get a 15.3T ship has 2083 m/s DV VAC and superior TWR.

If I use the T45, 15.1T, 1948 m/s DV VAC and better TWR

Terrier LV909, 14.1T, 2310 m/s DV VAC, and lesser TWR

All I did for that was swap the one engine at the bottom and the fuel being used. Same tanks, same fuel flow, reading out of KER in the VAB.

Link to comment
Share on other sites

@Shrike99, here you go


// Adds FSFuelSwitch to all LFO tanks, except service module type tanks (monoprop detected), engine/tank combos or boosters or tanks which already have switchers
@PART
[*]:HAS[@RESOURCE[LiquidFuel],@RESOURCE[Oxidizer],!RESOURCE[MonoPropellant],!MODULE[FSfuelSwitch],!MODULE[InterstellarFuelSwitch],!MODULE[ModuleEnginesFX],!MODULE[ModuleEngines]]:FINAL
{
MODULE
{
varVol = #$../RESOURCE[LiquidFuel]/maxAmount$
@varVol += #$../RESOURCE[Oxidizer]/maxAmount$

varLF = #$../RESOURCE[LiquidFuel]/maxAmount$
varO = #$../RESOURCE[Oxidizer]/maxAmount$

varOnlyLF = #$varVol$
varOnlyO = #$varVol$
@varOnlyLF *= 0.9
@varOnlyO *= 1.1

varMassOnlyLF = #$../mass$
varMassOnlyO = #$../mass$
@varMassOnlyLF *= 0.9
@varMassOnlyO *= 1.1

varCryoH2 = #$varVol$
varCryoO = #$varVol$
@varCryoH2 *= 5
@varCryoO *= 0.5

varOnlyH2 = #$varVol$
@varOnlyH2 *= 11

varMassOnlyH2 = #$../mass$
@varMassOnlyH2 *= 1.1

varMassStructural = #$../mass$
@varMassStructural *= 0.8

name = FSfuelSwitch
resourceNames = LiquidFuel,Oxidizer;LqdHydrogen,Oxidizer;LiquidFuel;Oxidizer;LqdHydrogen;MonoPropellant;Structural
resourceAmounts = #$varLF$,$varO$;$varCryoH2$,$varCryoO$;$varOnlyLF$;$varOnlyO$;$varOnlyH2$;$varVol$;0
tankCost = 0;0;0;0;0;0;0
availableInFlight = false
availableInEditor = true
displayCurrentTankCost = true
hasGUI = true
showInfo = true
basePartMass = 0
tankMass = #$../mass$;$../mass$;$varMassOnlyLF$;$varMassOnlyO$;$varMassOnlyH2$;$../mass$;$varMassStructural$
}
!RESOURCE[LiquidFuel] {}
!RESOURCE[Oxidizer] {}
}
// Adds FSFuelSwitch to all LF tanks aswell
@PART
[*]:HAS[@RESOURCE[LiquidFuel],!MODULE[FSfuelSwitch],!MODULE[InterstellarFuelSwitch],!MODULE[ModuleEnginesFX],!MODULE[ModuleEngines]]:FINAL
{
MODULE
{
varVol = #$../RESOURCE[LiquidFuel]/maxAmount$

varLF = #$varVol$
varO = #$varVol$
@varLF *= 0.45
@varO *= 0.55

varOnlyLF = #$varVol$
varOnlyO = #$varVol$
@varOnlyLF *= 0.9
@varOnlyO *= 1.1

varMassOnlyLF = #$../mass$
varMassOnlyO = #$../mass$
@varMassOnlyLF *= 0.9
@varMassOnlyO *= 1.1

varCryoH2 = #$varVol$
varCryoO = #$varVol$
@varCryoH2 *= 5
@varCryoO *= 0.5

varOnlyH2 = #$varVol$
@varOnlyH2 *= 11

varMassOnlyH2 = #$../mass$
@varMassOnlyH2 *= 1.1

varMassStructural = #$../mass$
@varMassStructural *= 0.8

name = FSfuelSwitch
resourceNames = LiquidFuel;Oxidizer;LqdHydrogen;MonoPropellant;LiquidFuel,Oxidizer;LqdHydrogen,Oxidizer;Structural
resourceAmounts = #$varOnlyLF$;$varOnlyO$;$varOnlyH2$;$varVol$;$varLF$,$varO$;$varCryoH2$,$varCryoO$;0
tankCost = 0;0;0;0;0;0;0
availableInFlight = false
availableInEditor = true
displayCurrentTankCost = true
hasGUI = true
showInfo = true
basePartMass = 0
tankMass = #$../mass$;$../mass$;$varMassOnlyLF$;$varMassOnlyO$;$varMassOnlyH2$;$../mass$;$varMassStructural$
}
!RESOURCE[LiquidFuel] {}
}
// And adds MP switch to the pods, don't use it in conjuction with tacls
@PART
[*]:HAS[@RESOURCE[MonoPropellant],@RESOURCE[ElectricCharge],@MODULE[ModuleCommand],!MODULE[FSfuelSwitch],!MODULE[InterstellarFuelSwitch]]
{
%varMP = #$RESOURCE[MonoPropellant]/maxAmount$
%varEC = #$RESOURCE[ElectricCharge]/maxAmount$
MODULE
{
name = FSfuelSwitch
resourceNames = MonoPropellant,ElectricCharge;ElectricCharge
resourceAmounts = #$../varMP$,$../varEC$;$../varEC$
tankCost = 0;0
availableInFlight = false
availableInEditor = true
displayCurrentTankCost = true
hasGUI = true
showInfo = true
basePartMass = #$../mass$
tankMass = 0;0
}
!RESOURCE[MonoPropellant] {}
!RESOURCE[ElectricCharge] {}
}

This is my take on tank switching, balancing is mostly preserved as is in the original mod.

The LF and O only tank setups have appropriate mass ratios, the LH2 only tank setup has a mass ratio assuming that LH2/O tanks have a 50:50 volume ratio

NERVAs should work just fine, in both LF and LH2 configurations

Attaching two identical tanks in a stack and filling one with LF and one with O will feed a LFO engine properly

Attaching two identical tanks in a stack and filling one with LH2 and one with O will feed a cryo engine properly

As a bonus i have structural tank setups (.8 the mass of the tank, is balanced stockalike, does not render wet wings op), MP setups aand..

A tank switcher for the manned pods to take out the monopropellant (warranty void if used with TACLS :Dsrsly, remove that bit if you have TACLS or any mod adding resources to the pods )

Back up your save and enjoy, feedback is welcome

sorry for the slow response but NP++ decided to revert to an older version of the patch and i had to redo it

Edited by igor_perusco
inability to copy and paste
Link to comment
Share on other sites

Hey guys :)

Is it possible for one of you really smart folks to hack together an MM patch to get Procedural Parts to support Cryo?

@PART[procedural*Liquid]:NEEDS[CryoEngines]{
@MODULE[TankContentSwitcher]
{
TANK_TYPE_OPTION
{
name = LqdHydrogen
dryDensity = 0.1
costMultiplier = 0.035
// Based on observation that LH2 is 1/20 the cost of LF
RESOURCE
{
name = LqdHydrogen
unitsPerT = 8800
// Based on nertea's 5.5x total of mixed tank
}
}
TANK_TYPE_OPTION
{
name = LqdHydrogen+Oxidizer
dryDensity = 0.1
costMultiplier = 0.785
// Based on observation that LH2 is 1/20 the cost of LF and adding the cost mult for oxidizer only
RESOURCE
{
name = LqdHydrogen
unitsPerT = 8000
// Based on nertea's 5x total of mixed tank
}
RESOURCE
{
name = Oxidizer
unitsPerT = 800
// Based on nertea's 1:10 ratio for mixed tank
}
}
}
}

Please critic it and let me know how it works haven't tested just made it. It is based the orignal stats from nertea's DL in OP.

Link to comment
Share on other sites

@PART[procedural*Liquid]:NEEDS[CryoEngines]{
@MODULE[TankContentSwitcher]
{
TANK_TYPE_OPTION
{
name = LqdHydrogen
dryDensity = 0.1
costMultiplier = 0.035
// Based on observation that LH2 is 1/20 the cost of LF
RESOURCE
{
name = LqdHydrogen
unitsPerT = 8800
// Based on nertea's 5.5x total of mixed tank
}
}
TANK_TYPE_OPTION
{
name = LqdHydrogen+Oxidizer
dryDensity = 0.1
costMultiplier = 0.785
// Based on observation that LH2 is 1/20 the cost of LF and adding the cost mult for oxidizer only
RESOURCE
{
name = LqdHydrogen
unitsPerT = 8000
// Based on nertea's 5x total of mixed tank
}
RESOURCE
{
name = Oxidizer
unitsPerT = 800
// Based on nertea's 1:10 ratio for mixed tank
}
}
}
}

Please critic it and let me know how it works haven't tested just made it. It is based the orignal stats from nertea's DL in OP.

Hi.

i'm interested in this too. How do I use this code?

Link to comment
Share on other sites

Hello,

Wow these coders should volunteer for Squad...and I am being abit cynical...why...because Squad should decide and FIX fuel densities, not 'just' modders; Liquid Fuel = Liquid Hydrogen always was and always is; aribtrary making a new fuel...?

Cmdr Zeta

Link to comment
Share on other sites

Hello,

Wow these coders should volunteer for Squad...and I am being abit cynical...why...because Squad should decide and FIX fuel densities, not 'just' modders; Liquid Fuel = Liquid Hydrogen always was and always is; aribtrary making a new fuel...?

Cmdr Zeta

Liquid Fuel = Liquid Hydrogen - This isn't necessarily the case, or wasn't when Nertea originally released the first Near Future Propulsion.

Back then I think the term "Liquid Fuel" was described as a burnable fuel-like substance. I don't think it was until Scott Manley drew alot of peoples attention to KSPI (Fractual's Interstellar Mod) that people started associating the two on a regular basis since KSPI originally renamed the resource & used it as "Hydrogen" for its thermal engines.

Nertea & Rover's USI still treat them as separate resources, and personally I like the variety without having to go the full Real Fuels overkill :)

@Nertea: Absolutely love these engines... Now I just need to figure out a good way to patch your patch so I can add other resources I like to store in stock tanks to the fuel switch list lol

Link to comment
Share on other sites

Nertea pls could you add NEEDS[!modularFuelTanks] to your fuel patch? For anyone who's interested in MFT patch: http://workupload.com/file/wQa7Ul5T


TANK_DEFINITION
{
name = Cryogenic
basemass = 0.0003125 * volume
TANK
{
name = LqdHydrogen
amount = full
maxAmount = 50%
utilization = 10
}
TANK
{
name = Oxidizer
amount = full
maxAmount = 50%
}
}
//------------------------------------------------------//

// Add tank type Cryogenic to all default tanks
@PART
[*]:HAS[@MODULE[ModuleFuelTanks]]&HAS[@type[Default]]:FINAL
{
@MODULE[ModuleFuelTanks]
{
typeAvailable = Default
typeAvailable = Cryogenic
}
}
// Add tank definition for CryoEngines

Basemass of the tanks are halved, because of balancing reasons.

Link to comment
Share on other sites

My whole life has been a lie?

I've been using FSfuelswitch, and recently InterstellarFuelSwitch and when I took a stock tank and switched to just LF or just OX, I was simply doubling the original amount of each, not taking into account the total tank volume.

The patches here assume that LF and OX are the same density? Is that in fact true? So a tank that held 14400 total combined LF/OX would hold 14400 LF only, or 14400 OX only?

Link to comment
Share on other sites

Nertea pls could you add NEEDS[!modularFuelTanks] to your fuel patch? For anyone who's interested in MFT patch: http://workupload.com/file/wQa7Ul5T


TANK_DEFINITION
{
name = Cryogenic
basemass = 0.0003125 * volume
TANK
{
name = LqdHydrogen
amount = full
maxAmount = 50%
utilization = 10
}
TANK
{
name = Oxidizer
amount = full
maxAmount = 50%
}
}
//------------------------------------------------------//

// Add tank type Cryogenic to all default tanks
@PART
[*]:HAS[@MODULE[ModuleFuelTanks]]&HAS[@type[Default]]:FINAL
{
@MODULE[ModuleFuelTanks]
{
typeAvailable = Default
typeAvailable = Cryogenic
}
}
// Add tank definition for CryoEngines

Basemass of the tanks are halved, because of balancing reasons.

Some feedback, this packs too much fuel in the tanks IMHO. Using it with Procedural Parts and MFT, I built an approximate scale 5m Delta IV M+ 5,4 and flew a 14.1 tonne payload to LKO with a lot of slack dV to spare. I'd back it off a bit for balance if it were me but it's up to you.

Link to comment
Share on other sites

Perhaps it is PP which assumes a higher volume of the tanks. When I've made the patch I've compared the amount of LqdHydrogen/OX for stock tanks and MFT to the values given by Nerteas Fuelswitch patch. Nerteas assumes for stock tanks, that 10 units of LqdHydrogen equals 1 unit of Oxidizer and the resource using is half and half.

Of course for MFT it isn't exactly the same, e.g. for fuelswitch there is a tank with LqdHydrogen only, but it adds just the value for Oxizider to the value of LqdH2, which makes no sense, when you assume 10x higher "density". In this case MFT just doubles the amount of LqdH2.

First you can change the default basemass to 0.000625 for balance reasons. But there are some other things I've thought about, which I will try to explain later, when I've some minutes.

Link to comment
Share on other sites

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