Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add CH4 fuel cell #161

Merged
merged 1 commit into from
Mar 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions GameData/KerbalismConfig/Localization/en-us.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,10 @@ Localization
#KERBALISM_empty_lqd_hydrogen = $VESSEL Liquid Hydrogen tanks are empty
#KERBALISM_refill_lqd_hydrogen = $VESSEL has refilled the Liquid Hydrogen tanks

#KERBALISM_low_lqd_methane = $VESSEL Liquid Methane reserves are low
#KERBALISM_empty_lqd_methane = $VESSEL Liquid Methane tanks are empty
#KERBALISM_refill_lqd_methane = $VESSEL has refilled the Liquid Methane tanks

#KERBALISM_low_lqd_oxygen = $VESSEL Liquid Oxygen reserves are low
#KERBALISM_empty_lqd_oxygen = $VESSEL Liquid Oxygen tanks are empty
#KERBALISM_refill_lqd_oxygen = $VESSEL has refilled the Liquid Oxygen tanks
Expand Down
113 changes: 112 additions & 1 deletion GameData/KerbalismConfig/Profiles/ROKerbalism.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,13 @@ Supply
refill_message = #KERBALISM_refill_lqd_hydrogen //$VESSEL has refilled the Liquid Hydrogen tanks
}
Supply
{
resource = LqdMethane
low_message = #KERBALISM_low_lqd_methane //$VESSEL Liquid Methane reserves are low
empty_message = #KERBALISM_empty_lqd_methane //$VESSEL Liquid Methane tanks are empty
refill_message = #KERBALISM_refill_lqd_methane //$VESSEL has refilled the Liquid Methane tanks
}
Supply
{
resource = LqdOxygen
low_message = #KERBALISM_low_lqd_oxygen //$VESSEL Liquid Oxygen reserves are low
Expand Down Expand Up @@ -451,6 +458,33 @@ Supply
output = [email protected]
dump = Water
}

//Methane fuel cells
// source: https://pubs.rsc.org/en/content/articlelanding/2017/ra/c7ra05245f
// https://pubs.rsc.org/en/content/articlelanding/2017/ra/c7ra05245f
// Still in development, not going for a specific technology
// Similar efficiency to H2 fuel cells
// Guessing 75% efficient by HHV
// Methane has a HHV of 55.5 MJ/kg
// Liquid Methane has a density of 0.42561 kg/L
// Therefore, we need 0.0000423346 / 0.75 = 0.0000564461 L/s of Lqd Methane to generate 1 kW
// 3.9899 kg O2 for every kg methane
// Liquid Oxygen has a density of 1.141 kg/L, so 1.4883 L oxygen for every liter methane
// running stoich, we then need 0.0000840087 L/s of Lqd Oxygen to match
// 0.0864864 kg/hr LCH4, 0.345074 kg/hr O2
// this will produce 0.194271 kg/hr H2O and 0.237298 kg/hr CO2
// 0.0000539642 L/s H2O, 0.0337858 L/s CO2
Process
{
name = fuel cell ch4
modifier = _FuelCellCH4
input = [email protected]
input = [email protected]
output = [email protected]
output = [email protected]
output = [email protected]
dump = Water,CarbonDioxide
}

// 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
Expand Down Expand Up @@ -1236,6 +1270,14 @@ Supply
capacity = 1
running = true
}
MODULE
{
name = ProcessController
resource = _FuelCellCH4
title = CH4 Fuel Cell
capacity = 1
running = true
}

MODULE
{
Expand Down Expand Up @@ -1317,6 +1359,21 @@ Supply
id_value = _FuelCellShuttle
}
}

SETUP //CH4
{
name = CH4 Hydrocarbon Fuel Cell
desc = Combines <b>LqdMethane</b> and <b>LqdOxygen</b> to produce <b>Water</b>, <b>Carbon Dioxide</b> and <b>Electricity</b>.
tech = powerNF
mass = 0.015 //better specific power than H2 fuel cells, but requires more cooling

MODULE
{
type = ProcessController
id_field = resource
id_value = _FuelCellCH4
}
}
}
}

Expand Down Expand Up @@ -1353,6 +1410,14 @@ Supply
capacity = 0.75
running = true
}
MODULE
{
name = ProcessController
resource = _FuelCellCH4
title = CH4 Fuel Cell
capacity = 0.75
running = true
}

MODULE
{
Expand Down Expand Up @@ -1404,6 +1469,21 @@ Supply
id_value = _FuelCellShuttle
}
}

SETUP //CH4
{
name = CH4 Hydrocarbon Fuel Cell
desc = Combines <b>LqdMethane</b> and <b>LqdOxygen</b> to produce <b>Water</b>, <b>Carbon Dioxide</b>, and <b>Electricity</b>.
tech = powerNF
mass = 0.01125

MODULE
{
type = ProcessController
id_field = resource
id_value = _FuelCellCH4
}
}
}
}

Expand Down Expand Up @@ -1440,6 +1520,14 @@ Supply
capacity = 6
running = true
}
MODULE
{
name = ProcessController
resource = _FuelCellCH4
title = CH4 Fuel Cell
capacity = 6
running = true
}

MODULE
{
Expand Down Expand Up @@ -1491,6 +1579,21 @@ Supply
id_value = _FuelCellShuttle
}
}

SETUP //CH4
{
name = CH4 Hydrocarbon Fuel Cell
desc = Combines <b>LqdMethane</b> and <b>LqdOxygen</b> to produce <b>Water</b>, <b>Carbon Dioxide</b> and <b>Electricity</b>.
tech = powerNF
mass = 0.0825

MODULE
{
type = ProcessController
id_field = resource
id_value = _FuelCellCH4
}
}
}
}

Expand Down Expand Up @@ -2159,6 +2262,7 @@ RESOURCE_DEFINITION
density = 0.0
isVisible = false
}

RESOURCE_DEFINITION
{
name = _FuelCellGas
Expand All @@ -2173,7 +2277,14 @@ RESOURCE_DEFINITION
isVisible = false
}

@PART:HAS[@MODULE[ProcessController]:HAS[#resource[_FuelCell]]]:NEEDS[ProfileRealismOverhaul]:LAST[Kerbalism]
RESOURCE_DEFINITION
{
name = _FuelCellCH4
density = 0.0
isVisible = false
}

@PART:HAS[@MODULE[ProcessController]:HAS[#resource[_FuelCell*]]]:NEEDS[ProfileRealismOverhaul]:LAST[Kerbalism]
{
@tags ^=:$:, fuel cell, lqdhydrogen, lqdoxygen, generator
}
Expand Down
Loading