There is a lot of discussions & math going on these forums, about solar power & how many accumulators you need. However just the math isn't going to tell you how many solar panels your factory needs. To help myself (& now others) see how many solar panels I need, I made an Excel sheet with some calculations. If you input your factories power requirement & the number of solar panels/accumulators (edit any of the blue fields) it will show you how many you are short (or over) & which power usage you can support with your given solar panels.
Hope this will make it easier for everyone to plan their power needs!
I tested this with 300kw, but this is not right. It says that I need 8 Solar and 6 Accus, but this is not the real value. I believe the current power comsumption is not included in your calculations.
My calculations were that you need for 15 solar panels 13 (max 24) accus (for 300kw). Then you have a buffer (for laser turrets) and the accu capacity should never falling down to 0.
calc
A day lasts 108s, a night including dusk and dawn also lasts 208s (i dont calculate with fractions of avaiable solar performance).
I calculate with the needed performance of 300kw.
To provide the 300kw at day, you need only 5 solar panels (5 x 60kw = 300kw)
The amount of MJ you need in a night:
208s x 300 000W = 62 400 000J = 62,4MJ
1 accu can store 5 MJ so you need 12,48 = 13 accus for a night.
1 accu is charged completely in 16,7s with a performance of 300kw.
5 solar panels (5 x 60kw = 300kw) can charge 1 accu in 16,7s.
In 208s 5 solar panels loaded 12 accus.
So you need 10 solar panels to charge the 13 accus and you also have a buffer at day
You also can have 24 accus for a night. Or 18 accus to have a day and a night buffer.
=> 15 Solar panels & 13 (max. 24) accus.
Re: Solar Power Excel sheet
Posted: Sat Mar 28, 2015 8:39 am
by Koub
Your formulas don't take into consideration I might have 0 solar panels
By the way, it's hard to check if your formulas are right, too many things are in 'Math' and 'Constants' hidden sheets, with passwords everywhere. All we can do is put values in cells, make the calculations on a paper, and check if we agree on the result.
I'll just redo an Excel sheet for myself, was just too lazy until now.
Re: Solar Power Excel sheet
Posted: Sat Mar 28, 2015 1:24 pm
by Merroc
Natha wrote:I tested this with 300kw, but this is not right. It says that I need 8 Solar and 6 Accus, but this is not the real value. I believe the current power comsumption is not included in your calculations.
My calculations were that you need for 15 solar panels 13 (max 24) accus (for 300kw). Then you have a buffer (for laser turrets) and the accu capacity should never falling down to 0.
calc
A day lasts 108s, a night including dusk and dawn also lasts 208s (i dont calculate with fractions of avaiable solar performance).
I calculate with the needed performance of 300kw.
To provide the 300kw at day, you need only 5 solar panels (5 x 60kw = 300kw)
The amount of MJ you need in a night:
208s x 300 000W = 62 400 000J = 62,4MJ
1 accu can store 5 MJ so you need 12,48 = 13 accus for a night.
1 accu is charged completely in 16,7s with a performance of 300kw.
5 solar panels (5 x 60kw = 300kw) can charge 1 accu in 16,7s.
In 208s 5 solar panels loaded 12 accus.
So you need 10 solar panels to charge the 13 accus and you also have a buffer at day
You also can have 24 accus for a night. Or 18 accus to have a day and a night buffer.
=> 15 Solar panels & 13 (max. 24) accus.
You are not taking into account that your with more than 5 solar panels you are still making more power after dusk starts.
For the day, I agree, 5 solar panels. For night (without dusk) you need 12.5 MJ of power (=2.5 accus).
For dusk & dawn the math should take into account that with more than 5 panels you are still charging for some part of the dusk & dawn. In case of 8 solar panels you are still charging your accus for 1875 ticks of the 5000 ticks that a dawn (or dusk) lasts. Only for the 1876th tick and onwards you actually need an accumulator.
more math
If you have 15 solar panels you are only generating 300kw 3333 (55.5 sec) ticks into the night.
15 solar panels produce 900kW, which will linearly drop to zero at start of night, so in 5000 ticks. That results in 3 W per tick of 'decay' (or 3*60 = 180 W per second).
You only need 300kW, so 600 kW is excess, divide 600 by 0.18 = 3333 ticks.
Since it's linear you can also see that 300 is 1/3rd of 900, you are at break even after 2/3rds.
For the remaining 1667 ticks you need accu power. As there is still a linear decrease in solar power, there is a linear increase in accu power of 3 W per tick. So basically you're trying to determine the surface of a triangle with a 90° corner. For which the math would be 'right side 1' * 'right side 2' / 2.
One of the sides is the used power (300 kW), the other is the amounts of ticks from break even to full night (1667).
So the power needed in one dusk is 300.000 * (1667 / 60) / 2.
Which comes down to 4.17 MJ. Of course you have dusk & dawn, so you need to multiply by 2 = 8.34 MJ. Or in other words 2 accus.
Together with the night you will need just a tad over 20MJ (20.84 exactly), so 5 accus as we round up.
Panel math
To calculate the needed solar panels you would just need to know the total power requirement in a full day. In this case 300kW * the number of seconds in a day (416.7) that comes to 125MJ.
Furthermore you need the production of one solar panel in a full day. Keep in mind, dusk is linear downwards, dawn is linear upwards & night is 0. As dusk & dawn is both the same triangle with a right edge, the sum of both is a square with sides the panels production & the lenght of dawn (or dusk).
So day: 208.3 * 30kW = 12.5 MJ
Dusk + dawn = 83.3 * 30kW = 5 MJ
Night = 0 MJ
In a full day, one panel makes 17.5 MJ.
We needed 125 MJ, so divide those to results in 7.14, or rouned up = 8.
Koub wrote:Your formulas don't take into consideration I might have 0 solar panels
By the way, it's hard to check if your formulas are right, too many things are in 'Math' and 'Constants' hidden sheets, with passwords everywhere. All we can do is put values in cells, make the calculations on a paper, and check if we agree on the result.
I'll just redo an Excel sheet for myself, was just too lazy until now.
You are right, I didn't consider the fact that there might be 0 solar panels. Chances are however you have some lying around .
If you want to unlock anything to verify, I forgot to mention the password:
Factorio!
Re: Solar Power Excel sheet
Posted: Sat Mar 28, 2015 2:39 pm
by Natha
i think you cant construct the best proportions of solar panels and accus without buffer. Either the solar panels produce at day too much energy or you have too much accu capacity...
and its very difficult to calculate the production that each second the avaiable performance of each solar panel will be used. That comes from the inappropriate values of day-night-time and performances of solar panels and accus. But i think it is not bad if at the end of day and in dusk/dawn some avaiable performance of solar panels or rather at the and of night some remained energy in accus will not be used respectively is lost.
and i think there are differents between our calculations because yoou calculate with the needed energy of completely day (inc. night, dawn and dusk), so there are excess and shortage, and i calculate with the each second needed performance.
Re: Solar Power Excel sheet
Posted: Sat Mar 28, 2015 3:54 pm
by Merroc
If you have stable power requirements and meet the mimimum calculated, you will have (near) dry accus after solar panels pick up again and at the start of night, the accus are just full. I've seen this myself ingame.
The biggest problem is that power requirements aren't stable over time and could vary greatly, depending on production. However any model that only calculates mimimums will have this problem, hence it's mimimum. What the model does tell you is that if you have less than the mimimum, you will run out of power at night for sure. I've also seen this ingame (both too little solar panels, or to little accus).
It should be possible to model power consumption, production & accu levels in a graph (per second, or per tick), from the figures in my model.
Re: Solar Power Excel sheet
Posted: Sun Mar 29, 2015 12:32 am
by Khyron
For each megawatt of power you need, build 23.8 solar panels and 20 accumulators.
If you're curious on the math, view the thread where we worked it out.
Re: Solar Power Excel sheet
Posted: Sun Mar 29, 2015 6:44 am
by Natha
it should be clear that there can be multiple approaches.
my other calculation (the night includes dusk and dawn again, because its too difficult calculate with the linear decrease):
1 solar panel procudes with a performance of 60kW, so 30kW are used for consumption at day and the other 30kW are used to store the energy for night.
I also assume from a needed performance of 300kW.
So if you have 10 solar panels, 300kW are used to provide energy at day and 300kW to store the energy.
1 accu (dis-)charges completely in 16,66667s with 300kW. So 10 solar panel can charge at day (208s) 12,48 accus.
You need at night 62,4MJ energy, and exactly this amount provide 12,48 accus.
=> 10 solar panel + 13 accus for each 300kW (each 600kW 12 accus).
Re: Solar Power Excel sheet
Posted: Wed Apr 29, 2015 12:01 pm
by MeduSalem
Hypothetically the 23.8 panels/20 accumulators for 1 MW would be perfect. The ratio is known for a very long time now and the discussion could stop right there as the solution has been found a year ago.
But realistically it never really works out that way. Just never. At least not without peaceful mode.
The problem is that we have to defend our bases. Most commonly that is done by laser turrets... and that's when stuff just gets way too complicated to be pinpointed around a golden ratio.
If you design the solarfarm to match your average consumption you will pretty much end up powerless during heavy attacks no matter if your setup matches the perfect ratio. And if you put more panels/accumulators than you need to cover the attacks then the ratio doesn't really matter anymore since the perfect ratio only kicks in during the consumption spikes when the turrets get ready for a heavy attack. The rest of the time you have either too many solar panels or too many accumulators depending on your perspective and realistically you have too many of both but you need them because otherwise you are doomed when you run out of power before sunrise.
So no matter which way you go about the problem, the perfect ratio is an illusion and not worth to be executed in most games other than in peaceful mode ones when biters never attack.
That's why I stopped bothering with Solar Farms a long time ago, wasting too much space and no amount of math will prevent you from the eventuality of a blackout, especially if you drive them at the edge where the ratio would actually matter.