Nertea

[1.7.x] Kerbal Atomics: fancy nuclear engines! (July 9)

Recommended Posts

or use KER. You can see the TWR and dV which is hepful. espacily when you choose the right celestial body for calculations and turn on/off atmospheric mode.

Share this post


Link to post
Share on other sites

@Nertea Congrats on the release! The new fuel-switching patch looks good, except that the costs for ZBO tanks in LH2O and OX configurations are not calculated properly. Here's the problem: the dry cost for a ZBO tank is more than 3x that of the corresponding stock tank. This represents the cost of its high-tech cooling/insulation. When you switch to LH2/O, you should only need expensive cooling for 60% of the tank volume. The OX configuration shouldn't need expensive cooling at all (and therefore ought to have the same dry cost as a stock tank; otherwise you're paying 3x as much for a functionally identical tank). These cost calculations are a bit tricky due to the imprecise way that dry costs scale across different stock tank volumes, but I'll try to draft a solution shortly.

EDIT - I think I got it. This appears to function correctly in my tests:

// ZBO tanks
@PART[*]:HAS[@RESOURCE[LqdHydrogen],!MODULE[InterstellarFuelSwitch],!MODULE[ModuleEnginesFX],!MODULE[ModuleEngines],!MODULE[FSfuelSwitch]]:NEEDS[!modularFuelTanks&!RealFuels]:FOR[zzz_CryoTanks]
{
	%LH2 = #$RESOURCE[LqdHydrogen]/maxAmount$
	
	%massOffset = #$LH2$
	@massOffset *= 0.00003125 // <- EDIT HERE (dry mass per unit LH2 capacity)
	@massOffset *= -1
	
	%costOffsetLH2 = #$LH2$
	@costOffsetLH2 *= #$@RESOURCE_DEFINITION[LqdHydrogen]/unitCost$
	@costOffsetLH2 *= -1
	
	%costOffsetOX = #$cost$
	@costOffsetOX *= -0.5 // reduction to wet cost of corresponding stock tank in LFO configuration
	%tempVar = #$LH2$
	@tempVar *= 0.055 // units of OX in hypothetical LFO configuration
	@tempVar *= #$@RESOURCE_DEFINITION[Oxidizer]/unitCost$
	@costOffsetOX -= #$tempVar$
	@tempVar = #$LH2$
	@tempVar *= 0.045 // units of LF in hypothetical LFO configuration
	@tempVar *= #$@RESOURCE_DEFINITION[LiquidFuel]/unitCost$
	@costOffsetOX -= #$tempVar$
	
	%costOffsetLH2O = #$costOffsetLH2$
	@costOffsetLH2O *= 0.6
	@tempVar = #$costOffsetOX$
	@tempVar *= 0.4
	@costOffsetLH2O += #$tempVar$
	
	!RESOURCE[LqdHydrogen] {}
	
	MODULE
	{
		name = ModuleB9PartSwitch
		moduleID = fuelSwitch
		switcherDescription = Tank Type
		baseVolume = #$../LH2$
		@baseVolume *= 0.1
		
		SUBTYPE
		{
			name = LH2
			tankType = LH2Cryo
			addedMass = #$../../massOffset$
			addedCost = #$../../costOffsetLH2$
		}
		SUBTYPE
		{
			name = LH2/O
			tankType = LH2OCryo
			addedMass = #$../../massOffset$
			addedCost = #$../../costOffsetLH2O$
		}
		SUBTYPE
		{
			name = Oxidizer
			tankType = OX
			addedMass = #$../../massOffset$
			addedCost = #$../../costOffsetOX$
		}
	}
	
	MODULE
	{
		name =  ModuleCryoTank
		FuelName = LqdHydrogen
		// in % per hour
		BoiloffRate = 0.05
		// in Ec per 1000 units per second
		CoolingCost = 0.08
	}
}

 

Edited by Fraz86

Share this post


Link to post
Share on other sites

First comment, and it is a about a small typo:

In KerbalAtomicsNFE.cfg, for LV-N it reads

        INPUT_RESOURCE
        {
            ResourceName = EnrichedUranium
            Ratio = 0.0027       // should be an order of magnitude lower
            FlowMode = NO_FLOW
        }
        OUTPUT_RESOURCE
        {
            ResourceName = DepletedFuel
            Ratio = 0.00027
            DumpExcess = false
            FlowMode = NO_FLOW
        }

 

Share this post


Link to post
Share on other sites
1 hour ago, Tau137 said:

First comment, and it is a about a small typo:

In KerbalAtomicsNFE.cfg, for LV-N it reads

        INPUT_RESOURCE
        {
            ResourceName = EnrichedUranium
            Ratio = 0.0027       // should be an order of magnitude lower
            FlowMode = NO_FLOW
        }
        OUTPUT_RESOURCE
        {
            ResourceName = DepletedFuel
            Ratio = 0.00027
            DumpExcess = false
            FlowMode = NO_FLOW
        }

 

Good find. Should mention at least one bug in that patch, reactor temp doesn't decay with thrust fast enough, so you can heat up a reactor, turn it down to 1%, and get full thrust benefits for quite a long time .

Share this post


Link to post
Share on other sites
1 hour ago, Nertea said:

Good find. Should mention at least one bug in that patch, reactor temp doesn't decay with thrust fast enough, so you can heat up a reactor, turn it down to 1%, and get full thrust benefits for quite a long time .

Yeah, I noticed that, waiting for update (or can it be tweaked in cfg? )

I wanted to say that quicker heat-up (on smaller motors) would be nice... but I would be contradicting myself here, NTRs do need a big weak spot (or why use anything but nuclear?), and this fits the bill just right.

One more thing/question: FissionRadiator, how exactly goes it work?  Does it link up with exhaust for cooling, or just vents to beyond the looking glass?  And why do we need to turn it on, can it be on by default?  Or does that serve a purpose of keeping reactor hot after shutdown and use heat with engines (but, on the other hand, in only kicks in after optimal temperature)?

Beyond that - GGRRREAT mod, big thank you!  Now I can actually start using NFE without feeling like I am willingly taking a handicap.

P.S. Fuel consumption seems a bit low, it would be nicer to keep run time to below 5hr, not 50, otherwise it will effectively never be a concern for a player (12.5hr under acceleration under x4 timewarp?  Really?)  Even for a NTJ, 5-10hr is plenty, unless you want to circumnavigate Jool in atmosphere (a whole day of playtime, btw).  I'll play around with tweaking consumption and reserves to keep in line with reactors (considering size, output power and core temperature differences).  RSS users may have a different point of view though, but, fortunately, most KSP users are sane :wink:

Share this post


Link to post
Share on other sites
17 hours ago, Fraz86 said:

@Nertea Congrats on the release! The new fuel-switching patch looks good, except that the costs for ZBO tanks in LH2O and OX configurations are not calculated properly. Here's the problem: the dry cost for a ZBO tank is more than 3x that of the corresponding stock tank. This represents the cost of its high-tech cooling/insulation. When you switch to LH2/O, you should only need expensive cooling for 60% of the tank volume. The OX configuration shouldn't need expensive cooling at all (and therefore ought to have the same dry cost as a stock tank; otherwise you're paying 3x as much for a functionally identical tank). These cost calculations are a bit tricky due to the imprecise way that dry costs scale across different stock tank volumes, but I'll try to draft a solution shortly.

EDIT - I think I got it. This appears to function correctly in my tests:


// ZBO tanks
@PART[*]:HAS[@RESOURCE[LqdHydrogen],!MODULE[InterstellarFuelSwitch],!MODULE[ModuleEnginesFX],!MODULE[ModuleEngines],!MODULE[FSfuelSwitch]]:NEEDS[!modularFuelTanks&!RealFuels]:FOR[zzz_CryoTanks]
{
	%LH2 = #$RESOURCE[LqdHydrogen]/maxAmount$
	
	%massOffset = #$LH2$
	@massOffset *= 0.00003125 // <- EDIT HERE (dry mass per unit LH2 capacity)
	@massOffset *= -1
	
	%costOffsetLH2 = #$LH2$
	@costOffsetLH2 *= #$@RESOURCE_DEFINITION[LqdHydrogen]/unitCost$
	@costOffsetLH2 *= -1
	
	%costOffsetOX = #$cost$
	@costOffsetOX *= -0.5 // reduction to wet cost of corresponding stock tank in LFO configuration
	%tempVar = #$LH2$
	@tempVar *= 0.055 // units of OX in hypothetical LFO configuration
	@tempVar *= #$@RESOURCE_DEFINITION[Oxidizer]/unitCost$
	@costOffsetOX -= #$tempVar$
	@tempVar = #$LH2$
	@tempVar *= 0.045 // units of LF in hypothetical LFO configuration
	@tempVar *= #$@RESOURCE_DEFINITION[LiquidFuel]/unitCost$
	@costOffsetOX -= #$tempVar$
	
	%costOffsetLH2O = #$costOffsetLH2$
	@costOffsetLH2O *= 0.6
	@tempVar = #$costOffsetOX$
	@tempVar *= 0.4
	@costOffsetLH2O += #$tempVar$
	
	!RESOURCE[LqdHydrogen] {}
	
	MODULE
	{
		name = ModuleB9PartSwitch
		moduleID = fuelSwitch
		switcherDescription = Tank Type
		baseVolume = #$../LH2$
		@baseVolume *= 0.1
		
		SUBTYPE
		{
			name = LH2
			tankType = LH2Cryo
			addedMass = #$../../massOffset$
			addedCost = #$../../costOffsetLH2$
		}
		SUBTYPE
		{
			name = LH2/O
			tankType = LH2OCryo
			addedMass = #$../../massOffset$
			addedCost = #$../../costOffsetLH2O$
		}
		SUBTYPE
		{
			name = Oxidizer
			tankType = OX
			addedMass = #$../../massOffset$
			addedCost = #$../../costOffsetOX$
		}
	}
	
	MODULE
	{
		name =  ModuleCryoTank
		FuelName = LqdHydrogen
		// in % per hour
		BoiloffRate = 0.05
		// in Ec per 1000 units per second
		CoolingCost = 0.08
	}
}

 

Oh nice! I'll include this in the next update.

49 minutes ago, Starbuckminsterfullerton said:

That's three in two days, you're on a roll this week!

Cryo and Atomics are not too hard - their main problem was in CryoTanks, which is shared. So not quite 3, more like 2 ;). 

46 minutes ago, Tau137 said:

Yeah, I noticed that, waiting for update (or can it be tweaked in cfg? )

I wanted to say that quicker heat-up (on smaller motors) would be nice... but I would be contradicting myself here, NTRs do need a big weak spot (or why use anything but nuclear?), and this fits the bill just right.

One more thing/question: FissionRadiator, how exactly goes it work?  Does it link up with exhaust for cooling, or just vents to beyond the looking glass?  And why do we need to turn it on, can it be on by default?  Or does that serve a purpose of keeping reactor hot after shutdown and use heat with engines (but, on the other hand, in only kicks in after optimal temperature)?

Beyond that - GGRRREAT mod, big thank you!  Now I can actually start using NFE without feeling like I am willingly taking a handicap.

P.S. Fuel consumption seems a bit low, it would be nicer to keep run time to below 5hr, not 50, otherwise it will effectively never be a concern for a player (12.5hr under acceleration under x4 timewarp?  Really?)  Even for a NTJ, 5-10hr is plenty, unless you want to circumnavigate Jool in atmosphere (a whole day of playtime, btw).  I'll play around with tweaking consumption and reserves to keep in line with reactors (considering size, output power and core temperature differences).  RSS users may have a different point of view though, but, fortunately, most KSP users are sane :wink:

1. Quicker heat up. That would probably involve either changing the total thermal output of the engine (which is tough as higher numbers destabilize the thermal system) or lowering the thermal mass (would make the reactor overheat very fast).

2. FissionFlowRadiator links with mass flow for cooling (cooling = current mass flow/maximum engine mass flow). I think KSP 1.1 added that "turn on/off" field for all radiators, I didn't really consider that it would propagate (FFR derives from the standard radiator field). I'll disable it when I do some more tweaking of NFE.

3. Yeah fuel consumption is a tricky one. The main reason it isn't a lower lifetime is related to the trimodal engines. The consumption at the moment needs to be low enough so that at 1% reactor power (the lowest settable in the UI), the reactor still has an acceptable (5 year ish) life when acting as a electrical generator. What I need to do is write some code that will allow lower reactor power in an elegant way, so then the reactor can run at 0.1% easily, and I can cut the full-thrust lifetime by a factor of 10. 

Share this post


Link to post
Share on other sites

im working on making patches to give other atomic engines these modules, but im honestly a bit lost as to what balance numbers i should plug in. any rule of thumbs you used?

Share this post


Link to post
Share on other sites
6 hours ago, toric5 said:

im working on making patches to give other atomic engines these modules, but im honestly a bit lost as to what balance numbers i should plug in. any rule of thumbs you used?

Are you talking about the NFE-compatibility version of these engines? Because if so, I worked most of it out awhile back and patched over Atomic Age.  I can share some notes if you'd like.  I've been wanting to do a more wide-scoped project (and mm patch PR) but.. you know... real life and stuff....

Share this post


Link to post
Share on other sites
3 hours ago, Businfu said:

2Are you talking about the NFE-compatibility version of these engines? Because if so, I worked most of it out awhile back and patched over Atomic Age.  I can share some notes if you'd like.  I've been wanting to do a more wide-scoped project (and mm patch PR) but.. you know... real life and stuff....

not sure what you men by combatability, as the engines are compatible out of the box. im talking about giving other mods the same reactor mechanics that you find in these mods engines. (only mod that i know of that did this was mk2 expantion, as i requested it.) im pretty sure i know how to write the patch, ive been MM modding for a while for my own use. i just am not sure what @Nertea uses as a rule of thumb for the stats of enignes. (radiator need, uranium capacity, overall core lifetime, ETC.)

Edited by toric5
need an awnser from dev, so tag the dev, stupid!

Share this post


Link to post
Share on other sites
2 hours ago, toric5 said:

not sure what you men by combatability, as the engines are compatible out of the box. im talking about giving other mods the same reactor mechanics that you find in these mods engines. (only mod that i know of that did this was mk2 expantion, as i requested it.) im pretty sure i know how to write the patch, ive been MM modding for a while for my own use. i just am not sure what nereta uses as a rule of thumb for the stats of enignes. (radiator need, uranium capacity, overall core lifetime, ETC.)

I'm talking about the (very fun) NFE reactor mechanics, so yeah we are on the same page.  The reactor mechanics on the Kerbal Atomics engines aren't 'out of the box' per-se, as you need NFE installed and you need to actually implement the MM patch, but I suppose there wouldn't be much of a patch to write for anything else...   

I put together the reactor compatibility patch with Streetwind for the USI mods with by laying out values and filling in the blanks according to gaps in progression all while balancing ratios of relevant statistics.  If you feel confident with what's under the hood on Nertea's plugin, you could totally do a similar version of the same thing. This is the spreadsheet if you are interested, might give a decent starting point: https://www.dropbox.com/s/fhookzgp56m1g7j/reactors_new_businfu.xls?dl=0

There are some other issues though aside from just the raw numbers.  For one... the really nifty thing about the Trimodal engines is the ability to generate EC, but it isn't by any means universal for NTRs.  In Nertea's patch, the stock NTR doesn't, and many mod's implement NTRs which are essentially scaled up versions of the stock one, and thus my inkling is that these shouldn't be bi(tri?)modal, but figuring out which engines do and which don't is a complex can of worms. 

The other thing is the KANDL Radioisotope Rocket (maybe other mods besides Atomic Age have similar engines too).  My inner stickler can't tolerate the idea that it has a throttle-able reactor that burns U235... it says Radioisotope Rocket right on the label!

Anyways, i'm excited to see what you come up with.  Let me know if you want to collaborate.  

Share this post


Link to post
Share on other sites
54 minutes ago, Businfu said:

I'm talking about the (very fun) NFE reactor mechanics, so yeah we are on the same page.  The reactor mechanics on the Kerbal Atomics engines aren't 'out of the box' per-se, as you need NFE installed and you need to actually implement the MM patch, but I suppose there wouldn't be much of a patch to write for anything else...   

I put together the reactor compatibility patch with Streetwind for the USI mods with by laying out values and filling in the blanks according to gaps in progression all while balancing ratios of relevant statistics.  If you feel confident with what's under the hood on Nertea's plugin, you could totally do a similar version of the same thing. This is the spreadsheet if you are interested, might give a decent starting point: https://www.dropbox.com/s/fhookzgp56m1g7j/reactors_new_businfu.xls?dl=0

There are some other issues though aside from just the raw numbers.  For one... the really nifty thing about the Trimodal engines is the ability to generate EC, but it isn't by any means universal for NTRs.  In Nertea's patch, the stock NTR doesn't, and many mod's implement NTRs which are essentially scaled up versions of the stock one, and thus my inkling is that these shouldn't be bi(tri?)modal, but figuring out which engines do and which don't is a complex can of worms. 

The other thing is the KANDL Radioisotope Rocket (maybe other mods besides Atomic Age have similar engines too).  My inner stickler can't tolerate the idea that it has a throttle-able reactor that burns U235... it says Radioisotope Rocket right on the label!

Anyways, i'm excited to see what you come up with.  Let me know if you want to collaborate.  

not really looking at porkjet right now, but definitely on a list. (selfishly doing the mods i use for now.) RLA stockalike has one nuke, and SXT has a couple more. after that, ill probably tackle FTT from roverdude, if no one beats me to it. thanks for the numbers. im not hugely familiar with eh under the hood aspects of the mod, i was just going to start messing around until the in game stats looked right, but if you have any, could you point me to the relevant documentation?

 

edit: as for the radistope rocket, i would not change that. you would almost want to make a plugin similar to decaying RTGs, decreasing its ISP (keeping fuel flow the same) over a half life. that is well out of my skill.

Edited by toric5

Share this post


Link to post
Share on other sites

Ahhhh, so I need to actually switch on the FissionRadiator. Now that sort of explains why my engines went meltdown while burning. That had me puzzled for a bit :wink:

Share this post


Link to post
Share on other sites

The LV-N-GE "Liberator" confuses me (the others would probably, too).

It says:

Core Heat:
Optimum Temp: 6000K
Shutdown Temp: 8000K

then later it says:

Fission Reactor:
Optimal Temperature: 6000K
Critical Temperature: 7000K

and finally the context menu provides a slider for Auto-Shutdown Temp that defaults to 1000K and is moveable to maximum 6000K

... so, what? If I don't touch the slider, will the reactor just shut down as it warms up? Or is it the skin temp of the whole engine?

What is it? A lack of description at least... ^_^

Edited by Gordon Dry

Share this post


Link to post
Share on other sites

How would one add the module that makes engines consume Uranium? I want to add this to the MRS Quad Reactor, but cant seem to find out how. Great mod by the way, works great with the Near Future Technologies, a mod which I wanted to have some form of Nuclear Thermal Rockets, which are 'near future' devices, but you made this mod and all my urges are satisfied. Quick question: In the Near Future Propulsion mod section on the NFT forum, it shows the new Hydrogen tanks from this mod, but when downloaded they aren't there. And there is no use for LqHydrogen in any of the 5 NFT branches. I assume this is a mistake or a bug, but it really confused me when I download the NF propulsion mod.

Share this post


Link to post
Share on other sites

The near future propulsion electric engines used to be able to run on hydrogen, but this feature was removed for balance reasons. The screenshot is from an earlier version. Or so I believe, correct me if I'm wrong :)

Share this post


Link to post
Share on other sites
19 hours ago, ChainiaC said:

The near future propulsion electric engines used to be able to run on hydrogen, but this feature was removed for balance reasons. The screenshot is from an earlier version. Or so I believe, correct me if I'm wrong :)

Oh thanks, I was just wondering. When I downloaded NF Propulsion I thought I didn't download it correctly

Share this post


Link to post
Share on other sites

The newest build of NFE has some significant functionality improvements for the NFE NTRs patch, namely fixing the most salient bugs. Appreciate any testing here. 

Share this post


Link to post
Share on other sites
49 minutes ago, Nertea said:

The newest build of NFE has some significant functionality improvements for the NFE NTRs patch, namely fixing the most salient bugs. Appreciate any testing here. 

So I just took a small test ship into orbit with the Neptune.  This is what happened:

It looks like i now need to have the full amount of radiators installed to prevent overheating if the engine is at full throttle. I only had 400kW installed on the test ship because I expected that running the engine to dissipate more heat than it did.  I was wrong, it doesn't dissipate much heat and the core quickly overheated and shut down.

after it reached shutdown temp, the reactor shut off and the engine started to slowly cool. but too my surprise when I throttled up, I could still run the engine and it still throttled thrust based on the reactor power slider.  Thus, I realized that I can simply turn on the reactor, heat it up to max temp, turn it off and then fire the engine for awhile (at optimum or near optimum) thrust and Isp.  I don't think this is the intended behavior?

EDIT: It seems that firing the engine doesn't have any cooling effect.  With my reactor at optimum temp (and turned off) and all radiators shut off I can fire at full throttle and the heat decay isn't any faster than baseline.

EDIT: It seems to be that it would be most interesting if the Isp & thrust were both scaled directly to temperature and not the power slider.  However, firing the engine should dissipate much more heat, and thus when the reactor is shutdown core temp would drop and quickly render the engine usless. That way it would be important to have the reactor running and the power turned up high in order to keep the temperature hot.

If i remember correctly, in a previous version it was more-or-less possible to use the NTR with almost no radiators, instead relying on the H2 to cool the engine? I liked this, and with the nifty new core shutdown temp slider, it could be even better.

 

Edited by Businfu

Share this post


Link to post
Share on other sites
18 minutes ago, Businfu said:

So I just took a small test ship into orbit with the Neptune.  This is what happened:

It looks like i now need to have the full amount of radiators installed to prevent overheating if the engine is at full throttle. I only had 400kW installed on the test ship because I expected that running the engine to dissipate more heat than it did.  I was wrong, it doesn't dissipate much heat and the core quickly overheated and shut down.

after it reached shutdown temp, the reactor shut off and the engine started to slowly cool. but too my surprise when I throttled up, I could still run the engine and it still throttled thrust based on the reactor power slider.  Thus, I realized that I can simply turn on the reactor, heat it up to max temp, turn it off and then fire the engine for awhile (at optimum or near optimum) thrust and Isp.  I don't think this is the intended behavior?

EDIT: It seems that firing the engine doesn't have any cooling effect.  With my reactor at optimum temp (and turned off) and all radiators shut off I can fire at full throttle and the heat decay isn't any faster than baseline.

EDIT: It seems to be that it would be most interesting if the Isp & thrust were both scaled directly to temperature and not the power slider.  However, firing the engine should dissipate much more heat, and thus when the reactor is shutdown core temp would drop and quickly render the engine usless. That way it would be important to have the reactor running and the power turned up high in order to keep the temperature hot.

If i remember correctly, in a previous version it was more-or-less possible to use the NTR with almost no radiators, instead relying on the H2 to cool the engine? I liked this, and with the nifty new core shutdown temp slider, it could be even better.

 

Did not ship correct dll. annoying.

Share this post


Link to post
Share on other sites

FYI, the patched LV-N seems to work as intended regarding engine cooling. I completed a 14 minute burn without needing radiators.

Share this post


Link to post
Share on other sites

Ah I see.  Just posted images testing all engines to demonstrate what I found. then saw that you posted about the .dll. 

Share this post


Link to post
Share on other sites

No worries. I just uploaded a fixed version. The version I had uploaded was from a day or so ago, when I hadn't yet fixed stock's auto-disabled radiator thing. 

Share this post


Link to post
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.