GTNewHorizons / GT-New-Horizons-Modpack

New Modpack with Gregtech, Thaumcraft and Witchery
https://www.gtnewhorizons.com/
Other
968 stars 298 forks source link

Pollution scrubbed by air filter is not correct. #15573

Open DeveloperLewis opened 7 months ago

DeveloperLewis commented 7 months ago

Your GTNH Discord Username

leeewiisss

Your Pack Version

2.5.1

Your Server

sp

Java Version

Java 21

Type of Server

Single Player

Your Expectation

I have an electric air filter with an mv energy hatch and 8 mv mufflers. This should scrub 1350 pollution a second

The Reality

It only scrubs 1280 to begin with. I have 2 of these air filters and they scrub a combined 2560. However in the isolated chunk with pyrolose ovens and a coupel generators (1500 pollution a second total) the pollution still rises. This shouldn't be the case as there is 1060 roughly that should be scrubbed every cycle. But after hours it still does not go down.

Your Proposal

It feels like its half of what the air filters are saying they are scrubbing. 64/t feels like 32/t. Up the amount to 128/t or just double the overall pollution scrubbing?

Final Checklist

AbdielKavash commented 7 months ago

Would you mind answering a few questions for me to help narrow it down:

DeveloperLewis commented 7 months ago

Sure no problem!

AbdielKavash commented 7 months ago

It looks like you are falling victim to rounding of small numbers.

Every MV muffler contributes to pollution cleaning rate by an additive factor of 2.5^2 = 6.25, which gets rounded to 6. With 8 such mufflers, this is 8 * 6 = 48. The base cleaning rate is 30, your turbine efficiency is 0.9 (90%), which gives 30 48 0.9 = 1,296 pollution cleaned per second. This is the actual amount that the filter really does. Scanning it gives you the amount per tick, which is 1,296 / 20 = 64.8, which gets rounded to 64, as you can see. This appears correct.

With three air filters like this, you are clearing 3 * 1,296 = 3,888 pollution/sec.

A pyrolyze oven produces 300 pollution per second with an LV muffler, or 261 with an MV one (I don't know which one you are using). Generators (assuming gas turbines?) produce 200 pollution per second if they are LV, or 180 pollution per second if they are MV.

Together, with LV mufflers on the pyrolyze ovens and LV generators, you are making 4 * 300 + 12 * 200 = 3,600 pollution/sec.

If you are using MV mufflers and MV generators, this is 4 * 261 + 12 * 180 = 3,204 pollution/sec.

While yes, you should be cleaning pollution faster than you are making it, the margin might be thinner than you think. Possibly you have some other polluting machines running nearby (Vanilla furnaces? Coke ovens?), or pollution spilling in from other adjacent chunks. Or maybe the pollution amount in your chunks is so large that it is really just taking the filters a long time to go through it all.

Let me know if my math matches yours.

DeveloperLewis commented 7 months ago

Oh that makes sense I forgot about the floor(). In the questbook it says something different but the controller includes the floor() into the formula. However the controller removes the mufflers so its a little confusing. The pyros are using mv muffler hatches. My gas turbines should only produce 36 pollution per second I thought, not 180? The ingame tooltip says this so maybe its different? image

So there should be a significantly higher amount of pollution scrubbing than pollution created so its a little confusing still. I don't have any other chunks aside from those 2 creating the pollution to begin with. The pollution in my chunks are relatively small (500k).