My calculation for optimal solar panel / accumulator ratio
Posted: Wed May 11, 2016 11:04 pm
I was trying to figure out the best ratio of solar panels to accumulators to optimize sanity. That is, I want a ratio that I can count on to work day and night and have a figure in my head for how much electricity I'm going to get from it. Wanting to 'do it on my own," I did a napkin calculation, and got a particular value -- 20 solar panels to 21 accumulators, yeilding 840kW of power -- which differs from the 21:25 'perfect' or the 20:24 'good enough' values I discovered on the Factorio wiki afterwards. I read a chunk of the posts that gave those calculations, and they're certainly solid. But the number I got was different, and I'm curious about why there's a difference. Anyway, here's what I did.
First, a few base facts and values. A solar panel generates 60kW during the daytime. A accumulator can store 5MJ. Factorio daylight lasts for 208.33s, dusk and dawn last for 83.33s, and night lasts for 41.66s. The solar panel's output scales linearly as time progresses through dusk and dawn, decreasing and increasing respectively.
My approach is to combine three things into an array: accumulators, 'output' solar panels, and 'charging' solar panels. The 'charging' solar panels (chargers) are there ONLY to charge the accumulators during the day, and won't be supplying electricity to the grid. The goal, then, is this: given some number of solar panels, how many accumulators do you need so that your electricity output from the array remains constant through the day?
Worded another way, this question is: for how long can one accumulator 'behave' like a solar panel? The answer is, for a fully-charged accumulator: 5MJ / 60kW = 5,000,000 / 60,000 = 83.33s. How long do we need? Well, during either dusk or dawn, the accumulators will be supplying half of the electricity from the array, while the output solar panels will be supplying the other half. While in reality this shift is a smooth gradient, there's a handy simplification I can make here, which is that I can consider the accumulators are supplying electricity for half of the time of dusk/dawn at a constant rate of 60W (I'm stealing a result from calculus, the mean value theorem of integrals if you're curious). So, in total, the accumulator will be supplying power for 41.66s (night) and 83.33s (combined halves of dawn and dusk) = 125s.
So, a full accumulator can supply 83.33s of 'solar panel' time, and we need 125s. So, that's 1.5 accumulators to act like one output solar panel all night long. As I have yet to figure out how to make half of an accumulator, let's just make that 2 output solar panels to 3 accumulators.
Now we need to add charging solar panels, or 'chargers.' The other side of the coin I mentioned earlier is that, during dusk and dawn, the solar panel will supply half of the electricity overall. So, that's 83.33s of 60kW, combined with the 208.33s of pure daylight 60kW, giving us 208.33s + 83.33s = 291.66s of 60kW, which translates to 291.66 * 60 = 17,499.6kJ = 17.5MJ (I'm rounding a touch). Since one accumulator can hold 5MJ, that means that over the course of one day, one solar panel can charge 17.5 / 5 = 3.5 accumulators!
What that means, simply put, is that one charger added to our 2 output solar panel / 3 accumulator array will not only charge all three accumulators, but have half of an accumulator's worth of charge left over. Since we want whole numbers, I will keep adding 2:3 groups to the overall array until I get six of those leftover halves -- that is, 3 free accumulators worth of charge -- so I can add a seventh 2:3 group with no chargers needed. This means that I've no wasted charging going on, and everything is nice and tidy.
What this means is that I've got 7 groups of 2:3, with 6 solar chargers, bringing my total solar panel count to 20, and my total accumulator count to 21. So, my final ratio here is 20 solar / 21 accumulator. Of course, the array in total is only supplying 14 output solar panels worth of electricity, which is 14*60kW = 840kW. But, that's a known quantity, and you can plan your base accordingly.
So. 20:21, 840kW of uninterrupted power. Is there anything wrong here? The numbers seem unusually nice to me -- they were kind of spot on in a lot of cases! Or... did I just rediscover something I didn't encounter earlier?
First, a few base facts and values. A solar panel generates 60kW during the daytime. A accumulator can store 5MJ. Factorio daylight lasts for 208.33s, dusk and dawn last for 83.33s, and night lasts for 41.66s. The solar panel's output scales linearly as time progresses through dusk and dawn, decreasing and increasing respectively.
My approach is to combine three things into an array: accumulators, 'output' solar panels, and 'charging' solar panels. The 'charging' solar panels (chargers) are there ONLY to charge the accumulators during the day, and won't be supplying electricity to the grid. The goal, then, is this: given some number of solar panels, how many accumulators do you need so that your electricity output from the array remains constant through the day?
Worded another way, this question is: for how long can one accumulator 'behave' like a solar panel? The answer is, for a fully-charged accumulator: 5MJ / 60kW = 5,000,000 / 60,000 = 83.33s. How long do we need? Well, during either dusk or dawn, the accumulators will be supplying half of the electricity from the array, while the output solar panels will be supplying the other half. While in reality this shift is a smooth gradient, there's a handy simplification I can make here, which is that I can consider the accumulators are supplying electricity for half of the time of dusk/dawn at a constant rate of 60W (I'm stealing a result from calculus, the mean value theorem of integrals if you're curious). So, in total, the accumulator will be supplying power for 41.66s (night) and 83.33s (combined halves of dawn and dusk) = 125s.
So, a full accumulator can supply 83.33s of 'solar panel' time, and we need 125s. So, that's 1.5 accumulators to act like one output solar panel all night long. As I have yet to figure out how to make half of an accumulator, let's just make that 2 output solar panels to 3 accumulators.
Now we need to add charging solar panels, or 'chargers.' The other side of the coin I mentioned earlier is that, during dusk and dawn, the solar panel will supply half of the electricity overall. So, that's 83.33s of 60kW, combined with the 208.33s of pure daylight 60kW, giving us 208.33s + 83.33s = 291.66s of 60kW, which translates to 291.66 * 60 = 17,499.6kJ = 17.5MJ (I'm rounding a touch). Since one accumulator can hold 5MJ, that means that over the course of one day, one solar panel can charge 17.5 / 5 = 3.5 accumulators!
What that means, simply put, is that one charger added to our 2 output solar panel / 3 accumulator array will not only charge all three accumulators, but have half of an accumulator's worth of charge left over. Since we want whole numbers, I will keep adding 2:3 groups to the overall array until I get six of those leftover halves -- that is, 3 free accumulators worth of charge -- so I can add a seventh 2:3 group with no chargers needed. This means that I've no wasted charging going on, and everything is nice and tidy.
What this means is that I've got 7 groups of 2:3, with 6 solar chargers, bringing my total solar panel count to 20, and my total accumulator count to 21. So, my final ratio here is 20 solar / 21 accumulator. Of course, the array in total is only supplying 14 output solar panels worth of electricity, which is 14*60kW = 840kW. But, that's a known quantity, and you can plan your base accordingly.
So. 20:21, 840kW of uninterrupted power. Is there anything wrong here? The numbers seem unusually nice to me -- they were kind of spot on in a lot of cases! Or... did I just rediscover something I didn't encounter earlier?