Almost every gas you get is a mixture: the outside air on Mars, the exhaust of a furnace, the output of the electrolyzer. With a filtration unit you split these mixtures and turn waste into raw material.
How the filtration unit works
The Filtration has three pipe ports: input, output and waste output. On top come a data and a power port and three slots: two for gas filters and one for a programmable chip.
The split is clear in the game code: whatever a filter catches goes to the output (“Filtered” in game), everything else to the waste output (“Unfiltered”). With a carbon dioxide filter, the carbon dioxide arrives at the output and the cleaned air at the waste output. The filtration unit measures all three lines itself: …Input, …Output (filtered) and …Output2 (waste) give pressure, temperature, amount and the fraction of every gas.
What else is in the code:
- It only runs with
On= 1,Mode= 1 (Active) and all three pipes connected. - Each tick it takes at least the amount of gas of 1,000 kPa in 10 litres, about 4.1 mol at 20 °C, more with a large pressure drop. You do not need a pump in front – it pushes even against pressure. Make sure both outputs can drain.
- If the target gas at the input drops below 0.1 %, it takes the last remainder out in one go. So the input network really becomes free of it.
- On top of the 10 W base draw, filtering adds up to 100 W, in full from 1,000 kPa at the input.
For liquid lines there is the larger Filtration Liquid, for rooms without pipes the Portable Air Scrubber.
The filters
Each filter is fixed to one gas. The six most common:
| Filter | Gas | Note |
|---|---|---|
| Filter (Oxygen) | Oxygen | breathing gas, oxidiser |
| Filter (Nitrogen) | Nitrogen | filler gas for breathing air |
| Filter (Carbon Dioxide) | Carbon Dioxide | not toxic, good cooling gas |
| Filter (Pollutant) | Pollutant | toxic |
| Filter (Methane) | Methane | fuel and toxic |
| Filter (Water) | Steam | catches steam and liquid water |
There are also filters for nitrous oxide, hydrogen, helium, ozone, alcohol, hydrochloric acid, hydrazine, silanol, polluted water and salt. According to the game code every gas filter also takes the liquid form of its gas along – the oxygen filter liquid oxygen, the water filter (filter type Steam) liquid water. Filters for pure liquids such as polluted water, alcohol or salt only catch that substance. One name is tricky: the volatiles filter is labelled “Methane”.
Every filter comes in several grades. Taking carbon dioxide as the example: the normal one needs 5 iron, the medium one 5 iron, 5 silver and 1 constantan, the heavy one 5 steel, 1 invar and 1 stellite plus a tier 2 pipe bender. You cannot craft the catalytic grade; it is only sold by the trader Cosmic Curiosities.
Changing filters
Each filter has a reserve that starts at 100. It drops by 1 after a fixed number of ticks in which the filter actually catches something – ticks without its gas do not count:
| Grade | Ticks per point | 100 points last for |
|---|---|---|
| normal | 145 | 14,500 ticks, a good 2 hours |
| medium (M) | 721 | about 10 hours |
| heavy (L) | 2,881 | about 40 hours |
| catalytic | 11,521 | about 160 hours |
So even the catalytic filter is not endless. At 0 the filter stays in the slot and catches nothing; in the filtration unit its gas then goes to the waste output. Slot logic gives you Quantity and FilterType per slot (slots 0 and 1).
This program switches a filtration unit on as soon as there is too much pollutant in the room, and makes a Flashing Light flash when one of the two filters is nearly empty:
# Filter pollutant from room air, watch the filters
define FILTRATION -348054045 # Filtration (StructureFiltration)
define SENSOR -1252983604 # Gas Sensor (StructureGasSensor)
define LIGHT -1535893860 # Flashing Light (StructureFlashingLight)
define NFILTER HASH("Air Filter")
define NSENSOR HASH("Living Sensor")
define NLIGHT HASH("Filter Light")
define TOXON 0.4 # kPa pollutant, filter from here
define TOXOFF 0.1 # kPa pollutant, filter down to here
define LOW 10 # filter reserve, warn below
alias pressure r0
alias fraction r1
alias ptox r2
alias run r3
alias f0 r4
alias f1 r5
alias tmp r6
sbn FILTRATION NFILTER Mode 1 # 1 = Active, otherwise it never filters
start:
yield
lbn pressure SENSOR NSENSOR Pressure 0
bnan pressure start # no sensor with this name
lbn fraction SENSOR NSENSOR RatioPollutant 0
mul ptox fraction pressure # pollutant partial pressure
# --- 1. Filtration with hysteresis ---
sgt tmp ptox TOXON
select run tmp 1 run
slt tmp ptox TOXOFF
select run tmp 0 run
sbn FILTRATION NFILTER On run
# --- 2. Check filter reserve ---
lbns f0 FILTRATION NFILTER 0 Quantity 0
bnan f0 start # no filtration unit with this name
lbns f1 FILTRATION NFILTER 1 Quantity 0
min tmp f0 f1
slt tmp tmp LOW
sbn LIGHT NLIGHT On tmp # light on: change filter
j start
The thresholds sit deliberately below the 0.5 kPa warning level. An empty slot reports Quantity 0 – so the light also comes on when a filter is missing. With a normal filter, 10 · 145 = 1,450 ticks remain after the warning, about 12 minutes of filtering. The line before start: sets the filtration unit to Mode 1 once – without it, it would stay idle despite On. Instead of a separate housing you can also put the chip straight into the chip slot of the filtration unit.
A calculation
A room of four cells (32,000 L) at 100 kPa contains 2 % pollutant. That is 2 kPa partial pressure – twice the damage threshold. In moles:
- n = 2 · 32,000 / (8.3144 · 293.15) ≈ 26 mol
The filtration unit has to pull out these 26 mol for the room to be clean again. They arrive at the output – that is where your exhaust line goes. The cleaned air leaves the filtration unit at the waste output and has to go back into the room, for example through an active vent. With at least 4.1 mol throughput per tick, a room with 1,330 mol of air has passed through the filtration unit once after a good 320 ticks, just under 3 minutes.
Where to put the waste gases
| Gas | Options |
|---|---|
| Pollutant | vent outside, far from intake lines; or liquefy from 1,800 kPa at room temperature and store compactly |
| Carbon dioxide | use as cooling gas; store as liquid from 517 kPa below 266 K; vent outside |
| Methane (volatiles) | store as fuel – separate from every oxygen line |
| Steam | condense and use as water |
| Nitrogen | use as filler gas for breathing air |
To vent, a passive vent on the outer wall is enough. It fully equalises with the cell in front of it every tick. On Mars the gas thus ends up back in the outside air.
A filtration unit that separates methane or hydrogen delivers pure fuel at one output. Never lead that line near an oxygen line or a wall heater – the heater makes a spark every tick.
Using the outside air of Mars
According to the world data the Mars air consists of about 95 % carbon dioxide, 3 % nitrogen, 1.4 % oxygen and 0.6 % pollutant. With carbon dioxide and pollutant filters in a filtration unit, a remainder of nitrogen and oxygen is left. The carbon dioxide is no waste here but a usable cooling gas.
Where next
- Gases and mixtures: breathing air, gas mixer, partial pressure – partial pressure and breathing air
- Electrolysis and water: winning oxygen and hydrogen – separating oxygen and hydrogen
- Evaporating, condensing, freezing: using phases on purpose – liquefying waste gases
- IC10: control a device by name – addressing devices by name, slot logic in the academy: slots