Jump to content

[ANY][0.3.0] More Fuels!


Clamp-o-Tron

Recommended Posts

1 hour ago, grungar3x7 said:

I guess I could, and no, not unless the ReStock+ folks add one! It's more to do with the fact that I like a granularity somewhere between  RealFuels and stock, using pretty much all of Nertea's mods to do so, and the supposition that the oxidizer in LF/O was oxygen, but the mix ratio being off, in addition to boiloff being handwaved, bugged me slightly. a while ago,  I'd read on the Add-on discussion someone's suggestion that RP-1/HTP was the fuel being represented, and it shut the voice in the back of my head up for a good while, until I did some digging, and found the mix ratio in documentation. Now, the little beast won't let me build in peace, nagging that "It's still not quite right..." whenever I put an LF/O rocket together.

Good news for you then. 0.3 basically adds HTP as a resource to the game (a monopropellant, though, I didn't want to cause confusion with liquid fuel having two possible oxidizers), mostly for the CRE mod.

Also, in the Patches/Optional folder of SH is an optional config for oxidizer boiloff. Just remove the .disabled extension from the end, making it .cfg.

I'm not going to mess with the fuel ratios for LF/Ox (stockalike ;)), but on my install I do have a patch to change the in-game names for several resources.

Spoiler




@RESOURCE_DEFINITION[LiquidFuel]
{
	@name = Kerosene
    @abbreviation = RP-1
}
@RESOURCE_DEFINITION[Oxidizer]
{
	@name = LqdOxygen
    @abbreviation = LOX
}
@RESOURCE_DEFINITION[Monopropellant]
{
	@name = Hydrazine
    @abbreviation = N2H4
}
@RESOURCE_DEFINITION[ElectricCharge]
{
	@name = KiloJoules
    @abbreviation = kJ
}

 

 

ISRU update:

ISRU production comes in two modes, (semi-)realistic and simplified. (semi-)Realistic will activate when Rational Resources is installed.

I sacrificed quite a bit of realism so that I don't have to add Chloride as a required resource or add way too many methyl groups to the reaction than I'd be willing to (and you would have to get a lot of Carbon). Instead, the Convert-o-Tron will just do its chemical magic to convert the components to Aerozine-50, which is just a mixture of Hydrazine and Unsymmetrical Dimethylhydrazine.

2(CH4)+N2H4+N2 -------> 1/2(N2H4)+1/2(H2+N2+2(CH3))
2(Methane)+Monopropellant+Nitrogen -------> Aerozine

(Units in nothing particular, let's just say moles. I'll do the density conversions later. If any people who are more than armchair chemists want to correct me, please do.)

Nitroxide is pretty simple.

N2+2(O2)------->N2O4
Nitrogen+2(Oxygen)------->Nitroxide

Even simpler is the simplified chain (OFC).

IDK how much Ore -------> some of both
IDK how much Ore -------> Nitroxide
IDK how much Ore -------> Aerozine

 

I feel OK with having something this complicated with several resources in a "stockalike" mod, because ISRU probably something useful with these fuels, and it will need Rational Resources to function.

 

Spoiler

I might actually be open to changing fuel masses, depending on how simple it would be to change the liquid fuel mass without messing other things up is.

 

Edited by Clamp-o-Tron
Link to comment
Share on other sites

Took the most recently uploaded dev build out for a spin, it appears that your RCS fuel switch only 50% works, both hydroprox and hypergol consume hydrogen peroxide as a resource while hypergolic should consume aerozine/nitroxide, standard monoprop works as normal.

also, the SPS engines for the BDB agena aren't recognized as hypergolic, id fix it myself, but my module manager skills are a solid lvl 1

 

Edit:

was doing some reading, looks like the engines for the juno 4's upper stages (ergo, vega 3rd stage)  should be hypergolic as well. 

if you wanted to PM me a crash course/explanation of how to do that with module manager, id be happy to do that for engines in BDB/tantares/etc

Edited by The Acid Falcon
further information discovered
Link to comment
Share on other sites

An issue that I have found is that tanks that contain liquid fuel and oxidiser AND monopropellant (e.g. the BDB Juno IVA second stage) will lose monopropellant as a resource when switched to hypergols. I have only noticed this problem in the aforementioned part and will check if others have the problem also (like the Delta K).

Link to comment
Share on other sites

1 hour ago, KeaKaka said:

An issue that I have found is that tanks that contain liquid fuel and oxidiser AND monopropellant (e.g. the BDB Juno IVA second stage) will lose monopropellant as a resource when switched to hypergols. I have only noticed this problem in the aforementioned part and will check if others have the problem also (like the Delta K).

Its on all of the BDB tanks for sure. agena is the only one that i can fly with the current dev build because the hydrazine is stored in the equipment module. IMO his approach of changing the RCS to consume hypergolic fuels is a better fix than retaining the monprop in the tank setup.

Link to comment
Share on other sites

4 hours ago, KeaKaka said:

An issue that I have found is that tanks that contain liquid fuel and oxidiser AND monopropellant (e.g. the BDB Juno IVA second stage) will lose monopropellant as a resource when switched to hypergols. I have only noticed this problem in the aforementioned part and will check if others have the problem also (like the Delta K).

Yeah, this is a problem I've experienced. If you have any solutions, please tell.

3 hours ago, The Acid Falcon said:

Its on all of the BDB tanks for sure. agena is the only one that i can fly with the current dev build because the hydrazine is stored in the equipment module. IMO his approach of changing the RCS to consume hypergolic fuels is a better fix than retaining the monprop in the tank setup.

This is exactly what I would do.

Link to comment
Share on other sites

I'm looking forward to try this in a new campaign. As Aerozine is derived from the company Aerojet Rocketdyne the Kerbal equivalent could be named Kerbozine (for Kerbodyne) or Jebozine (for Jeb's Junkyard).

Anyway, I needed some patches, so I might as well add them here:

Vens additional parts:

Spoiler

@PART[MicroEngineB|VenLV909b|S2ServiceEngine]:NEEDS[VenStockRevamp]:FIRST
{
	%SHHypergolic = True
}
@PART[LargeOMS]:NEEDS[VenStockRevamp]:FIRST
{
	%MPHypergolic = True
}

 

 

Procedural parts:

Spoiler

@PART[proceduralTankLiquid]:NEEDS[ProceduralParts]
{
	@MODULE[TankContentSwitcher]
	{
		TANK_TYPE_OPTION
		{
			name = Hypergolic
			// This is the dry mass of the tank per kL of volume.
			dryDensity = 0.1089
			costMultiplier = 1.0
			RESOURCE 
			{
				name = Aerozine
				unitsPerT = 3600
			}
			RESOURCE 
			{
				name = Nitroxide
				unitsPerT = 4400
			}
		}
	}
}

 

 

Configurable Containers:

Spoiler

TANKCONF:NEEDS[ConfigurableContainers]
{
    name = Hypergolic
    TANK
    {
        TankType = LiquidChemicals
        CurrentResource = Aerozine
        InitialAmount = 1
        Volume = 225
    }
    TANK
    {
        TankType = LiquidChemicals
        CurrentResource = Nitroxide
        InitialAmount = 1
        Volume = 275
    }
}

@TANKTYPE[LiquidChemicals]:NEEDS[ConfigurableContainers]
{ @PossibleResources ^= :$: Nitroxide 0.81; Aerozine 0.81;: } //cfp

 

 

Cost and weight of empty tanks remain unchanged with both previous patches.

 

And Kerbalism:

Spoiler

@PART[*]:HAS[@MODULE[ModuleEngines*]:HAS[@PROPELLANT[Aerozine]]]:NEEDS[FeatureReliability,KerbalismDefault,StockalikeHypergols]:FINAL
{
	@MODULE[Reliability]:HAS[#type[ModuleEngines*]]
	{
		@rated_ignitions *= 10
		@rated_operation_duration *= 10
		@turnon_failure_probability *= 0.5
	}
}

// optional since Kerbalism has its own fuel cell
-PART[StockalikeHypergolsFuelCell]:NEEDS[KerbalismConfig]{}

 

I assume Hypergolics should have a really high number of ignitions, so I multiplied the originally computed value by 10. I have no idea if this is realistic.

Link to comment
Share on other sites

3 hours ago, Clamp-o-Tron said:

Thanks. I'll include these in the DEV branch, with credit to you. Some internal things have changed, so I'll fix that for you.

Great,

as my playthrough is supposed to be Koviet style, I decided to use the soviet terms Heptyl and Amyl instead of Aerozine50 and NTO.

I also tried to change the ratio to 7/13 instead of 9/11 and doing it this way seems to work fine (although the patch looks a bit messy and in the end you really can't spot the difference in ratios during burns):

Spoiler


// Copied verbatim from CRP, with name changed.
RESOURCE_DEFINITION
{
    name = Heptyl
	displayName = Heptyl
	abbreviation = Hp
    density = 0.001
    unitCost = 0.16
    hsp = 2970.1
    flowMode = STACK_PRIORITY_SEARCH
    transfer = PUMP
    isTweakable = True
    isVisible = true
}

// Copied verbatim from CRP, with names changed.
RESOURCE_DEFINITION
{
    name = Amyl
	displayName = Amyl
	abbreviation = Ay
    density = 0.001
    unitCost = 0.036
    hsp = 1521.6
    flowMode = STACK_PRIORITY_SEARCH
    transfer = PUMP
    isTweakable = True
    isVisible = true
}

@PART[liquidEngine3_v2|microEngine_v2|radialEngineMini_v2]:FIRST
{
  @MODULE[ModuleEngine*],*
	{
		@PROPELLANT[LiquidFuel]
		{
			@name = Heptyl
			@ratio /= 9
			@ratio *= 35
		}
		@PROPELLANT[Oxidizer]
		{
			@name = Amyl
			@ratio /= 11
			@ratio *= 65
		}
	}
	// Not present in tanks, but some engines have fuel onboard
	@RESOURCE[LiquidFuel]
	{
		@name = Heptyl
		@amount /=9
		@amount *=35
		@maxAmount /=9
		@maxAmount *=35
	}
	@RESOURCE[Oxidizer]
	{
		@name = Amyl
		@amount /=11
		@amount *=65
		@maxAmount /=11
		@maxAmount *=65
	}
}
@PART[omsEngine]:FIRST
{
	@MODULE[ModuleEngines*],*
	{
		@PROPELLANT:HAS[#name[MonoPropellant]]
		{
			@name = Heptyl
			@ratio /=18
			@ratio *=35
		}
		PROPELLANT
		{
			name = Amyl
			ratio /=22
			ratio *=65
		}
	}
}

@PART[proceduralTankLiquid]:NEEDS[ProceduralParts]
{
	@MODULE[TankContentSwitcher]
	{
		TANK_TYPE_OPTION
		{
			name = Hypergolic
			// This is the dry mass of the tank per kL of volume.
			dryDensity = 0.1089
			costMultiplier = 1.0
			RESOURCE 
			{
				name = Heptyl
				unitsPerT = 2800
			}
			RESOURCE 
			{
				name = Amyl
				unitsPerT = 5200
			}
		}
	}
}

TANKCONF:NEEDS[ConfigurableContainers]
{
    name = Hypergolic
    TANK
    {
        TankType = LiquidChemicals
        CurrentResource = Heptyl
        InitialAmount = 1
        Volume = 175
    }
    TANK
    {
        TankType = LiquidChemicals
        CurrentResource = Amyl
        InitialAmount = 1
        Volume = 325
    }
}

@TANKTYPE[LiquidChemicals]:NEEDS[ConfigurableContainers]
{ @PossibleResources ^= :$: Amyl 0.81; Heptyl 0.81;: } //cfp

 

Just in case anybody wondered how this could be done.

Edited by hermano
Link to comment
Share on other sites

1 minute ago, hermano said:

Great,

as my playthrough is supposed to be Koviet style, I decided to use the soviet terms Heptyl and Amyl instead of Aerozine50 and NTO.

I also tried to change the ratio to 6/14 instead of 9/11 and doing it this way seems to work fine (although the patch looks a bit messy and in the end you really can't spot the difference in ratios during burns):

  Hide contents


// Copied verbatim from CRP, with name changed.
RESOURCE_DEFINITION
{
    name = Heptyl
	displayName = Heptyl
	abbreviation = Hp
    density = 0.001
    unitCost = 0.16
    hsp = 2970.1
    flowMode = STACK_PRIORITY_SEARCH
    transfer = PUMP
    isTweakable = True
    isVisible = true
}

// Copied verbatim from CRP, with names changed.
RESOURCE_DEFINITION
{
    name = Amyl
	displayName = Amyl
	abbreviation = Ay
    density = 0.001
    unitCost = 0.036
    hsp = 1521.6
    flowMode = STACK_PRIORITY_SEARCH
    transfer = PUMP
    isTweakable = True
    isVisible = true
}

@PART[liquidEngine3_v2|microEngine_v2|radialEngineMini_v2]:FIRST
{
  @MODULE[ModuleEngine*],*
	{
		@PROPELLANT[LiquidFuel]
		{
			@name = Heptyl
			@ratio /= 9
			@ratio *= 35
		}
		@PROPELLANT[Oxidizer]
		{
			@name = Amyl
			@ratio /= 11
			@ratio *= 65
		}
	}
	// Not present in tanks, but some engines have fuel onboard
	@RESOURCE[LiquidFuel]
	{
		@name = Heptyl
		@amount /=9
		@amount *=35
		@maxAmount /=9
		@maxAmount *=35
	}
	@RESOURCE[Oxidizer]
	{
		@name = Amyl
		@amount /=11
		@amount *=65
		@maxAmount /=11
		@maxAmount *=65
	}
}
@PART[omsEngine]:FIRST
{
	@MODULE[ModuleEngines*],*
	{
		@PROPELLANT:HAS[#name[MonoPropellant]]
		{
			@name = Heptyl
			@ratio /=18
			@ratio *=35
		}
		PROPELLANT
		{
			name = Amyl
			ratio /=22
			ratio *=65
		}
	}
}

@PART[proceduralTankLiquid]:NEEDS[ProceduralParts]
{
	@MODULE[TankContentSwitcher]
	{
		TANK_TYPE_OPTION
		{
			name = Hypergolic
			// This is the dry mass of the tank per kL of volume.
			dryDensity = 0.1089
			costMultiplier = 1.0
			RESOURCE 
			{
				name = Heptyl
				unitsPerT = 2800
			}
			RESOURCE 
			{
				name = Amyl
				unitsPerT = 5200
			}
		}
	}
}

TANKCONF:NEEDS[ConfigurableContainers]
{
    name = Hypergolic
    TANK
    {
        TankType = LiquidChemicals
        CurrentResource = Heptyl
        InitialAmount = 1
        Volume = 175
    }
    TANK
    {
        TankType = LiquidChemicals
        CurrentResource = Amyl
        InitialAmount = 1
        Volume = 325
    }
}

@TANKTYPE[LiquidChemicals]:NEEDS[ConfigurableContainers]
{ @PossibleResources ^= :$: Amyl 0.81; Heptyl 0.81;: } //cfp

 

Just in case anybody wondered how this could be done.

I'm glad you found a use. FYI, you can simplify this a lot, by simply changing the localization name instead of the in-game title.

@RESOURCE[Aerozine]
{
	@displayName = Heptyl
    @abbreviation = Hp
}
@RESOURCE[Nitroxide]
{
	@displayName = Amyl
    @abbreviation = Am
}

For the ratio changing, you would have to just change my config files. Maybe I'll implement settings as to fuel mixtures.

Link to comment
Share on other sites

14 hours ago, Clamp-o-Tron said:

I'm glad you found a use. FYI, you can simplify this a lot, by simply changing the localization name instead of the in-game title.

Right, I decided to not use B9PartSwitch, then changed some values to try some things and didn't want to rewrite it all and post untested code. My intent was just to show that changing ratios works that way.

 

Link to comment
Share on other sites

  • 4 weeks later...
  • 3 weeks later...
Just now, Spaceman.Spiff said:

It's been a little bit since there was activity here.

Not to poke bears, but have you been up to anything related to this mod recently?

Totally my fault that we don't have activity.

My development mentality is always short bursts of activity, but after Winter holidays those short bursts last about 5 minutes, with weeks in between. I'll try to get something out just to improve on 0.2, but it won't be as complete as intended.

Link to comment
Share on other sites

@SpaceFace545 what you posted in the BDB topic is a known bug, but unfortunately not one that I believe can be fixed. Looking at other B9PS configuration for other mods, I can say that this crops up from time to time, and that nobody has found a way to stop it.

A solution coming either in 0.3 or 0.4 which will allow you to switch your RCS to using more fuels, including HTP and hypergolic bipropellant, which means that a single tank will work for RCS and main engine fuel.

Link to comment
Share on other sites

On 3/18/2021 at 8:13 PM, Clamp-o-Tron said:

@SpaceFace545 what you posted in the BDB topic is a known bug, but unfortunately not one that I believe can be fixed. Looking at other B9PS configuration for other mods, I can say that this crops up from time to time, and that nobody has found a way to stop it.

A solution coming either in 0.3 or 0.4 which will allow you to switch your RCS to using more fuels, including HTP and hypergolic bipropellant, which means that a single tank will work for RCS and main engine fuel.

So my issue was rational resources. I uninstalled it and reinstalled stockalike hyperboles and it works fine now. I accidently thought it was a JNSQ dependency :D

Link to comment
Share on other sites

Okay, I've got a lot of progress done. Most of it required some plugin work, and I must say I am proud of it. 0.3 will now make the following changes:

* ISRU will be available, but only within 500 meters of the Bop Kraken corpse.

* Fuel cells now produce ore (coking) as a byproduct.

* A dialogue from the ghost of Sergei Korolev will now appear when loading hypergolic propellants, urging you not to.

* New fuel mixture: alcolox. Crew will have their stupidity increased by 1% every day they spend with alcolox on board.

* New fuel mixture: hydrogen peroxide/ RP-1. In-game, they will be called Liquid Fuel and Oxidizer, but are not compatible with the other Liquid Fuel and Oxidizer. There is no way to tell them apart, but any attempt to fix this will cause crashes.

* New fuel mixture: ethalox. Frankly, these are the same as alcolox, as multiple clinical trials showed.

* Orange clouds of smoke are bland and not unique to hypergols, so purple pigments will now be required for the firing of hypergolic engines.

* Removed Waterfall and RealPlume.

* To ensure a proper "real-life" look, all plumes will now be generated from data taken from real-time tetris matches taking place online.

* Users now must make their own sound effects, for performance reasons.

* The ocean has been replaced by more atmosphere with pressure high enough as to cause buoyancy.

* Removed hypergolic B9 tank switches, users will now have to have the infinite fuel cheat on at all times when using these engines.

* Fuel ratios are now procedurally generated every physics frame, adding an element of risk to the game.

* Notable compatibilities added include Scott Munley and Big Chungus Planet Pack.

* Bees.

Changes can be seen here:

https://github.com/Clamp-o-Tron/KSP-Stockalike-Hypergols

 

 

Spoiler

In all seriousness, I'm doing good work on this again, but feature creep might throw a wrench in a quick release. Wish me luck.

 

Edited by Clamp-o-Tron
Link to comment
Share on other sites

4 hours ago, Spaceman.Spiff said:

wait you weren't joking about this :o

who's the fool now?

still me

Not sure if I like the fact that people are snooping about the GitHub dev branch...

(totally fine and encouraged, in fact)

The scope has in fact changed since the last real update, this is what's on the table:

* Bug fixes

* H2O2/RP-1 fuel mixture, instead of the only H2O2 propellant I had earlier.

* Ethanol/LOX fuel mixture, what you saw the resource definition for.  This is experimental at the moment. I haven't asked yet, but I plan on consulting with @Nertea to add a feature to the boiloff code of Cryo Tanks: RP-1 gelling. There's a reason kerolox isn't used much in space probes, aside from slight LOX boiloff: if kerosene or RP-1 gets too cold (as it does in deep space ), it will start to become unusable as it becomes solid or wax-like.

          So what I'm proposing if Nert would like to help out is basically a reverse of the CryoTanks code; if a propellant gets too cold rather than too hot, it is transformed into another resource that engines can't run on.

          If this doesn't pan out, there's really no reason to have ethalox in addition to the other stuff we have.

* RCS switches will finally come, with hypergolic bipropellant, HTP monopropellant, ethalox bipropellant, and nitrogen cold gas thrusters.

* ISRU for H2O2, upon review, it's the only reasonable one of these you could get with ISRU.

I've also got an aspirational goal of low-detail standardized engines, modeled by someone else, with options through B9PS to run in kerolox, hydrolox, methalox, monoprop, HTP/LOX, and ethalox configurations.

If anyone has the talent and time to do some of these, please PM me!

I'm especially looking for 1 kN, 10 kN, 30 kN, and 100 kN engines in both sea level (except for 1 kN) and vacuum variants, but basically anything will go.

Link to comment
Share on other sites

8 minutes ago, Clamp-o-Tron said:

Ethanol/LOX fuel mixture, what you saw the resource definition for.  This is experimental at the moment. I haven't asked yet, but I plan on consulting with @Nertea to add a feature to the boiloff code of Cryo Tanks: RP-1 gelling. There's a reason kerolox isn't used much in space probes, aside from slight LOX boiloff: if kerosene or RP-1 gets too cold (as it does in deep space ), it will start to become unusable as it becomes solid or wax-like.

I wonder if that would work in a similar fashion to boil off, because you’d still be loosing usable propellant. 

It could even use EC in the same way as well, because heaters for RP-1 are definitely a real thing.

(I think Falcon Second Stage has it for missions with a long coast period like GEO)

It would be a funny feature to allow kerbs to use ethanol in the case of no LS supplies. They would just need to be set to tourist skill level for “realism” :wink:
 

Spoiler

Also it would be a shame not to use the amazing Ethalox plumes that Zorg made

 

Edited by Spaceman.Spiff
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...