Jump to content

This germ filter setup works, but how?


Recommended Posts

I've been trying to make use of the germ filter recently and found this setup. It was a small picture on a germ filter mod page, so no explanations. I've tested it in Sandbox and it works - from time to time, two germ-free packages pass through the top pipe. What I can't understand is how it works? Can someone please help and explain?

The germ sensor is set to below one germ, and germy water goes through a reservoir in chlorine.

Screenshot from 2020-11-11 13-09-31.png

Screenshot from 2020-11-11 13-08-52.png

Screenshot from 2020-11-11 00-56-25.png

Link to comment
Share on other sites

Why the heck are there two shutoffs and three outputs?  Germs should go down the pipe on the right.  Clean water passes through the first shutoff, but then for some reason is split between going out the pipe on the bottom left, and trying to go through the top shutoff, but will have to stop and wait for that shutoff to open until germs are detected again.  Where is that pipe supposed to go?

Link to comment
Share on other sites

Germ removal is actually done in the reservoir, water there is considered to be "surrounded by chlorine" resulting in germs dying quickly. The germ sensor plus the first shutoff performs filtering, germ-free water is let through the shutoff, germy water gets held back, probably going back to the reservoir to have some more germs removed. The two output pipes from the first shutoff might be a (not very efficient) solution to prevent the pipes from backing up which would break the filtering. The second shutoff makes no sense, it has no function as far as I can tell, just randomly limits the throughput for no reason.

Link to comment
Share on other sites

6 minutes ago, Urist McPilot said:

The two output pipes from the first shutoff might be a (not very efficient) solution to prevent the pipes from backing up which would break the filtering.

It wouldn't break the filtering.  It just would send germ free water back to the reservoir even though it doesn't need cleaned any more, but that's not a problem.

Link to comment
Share on other sites

51 minutes ago, Urist McPilot said:

The second shutoff makes no sense, it has no function as far as I can tell, just randomly limits the throughput for no reason.

If you try this without a second shutoff, you will see that with just one it does not work. Reservoir is not automated, no doors, free cycling of water.

Link to comment
Share on other sites

Well the germ sensor makes no sense as is: The signal reaches the shutoff before the packet does, so a germ-free packet sends the packet in front of it through the shutoff.

There's no way to know what happens thereafter though, due to the branch and second shut-off.

Link to comment
Share on other sites

28 minutes ago, Yunru said:

The signal reaches the shutoff before the packet does

It does not work like that, just build it and watch it: when a germy packet starts entering the sensor, the animation immediately starts to show a red signal, but the packet of water on the input of the shutoff at the same time acts based on the previous state of the shutoff. The next second, when the germy water has already left the sensor and is sitting on the input of the shutoff, it starts to move according to the red signal sent just before; animation immediately starts to show the signal generated by the next packet, but that does not change the shutoff state.

This mechanic works reliably given that the sensor is immediately before the shutoff input, and the flow does not get stopped.

1 hour ago, psusi said:

It wouldn't break the filtering.  It just would send germ free water back to the reservoir even though it doesn't need cleaned any more, but that's not a problem.

You are right, it would not break in the sense that it would not let germy water through, it would just fail to precisely split the input, which is probably irrelevant since the germ-free output is also split and I expect half of it goes back to the reservoir anyway... I was just trying to find some sense in it being there :)

33 minutes ago, miauly said:

If you try this without a second shutoff, you will see that with just one it does not work.

That may be true, but to understand that we will need to see the whole pipeline. I've built countless sensor+shutoff filters with germ sensors, temp sensors, material sensors, and they never failed me unless the pipe backed up.

Assuming that the two downward pipes both go back to the reservoir, and that the reservoir has some other input as well, the construction may be prone to occasionally blocking liquid flow, and if that happens on the right hand side pipe, it will result in germy water going through the filter. But the second shutoff will not solve that problem, it would just lower the chance that the bad packet goes the wrong way. Still, when you have a continuous flow of germy water, and the right hand side pipe is blocked right before the clean water arrives, you will get a germy packet going through both shutoffs.

Link to comment
Share on other sites

30 minutes ago, miauly said:

If you try this without a second shutoff, you will see that with just one it does not work. Reservoir is not automated, no doors, free cycling of water.

The only time it doesn't work is when you first start filling up the reservoir because the germy water flies right through without having time to disinfect and then back into the reservoir and around and around.  Once it's primed it works fine.  Adding a valve to slow the rate of flow will allow the reservoirs to continue to fill with more water and slowly become disinfected and then the shutoff will start sending out clean water.  I don't see how that second shutoff is supposed to help; it's just going to hold one packet of germ free water in that pipe segment until some germy water comes through.  When you first start the system and all the water is germy it's just going to cycle around and the second shutoff will do nothing.

30 minutes ago, Yunru said:

Well the germ sensor makes no sense as is: The signal reaches the shutoff before the packet does, so a germ-free packet sends the packet in front of it through the shutoff.

No, you always put the sensor right before the shutoff so that it acts on the first detected packet.  The signal isn't acted on in the same tick where it is detected, but in the next one.  Otherwise it would not be possible to use shutoffs for filtering at all.

 

Link to comment
Share on other sites

14 minutes ago, psusi said:

No, you always put the sensor right before the shutoff so that it acts on the first detected packet.  The signal isn't acted on in the same tick where it is detected, but in the next one.  Otherwise it would not be possible to use shutoffs for filtering at all.

That doesn't match the experiment I ran though:

(Also it definitely wouldn't make it impossible, you just add a delay)

image.thumb.png.60cd8d2c62df05bea07bd9e9bbba0a0c.png

image.thumb.png.cb9e9a624c0d091c53dd06d61b43aa88.png

The sensor is set to brine and on a 1-tick delay, and yet it perfectly sorts.

 

EDIT: It seems liquids take ~1 second to traverse a pipe segment, puzzle solved.

Link to comment
Share on other sites

8 minutes ago, Yunru said:

The sensor is set to brine and on a 1-tick delay, and yet it perfectly sorts.

Automation updates every tick (1/5 s), buildings and pipes update every second. You should be able to delay the signal 4 or 5 ticks before it breaks.

Link to comment
Share on other sites

11 minutes ago, psusi said:

The only time it doesn't work is when you first start filling up the reservoir because the germy water flies right through

I disagree, germy water gets through the first shutoff only if the pipe continued on its input is blocked, and clean water is coming right after the germy packet on the input. (which can happen easily if the flow is not continuous)

Link to comment
Share on other sites

10 minutes ago, ghkbrew said:

Automation updates every tick (1/5 s), buildings and pipes update every second. You should be able to delay the signal 4 or 5 ticks before it breaks.

That is what I figured too, except I'm currently delaying it 6 ticks and it's still bloody working.

image.thumb.png.d9ef91541717bce7976ed06d46c1b983.png

EDIT: 10 seems to be the magic number, so I'm guessing a tick is 1/10th of a second.

Link to comment
Share on other sites

15 minutes ago, Yunru said:

That doesn't match the experiment I ran though:

Could you add the pipe overlay too? Without seeing where are the input and outputs these pictures do not tell to much.

And what are those funny tiles on the edges of boxes? I don't recognize them as anything in an unmodded game...

Link to comment
Share on other sites

1 minute ago, Urist McPilot said:

Could you add the pipe overlay too? Without seeing where are the input and outputs these pictures do not tell to much.

Except... they do? Shutoff valves lack any kind of mirror symmetry, so it's easy to deduce which way that's pointing, and given it feeds into the block below it, we know that's an output. Thus the tank with the mixed waters must be the input.

Link to comment
Share on other sites

24 minutes ago, Yunru said:

EDIT: 10 seems to be the magic number, so I'm guessing a tick is 1/10th of a second.

Hmm, I'm sure it's 5 ticks/s.  I've noticed before that thermal calculations with buildings happen sequentially and the order appears to be the same as the build order.  I bet automation updates are similar.  My guess is the sensor is updating after the shutoff so it has nearly 2s before the shutoff checks again.  I bet if you swap the build order it will break after 5 ticks.

Link to comment
Share on other sites

@ghkbrew

An automation tick is 0.1s.

A string of 0.1s FILTER gates takes exactly the same time to propagate through as a string of NOT gates.

It was one of the changes in the launch upgrade.

Note that only FILTER and BUFFER gates set to exactly 0.1s is tied to automation ticks. If they are set to any higher value, the BUFFER and FILTER gates are no longer tied to the automation tick which is why we see often severe discrepancies when using them for time keeping purposes.

Link to comment
Share on other sites

48 minutes ago, Yunru said:

That doesn't match the experiment I ran though:

(Also it definitely wouldn't make it impossible, you just add a delay)

No, you are saying that you would require a negative delay, which is impossible.  You can't get the sensor any closer than 1 tile away, and that is exactly how far it needs to be in order to work.  Your logic delays by 1 automation tick, not by the 1 second that the pipes and shutoff operate at.  Hence, the delay is effectively zero, and the shutoff switches one second after the sensor triggers, and thus acts on the packet that the sensor triggered on.

37 minutes ago, Urist McPilot said:

I disagree, germy water gets through the first shutoff only if the pipe continued on its input is blocked, and clean water is coming right after the germy packet on the input. (which can happen easily if the flow is not continuous)

Sorry, by not work I meant that it would get stick just recirculating polluted water and never fill up the reservoir, not that it would let germs go down the clean route.  And I think you meant the pipe connected to its output is blocked.  So you are saying the second shutoff is there to handle if the return pipe to the reservoir gets blocked?  That should never happen if you use pipe priority properly to give the return first priority at going back into the reservoir rather than polluted water from the other source.

8 minutes ago, Saturnus said:

Note that only FILTER and BUFFER gates set to exactly 0.1s is tied to automation ticks. If they are set to any higher value, the BUFFER and FILTER gates are no longer tied to the automation tick which is why we see often severe discrepancies when using them for time keeping purposes.

If it's not using automation ticks then what is it using?

Link to comment
Share on other sites

40 minutes ago, ghkbrew said:

Hmm, I'm sure it's 5 ticks/s.  I've noticed before that thermal calculations with buildings happen sequentially...

Thermal calculations (and a lot of other stuff, like liquid flowing) happen 5 times per second, but automation ticks are different, they happen 10 times per second.

Link to comment
Share on other sites

27 minutes ago, psusi said:

Sorry, by not work I meant that it would get stick just recirculating polluted water and never fill up the reservoir

I see, yes, if there is nothing that makes sure to put content into the reservoir, it does exactly that.

 

29 minutes ago, psusi said:

That should never happen if you use pipe priority properly

I have a feeling that the whole build is not using pipe priority properly, that's why I asked for the whole network, not just the filter part :) For example, if there is no pipe prioritization at all, all pipes are just connected directly to the reservoir input, that would explain all behavior that has been mentioned so far.

Link to comment
Share on other sites

2 hours ago, Urist McPilot said:

I've built countless sensor+shutoff filters with germ sensors

Could you then maybe post one here? I have tried a lot and they never work for me - germy water gets through. Pipes in my tests do not back-off, I test with a liquid vent. I do not want to prime either, or use timers - this one works without them. But I still do not understand how.

1 hour ago, occamrazor said:

For some insights how the mechanics of this filter works, have a look at this video.

The setup of this video is quite similar to a filter-less setup with three full reservoirs in chlorine - seems like piping forces them to fill up. I'm interested in a setup without trapped water, otherwise daisy chain builds are still working I think.

Link to comment
Share on other sites

1 hour ago, Urist McPilot said:

I see, yes, if there is nothing that makes sure to put content into the reservoir, it does exactly that.

I'm not sure whether you didn't understand me or you said that odd, because it sounds like you are saying if there is no pump sending fluid into the reservoir then it will never fill up. The pump is putting liquid into the reservoir of course, but if the return has priority, then the pump blocks while the first packets recirculate and you just have packets going around in a big loop with the reservoirs constantly empty because as soon as fluid goes in, it goes right out again.

57 minutes ago, miauly said:

The setup of this video is quite similar to a filter-less setup with three full reservoirs in chlorine - seems like piping forces them to fill up.

It forces the polluted water to go back rather than out if it still has germs, and so since it isn't going out, and new water is going in, it fills up.  Once the germs are gone, it can start flowing out.

1 hour ago, miauly said:

I'm interested in a setup without trapped water, otherwise daisy chain builds are still working I think.

I can't figure out what this means.  If by "trapped water" you mean holding it in the reservoir, there is no such thing.  The whole way it works is that when it's in a reservoir, it is effected by being surrounded by chlorine.  And you do daisy chain the reservoirs, but you also need the shutoff.

Link to comment
Share on other sites

24 minutes ago, psusi said:

And you do daisy chain the reservoirs, but you also need the shutoff.

Need is a strong word (and oft incorrect).

 

You only need a shutoff if you lack sufficient tanks (n tanks should be able to handle roughly 500^n germs).

Link to comment
Share on other sites

25 minutes ago, psusi said:

If by "trapped water" you mean holding it in the reservoir, there is no such thing.

What I mean is that for this build to work, reservoirs need to be full and all three of them - that's 15 tons of water doing the decontamination. Not the end of the world, but I wanted something smaller, with a germ sensor and without doors under reservoirs.

Link to comment
Share on other sites

1 hour ago, Yunru said:

You only need a shutoff if you lack sufficient tanks (n tanks should be able to handle roughly 500^n germs).

Only once they are primed and full and remain that way.  As I've been saying, once they first start filling from empty the water flows right through without spending any time in the tank being disinfected.

1 hour ago, miauly said:

What I mean is that for this build to work, reservoirs need to be full and all three of them

They don't have to be full.  If they are low then the germy water will just recycle for a bit until it's all clean.  You don't require constant 10kg/s output do you?  You can also get away with only two tanks if you don't mind spending some time recirculating.  To make it work with only one tank then you have to stop the output and force it to sit there for a while somehow.  You can use a shutoff instead of a door under the tank though.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

Please be aware that the content of this thread may be outdated and no longer applicable.

×
  • Create New...