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

Solar panels rebalance #67508

Closed
wants to merge 20 commits into from
Closed

Conversation

Alm999
Copy link
Contributor

@Alm999 Alm999 commented Aug 7, 2023

Summary

Balance "Solar panels rebalance"

Purpose of change

With recent changes to electric energy consumption current solar panels have become inadequate. They are too heavy for their output.

resolves #67498

Describe the solution

I've adjusted the panels based on what others have find ( #67498 ) and my own findings.

The changes are:

  1. basic "solar cell" has an output of 25W, is made primarily of silicon (density of 2.33 kg/l) and has a mass of 1.1 kg and a volume of 470 ml;
  2. basic "solar array" is made of 8 solar cells, has electric output of 200 W and can be mounted onto vehicle (mass and volume have been adjusted based on the "solar cell" data);
  3. a "stationary solar array" consists of 16 "solar cells", has output of 400 W and can not be mounted onto vehicle rooftop;
  4. all derived types have been adjusted proportionally, with the exception of "foldable" ones. These shall have the same performance as the non-foldable ones because they are literally made of them, have the same amount of cells and some added mass (extra hinges, locks, frames and wires).

Describe alternatives you've considered

As was noted, we do not currently have IRL analogues to "advanced" types commercially available. This requires further investigation and adjustments.

Testing

The items are in the game. I still can not deploy "stationary solar array" from a construction menu, even if the "disconnected stationary solar array" (E)xamine window says I can place it as an appliance. Needs further work.

UPDATE: Construction recipes added to the (*) menu

Additional context

TODO:

  1. review the crafting recipes: maybe we need a proper steel frame for "stationary solar panel"; -- DONE: steel frame is too heavy (20 kg), aluminum one shall do;
  2. define max. length and form or the panels. Assume a cell is square? If so, a 4x2 for a basic solar panel and 8x2 for a stationary one? -- DONE: settled for a 0.44 x 0.3 m rectangle and 3.5 mm thickness for a solar cell; panel shapes are derived from this;
  3. make a bogus "f_stationary_solar_panel" furniture item that could replace current fake solar panels atop of some stores / houses (not all of them, though. I think that lone solar panel on an evac. shelter's roof shall stay :) ) -- DONE;
  4. fix tests. -- DONE.

Alm999 added 4 commits August 7, 2023 17:13

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
vehicle solar array = 8 solar cells
stationary solar array = 16 solar cells

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
@github-actions github-actions bot added [JSON] Changes (can be) made in JSON Vehicles Vehicles, parts, mechanics & interactions Appliance/Power Grid Anything to do with appliances and power grid Game: Balance Balancing of (existing) in-game features. labels Aug 7, 2023
@github-actions
Copy link
Contributor

github-actions bot commented Aug 7, 2023

Spell checker encountered unrecognized words in the in-game text added in this pull request. See below for details.

Click to expand
  • An electronic device that can convert solar radiation into electric power. It is mot mountable on a vehicle and is intended to be mounted on a rooftop as an appliance. This model uses high-performsnce monocrystalline silicon cells.

This alert is automatically generated. You can simply disregard if this is inaccurate, or (optionally) you can also add the new words to tools/spell_checker/dictionary.txt so they will not trigger an alert next time.

@github-actions github-actions bot added json-styled JSON lint passed, label assigned by github actions astyled astyled PR, label is assigned by github actions labels Aug 7, 2023

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
data/json/items/vehicle/solar.json Outdated Show resolved Hide resolved
data/json/items/vehicle/solar.json Outdated Show resolved Hide resolved

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
@github-actions github-actions bot added Crafting / Construction / Recipes Includes: Uncrafting / Disassembling <Bugfix> This is a fix for a bug (or closes open issue) labels Aug 7, 2023
Alm999 and others added 3 commits August 7, 2023 19:36

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
Co-authored-by: Anton Simakov <[email protected]>

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
Co-authored-by: Anton Simakov <[email protected]>
@Calavera20012
Copy link

Hope a rework for wind power comes at some point too (maybe they are accurate just not very efficient? idk) to put it on par with this. Awesome work!

Alm999 added 4 commits August 8, 2023 12:47

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
@github-actions github-actions bot added the Fields / Furniture / Terrain / Traps Objects that are part of the map or its features. label Aug 8, 2023
Alm999 added 2 commits August 8, 2023 13:37

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
@ampersand55
Copy link
Contributor

Hope a rework for wind power comes at some point too (maybe they are accurate just not very efficient? idk) to put it on par with this. Awesome work!

I looked into it and you are right. See #67533.

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
Alm999 added 3 commits August 9, 2023 16:39

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
@github-actions github-actions bot added [C++] Changes (can be) made in C++. Previously named `Code` BasicBuildPassed This PR builds correctly, label assigned by github actions labels Aug 9, 2023
@GuardianDll
Copy link
Member

any reason it's still draft?

@Alm999
Copy link
Contributor Author

Alm999 commented Aug 9, 2023

any reason it's still draft?

I want others to speak out and possibly verify my changes. Maybe there are some stupid oversights. Other than that, I can convert if everything is OK.

@snipercup
Copy link
Contributor

make a bogus "f_stationary_solar_panel" furniture item that could replace current fake solar panels atop of some stores / houses (not all of them, though. I think that lone solar panel on an evac. shelter's roof shall stay :) )

What do you mean by this? Shouldn't the solar panels that are mounted on top of roofs return the new stationary_solar_panel instead of the current solar_panel?

@estebandellasilva
Copy link

estebandellasilva commented Aug 9, 2023

Maybe for a Future PR there could be some kind of "advanced" version of a solar panel with some motors (for vehicle use you would have to deploy them) which can follow the sunlight and have a certain tilt + a controller who can controll them for a better yield
image
as flat mounting is not the best regarding the output of the solar panel (on vehicle they should be deployable and so on and cause drag if you drive with them deployed)
this is supposed to increase production betwen 25% and 40% (according to the website where i stole this image)

@Alm999
Copy link
Contributor Author

Alm999 commented Aug 9, 2023

Maybe for a Future PR there could be some kind of "advanced" version of a solar panel with some motors (for vehicle use you would have to deploy them) which can follow the sunlight and have a certain tilt + a controller who can controll them for a better yield

I have been pointed out that this was considered back when the new "irradiance" model was implemented in #59179 but was deemed too complex and taxing for too little gain. Right now in order to compensate for "optimal placement" all "appliance" solar panels receive a silent 20% power boost compared to their "vehicle" variants.

What do you mean by this? Shouldn't the solar panels that are mounted on top of roofs return the new stationary_solar_panel instead of the current solar_panel?

No, mounted solar panels return plain "solar panels" just as it was before. All existing map templates shall work as usual (apart from the increase in output of the panels). There are new "stationary solar panels" (decorative furniture) introduced with this PR that can be converted into new "stationary solar panels" (appliance) upon being inspected. Right now there are no occurrences of such "furniture" being placed anywhere on the map templates, this would require a separate PR and revision of existing templates. Like, the freshly introduced "Solar Farm"(#67275) could probably use some in lesser quantity than current abundance of normal "solar panels". What I've said about panels on the roofs of evac. shelters was purely my suggestion. All the options are available to map creators.

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
@Alm999
Copy link
Contributor Author

Alm999 commented Aug 10, 2023

I've made some final tests (I knew it! There was a small bug with a missing name!). I think this PR is ready.

@Alm999 Alm999 marked this pull request as ready for review August 10, 2023 05:23
Copy link
Member

@kevingranade kevingranade left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You need to show your work that justifies quadrupling power output of the existing solar panel part and demonstrate that your changes result in correct power production given new England area latitude and flat mounting. I'm very skeptical that the status quo is that far off.

Your statements about advancements in panel technology and changes to appliance power draw are irrelevant, I just need to see your justification for how much power these would produce after your changes.

@Zireael07
Copy link
Contributor

Real life solar panels apparently have a wattage of between 250 W and 400 W, so both numbers check out.
https://news.energysage.com/what-is-the-power-output-of-a-solar-panel/

(Real life panels have 60 cells or 72 cells apparently)

Solar Atlas info for New England: https://globalsolaratlas.info/map?c=44.205708,-70.753784,5&s=44.205708,-70.753784&m=site

Here come lots of deets: https://globalsolaratlas.info/detail?c=44.205708,-70.753784,5&s=44.205708,-70.753784&m=site&pv=small,180,39,1

I can't quite figure out how to apply this to the game since Solar Atlas gives amounts per day or year.

PVOUT seems to be around 3.5-3.9 kWh/kWp

@ampersand55
Copy link
Contributor

ampersand55 commented Aug 11, 2023

You need to show your work that justifies quadrupling power output of the existing solar panel part and demonstrate that your changes result in correct power production given new England area latitude and flat mounting. I'm very skeptical that the status quo is that far off.

Your statements about advancements in panel technology and changes to appliance power draw are irrelevant, I just need to see your justification for how much power these would produce after your changes.

Here is an attempt at a justification:

There are a couple of ways to measure solar potential. One standard measures how much electricity a square meter solar panel will produce in a day if installed pointing directly up. By this metric, the cloudy New England states are near the bottom, according to the National Renewable Energy Laboratory. Most of New England sits between 4 kWh and 4.5 kWh per square meter per day. At the other end of the spectrum, the same square meter solar panel in New Mexico and Arizona will likely produce closer to 7 kWh.

https://www.cnet.com/home/energy-and-utilities/new-england-solar-panels/

The proposed solar panels with 2x8 cells are close to 1 square meter (4 x 2 x 0.44 m x 0.3 m=1.056 m^2), so they should produce 4.25 kWh per day (4250 Wh / 24 h = 177.1 W average).

Note that solar panels:

  1. Only produce in daylight
  2. Have a lower production when not sunny weather
  3. Installed (non-vehicle) solar panels are likely angled towards the sun for better efficiency.

I did a quick test in game where I let a single 200W solar panel run for one in game week in spring (with portal storms disabled) and it produced 40120 battery charge (kJ), which is 11.144 kWh, or 1592 kWh per day or 66.31 W average, which is only 37.44 % of the value reported by the National Renewable Energy Laboratory for New England. This would mean that the in-game solar panels should be closer to 534 W to match real-life values.

@kevingranade
Copy link
Member

Real life solar panels apparently have a wattage of between 250 W and 400 W, so both numbers check out.

It very much does not check out, we're looking at output per square meter, not per "panel" which is variable in size. The 250W panels from your sources are close to one square meter, and the 400W panels are about 2 square meters, which means the current values are correct, not the ones from this PR.

Most of New England sits between 4 kWh and 4.5 kWh per square meter per day.

Please point to where in the research paper this is substantiated. The closest I can find is a chart included from another paper showing tilted panel production per square meter, which is a completely different thing.

@ampersand55
Copy link
Contributor

ampersand55 commented Aug 12, 2023

Please point to where in the research paper this is substantiated. The closest I can find is a chart included from another paper showing tilted panel production per square meter, which is a completely different thing.

The National Renewable Energy Laboratory has a calculator for what effect to expect:

Site: https://pvwatts.nrel.gov/pvwatts.php

Technical manual: https://www.nrel.gov/docs/fy14osti/62641.pdf

Optimistic:

  • Location: Boston
  • DC System Size (kW): 0.2
  • Module type: Premium
  • Array Type: Fixed (roof mount)
  • System Losses (%): 0
  • Tilt (deg): 0
  • Total: = 261 kWh / y = 29.79 W average.

Pessimistic:

  • Location: New Hampshire
  • DC System Size (kW): 0.2
  • Module type: Standard
  • Array Type: Fixed (roof mount)
  • System Losses (%): 14.08
  • Tilt (deg): 0
  • Total: = 215 kWh / y = 24.54 W average.

With a 30 degree tilt you can add 19% output.

In my in game test a 200 W panel produced an average of 66.31 W, The discrepancy can partly be explained with 200 W panels having a smaller area than 1 square meter and that calculate use AC/DC conversion and inversion losses which wouldn't be applicable in a vehicle.

In my research in #67498, the most common panels being sold were 400W and 1.4 square meter, with the 300W versions being 0.97 m^2. Most of the 400 W were intended for house roofs and most 300 W were for RV use with light-weight aluminum frames.

@kevingranade
Copy link
Member

Your testing indicates that 200W is at least 2x as high as it should be, and I would argue that you're actually looking at something like a 140W panel on one tile of a car, meaning the right epower value to set is right around 50W.

The same applies to the fixed panels, they can be a full square meter and tilted, but you're still looking at an in-game setting around 150W or so to get the year round powet generation to be in the right neighborhood.

@ampersand55
Copy link
Contributor

In my testing, a 200 W panel produced 66.31 W average, about 1/3rd of its rating. Assuming it's linear, it would mean that the current 50 W solar panels produce 16.66 W average over a day which is quite a bit lower than the 25-30 W average of the predicted by the site.

The site assumes a 1.2 DC to AC Size Ratio and 96% inverter efficiency, so that would be a direct 25 % increase as we're not converting to AC for vehicles.

If we allow the panels to be 1 square meter then the 300 W versions would be more applicable for modern panels. Then, if we're generous and go by the optimist scenario, the average output would be 30 * 1.25 * 1.5 = 56.25 W avg power, which isn't that far from the 66.31 W measured in game.

If we allow solar panels installed as appliances to use DC and to have a 30 degree tilt then it pretty much exactly matches the measured value.

@Alm999
Copy link
Contributor Author

Alm999 commented Aug 12, 2023

@kevingranade

Your testing indicates that 200W is at least 2x as high as it should be, and I would argue that you're actually looking at something like a 140W panel on one tile of a car, meaning the right epower value to set is right around 50W.

I don't think it works that way. "epower" is maximum power output at full solar exposure, not the average power produced by the "tile".
A common solar panel has 1.056 m2 of area. According to https://en.wikipedia.org/wiki/Direct_insolation the simplified formula for " Direct normal irradiance " is

I = 1.353 * 0.7 ^ (AM^0.678) ,
AM = 1 / cos LAT
Boston is at LAT = 42N, so AM = 1.346.
I = 0.875 kW/m2
For a solar panel area the input is 0.875 * 1.056 = 0.92 kW.
If we take the energy conversion efficiency of 0.21 then we get the 0.92*0.21=0.193 kW, or 193 W of "maximum" output.

@kevingranade kevingranade added the (S4 - Invalid) wontfix / can't reproduce / notabug label Sep 27, 2023
@kevingranade
Copy link
Member

The evidence presented supports the status quo, not a change.

@Alm999
Copy link
Contributor Author

Alm999 commented Sep 29, 2023

@kevingranade
Care to show your calculations confirming current solar panels are adequate?

So far I've not seen any explanations the 50W output from a 14kg panel is justified… Only your word.

@pwalsh0
Copy link

pwalsh0 commented Oct 6, 2023

The figures are really obviously too low, by a factor of x3 at least.

We all have these frickin things on our roofs now and know how much they produce.

The in-game ones currently produce 50W - which would correspond to a miserable 0.3m2 panel for little babies.

The calculations involved here are really simple - the guys have proved the math above.

A simple example: Average domestic solar setup today is say 5kW. To produce this in-game needs 100 of those panels! Good luck finding that many in an entire city.

To start with lets just buff the panels to 100W and see how it goes.

@Alm999
Copy link
Contributor Author

Alm999 commented Oct 12, 2023

Kevin doesn't see a problem. Apparently, if he thinks current solar panels are adequate, that's it. No way of arguing.

@GuardianDll
Copy link
Member

Isn't #68603 is essentially what Kevin told about?

@Alm999
Copy link
Contributor Author

Alm999 commented Oct 12, 2023

As far as I can understand, the #67508 introduces "arrays" consisting of 4 ordinary panels.
There seems to be a mismatch between item and appliance naming:
solar panel (item) -> "small solar panel" (appliance)
solar panel array (item) -> "solar panel" (appliance)

Other than that, it seems to be just what was proposed in this PR (roughly). Oh, and foldable solar panels are still trash for no reason.

This was probably merged because Kevin hasn't seen it (he is not in the reviewers).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Appliance/Power Grid Anything to do with appliances and power grid astyled astyled PR, label is assigned by github actions BasicBuildPassed This PR builds correctly, label assigned by github actions <Bugfix> This is a fix for a bug (or closes open issue) [C++] Changes (can be) made in C++. Previously named `Code` Code: Tests Measurement, self-control, statistics, balancing. Crafting / Construction / Recipes Includes: Uncrafting / Disassembling Fields / Furniture / Terrain / Traps Objects that are part of the map or its features. Game: Balance Balancing of (existing) in-game features. [JSON] Changes (can be) made in JSON json-styled JSON lint passed, label assigned by github actions (S4 - Invalid) wontfix / can't reproduce / notabug Vehicles Vehicles, parts, mechanics & interactions
Projects
None yet
9 participants