Page 1 of 1

Calculating accumulator discharge time

Posted: Fri Apr 01, 2016 5:10 am
by JasonC
I'd like to be able to calculate how many fully charged accumulators I'd need to get my factory through a night given my factory's typical power consumption in watts.

The problem is I don't understand this game's units of time or how long night is.

So a single accumulator holds 5 MJ and can output 300 kW max.

In the real world 5 MJ = 1.39 kWh, so at max output an accumulator would last 1.39 kWh / 300 kW = 16.67 seconds.

But what's an "hour" in this game and how long is night? I cant do calculations in kWh because I'm not sure how long an "h" is.

It does seem to take about 16-17 seconds for an accumulator to charge at its max rate so I think this is wall time. Is this correct?

Re: Calculating accumulator discharge time

Posted: Fri Apr 01, 2016 5:27 am
by Bart
https://wiki.factorio.com/index.php?tit ... imal_ratio

21 accumulators per 25 solar panels. I think that you can calculate your needs with that information ;).

Re: Calculating accumulator discharge time

Posted: Fri Apr 01, 2016 5:42 am
by JasonC
I think I got it. It appears to be wall time from some tests. And according to https://wiki.factorio.com/index.php?title=Game-day, dusk/night/dawn = 83/42/83 seconds, respectively. Since the transitions are linear we can estimate and say we need 83/2 + 42 + 83/2 = 125 seconds of accumulator charge time to get through the night.

So if our factory needs 2 MW for 125 seconds that's:

2 MW * 125 seconds = 250 MJ (a Joule is a Watt-Second)
250 MJ / 5 MJ = 50 accumulators

And a test showed that it's pretty much spot on.

A good rule of thumb is 25 fully charged accumulators per MW required to get you through the night on accumulators alone.

Re: Calculating accumulator discharge time

Posted: Fri Apr 01, 2016 5:50 am
by JasonC
Bart wrote:https://wiki.factorio.com/index.php?tit ... imal_ratio

21 accumulators per 25 solar panels. I think that you can calculate your needs with that information ;).
Yeah I've read that but I never really quite accepted it, although I appreciate the guy's effort. It doesn't matter how many solar panels you have, only how much power you need, because if you have too many solar panels, you don't need more accumulators. The limiting factor is power consumption, not generation. If I have three times as many solar panels as I need, it's not exactly optimal to just blindly follow that math and throw in three times as many accumulators that will never be fully discharged.

Re: Calculating accumulator discharge time

Posted: Fri Apr 01, 2016 5:50 am
by Koub
Remember that your accumulators start to be drained only when your solar panels start to be unable to produce enough power for your factory. Your 125 seconds are a wrong hypothesis.

Re: Calculating accumulator discharge time

Posted: Fri Apr 01, 2016 6:46 am
by JasonC
Koub wrote:Remember that your accumulators start to be drained only when your solar panels start to be unable to produce enough power for your factory. Your 125 seconds are a wrong hypothesis.
Well, it's the upper bound.

It'd be the worst case, where you have precisely the amount of solar panels necessary to power your factory plus charge the accumulators fully in one daylight cycle, and no more.

If you added a few solar panels you could sacrifice some accumulators since the solar panels would last a bit longer during dusk and dawn (another reason why I don't really like to go by the math in that other thread, it's not a bad rule of thumb to talk about accumulator : solar panel ratio, but it's not really a meaningful ratio).

Whether its worth it or not to do that I don't know, guess it depends on how many extra batteries you've got laying around. I'll leave it up to somebody with more motivation to figure out a raw resource (and power consumption when manufacturing) trade-off.

Re: Calculating accumulator discharge time

Posted: Fri Apr 01, 2016 8:07 am
by Bart
JasonC wrote:
Bart wrote:https://wiki.factorio.com/index.php?tit ... imal_ratio

21 accumulators per 25 solar panels. I think that you can calculate your needs with that information ;).
Yeah I've read that but I never really quite accepted it, although I appreciate the guy's effort. It doesn't matter how many solar panels you have, only how much power you need, because if you have too many solar panels, you don't need more accumulators. The limiting factor is power consumption, not generation. If I have three times as many solar panels as I need, it's not exactly optimal to just blindly follow that math and throw in three times as many accumulators that will never be fully discharged.
The optimal accumulator/panel ratio obviously assumes that you have an optimal amount of panels (to be specific: your panels produce exactly the power you consume). If that is the case, the ratio gives you an optimal amount of accumulators, precisely enough to get you through the night. If you have three times too many panels, then you can have 7 accumulators for every 25 panels, in stead of 21.

Re: Calculating accumulator discharge time

Posted: Fri Apr 01, 2016 10:06 am
by BlakeMW
The 21:25 ratio is useful, the other useful thing to remember is that solar panels generate on average 42kW over a day, so you can take your peak usage in MW and divide it by 0.042 to find out exactly how many solar panels you need, then you can multiply the number of solar panels by 0.84 to find how many accumulators you need. This is useful for instance if you have an outpost of mining drills and want to build only as many solar panels and accumulators as are required.

Re: Calculating accumulator discharge time

Posted: Fri Apr 01, 2016 10:21 am
by JasonC
BlakeMW wrote:... the other useful thing to remember is that solar panels generate on average 42kW over a day, so you can take your peak usage in MW and divide it by 0.042 to find out exactly how many solar panels you need ...
Thanks. I just arrived at that same ratio, can definitely confirm 0.042 (it's about 24:1 solar panels to MW): viewtopic.php?p=143317#p143317

Jackielope has a nice little square with a 6:5 panel:accumulator ratio in that thread. One of those squares per MW just about nails it. It's nice when numbers line up cleanly.

My initial 25:1 accumulator:megawatt ratio above is a bit high, it's more like 21:1.

Anyways the direct answer to my original question is the time unit in energy units here (like MJ) is game time, so game seconds etc. can be used in all the math. I just wasn't familiar with how time ran in the game but probably should have just searched the wiki first, it's right there. So a 5 MJ accumulator will give you 300 kW for 16.67 game seconds.

Re: Calculating accumulator discharge time

Posted: Sat Apr 02, 2016 6:23 pm
by Major Tom
Did you remember to take into account that during the day you have to both power you network and charge your accumulators?

Re: Calculating accumulator discharge time

Posted: Sat Apr 02, 2016 7:54 pm
by JasonC
Major Tom wrote:Did you remember to take into account that during the day you have to both power you network and charge your accumulators?
Yep, that's what that ratio is. Check out the linked post.

But the direct question I had, I've got the answer to now; I was just trying to figure out how long a fully charged accumulator would last, I didn't know because I didn't have an understanding of game time (which I do now).