Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
NEEDS CHECKING!: Kerbalism Rules and Processes created for RO Profile
Browse files Browse the repository at this point in the history
I need you to check these values please!

This is the first step to integrating Kerbalism into RO and I want to make sure that we have working rules and processes before we move forward. There are a lot of notes throughout the file and I included my XLS file of some of the calcs I did.

Please look over it, check my math, check my logic, question what I was doing, find a better way, improve it. Please.
pap1723 committed Jan 19, 2019
1 parent 9e0a518 commit bb62b7b
Showing 2 changed files with 461 additions and 0 deletions.
461 changes: 461 additions & 0 deletions GameData/RealismOverhaul/Kerbalism/ROKerbalism.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,461 @@
// =================================================================================
// This is the official profile of the Realism Overhaul Mod
// =================================================================================

// TO-DO's
//
// * Determine proper amount of EC on_eva
// * Degeneration on all Rules
// * How much radiation is fatal?? Where are the values stored for how much a crew is exposed to?
// * Non-regenerative scrubber for EVA?
// * Pap: I think we should remove the Humidity System. It is important in RL, but hard to have abstract for our purposes causing issues for the Crew instead of systems
//
// SOURCES
//
// NTRS - Fuel Cells for Space Science Applications (2003): https://ntrs.nasa.gov/archive/nasa/casi.ntrs.nasa.gov/20040010319.pdf
// NTRS - The Fuel Cell in Space (1989): https://ntrs.nasa.gov/archive/nasa/casi.ntrs.nasa.gov/19900002488.pdf
Profile
{
name = RealismOverhaul
// SUPPLIES
Supply
{
resource = ElectricCharge
//on_eva = 33.0
low_message = $VESSEL batteries are getting low@<i>We must shut down non-essential systems</i>
empty_message = $VESSEL has run out of ElectricCharge@<i>Life support systems are off</i>|$VESSEL is out of ElectricCharge@<i>We no longer have control</i>
refill_message = $VESSEL batteries have been recharged@<i>All systems are back online</i>
}
Supply
{
resource = Food
on_pod = 29.25 // 5 days
low_message = Food reserves are getting low on $VESSEL@<i>All edible items are being rationed</i>
empty_message = There is no more food on $VESSEL@<i>The crew prepares for the worst</i>
refill_message = $VESSEL food reserves restored@<i>Rations have returned to normal amounts</i>
}
Supply
{
resource = Water
on_pod = 19.36 // 5 Days
low_message = Water reserves are getting low on $VESSEL@<i>Bathing has been suspended</i>
empty_message = $VESSEL is completely out of water@<i>We are in a state of emergency</i>
refill_message = $VESSEL has restocked water reserves@<i>Regular bathing schedules can resume</i>
}
Supply
{
resource = Oxygen
on_pod = 2960 // 5 Days
low_message = Oxygen reserves are dangerously low on $VESSEL@<i>Something must be done immediately</i>
empty_message = $VESSEL has run out of Oxygen@<i>It is only a matter of time for the crew</i>
refill_message = $VESSEL Oxygen reserves refilled@<i>Everyone is breathing easier</i>
}
Supply
{
resource = Nitrogen
low_message = Nitrogen reserves are low on $VESSEL@<i>Please send a resupply mission</i>
empty_message = $VESSEL is out of Nitrogen@<i>The crew should consider getting in their suits</i>
refill_message = $VESSEL Nitrogen reserves refilled@<i>Normal operations can resume</i>
}
Supply
{
resource = LithiumHydroxide
low_message = Lithium Hydroxide reserves are low on $VESSEL@<i>Please send a resupply mission</i>
empty_message = $VESSEL is out of Lithium Hydroxide@<i>We can no longer scrub CO2</i>
refill_message = $VESSEL Lithium Hydroxide reserves refilled@<i>Normal operations can resume</i>
}
Supply
{
resource = CarbonDioxide
low_message = Carbon Dioxide concentration is rising on $VESSEL@<i>We must turn on the scrubbers</i>
empty_message = $VESSEL Carbon Dioxide concentration is dangerously high@<i>We must do something immediately</i>
refill_message = $VESSEL CO2 levels have normalized@<i>Normal operations can resume</i>
}
Supply
{
resource = Ammonia
low_message = $VESSEL Ammonia reserves are low
empty_message = $VESSEL Ammonia tanks are empty
refill_message = $VESSEL has refilled the Ammonia tanks
}
Supply
{
resource = LqdHydrogen
low_message = $VESSEL Liquid Hydrogen reserves are low
empty_message = $VESSEL Liquid Hydrogen tanks are empty
refill_message = $VESSEL has refilled the Liquid Hydrogen tanks
}
Supply
{
resource = LqdOxygen
low_message = $VESSEL Liquid Oxygen reserves are low
empty_message = $VESSEL Liquid Oxygen tanks are empty
refill_message = $VESSEL has refilled the Liquid Oxygen tanks
}
// ==============================================================================
// RULES
// ==============================================================================
Rule
{
name = climatization
input = ElectricCharge
rate = 0.0001 // per-kelvin (temp diff), per m^3 (living space), per-second
degeneration = 0.00000007 // about 2h at 100k temp diff in 20m^3
modifier = temperature,volume,per_capita
warning_message = $ON_VESSEL$KERBAL feels cold|$ON_VESSEL$KERBAL is sweating
danger_message = $ON_VESSEL$KERBAL is freezing|$ON_VESSEL$KERBAL is burning alive
fatal_message = $ON_VESSEL$KERBAL froze to death|$ON_VESSEL$KERBAL was burned alive
relax_message = $ON_VESSEL$KERBAL hypothermia is under control|$ON_VESSEL$KERBAL is cooling down
}
Rule
{
name = eating
input = Food
output = Waste
rate = 1.94976 // Based on RO-TACLS Profile (5.84928 per day)
interval = 28800.0 // 3 Meals per day
individuality = 0.00 // Everyone eats the same amount
degeneration = 0.0222222 // 45 meals, 15 days
warning_message = $ON_VESSEL$KERBAL is hungry
danger_message = $ON_VESSEL$KERBAL is starving
fatal_message = $ON_VESSEL$KERBAL starved to death
relax_message = $ON_VESSEL$KERBAL is enjoying a meal
}
Rule
{
name = drinking
input = Water
output = WasteWater
rate = 0.774144 // Based on RO-TACLS Profile (3.87072 per day)
interval = 17280.0 // 5 drinks per-day
degeneration = 0.08333 // 3 days
individuality = 0.00 // Everyone uses the same amount
warning_message = $ON_VESSEL$KERBAL is thirsty
danger_message = $ON_VESSEL$KERBAL is dehydrated
fatal_message = $ON_VESSEL$KERBAL died from dehydration
relax_message = $ON_VESSEL$KERBAL is enjoying a drink
}
Rule
{
name = breathing
input = Oxygen
output = WasteAtmosphere
rate = 0.00685 // Based on RO-TACLS Profile (591.84 per day)
degeneration = 0.0055555 // 3 minutes
modifier = non_breathable
individuality = 0.00 // Everyone uses the same amount
warning_message = $ON_VESSEL$KERBAL can't breathe
danger_message = $ON_VESSEL$KERBAL is suffocating
fatal_message = $ON_VESSEL$KERBAL suffocated to death
relax_message = $ON_VESSEL$KERBAL is breathing again
}
Rule
{
name = humidity
input = MoistAtmosphere
output = MoistAtmosphere
monitor = true
monitor_offset = 0.6 // Base humidity of 60% - ***DO NOT CHANGE*** Bad things will happen as base humidity is Hard-Coded in Habitation.
rate = 0.002879123 // Based on a humans output of humidity from breathing, a humans breath is at 100% humidity and at 50Ltr/day MoistAtmosphere, contains 850 mL of Water/day.
input_threshold = 0.95
degeneration = 0.000003858 // 3 days
variance = 0.0 // No Variance
modifier = humidity,non_breathable // if we are on a planet with breathable atmosphere vent moisture outside.
warning_message = $ON_VESSEL$KERBAL notes condensation is forming
danger_message = $ON_VESSEL$KERBAL is seeing an alarming amount of condensation
fatal_message = $ON_VESSEL$KERBAL died from electrocution touching moisture soaked equipment
relax_message = $ON_VESSEL$KERBAL is dry again
}

// Carbon Dioxide Toxicity
// 1% in air = Drowsiness
// 3% in air = Mild narcosis, Reduced Hearing, Increased Heart Rate and Blood Pressure
// 5% in air = Dizziness, Confusion, Headache, Shortness of Breath
// 7-10% in air = Unconsciousness, Muscle Tremors, Suffocation and Death
Rule
{
name = co2 poisoning
degeneration = 0.000555556 // 30 minutes
modifier = poisoning
warning_message = $ON_VESSEL$KERBAL's is beginning to feel drowsy
danger_message = $ON_VESSEL$KERBAL is having trouble breathing
fatal_message = $ON_VESSEL$KERBAL has died of CO2 poisoning
relax_message = $ON_VESSEL$KERBAL is breathing normally again
}
Rule
{
name = stress
degeneration = 0.000000032 // 365 days FIXME: Is this too short?
variance = 0.0 // No Variance
individuality = 0.0 // No Variance
modifier = living_space,comfort,pressure
breakdown = true // trigger breakdown event instead of death
warning_message = $ON_VESSEL$KERBAL is losing their mind@<i>Concentration is becoming a problem</i>
danger_message = $ON_VESSEL$KERBAL is about to breakdown@<i>The stress is too much</i>
relax_message = $ON_VESSEL$KERBAL is thinking straight now@<i>The stress level has reduced</i>
}
Rule
{
name = radiation
degeneration = 1.0 // just use the modifier??
variance = 0.0 // No Variance
individuality = 0.0 // No Variance
lifetime = true // Persists as a life time value
modifier = radiation,shielding
warning_threshold = 25.0 // FIXME
danger_threshold = 37.5 // FIXME
fatal_threshold = 50.0 // FIXME
warning_message = $ON_VESSEL$KERBAL has been exposed to intense radiation
danger_message = $ON_VESSEL$KERBAL is reporting symptoms of radiation poisoning
fatal_message = $ON_VESSEL$KERBAL died after being exposed to extreme radiation
relax_message = $ON_VESSEL$KERBAL no longer exposed to high levels of radiation
}
// ==============================================================================
// PROCESSES
// ==============================================================================
// FIXME - Is this needed? Numbers are not calibrated
// convention: 1 capacity = enough to scrub output of 1 crew member for 1 day
Process
{
name = non-regenerative scrubber
modifier = _NonRegenScrubber
input = WasteAtmosphere@0.0024915995 // efficiency starts at 2 (2 x a pods scrubber), reaches 1 in 6h, then drops below
input = _NonRegenScrubber@0.000023148 // consume 0.5 capacity in 6h, simulates the scrubber wearing out over time.
}
// Based on the Lithium Hydroxide Apollo Scrubber
// convention: 1 capacity = enough to scrub output of 1 crew member
Process
{
name = scrubber
modifier = _Scrubber
input = ElectricCharge@0.1
input = WasteAtmosphere@0.006216
input = LithiumHydroxide@0.00001189
output = CarbonDioxide@0.00003932
dump = true
}
// Based on the Lithium Hydroxide Orion Scrubber
// convention: 1 capacity = enough to scrub output of 1 crew member
Process
{
name = AdvScrubber
modifier = _AdvScrubber
input = ElectricCharge@0.01
input = WasteAtmosphere@0.006216
input = LithiumHydroxide@0.00001189
output = CarbonDioxide@0.00003932
dump = true
}
// ISS has normal air pressure at 101.3kPa (14.7 psi)
// convention: 1 capacity = enough to compensate for leaks in 70 m^2 surface (a cube of 40 m^3 volume)
Process
{
name = pressure control
modifier = _PressureControl,non_breathable
input = ElectricCharge@0.00858
input = Nitrogen@0.35
output = Atmosphere@0.35
}
// FIXME: What is this??
// convention: when pressure control is disable in breathabe atmosphere, air pump will consume only EC and pumping air into the vessel
Process
{
name = air pump
modifier = _AirPump,breathable
input = ElectricCharge@0.00258
output = Atmosphere@7.35
}
// FIXME: Remove?
// ISS THC keeps the ISS around 60% humidity
// Once at 70% there are issues with microorganism growth
// convention: 1 capacity = enough to reclaim moisture output of 1 crew member
// 50Ltr per-day @100% humidity. Contains 850mL of Water per-day per Crew.
Process
{
name = humidity controller
modifier = _HumidityController
input = ElectricCharge@0.037
input = MoistAtmosphere@0.00071978
// Calculated with the amount of water in a Liter of air @ 0.017mL/L (in real world this is approx. 100% saturation)
// 850mL of Water divided by 0.017mL = 50L of MoistAtmosphere.
// 50L divided by MoistAtmosphere density of 804mL/L = 62.18905473L
// 62.18905473L / 86400 seconds (one day) = 0.00071978/s
output = Water@0.00000984 // 53.125mL divided by density of Water = 0.053125L, divided by 21600 seconds (a Kerbal day of 6hrs) = 0.000009837975/s
dump = true
}
// Based on ISS Urine Reclamation
// convention: 1 capacity = enough to recycle output of 1 crew member
Process
{
name = water recycler
modifier = _WaterRecycler
input = ElectricCharge@0.1
input = WasteWater@0.00000619
output = Water@0.0000336 // ISS currently achieves 75% Water recovery
output = Ammonia@0.00000104 // Based on Wikipedia, we assume 4.21% of WasteWater is solids and 55% of solids are Urea
dump_valve = Water,Ammonia,Water&Ammonia
}
// FIXME: These don't exist yet, but most likely unnecessary in orbit as it is dumped from the craft. What to do on land bases? Add this for Moon Bases / Mars Bases?
// convention: 1 capacity = enough to process output of 1 crew member
Process
{
name = waste processor
modifier = _WasteProcessor
input = ElectricCharge@0.065556
input = Waste@0.0000045525
// According to https://www.ncbi.nlm.nih.gov/pmc/articles/PMC4500995/ feces contains approximately 0.7% nitrogen.
// Feces is considered to the dominant source of Waste
// Waste is 975.3 times more dense than Ammonia
output = Ammonia@0.000031083125
}
Process
{
name = waste incinerator
modifier = _WasteIncinerator
input = Waste@0.0001082667 // H18C82
input = Oxygen@0.1589194249
output = CarbonDioxide@0.1497439605
output = Water@0.0000131259
output = ElectricCharge@0.005
dump_valve = Water,ElectricCharge,Water&ElectricCharge
}

Process
{
name = atmo leaks
modifier = surface,non_breathable
input = Atmosphere@0.000148
// from ISS: 899 m³ volume, 452 m² surface (estimated), 0.227 Kg/day (structural) + 1.543 Kg/day (activities)
}

// FIXME: Determine proper Half-life for what we want
Process
{
name = radioisotope generator
modifier = _SNAP3RTG
input = _SNAP3RTG@0.000000001888 // 28.8 kerbin-year half-life
input = Plutonium-238@1.64e-10
output = ElectricCharge@0.0025
output = DepletedFuel@1.64e-10
}
Process
{
name = radioisotope generator
modifier = _SNAP9RTG
input = _SNAP9RTG@0.000000001888 // 28.8 kerbin-year half-life
input = Plutonium-238@1.64e-10
output = ElectricCharge@0.025
output = DepletedFuel@1.64e-10
}
Process
{
name = radioisotope generator
modifier = _SNAP19RTG
input = _SNAP19RTG@0.000000001888 // 28.8 kerbin-year half-life
input = Plutonium-238@6.34e-11
output = ElectricCharge@0.08
output = DepletedFuel@6.34e-11
}
Process
{
name = radioisotope generator
modifier = _MHWRTG
input = _MHWRTG@0.000000001888 // 28.8 kerbin-year half-life
input = Plutonium-238@4.32e-10
output = ElectricCharge@0.475
output = DepletedFuel@4.32e-10
}
Process
{
name = radioisotope generator
modifier = _GPHSRTG
input = _GPHSRTG@0.000000001888 // 28.8 kerbin-year half-life
input = Plutonium-238@2.59e-10
output = ElectricCharge@0.3
output = DepletedFuel@2.59e-10
}
Process
{
name = radioisotope generator
modifier = _MMRTG
input = _MMRTG@0.000000001888 // 28.8 kerbin-year half-life
input = Plutonium-238@1.64e-10
output = ElectricCharge@0.11
output = DepletedFuel@1.64e-10
}

// Fuel Cells are based off of 1.0kW produced. For the process controller, we
// should be multiplying the capacity * the amount we want produced
// Eg. Apollo Fuel Cells were 1.42kW so the capacity = 1.42
Process
{
name = fuel cell
modifier = _FuelCell
input = LqdHydrogen@0.000134718
input = LqdOxygen@0.000269436
output = Water@0.0001186
output = ElectricCharge@1.0
dump_valve = Water
}

// Based on current electrolysis rates where it takes 12.749kWh to make 1L of H
// Convention: 1 "unit" creates just a little more O2 per second than is needed for 1 crew
Process
{
name = water electrolysis
modifier = _WaterElectrolysis
input = ElectricCharge@0.178486
input = Water@0.000011248
output = Hydrogen@0.014
output = Oxygen@0.007
dump_valve = Hydrogen,Oxygen
}

Process
{
name = sabatier process
modifier = _Sabatier
input = ElectricCharge@0.8
input = WasteAtmosphere@0.0172683775
input = Hydrogen@0.064721246
output = Water@0.0000259988
output = LqdMethane@0.0000271941
dump_valve = Water,LqdMethane
}

Process
{
name = brayton generator
modifier = _BraytonGenerator
input = EnrichedUranium@1.0813e-15
output = ElectricCharge@25
output = DepletedUranium@1.0813e-15
}

Process
{
name = turbine generator
modifier = _TurbineGenerator
input = EnrichedUranium@6.66667E-14
output = ElectricCharge@1
output = DepletedUranium@6.66667E-14
}

}
Binary file added Notes/Kerbalism.xlsx
Binary file not shown.

0 comments on commit bb62b7b

Please sign in to comment.