Jump to content

[1.12.x] JDiminishingRTG: Realistic, configurable radioisotope decay!


linuxgurugamer

Recommended Posts

A mod written by @KwirkyJ to have RTGs perform more realistically .  Original thread is  here:  https://forum.kerbalspaceprogram.com/index.php?/topic/104415-113-jd

A smarter, shinier, better radioisotope module, now with more heat

auxiliary title: Quarter Life: Halfway to Dres-truction

 

  •  An improvement on stock RTG behavior with its eternal power supply.
  • Implements a configurable, robust mechanism for Radioisotope decay and power generation.
  • Parts with ModuleDiminishingRTG will be able to configure their isotope fuel from within the VAB, a single input being reflected across all symmetry companions.
  • Parts should behave consistently between vessel docking/undocking.
  • Decay operates in background (all unfocused vessels).
  • Can be added to any part without interference... probably.
  • Inspired by "Realistic RTGs" plugin by Gribbleschnibit8 http://forum.kerbalspaceprogram.com/threads/96030/
  • ModuleManager redistributed under CC SA license.

 

 Availability

Dependency

  • Module Manager

In the VAB...

screenshot2_zps4o0cpdqm.png

Been in space a while, adjusting Duna orbit

screenshot3_zpsqgrsvrjo.png

Output (Ec/min) of 1 Unit (dL) of fuel over ten years, multiply by 7 for actual values --

Red is Krontium90

Green is Kyandere210

Blue is Kitsunium238

Yellow is Kuudite241

RTGcurvesV1.3a_zps883i1mkt.png

 

Extenders/modders:

  •  Look at provided configs for documentation.
  • Plugin and source available under LGPLv3 : You are free to run, modify, recompile, and redistribute with attribution and same license.
  • Assets (cfg files) made available under CC BY NC 4.0 : You may share and modify-and-share so long as credit is given and is not sold.
  • All RTGFUELCONFIG nodes ABSOLUTELY MUST have a resource definition of the same name.
  •  Adding/removing RTGFUELCONFIG nodes may have a deleterious effect to .craft files and persistent saves -- modify with caution.
  • If more than one RTGFUELCONFIG has the same name, only one will be retained and order is undefined.

 

Link to comment
Share on other sites

Note to other Kerbalism users - it doubles up with the default profile RTG patch Kerbalism has.

For other Near Future Electrical users, it doesn't remove ModuleRadioisotopeGenerator that the newest versions of NFE use, but it does remove ModuleGeneratorRTG from older versions.

Both of the above are easy user-side MM patches. I haven't tested TACLS BackgroundProcessing, but integration seems unnecessary since this mod does its own background simulation of decay.

Link to comment
Share on other sites

  • 6 months later...

Just wanted to give a 'thumbs up' to this mod and offer a recommendation.

Years ago, when I was working in the field of statistical data analysis, a materials engineer requested data on radioactive materials, their pertinent facts, statistical analysis on their decay rates and decay chain products, specific heat capacity,  as well as statistical calculations on shielding methods and weights for each. The list was for fifteen radioisotopes and I still have all the data I collected on that project. I ran the numbers against your list of materials and noted some discrepancies against real-world figures. (which should still be valid in Kerbal-world as radioisotopes don't change their properties just because you have green skin ;^)

Here are your RTGFuelConfigs and RTGResources files with the corrected data on the four products in your RTG Mod (though I DID change the names of some as I thought they could be much cleverer while still hinting at their more well-known names) as well as five additional potential RTG fuels. The other six were discarded early on in the study as their energy density vs decay rate of other fuels were better... i.e. they had longer half-lives and produced more power than the six discarded isotopes which had nothing going for them. The only one that was outclassed by another element (Plutonium-238 has both a longer half-life and higher energy density in W/g) that was kept in the study was Strontium-90 simply based on the ease of access to that isotope.

Thoughts welcome and please fell free to use these files in your Mod if you like them!

Link to comment
Share on other sites

  • 1 year later...
  • 2 months later...
  • 4 months later...

Just using the mod in a career game; The editor lists the output for Kitsunium238 as "14.63 Ec/S", while the actual output is about 0.7 Ec/S. I understand that this is related to the parts "Efficiency: 5%", since 0.7 is about 5% of the editor's listed output. I had two questions relating to this problem:

1) What is the point of listing a 5% efficiency if we can't actually do anything with it, such as improve efficiency somehow, or other RTG options with better efficiency? (The largest extent of my part-adding mods is restock and scansat. No other RTGs are added with any of my mods)
2) Why does the editor list the output with what it would be at 100%, instead of displaying the value most relevant to the RTG; the 5% efficiency value?

Link to comment
Share on other sites

  • 7 months later...
  • 4 weeks later...
On 9/30/2022 at 8:43 AM, mister_goo said:

Need the following MM patch to be used with the Near Future Electrical decaying RTG:

@PART[rtg,rtg-0625]:NEEDS[JDiminishingRTG]:FINAL
{
  !MODULE[ModuleRadioisotopeGenerator] {}
}

 

Just going to note that if you do use Near Future Electrical and do not opt to install the "NFElectricalRTGPatch" from the Extras folder, then the above patch is unnecessary as Near Future Electrical won't replace stock RTG modules to begin with, and by default the Near Future Electrical RTG even uses the basic "ModuleGenerator" by default.

That being said I'm not sure if CKAN will install Near Future Electrical's RTG patch by default or not as I don't use it. Perhaps I'm a dinosaur but I still install mods manually.

EDIT: On a side note, I just went ahead and did some patching for the mods that I use, figured I'd share the config for anyone else who wants it. It has patches for the Stock RTG, NearFutureElectrical RTG, RLA Stockalike RTG, Stock LV-N Nuclear Engine, Kerbal Atomics Nuclear Engines, and Missing History Engines... Also it does check for the presence of the NearFutureElectrical decaying RTG module just in case you've accidentally installed it.

Also just going to note I haven't tested these patches yet, though they should work, use at your own risk. I'll edit the config if I find any problems with it. Oh and if anyone does use it, I haven't balance tested anything either I just put in numbers for efficiency and volume that sounded good based on the possibly misguided assumption that larger RTG's and nuclear engines would be more slightly more efficient and hold more, where as smaller RTG's and nuclear engines would be slightly less efficient and hold less.

Spoiler

//Patch to remove NearFutureElectrical decaying RTG module from all parts that have it
@PART:HAS[@MODULE[ModuleRadioisotopeGenerator]]:NEEDS[NearFutureElectrical&JDiminishingRTG]:FINAL
{
    !MODULE[ModuleRadioisotopeGenerator]
}

// Stock RTG
@PART[rtg]:LAST[JDiminishingRTG]
{
    !MODULE[ModuleGenerator] {}

    @description = By exploiting the 'natural' decay of radiological isotopes, electrical power can be generated for prolonged durations—indeed, indefinitely, but the output tends to fall off over time. Accountants have also noted that different 'hot rocks' are hotter or cooler than others and tend to cool down a different rates, with the two aspects not necessarily being related.

    MODULE
    {
        name       = ModuleDiminishingRTG
        efficiency = 0.05 // factor (0..1) of 'pep' into ElectricCharge 
        volume     = 7    // roughly, in deciliters. ("units")
    }
}
@PART[rtg]:HAS[!RESOURCE[ElectricCharge]]:LAST[JDiminishingRTG]
{
    RESOURCE
    {
        name        = ElectricCharge
        amount      = 1
        maxAmount   = 1
        isTweakable = true
    }
}

// NearFutureElectrical RTG
@PART[rtg-0625]:NEEDS[NearFutureElectrical]:LAST[JDiminishingRTG]
{
    !MODULE[ModuleGenerator] {}

    @description = By exploiting the 'natural' decay of radiological isotopes, electrical power can be generated for prolonged durations—indeed, indefinitely, but the output tends to fall off over time. Accountants have also noted that different 'hot rocks' are hotter or cooler than others and tend to cool down a different rates, with the two aspects not necessarily being related.

    MODULE
    {
        name       = ModuleDiminishingRTG
        efficiency = 0.07 // factor (0..1) of 'pep' into ElectricCharge 
        volume     = 14   // roughly, in deciliters. ("units")
    }
}
@PART[rtg-0625]:HAS[!RESOURCE[ElectricCharge]]:NEEDS[NearFutureElectrical]:LAST[JDiminishingRTG]
{
    RESOURCE
    {
        name        = ElectricCharge
        amount      = 1
        maxAmount   = 1
        isTweakable = true
    }
}

//RLA Stockalike RTG
@PART[RLA_mmrtg]:NEEDS[RLA_Reborn]:LAST[JDiminishingRTG]
{
    !MODULE[ModuleGenerator] {}

    @description = By exploiting the 'natural' decay of radiological isotopes, electrical power can be generated for prolonged durations—indeed, indefinitely, but the output tends to fall off over time. Accountants have also noted that different 'hot rocks' are hotter or cooler than others and tend to cool down a different rates, with the two aspects not necessarily being related.

    MODULE
    {
        name       = ModuleDiminishingRTG
        efficiency = 0.03  // factor (0..1) of 'pep' into ElectricCharge 
        volume     = 1 // roughly, in deciliters. ("units")
    }
}
@PART[RLA_mmrtg]:HAS[!RESOURCE[ElectricCharge]]:NEEDS[RLA_Reborn]:LAST[JDiminishingRTG]
{
    RESOURCE
    {
        name        = ElectricCharge
        amount      = 1
        maxAmount   = 1
        isTweakable = true
    }
}

//Stock LV-N Engine
@PART[nuclearEngine]:LAST[JDiminishingRTG]
{
    !MODULE[ModuleAlternator] {}

    MODULE
    {
        name       = ModuleDiminishingRTG
        efficiency = 0.05 // factor (0..1) of 'pep' into ElectricCharge 
        volume     = 7   // roughly, in deciliters. ("units")
    }
}
@PART[nuclearEngine]:HAS[!RESOURCE[ElectricCharge]]:LAST[JDiminishingRTG]
{
    RESOURCE
    {
        name        = ElectricCharge
        amount      = 1
        maxAmount   = 1
        isTweakable = true
    }
}

//Kerbal Atomics Engines
@PART[ntr-sc-25-1]:NEEDS[AtomicAge]:LAST[JDiminishingRTG]
{
    !MODULE[ModuleGenerator] {}
    !MODULE[ModuleAlternator] {}

    MODULE
    {
        name       = ModuleDiminishingRTG
        efficiency = 0.06 // factor (0..1) of 'pep' into ElectricCharge 
        volume     = 14   // roughly, in deciliters. ("units")
    }
}
@PART[ntr-sc-125-1]:NEEDS[AtomicAge]:LAST[JDiminishingRTG]
{
    !MODULE[ModuleGenerator] {}
    !MODULE[ModuleAlternator] {}

    MODULE
    {
        name       = ModuleDiminishingRTG
        efficiency = 0.05 // factor (0..1) of 'pep' into ElectricCharge 
        volume     = 7   // roughly, in deciliters. ("units")
    }
}
@PART[ntr-sc-375-1]:NEEDS[AtomicAge]:LAST[JDiminishingRTG]
{
    !MODULE[ModuleGenerator] {}
    !MODULE[ModuleAlternator] {}

    MODULE
    {
        name       = ModuleDiminishingRTG
        efficiency = 0.07 // factor (0..1) of 'pep' into ElectricCharge 
        volume     = 21   // roughly, in deciliters. ("units")
    }
}
@PART[ntr-sc-0625-1]:NEEDS[AtomicAge]:LAST[JDiminishingRTG]
{
    !MODULE[ModuleGenerator] {}
    !MODULE[ModuleAlternator] {}

    MODULE
    {
        name       = ModuleDiminishingRTG
        efficiency = 0.04 // factor (0..1) of 'pep' into ElectricCharge 
        volume     = 3   // roughly, in deciliters. ("units")
    }
}
@PART[ntr-sc-25-1|ntr-sc-125-1|ntr-sc-375-1|ntr-sc-0625-1]:HAS[!RESOURCE[ElectricCharge]]:NEEDS[AtomicAge]:LAST[JDiminishingRTG]
{
    RESOURCE
    {
        name        = ElectricCharge
        amount      = 1
        maxAmount   = 1
        isTweakable = true
    }
}

//Missing History Engines
@PART[nuclearEngine_size0]:NEEDS[MissingHistory]:LAST[JDiminishingRTG]
{
    !MODULE[ModuleAlternator] {}

    MODULE
    {
        name       = ModuleDiminishingRTG
        efficiency = 0.04 // factor (0..1) of 'pep' into ElectricCharge 
        volume     = 3   // roughly, in deciliters. ("units")
    }
}
@PART[nuclearEngine_1p5]:NEEDS[MissingHistory]:LAST[JDiminishingRTG]
{
    !MODULE[ModuleAlternator] {}

    MODULE
    {
        name       = ModuleDiminishingRTG
        efficiency = 0.06 // factor (0..1) of 'pep' into ElectricCharge 
        volume     = 10   // roughly, in deciliters. ("units")
    }
}
@PART[nuclearEngine_size0|nuclearEngine_1p5]:HAS[!RESOURCE[ElectricCharge]]:NEEDS[MissingHistory]:LAST[JDiminishingRTG]
{
    RESOURCE
    {
        name        = ElectricCharge
        amount      = 1
        maxAmount   = 1
        isTweakable = true
    }
}

 

Edited by CoriW
Corrected Syntax Error in CFG
Link to comment
Share on other sites

  • 4 months later...

Here's a handful of suggestions:

  1. Consider adding ways to use RTGs earlier (high-power electrics node?)
    • RTGs unlock earlier but only with Krontium90 (the cheap one), with the other fuels unlocking in the usual node
    • Add a 0.625m "Hot Rock Storage Unit" part that's far less efficient as an early RTG (which means more heat because you'd have more fuel to compensate)
  2. Have VAB-specific part info showing output after 1, 5, and 15 years (or a slider to pick how many years to look forward?)
    • Number of years should respect real/kerbal time toggle in settings (real years are over 3 times longer)
  3. List fuel type power density in terms of volume not mass, since capacity is volume based, and also use the given electricity unit
    • As an example, Kyandere210 would list as 5.46Ec/s/dL instead of 1.3W/kg (1.3[pep] x 0.0042[density] / 0.001[factor])
  4. List density and cost for each fuel type in the part list infobox and science tree infobox
  5. Output on part info should be after the 5% efficiency (above 5.46/s becomes 16.38/min), and should also show generated heat at the same time (if both are enabled)
  6. Half-life should respect the real/kerbal time toggle in settings

It would've also been nice to create issues on the repo so I could separate these out.

I'm probably going to create a part myself to get that early RTG, along with moving active heat management further up the tree. Having to deal with high heat output seems like a fun challenge.

Link to comment
Share on other sites

On 3/18/2023 at 4:58 PM, Hexicube said:

It would've also been nice to create issues on the repo so I could separate these out.

Issues now there

your first suggestion doesn't make sense, except in a very cheaty game play mode. RTGs are pretty advanced in general

Get the issues up there, will be helpful to track

 

Link to comment
Share on other sites

1 hour ago, linuxgurugamer said:

Issues now there

your first suggestion doesn't make sense, except in a very cheaty game play mode. RTGs are pretty advanced in general

Get the issues up there, will be helpful to track

 

Done, split them up into multiple issues.

I've not included the early RTG suggestion as I've tweaked my own install to massively increase heat output to balance the earlier RTG and still need to actually test it. Seems like radiative cooling is simply too strong to reasonably balance it, let alone in-atmo cooling; 10x heating only managed to get Kyandere210 to explode with no active cooling.

That said, it would still be nice to have a larger RTG for those really long missions, and I've made an issue for that which you could flag as enhancement. Trying to use the vanilla RTGs for a 50 year mission with a base load of 10EC/s requires a whopping 1400 RTGs massing 171.535t. Reducing the part count would be really handy.

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