Jump to content

Campaign for Real ElectricCharge


Recommended Posts

I'm back after a few years away and wondering about something that's been bugging me for a while. The apparent value of a unit of ElectricCharge varies wildly depending on what kind of part one looks at. I was thinking of doing a mod with a ModuleManager rune that would adjust (eg) all parts' energy storage by a like factor so if they were balanced relative to stock parts, they would remain balanced in that way. (Then, presumably, it would turn out to break some specific mod parts which would need special treatment).

So, we ask ourselves, how much is a unit of ElectricCharge? (In particular, I bet there is at least one hilarious error in what follows - point it out to me?)

Solar energy flux near Earth (and hence near Kerbin?) is circa 1400W/m^2; 30% efficiency would give us 400W/m^2. However, the ISS's arrays produce 100W/m^2 when it is not eclipsed. An OX-STAT is 0.3*0.5m and puts out 0.35 EC/s; that would make a unit of EC between circa 40J and 170J.

This implies that probe cores draw somewhere between 1 and 5 W (not counting torque). This doesn't seem implausible - it's in Raspberry Pi territory, say. Presumably most of the volume is reaction wheels and leftover Snacks wrappers.

Let's pretend a unit of EC is 100J, somewhere in the middle. But round batteries have an energy density of 4 EC/kg. That's... 2kJ/kg. This is quite low compared to, say, a Tesla 85kWh (sigh units) battery which holds 560kJ/kg! (Lithium thionyl chloride batteries, actually used in aerospace, do better, but it's not a rechargable chemistry). Let's be generous and say kerbals engineer really superb solar panels and so a unit of EC on the solar scale is _200J_; now round batteries do 4kJ/kg. We would need to multiply up battery capacities by a hundred to get them into the same general efficency range as solar. Conversely, battery weights want one EC to be around 20kJ... but then that probe core draws 500W!

Aerospace fuel cells provide c. 500 W/kg. A KSP fuel cell array (different chemistry, mind) provides 0.075 EC/s/kg. This would make an EC around 6.6 kJ - closer to the battery scale.

A SNAP-27 RTG as used on the Apollo missions provided about 3.3 W/kg (and this is not an atypical figure). A PB-NUK provides about 0.01 EC/s/kg, suggesting an EC is about 3kJ. Not a bad deal compared to the fuel cells, especially given you never have to refuel it.

A USILS kerbal uses 0.01 EC/s for their life support needs. On the solar scale, that's 2W - pretty generous for an astronaut. On the battery scale, it's a perhaps more plausible 200W. (TACLS used 1 EC = 1kJ and on that scale a kerbal uses circa 20W with TACLS consumption, 10W with USILS). Humans are bigger than kerbals, and Skylab seems to have used circa 400W per astronaut over and above its uncrewed power consumption, so that's at least in the right ballpark.

So, any errors in that, and any thoughts on which direction the adjustment should be done? There is something to be said for adjusting everything towards the 1kJ = 1EC convention which at least some modders have used.

Link to post
Share on other sites

It struck me on the way home that for many purposes, the power to mass ratio of a solar panel is what matters, even if the area looks funny. It is also quite hard to find figures on the mass of solar panels, but each ISS "wing" is around 1,100kg (and is 1/8 of the overall output) for 27 W/kg. A Gigantor produces 0.08 EC/s/kg. This would make an EC around 340J. However, I think I'm willing to say that the ISS solar array (which also has a low output compared to what you'd expect from a naive assessment of its size, solar flux, and typical efficiency) is more robust than a Gigantor (which, after all, shatters into a million pieces if you look at it funny) and the power/mass ratio isn't a total outlier compared to the power/area ratio.

Link to post
Share on other sites

As someone who does probably the most electric stuff with KSP... yeah it's totally out to lunch in stock. One data point you did miss out on is the Dawn engine, which uses about 8.5 Ec/s, and supposedly maps to the NSTAR engine which runs at 2.1 kW (it's named Dawn after all). That gives you a 1 EC = ~250J number. 

No single part category really maps logically to another category. Pick a standard, easy number (1 kJ = 1 EC is the obvious choice in my mind) and rebalance around that. 

 

Link to post
Share on other sites

I forgot about ion engines, yes, thanks.

The other thing that might be interesting to look at is reaction wheels - now obviously they're a bit magic, and worse yet on larger vessels IRL you have CMGs (but perhaps the way the large wheel uses less EC per unit torque touches on that) - but at a very brief glimpse, IRL reaction wheels pull somewhere between about 10 and 50 W per kg. The small wheel can use 0.75 EC/s, the medium one 1.35 EC/s, and the large one 1.80; between 0.009 and 0.015 EC/s/kg. This gives us anywhere between 660J and 5.5kJ per EC. Given that reaction wheels are magic anyway, I'm inclined to say "this doesn't contradict 1 EC = 1 kJ" and leave dealing with their magical effects to other modders. (In practice, I don't fit reaction wheels and set the ones that come built in to other parts to "SAS only", to require me to use RCS more prototypically).

(Other things to consider: LFO engine alternators. Stock wheels, probably with a view to just reviewing the old Kerbal Foundries configs for them.)

Edited by damerell
Link to post
Share on other sites
  • 3 weeks later...

I had the time to have a crack at this tonight, and wrote the wall of text below while writing a ModuleManager file; this takes care of my most immediate need, launching comsats in my current game with plausible solar / RTG performance.

(But no; there's actually a problem with dish performance. A RemoteTech Reflectron GX-128 pulls 2.8 EC/s just to tick over; stock antennae want between 20 and 200 EC/s to transmit data. If these are kW, this looks odd in view of the way that, say, Voyager 1's RTGs only put out 470W at launch and we can still talk to it now. RemoteTech's root range model doesn't help much (stick a powerful antenna on Kerbin and a less powerful one on the ship), both because they cap out at the GX-128 (there isn't a super-powerful antenna to talk to weak ones at Eeloo) and because Kerbin has no ground-based electricity infrastructure other than at the KSC. I might just have to say, well, kerbals are bad at antennae, deal with it.)

A pretty fundamental question here is whether we try and look at the
part's actual mass - but that will break for any two-in-one part like
kerballed command modules, so it's a non-starter; so we have to just
multiply or divide the existing performance. This will, vexingly,
break mods which already have adopted the 1EC = 1kJ convention.
Worse yet will be mods which mix that convention with other parts
with stockalike performance.


Solar - seems like we can scale the lot, factor of 6 selected.


EC capacity
Battery capacities want multiplied up by 20.
Bit of a wrinkle in that for control parts, I might like not to change
their built-in endurance and ability to use reaction wheels; I
intentionally are not going to address RW balance, but giving probe
cores 20x the EC kind of does change it. On the other hand, not
multiplying up risks an inadvertent nerf to parts like the HECS2
which contain a significant mass of battery. I think best to err on the
side of caution (and also before you could just stick on an OX-STAT and
run the wheel forever) which also spares me writing a giant rune about
_which_ part to edit.

Of course there's a gotcha here that fuel switching mods won't know
about this. Mind you, many of them don't increase mass much or at all -
EC doesn't weigh anything, but batteries to put it in certainly do!


RTGs:
We think an RTG is any part with a ModuleGenerator making EC with no
input resource and no other output resource. (This also does the
launch clamp; who cares?)


Fuel cells are a bit more complex because we will want not just a
sensible EC/mass ratio, but a sensible input amount of LF/O. A base
fuel cell uses 0.01875 kg of LF+O every second to make what will be,
once we multiply it up, 9 kW power. It is surprisingly hard to find a
figure for the energy density of RP-1 + LOX, but kerosene is 43 MJ/kg,
which at 2.3 oxidiser to fuel ratio (as in the F-1) gives 13 MJ/kg.

(Of course we are stretching here because KSP's LF/O ratio isn't
anything like that, but we need _a_ real-world analogy. The other
approach would be to use KSP's LF/O ratio, but that would produce
an even bigger adjustment to mass flow!)

Fuel cells are about 50% efficient (the alkaline chemistry ones used
in aerospace are better, but then they're working off H2/O2, not
somehow magicing kerosone into electricity without combustion).
This would warrant a consumption of... huh, 0.0014 kg/s. Fuel cells
are going to be a lot more viable in CAMREC, consuming 1/13 the amount
of fuel.

This also runs me into my first mod compatibility problem - On-Demand
Fuel Cells. Oddly, ODFC _already_ changes fuel cell performance -
quite dramatically, with a LF/O ratio closer to RP-1/LOX than KSP LF/O.
Sigh.

Where the standard fuel cell produces 1.5 EC/s, the ODFC one produces
5 EC/s, consuming 0.104525 kg/s of LFO, 0.02 kg/s monoprop,
9.4 * 10^-5 kg/s hydrogen and 0.0011 kg/s oxygen (and producing 0.00084
kg/s of water), or 0.002 kg/s LF if IntakeAir is available.

These are odd figures to reconcile (for example, the energy density of
monoprop is better than LFO, the energy density of hydrogen is amazing,
about half the mass used in the H2/O2 cycle disappears, for some reason
having IntakeAir available makes your LF go further) so I think they
have to be rewritten.

The LF/O process now produces the same numbers as CAMREC without ODFC.
The monoprop process has reduced efficiency (J/kg) by a factor of about
2, and reduced peak output (which conveniently keeps the 0.5 EC/s ODFC
adds to pods intact if they run on monoprop). The LF/IntakeAir process
is like the LF/O one except it wants more air because air mostly isn't
oxygen. The CRP H2/O2 process is based on the circa 130MJ/kg energy
value of hydrogen and the circa 60% efficiency of aerospace H2/O2 fuel
cells.

1kW output needs circa 1.3 * 10^-5 kg/s hydrogen, and 4x that mass of
oxygen. 90% of the mass emerges as water (there's a reason fuel cells
and electrolysers don't make good long-term energy storage). I'm kind
of curious as to why it uses Hydrogen not LqdHydrogen but presumably
in a RealFuels world there's a way to warm the stuff up before you
use it. 0.143 units /s for 1 kW, and 0.0364 units of oxygen. (Oxygen
is much denser in the CRP than hydrogen).

Also I totally confused myself here with the way resource densities
are shown in _tonnes_ per unit, but I think I have it all right now.
As a brief test I launched a vessel with 2 H2/O2 arrays, an empty
80MJ battery, and Universal Storage hydrogen, oxygen, and (empty)
water tanks. It should take about 6-700 seconds to fill the battery,
and it does; and if I deploy a much larger version of it, the total
vessel mass decreases by 1kg when it's made about 10kg of water,
which is the loss figure I was looking for.


An obvious downside here is that I might have turned electrolysers
into perpetual motion machines, at least until the water runs out.
A brief look at the US Elektron says I haven't, but its output
numbers are funny, perhaps because it doesn't account for the relative
density of H2 and O2.


So what's next? This is enough to let me do the next thing in my
current game, but on the list are the US Elektron (because I know
it's wrong), Kerbal Foundries (which just has a large fudge factor
to make driving on batteries even vaguely possible), Karbelectic
generators, ion drives (since Nertea mentions they are wrong),
USI nuclear reactors (and I think there's one apiece in the Mk2/Mk3
Expansions), and radiators - those being the parts I want to work
plausibly later in the current game.

Link to post
Share on other sites
  • 3 weeks later...

I've posted a new version of the Module Manager config using some help from the MM thread, and which gives more realistic (high!) power requirements for Kerbal Foundries and stock wheels.

However, I've run into the first real tangle. IRL, the NSTAR uses 2.1kW for 92 mN thrust. The KSP Dawn uses 8.74EC/s for 2kN thrust. If the thrust isn't adjusted, the electricity requirement will be enormous (ie, circa 40 _MW_), but if the thrust is adjusted, first of all I'm stepping outside my remit of just correcting EC usage and not worrying about parts like reaction wheels that do the impossible with it, and secondly ion burns will take weeks. (Indeed, if solar powers that 40MW engine, the burn will take weeks anyway...)

I guess:

  1. if Persistent Thrust is installed, give the engine a realistic TMR and EC usage. It will only be useful with Persistent Thrust. No ion-powered aircraft or sticking rovers to Gilly with ions.
  2. If Persistent Thrust is not installed, since the Dawn masses almost exactly 10x as much as the NSTAR (with PPU, etc), increase the Dawn's EC draw by 10. This gives the "right" answer in terms of necessary solar/RTG capacity to run it, but gives you a lot of free thrust if you are, say, using a fuel cell to run it (where this is not a remotely practical option IRL).

But I could say, well, even step 1 is outside my remit, and it'll just cause annoyance while eliminating some options which, while unrealistic, aren't unrealistic in terms of EC usage.

Link to post
Share on other sites

Why not only work on stock parts for right now, get them working and balanced properly, and then worry about mods.

 Given the way the game has developed and mods have been written, you're not going to have all mods be compatible. But since the commonality of everything is stock parts, I figured it might be better to see get them fully balanced and making sense and then to move on to mods.

Edited by linuxgurugamer
Link to post
Share on other sites
2 hours ago, linuxgurugamer said:

Why not only work on stock parts for right now, get them working and balanced properly, and then worry about mods.

I'm not sure if you mean "why are you writing rules for specific mods?" or "why are you writing generic rules which will edit any part with a given function, rather than explicitly naming stock parts for conversion?"

The answer to the first question is I'm writing the mod I want to use; since I use Kerbal Foundries, ODFC, and Universal Storage (for example), I'm writing configuration to handle those parts. The order in which I'm doing things reflects what I'm trying to get done in my current game; I wrote the KSPWheel rebalancing bit before the ion engine bit because I'm building big rovers not tiny high-dV probes. Also, since this is my first nontrivial use of Module Manager, I've been doing things I do know how to do while hoping to get advice on things I don't.

The answer to the second question is that it's less work, and these generic rules naturally work on parts with stockalike balance, which I think the majority of mods out there try for. For example, "Hangar" hangars incorporate EC storage, solar generation, and ex nihilo EC generation representing RTGs, and their mass and cost is intended to partly reflect the mass and cost you'd otherwise have to bring in batteries, panels, and RTGs - saving part count, but nothing else. After CAMREC edits those hangars, they're still balanced relative to bringing CAMREC batteries, panels, and RTGs.

(Also, at least until I think of something else, radiators are the only stock part category I plan to address and haven't yet...)

Edited by damerell
Link to post
Share on other sites
3 minutes ago, damerell said:

I'm not sure if you mean "why are you writing rules for specific mods?" or "why are you writing generic rules which will edit any part with a given function, rather than explicitly naming stock parts for conversion?"

The answer to the first question is I'm writing the mod I want to use; since I use Kerbal Foundries, ODFC, and Universal Storage (for example), I'm writing configuration to handle those parts. The order in which I'm doing things reflects what I'm trying to get done in my current game; I wrote the KSPWheel rebalancing bit before the ion engine bit because I'm building big rovers not tiny high-dV probes. Also, since this is my first nontrivial use of Module Manager, I've been doing things I do know how to do while hoping to get advice on things I don't.

The answer to the second question is that it's less work, and these generic rules naturally work on parts with stockalike balance, which I think the majority of mods out there try for. For example, "Hangar" hangars incorporate EC storage, solar generation, and ex nihilo EC generation representing RTGs, and their mass and cost is intended to partly reflect the mass and cost you'd otherwise have to bring in batteries, panels, and RTGs - saving part count, but nothing else. After CAMREC edits those hangars, they're still balanced relative to bringing CAMREC batteries, panels, and RTGs.

(Also, at least until I think of something else, radiators are the only stock part category I plan to address and haven't yet...)

Ah, the trouble of answering a post with a phone.

I wasn't critisizing, just suggesting.  Most mods are made because someone want's something which isn't there, and you fit right in that category.

Since you have specific mods you want to work with, of course you should include those.  And generic rules are MUCH better than specific rules.  I meant that write your generic rules against the stock parts, when they work well for the stock parts, they should also work for mod parts.  Since stock parts are in every game, it would have wide appeal to other players.

I am looking forward to seeing what you come up with.

Link to post
Share on other sites
30 minutes ago, linuxgurugamer said:

I wasn't critisizing, just suggesting.  Most mods are made because someone want's something which isn't there, and you fit right in that category

Oh, I didn't read it as criticism, just as a straightforward suggestion.

While I'm here:

Russian RITM-200 icebreaker power plant: 175MW/1100 tonnes = 160 W/kg.

USI 0.625m nuclear power plant: 190 W/kg (@ 1EC = 1 kJ)

USI 3.75m nuclear power plant: 180 W/kg.

I guess I can leave those alone.

 

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.

×
×
  • Create New...