age-series / ElectricalAge

Electrical Age (ELN) is a Minecraft Mod offering the ability to perform large-scale in-game electrical simulations.
Other
66 stars 32 forks source link

Batteries overcharge and explode on v1.18.3a #263

Closed genestrashcan closed 3 years ago

genestrashcan commented 3 years ago

i figured out what causes this if it is a issue or just cleverly designed realism,

Batteries will overcharge and explode on v1.18.3a if you have them all wired properly and when fully charged remove one or two of them and replace the removed ones in the chain with ones that are half charged

Also Overvoltage and Overheating protection is unable to be placed in any batteries at all

how to easily reproduce

wire 2 large rotating solar panels properly to 4 life oriented batteries or some other similar setup where the voltage and wattages of the line and load nearly match. The batteries will charge like you expect it to, when they reach 100% they overcharge a bit to around 124 kj each and stop charging, remove one or two of them and replace them with undercharged ones and they explode.

Welbre commented 3 years ago

i figured out what causes this if it is a issue or just cleverly designed realism,

Batteries will overcharge and explode on v1.18.3a if you have them all wired properly and when fully charged remove one or two of them and replace the removed ones in the chain with ones that are half charged

Also Overvoltage and Overheating protection is unable to be placed in any batteries at all

how to easily reproduce

wire 2 large rotating solar panels properly to 4 life oriented batteries or some other similar setup where the voltage and wattages of the line and load nearly match. The batteries will charge like you expect it to, when they reach 100% they overcharge a bit to around 124 kj each and stop charging, remove one or two of them and replace them with undercharged ones and they explode.

Can you post some image/print, showing,how you have connect the batteries and them solar panels ?

Welbre commented 3 years ago

Looking to the Battery Charge Curves,we can see that, above the 100% charge, the battery will work in a voltage above the nomial, and when you put a new battery (half charged) the electric potential difference between the half charged battery and overcharge battery will do that the battery half charged explode due to high power. The batteries overcharge if you put a high voltage on them, forcing the charge to above the 100%, this high voltage can have be created by solar panels.

Maybe,this can be a cause of you problems.

genestrashcan commented 3 years ago

@Welbre @jrddunbr

i have provided some photos to help explain this weird bug i found further if it is a bug...

The first photo shows a setup with two 2x2 large rotating solar panels wired in series to 4 life oriented batteries wired in series with a 200 volt incandescent light wired in to generate a small load. If all 4 batteries charge level is the same they will charge normally and stop around 105%, as soon as you remove one and replace it with one that is half charged, one of the batteries in the chain will randomly explode.

2021-04-25_16 13 15

The second photo shows a larger setup with 8 large 2x2 rotating solar panels wired in series with 2 experimental batteries. The total output of the 8 panels totals around 4000w and the total draw by the batteries is around 4000w too. The first weird bug happens in either setup if it try to wire a load with transformers etc where the amount of power from the solar panels is double what the load batteries draw. For example if i use a transformer to drop the voltage of 800 volts from 8 large 2x2 rotating solar panels wired in series to drop the voltage to 50v, and wire a single life oriented battery to it properly, the battery will start charge and suddenly explode before it even reaches 100%.

2021-04-25_16 16 12

The third photo shows the charge on the batteries going over 100%

2021-04-25_16 15 50

The Fourth Photo shows the life oriented batteries have no slots for overvoltage and overheating protection chips and right clicking the batteries with the OV and OH chips in hand does nothing.

2021-04-25_16 37 41

jrddunbr commented 3 years ago

Batteries will overcharge and explode on v1.18.3a if you have them all wired properly and when fully charged remove one or two of them and replace the removed ones in the chain with ones that are half charged

Don't do this. Haven't you ever read instructions not to mix new and old batteries? Obviously it exploded..

Also Overvoltage and Overheating protection is unable to be placed in any batteries at all

This "feature" was removed in the 1.18.x branch as it was unrealistic and allowed players to not understand the battery mechanic but still use batteries (ie, they would do terrible things to battery and call it "correct" because it worked).

The first photo shows a setup with two 2x2 large rotating solar panels wired in series to 4 life oriented batteries wired in series with a 200 volt incandescent light wired in to generate a small load. If all 4 batteries charge level is the same they will charge normally and stop around 105%, as soon as you remove one and replace it with one that is half charged, one of the batteries in the chain will randomly explode.

Expected behavior, except I'm pretty certain it's more like 103%.

The second photo shows a larger setup with 8 large 2x2 rotating solar panels wired in series with 2 experimental batteries. The total output of the 8 panels totals around 4000w and the total draw by the batteries is around 4000w too. The first weird bug happens in either setup if it try to wire a load with transformers etc where the amount of power from the solar panels is double what the load batteries draw. For example if i use a transformer to drop the voltage of 800 volts from 8 large 2x2 rotating solar panels wired in series to drop the voltage to 50v, and wire a single life oriented battery to it properly, the battery will start charge and suddenly explode before it even reaches 100%.

Obey the current limits for your batteries.

The third photo shows the charge on the batteries going over 100%

Expected behavior, they explode just past 103% if I recall correctly. You can do this with real batteries to, but I would advise against it.

The Fourth Photo shows the life oriented batteries have no slots for overvoltage and overheating protection chips and right clicking the batteries with the OV and OH chips in hand does nothing.

Again, expected feature.

You should really read the limits on the batteries themselves. The only bugs I know of are the one where single use batteries are rechargeable, and that batteries sometimes reset their NBT instead of crashing the game, and are only 50% full on placement.

Please note that the watt limits are for the nominal voltage, and that they may have slightly different watt limits at different voltages, and remember that if your batteries don't use a ground as a reference for that power, that the power across the batteries may look much different from the power across the wires, and that the watts over the wires can be confusing.

I don't see any bugs here, if you want to address the two bugs I mentioned, you may write a PR. I'm not doing any more work on this branch and focusing on Eln2 development.

dfn8979 commented 7 months ago

For any people reading this, the last release that doesn't appear to have this new "surprise mechanic" where your batteries explode after loading this mod on an old save (apparently BMS-like devices are unrealistic now, despite 768MW cables being in the mod) is the "1.16.8 Stable (ish) Release". This version appears to be fully compatible with the older Electrical Age versions, unlike the newer versions that can break either existing batteries or shaft networks if loaded on an older save.

jrddunbr commented 7 months ago

The BMS device was removed because 1) it was the most expensive thing in the mod to simulate 2) it prevented people from designing their own, better battery charging system. Everyone was complacent with the batteries switching on and off each tick to prevent batteries exploding and it caused confusion when people tried to pull more current than it could handle. All the parts you need are available; a signal processor, voltage, current, and watt probes, and more.

Sorry it doesn't meet your stringent requirements, but we're doing what we can.

dfn8979 commented 7 months ago

I have no "stringent requirements" from any freely-available open-source software. It's just that when a change like this is made, there should typically be a warning about it like for shaft networks. I've looked through the release notes for all of the versions starting from 1.16.8 and as far as I can see there is nothing, absolutely nothing about batteries. Meanwhile a significant, potentially world-breaking change was introduced, completely silently, and then once someone dares to open an issue report about the silent change, they receive responses like this one:

Sorry it doesn't meet your stringent requirements, but we're doing what we can.

Or

Don't do this. Haven't you ever read instructions not to mix new and old batteries? Obviously it exploded..

which has:

A condescending tone: The phrasing "Don't do this" implies the speaker thinks the listener lacks basic knowledge. Is mocking and belittling: The questions "Haven't you ever read instructions..." and the word "obviously" are dismissive of the other person's possible lack of awareness. This suggests that the speaker is blaming them for what happened rather than offering helpful guidance. Is blame focused: "...Obviously it exploded" emphasizes the person's mistake rather than focusing on how to solve the situation.

jrddunbr commented 7 months ago

Yeah, I could have worded that better. It does sound condescending, and I'm sorry for it. We all have bad days sometimes.

Release notes are expectedly incomplete. You can read the commit log if you want to know everything that happened. The breaking changes for shaft networks are much more impactful than battery networks in my opinion, which is why an entire release branch warns for it. But, I can't warn about every change. Almost every release since then warns about taking backups of your world though. It will have to be good enough, I guess. I'm not going back to write release notes. Feel free to contribute that if you want to, but I see no need.

While I try to avoid breaking backwards compatibility too much between versions, it does happen. I'm not going to let stability between releases dictate forward progress on a hobby project - I do this because I enjoy writing the code for it and not because it's some corporate software that needs to support it. If I had to maintain backwards compatibility, I wouldn't contribute at all and the mod would have been dead years ago (or more than it already is to be honest). I let Eln2 development do its own thing, and it's pretty much dead too.

This is heading a bit off topic, so if you want to discuss the way the project is run or something else, I would suggest moving the conversation to the Discord linked on the website and out of this issue. Thanks.