# [WIP] Radioactivity - test release 0.1.1 (Sept 7, 2016)

## Recommended Posts

1 hour ago, Nertea said:

Well so I have the following stuff pretty much working now!

Hooray!

1 hour ago, Nertea said:

I've also normalized units on Sv for everything. Not the most valid assumption but I have to simplify.

Why is this not a valid assumption? It's the accepted international unit for radiation exposure. I suppose you could use REM, but KSP has settled on SI units for everything else.

1 hour ago, Nertea said:

The thing I need to start thinking about is plugging values into things so I can start calibrating stuff for balance. I'd like to open the floor to any input from people here. I've established a few general constants that seem like they will make sense

• Threshold for radiation sickness: 2 Sv total
• Threshold for radiation death: 10 Sv total
• Heal rate for radiation damage on-mission: 0.1 Sv per year
• Heal rate for radiation damage at KSC: 5 Sv per year

Threshold numbers for radiation death are voodoo. If you look at historical examples they're all over the map. Some people die with as little as 4 Sv of exposure, some people survive close to 20 Sv. It's all about where the dose is received and what kind of care they get. 10 Sv is a good approximation. If you wanted a more realistic, more complicated mechanic, you could say that the risk of death starts at 0% at 5 Sv, reaches 90% at 10 Sv, and then increases to 100% at 20 Sv.

Same with sickness, it's really a sliding scale of incapacitation. Although I think the threshold for sickness would start as low as 1 Sv.

1 hour ago, Nertea said:

Some starter questions:

• What should be the dose rate for an unshielded Kerbal beside a reactor when it's running (like an LV-N)? Should the kerbal die instantly (given death at 10Sv that would be more than 10 Sv/s)
• What does a reasonable ship using this mod look like? Given the limitations of KSP in terms of part rigidity and such, this is important to calibrate the absorptivity of parts
• What parts have integrated shadow shields?
• I'm trying to remember what the dose rate in the reactor compartment during operation on my sub was. I can't remember the exact number, but it was pretty horrific. You were dead within seconds. Not, "In the hospital, dying of ARS in a couple of days," dead. Like, "I reheated the chicken breast in the microwave for 20:00 instead of 2:00," dead. And that was outside the pressure vessel (which was about six inches of Inconel), and outside the primary shield (which was about three feet of borated water). Next to an operating nuclear rocket engine with little or no shielding? It isn't so much modeling it as it is just popping up, "Bill Kerman's Game Is Over."
• I've always tried to design my ships realistically. They tend to be long and spindly, with the control spaces at the very front (since you'd want the greatest distance between your crew and the engines when the engines were actually operating), and the habitation spaces immediately behind those. I also try to keep the fuel tanks between the engines and the crew, since most reaction masses for nuclear engines also tend to be very good neutron shielding as well. I can post some screen shots when I get home.
• Which parts should have integrated shadow shields? In general, you want to keep your shielding as close to the source as you can. This keeps your shield smaller and less expensive, and allows your personnel the greatest freedom of movement. So, by standard design practice, the parts that are emitters should actually be the ones with shielding built into them. But, on the other hand, you aren't just shielding against your drives and reactors, you also have the environment to worry about. So would it make sense to eliminate the shielding on your drives and reactors and shield the crew spaces instead to be able to protect against both? Dunno, haven't crunched the numbers. But it's something to think about.
1 hour ago, Nertea said:

Lastly, I did make another plugin which is separate from Radioactivity called GlowingReputation, which in a simple aspect supports Radioactivity by introducing reputation penalties for destroying radioactive parts in sensitive environments, and reputation penalties for operating certain engines in sensitive environments. This is almost ready for testing too.

"Glowing Reputation" LOL

Do you think that this mod will ever encompass environmental radiation as well, such as cosmic background and radiation belts?

27 minutes ago, TiktaalikDreaming said:

I'm inclined to agree.  The NERVA style solid core NTRs will usually be "shielded" to reflect neutrons back into the core to reduce required critical mass, if for no other reason.  And if the base NTRs are quick kills, where does that leave options for more lethal engines?  AKA, I'd like to be able to make my open-cycle gas core NTR significantly nastier than stock NTRs.

Once upon a time, I had notes on shadow shielding materials.  I'll see if I can dredge that up.

Sorry, reality dictates that a nuclear rocket will be a death ray. Just the fast neutron leakage will be enough to do major damage to any living thing nearby, regardless of the nuclear physics going on in the core. Never mind the amount of gamma radiation being emitted. There really isn't any way around it, unless you just want to completely ignore reality, which is always an option on the table (it is just a game, after all).

##### Share on other sites
53 minutes ago, TiktaalikDreaming said:

I'm inclined to agree.  The NERVA style solid core NTRs will usually be "shielded" to reflect neutrons back into the core to reduce required critical mass, if for no other reason.  And if the base NTRs are quick kills, where does that leave options for more lethal engines?  AKA, I'd like to be able to make my open-cycle gas core NTR significantly nastier than stock NTRs.

Indeed, we need to strike a balance between precise realism and gameplay ease. Though do consider.... if engine A produces 1 instadeath of radiation at its surface and engine B produces 10 instadeaths, that does have consequences in terms of attenuation. So engine B will be much more lethal at longer distances.

27 minutes ago, TheSaint said:

Why is this not a valid assumption? It's the accepted international unit for radiation exposure. I suppose you could use REM, but KSP has settled on SI units for everything else.

It starts getting icky when you talk about probe cores and instrumentation that should be measured in Grays.

27 minutes ago, TheSaint said:

Threshold numbers for radiation death are voodoo. If you look at historical examples they're all over the map. Some people die with as little as 4 Sv of exposure, some people survive close to 20 Sv. It's all about where the dose is received and what kind of care they get. 10 Sv is a good approximation. If you wanted a more realistic, more complicated mechanic, you could say that the risk of death starts at 0% at 5 Sv, reaches 90% at 10 Sv, and then increases to 100% at 20 Sv.

Same with sickness, it's really a sliding scale of incapacitation. Although I think the threshold for sickness would start as low as 1 Sv.

Yeah, but we have to do some simplification for gameplay purposes, and I don't like probabilities, i prefer deterministic systems :P. When I started thinking about this, I was all for considering acute sickness, long term damage, etc. It got messy real quick. Seems best to just track a total dose with simplistic mechanics, and have them be easy to disable if another mod wants to piggyback and extent.

27 minutes ago, TheSaint said:
• I've always tried to design my ships realistically. They tend to be long and spindly, with the control spaces at the very front (since you'd want the greatest distance between your crew and the engines when the engines were actually operating), and the habitation spaces immediately behind those. I also try to keep the fuel tanks between the engines and the crew, since most reaction masses for nuclear engines also tend to be very good neutron shielding as well. I can post some screen shots when I get home.

That's be good to see some ships. The balance I want to strike is that it would be a valid design option to build a long, spindly ship with a small shadow shield or a denser ship with a lot of mass for shielding. I want to calibrate numbers so that the length required to do distance attenuation doesn't run too hard into the "long ksp ships are crazy wobbly" problem.

27 minutes ago, TheSaint said:

In Nertea-land, LF is kerosense, but I think NathanKell said it was some sort of storable biprop. Currently Radioactivity assumes everything is aluminum in terms of attenuation constant (:P), because apparently for gamma, using mass attenuation constants, the great majority of materials are similar for 'average' gamma energies. That means attenuation is more proportional to the total mass between source and sink, which lets me get away with not tracking attenuation constants for everything ;).

That being said, I have a PartModule you can add to a part to tell the system that it's made of a different attenuation constant carrying material if this ends up failing in practice.

Quote

Which parts should have integrated shadow shields? In general, you want to keep your shielding as close to the source as you can. This keeps your shield smaller and less expensive, and allows your personnel the greatest freedom of movement. So, by standard design practice, the parts that are emitters should actually be the ones with shielding built into them. But, on the other hand, you aren't just shielding against your drives and reactors, you also have the environment to worry about. So would it make sense to eliminate the shielding on your drives and reactors and shield the crew spaces instead to be able to protect against both? Dunno, haven't crunched the numbers. But it's something to think about.

To some extent I'd follow what the models look like - all my FFT engines have pretty well-defined shadow shields in the model, and most of my NFE reactors do too. Come to think of it, so do the KA models (it's just textured differently).

Knowing that, those parts will all probably have moderately effective shadow shields :P. Something in the range of "this shield, plus 20m, will protect your Kerbals well enough".

Edited by Nertea

##### Share on other sites
53 minutes ago, Nertea said:

That's be good to see some ships. The balance I want to strike is that it would be a valid design option to build a long, spindly ship with a small shadow shield or a denser ship with a lot of mass for shielding. I want to calibrate numbers so that the length required to do distance attenuation doesn't run too hard into the "long ksp ships are crazy wobbly" problem.

Well, as was taught to me in RadCon: "Distance is the best shielding." The inverse-square law is always your best friend when it comes to reducing your radiation exposure. So the laws of physics dictate that long-and-spindly will always beat short-and-dense, especially when you start looking to reduce your mass in a spacecraft. (Kerbal Joint Reinforcement is a God-send.)

I just realized that I do have one design I can show you, I have some pictures up on Imgur already, even though I haven't finished constructing it yet. Behold the Nimrod!

My design philosophy: The command deck is at the very front, giving the crew maximum distance from the engines while they are operating. The next module in line is the cryogenic suspension module. The ship is destined for Sarnus, a total round trip time of about eleven years, which means that most of their time on board will be spent in cryogenic suspension with the engines shut down and the reactors (which are also placed at the aft end of the ship) operating at low power. So, to minimize their exposure while they are asleep, the cryo module is the second furthest away from the aft end. Next is life support, which is placed to ensure that it is accessible from the command deck and cryo module in case of a failure in the spin hab that requires it to be isolated. Next is the spin hab, placed next in line away from propulsion to minimize exposure from the reactors. (Not really worried about exposure from the engines, since operational procedure will dictate that all of the crew will be in the command deck when the main engines are in operation.) The science lab is placed last, next to the docking hub, in case some sort of sample contamination from the landers requires the lab to be isolated from the rest of the ship. Fuel tankage is arranged at the rear of the ship to provide extra shielding for as long as it is around.

Edited by TheSaint

##### Share on other sites
1 hour ago, Nertea said:

In Nertea-land, LF is kerosense, but I think NathanKell said it was some sort of storable biprop. Currently Radioactivity assumes everything is aluminum in terms of attenuation constant (:P), because apparently for gamma, using mass attenuation constants, the great majority of materials are similar for 'average' gamma energies. That means attenuation is more proportional to the total mass between source and sink, which lets me get away with not tracking attenuation constants for everything ;).

Kerosene makes the most sense. KSP's LF is interchangeable into jet engines, and I can't think of any biprops that can do that. But the thought of running kerosene through a nuclear rocket makes me feel like I need a bath.  Liquid methane, maybe?

For gamma radiation, most metals at the low end of the periodic table are pretty interchangeable when it comes to shielding, but when you start getting to the higher atomic numbers they start to get a lot more efficient in terms of shielding per unit of mass. Likewise when it comes to neutron radiation: Steel and aluminum will attenuate it a little bit, but borated polyethylene is going to be your material of choice in a dedicated shield. If you're going to have dedicated shield parts I would assume that they are made out of lead/poly and increase their shielding ability per unit of mass accordingly.

##### Share on other sites

Shielding is usually a dual thing.  A heavy metal shield of some sort for gamma radiation.  Often lead, although I do wonder if there's a better choice for shielding to weight ratio use.  The Neutron and other particle shielding is usually some form of modified polyethylene.  Borated polyethylene is probably the more common, but NASA's done some work on a baked   composite hydrogenated polyethylene.  But, as people have mentioned, distance is king.

Anyway, an example basic craft.  Maybe a bit larger than most stock craft, but there's a minimum size for GCRs.

Without hanger extender working I had to skip the chemical first stage and hyper-edit it into space.
Scientific sensors etc, probably should be well shielded as well, although it's not the sort of thing I'd expect to be modeled in game.

##### Share on other sites
30 minutes ago, TiktaalikDreaming said:

Shielding is usually a dual thing.  A heavy metal shield of some sort for gamma radiation.  Often lead, although I do wonder if there's a better choice for shielding to weight ratio use.

Basically, the higher the atomic number, the better it will work as a shielding material. But, once you get past lead, you start to run into issues. Technically, depleted uranium would be a better shielding material for gamma than lead, but it is itself a mild gamma emitter, and putting a large hunk of U238 into an area with an active neutron flux will breed Pu239, which will almost certainly lead to unintended consequences. Beyond that, there just aren't any elements with a higher atomic number than lead that are inexpensive enough to use for bulk shielding.

##### Share on other sites
8 hours ago, TheSaint said:

Basically, the higher the atomic number, the better it will work as a shielding material. But, once you get past lead, you start to run into issues. Technically, depleted uranium would be a better shielding material for gamma than lead, but it is itself a mild gamma emitter, and putting a large hunk of U238 into an area with an active neutron flux will breed Pu239, which will almost certainly lead to unintended consequences. Beyond that, there just aren't any elements with a higher atomic number than lead that are inexpensive enough to use for bulk shielding.

The fact that lead is the heaviest element that comes in non-radioactive flavours helps.  And materials don't get much easier to shape than lead.  Ease of manufacturing and price tend to feature less in space craft materials selection than other things like weight and mass, and weight and mass.  But if the point is density, specifically atomic mass, then it's plain old hard to avoid mass.  There are denser materials with lower atomic mass (eg Tungsten, Gold, Platinum, hell, even Thallium now that I check, Lead is starting to look pretty light weight for it's atomic mass actually) which would clearly be a worse choice, because they're worse both ways.  Checking Tin, the saving in density doesn't compensate for the drop in atomic mass.  And it all starts to look even worse after.

I'm assuming to be effective the material needs to have atoms in close proximity, otherwise Xenon's looking pretty good.  :-)  But, I'm going to assume best gamma ray absorption is via a densely packed metallic crystal with electron mobility.  Ruling out ceramics and gases.

EDIT

Oh, and on "and putting a large hunk of U238 into an area with an active neutron flux will breed Pu239", one of the key reasons for a designated shadow shield is to lessen this effect.  Because it's not just U238.  Most useful materials on exposure to the radiation from a fission reactor are going to suffer two effects that are quite annoying.  One is embrittlement. Materials getting hit with neutrons change.  How they change usually leads to them being less mechanically sound, and usually makes them more brittle.  The second is they often become radioactive themselves.  So, anything poking out of the shield's shadow, will itself become an emitter.

You can use 3D programs' ray casting to model this behaviour with various material types.  Translucent for most materials and emissive for the primary sources, and a mostly opaque translucent for the shield.  And in fact, ray casting/ray tracing software's origin is in radiation shielding design.

It's a fascinating area.  I stepped through doing this for my GCRs.  And then there's the exhaust plume.  For a non-open-cycle system, you can mostly ignore it.  But an open cycle gas core reactor nuclear thermal rocket's exhaust contains reaction products.  And they spread out in a nasty cone of death (not counting the toxic effects of uranium tetrafluoride mixed with super hot hydrogen).  Shadow shielding an expanding cone is an exercise in futility.

Edited by TiktaalikDreaming
Rememberifying

##### Share on other sites
10 hours ago, TiktaalikDreaming said:

Oh, and on "and putting a large hunk of U238 into an area with an active neutron flux will breed Pu239", one of the key reasons for a designated shadow shield is to lessen this effect.  Because it's not just U238.  Most useful materials on exposure to the radiation from a fission reactor are going to suffer two effects that are quite annoying.  One is embrittlement. Materials getting hit with neutrons change.  How they change usually leads to them being less mechanically sound, and usually makes them more brittle.  The second is they often become radioactive themselves.  So, anything poking out of the shield's shadow, will itself become an emitter.

You can use 3D programs' ray casting to model this behaviour with various material types.  Translucent for most materials and emissive for the primary sources, and a mostly opaque translucent for the shield.  And in fact, ray casting/ray tracing software's origin is in radiation shielding design.

It's a fascinating area.  I stepped through doing this for my GCRs.  And then there's the exhaust plume.  For a non-open-cycle system, you can mostly ignore it.  But an open cycle gas core reactor nuclear thermal rocket's exhaust contains reaction products.  And they spread out in a nasty cone of death (not counting the toxic effects of uranium tetrafluoride mixed with super hot hydrogen).  Shadow shielding an expanding cone is an exercise in futility.

Well, yes, neutron embrittlement and activation are going to be issues no matter what. (Trust me, we had a whole course on metallurgy at NNPS. Fast neutrons crash into the crystalline structure of the metals and produce interstitial point defects, making the crystalline structure less ductile and more brittle. Ha! I remembered something from NNPS!) The specific unintended consequences I was imagining would be, believe it or not, political. By creating a situation where you are breeding Pu239 in orbit, your spacecraft now becomes a potential Non-Proliferation Treaty and/or Outer Space Treaty violation. It also becomes a target for uneducated anti-nuclear protestors. (Not that it wasn't already, but this lets them add a nuclear weapons dimension to it.) When you add that to the miniscule advantages that uranium gives you in shielding, lead becomes a no-brainer.

Open-cycle gas cores, for me anyway, fall into the same category as NSWRs: I wouldn't ride in the damned thing. I have years of training that bred into me one simple prime directive: Keep the zoomies in the zoomie tank! Any drive that violates that rule on purpose is not meeting standards.

##### Share on other sites

• Instruments now take a science penalty depending on the dose rate they're exposed to. This is configurable based on the instrument so some (gravimeter) might be very sensitive, others (goo experiment) might not be as sensitive
• Drone cores now take a computational penalty depending on the dose rate they're exposed to. Higher dose rates reduce SAS level by some number. Configurable to simulate rad-hardened electronics.
• In-part shadow shields are implemented as a PartModule, in which is specified the position and geometry of the shield (location, facing, radius) and its parameters (thickness, density, attenuation constant). All shields are modeled as cylinders (this seems a valid assumption) and the positional data is converted into the appropriate angular data at runtime. All rays cast through the angular volume defined by the shield will be pre-attenuated by the shield's parameters. This should cover all the scenarios I can think of.
• Got a better UI paradigm running, much easier to interpret and read
• Bunch more tweaks to how exposure works
• Optimization

##### Share on other sites
8 hours ago, TheSaint said:

Open-cycle gas cores, for me anyway, fall into the same category as NSWRs: I wouldn't ride in the damned thing. I have years of training that bred into me one simple prime directive: Keep the zoomies in the zoomie tank! Any drive that violates that rule on purpose is not meeting standards.

Space flight does tend to put you in the path of the zoomies, whether you bring your own or not though.  Always ends up being a reverse anti-zoomie tank.

##### Share on other sites

I'm so glad you're developing this. When you get around to charged-particle radiation, will electromagnetic shielding be a possibility? (Will we be able to use the electromagnetic shield as a magnetic sail to generate microthrust?)

##### Share on other sites
4 hours ago, eataTREE said:

I'm so glad you're developing this. When you get around to charged-particle radiation, will electromagnetic shielding be a possibility? (Will we be able to use the electromagnetic shield as a magnetic sail to generate microthrust?)

Probably not, but the interface should be open enough that there wouldn't be any trouble adding such a module.

##### Share on other sites

Slowly squashing bugs and fixing edge cases. There are still some but we're coming close to a point where the NREs are manageable for a test release.

Here's some VAB shots, with new overlay UI.

The connector is a placeholder radiation shield made of "lead" - ie, the proper attenuation constant and high density. Works pretty well.

##### Share on other sites

Let's... see how this goes?

I've written up a wiki type thing for documentation and tutorials

Do not use this on a save you really care about. It might kill your Kerbals. If you find a bug, please log it on GitHub, and for heaven's sake provide information!

• output_log.txt from the KSP_Data directory (this mod is currently very log-verbose so this very much helps)
• List of installed mods, if any.
• Reproduction steps
• If it's a bug with the geometry of the situation (like a ship not recalculating ray paths correctly, or something not attenuating right) please provide screenshots of the ship with the overlay open

Balance

Not much has been balanced.

Performance

I've tested this a bunch with sets of up to 10 radiation sources and 10 radiation sinks constantly changing position. Performance hit seems negligible here

Mod Compatibility

Not compatible with Kerbalism. Most recent release of Kerbal Atomics and Near Future Electrical (forgot to include the shadow shields for NFE reactors though) contain the right stuff and patches to enable emissions from reactors and engines, but that's about it. New crew containers, science instruments and the like from other mods are not integrated.

If you want to write patches to add things to mods, please consult the documentation on the wiki, and keep in mind the fluctuating balance state.

Known Issues

• The radiation overlay doesn't always load correctly when entering the VAB or loading a vessel in the VAB. To fix this, just move the root part around a bit.
• Probe core degradation is not really in (my hacks have not worked yet) but probes do track exposure
• Science experiment degredation is not well tested
• Testing in career has been limited up to this point
• Radiation sickness doesn't do anything, only death
• Some elements of the UI aren't quite done so I'm aware of that, but I welcome suggestions on improving communication and stuff.

After such a big stack of disclaimers, first test release!

Edited by Nertea

##### Share on other sites

Unleash the zoomies! LOL

Will try testing this out this weekend, when I have some time.

##### Share on other sites
2 hours ago, TheSaint said:

Unleash the zoomies! LOL

Will try testing this out this weekend, when I have some time.

Thanks! The only way this is going to get release-forum-ready is if I get some solid testing done, so it is much appreciated :).

##### Share on other sites
17 hours ago, Nertea said:

Thanks! The only way this is going to get release-forum-ready is if I get some solid testing done, so it is much appreciated :).

And it gives me something to poke around at that isn't trying to make landing gear.

Seems to work fine so far.

Edited by TiktaalikDreaming

I found a glitch

##### Share on other sites
On 9/2/2016 at 3:26 PM, TiktaalikDreaming said:

And it gives me something to poke around at that isn't trying to make landing gear.

Seems to work fine so far.

Pretty nice! Is there any noticeable performance hit?

4 hours ago, steeeal said:

I found a glitch

That contains exactly one of the four things I asked for in bug reports above.

##### Share on other sites
28 minutes ago, Nertea said:

Pretty nice! Is there any noticeable performance hit?

Not that I've noticed.   Launched the sucker again.  I'd forgotten the joys of trying to circularize with 0.58m/s2 acceleration.

I got similar weirdness to @steeeal  Although it varied based on whether the engine was running or not.  The ray casts were always pointing off in some other direction.  Coordinate system different in flight than in VAB?  Not sure.

Running

Not running

I should do testing with the more kerbal regeneratively cooled editions.  Less radiator, more thrust.  Kerbals closer to the nasties.

##### Share on other sites

That's... Really weird and didn't show up at all in testing. Can you send me a log too? And more or less what you were doing to get it to there? In the second picture at least it looks like all the lines are right but just drawn at the wrong location. Huh. Well I'll look into it when I get home.

Edited by Nertea

##### Share on other sites

Does it have to do with acceleration?

##### Share on other sites

[LOG 20:24:10.165] Radioactivity > UI: Start
[LOG 20:24:10.165] Radioactivity > Editor: Starting monitor
[WRN 20:24:10.181] Radioactivity > Sink: Couldn't find Source transform, using part root transform
[WRN 20:24:10.197] Radioactivity > Source: Couldn't find Emitter transform, using part root transform
[LOG 20:24:10.197] Radioactivity > Shadow Shield: created new with position (0.0, 0.8, 0.0), radius 1.0, angular size 33.7

Hope this will help

##### Share on other sites

I got confused and killed my output_log.  Loaded back into game, and accessed the craft already in orbit.  Similar display issues when engine was running, but the ray display just skipped drawing altogether this time.

Oh, and the config I created for my engine;

(OuterShell is the mesh for the central radioactive source, and I matched the shield to the mesh dimensions for the shield, nice, easy to understand values, thanks Nertea)

```@PART[GCnuclearEngine6kRev]:NEEDS[Radioactivity]
{
MODULE
{
SourceID = OuterShell
IconID = 0
}
MODULE
{
SourceID = OuterShell
EmissionAtMax = 950000
}
MODULE
{
ShieldPosition = 0,5.5,0
Density = 1.2
Thickness = 0.4
MassAttenuationCoeffecient = 15
}
}```

Banana scale?

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