1 Gas Mixer

The stationeers gas mixer ratio is skewed by temperature differences. If you set the mixer ratio to r and the temperatures of the two inputs are not identical, you get a different ratio in the output.

r′ = r Ta r Ta + 1−r Tb Δma = r′Q Δmb = (1 − r′)Q ma′ = m a + Δma mb′ = m b + Δmb

The quantity of gas transferred appears to be based on the volume V of the output pipe network ( each pipe segment is 100L of volume).

V 12.2 = TaΔma + TbΔmb = Tar′Q + T b(1 − r′)Q = (Tar′ + T b(1 − r′))Q V 12.2 Tar′ + Tb(1 − r′) = Q

If you want to avoid hard-coding the volume of the pipe segment in your MIPS code, you can calculate it using the values you collect from a pipe analyzer.

V = nRT P

I told you that story so I could tell you this one. If you have a pipe system with some gas already in it (ma, mb) and you want to add some to achieve a specific target ratio (r″ ⁡).

ma′ = r″ ⁡(m a′ + m b′) ma′− r″ ⁡m a′ = r″ ⁡m b′ (1 − r″ ⁡)ma′ = r″ ⁡m b′ (1 − r″ ⁡)(ma + Δma) = r″ ⁡(mb + Δmb) (1 − r″ ⁡)(ma + r′Q) = r″ ⁡(m b + (1 − r′)Q) (1 − r″ ⁡)ma + (1 − r″ ⁡)r′Q = r″ ⁡m b + r″ ⁡(1 − r′)Q (1 − r″ ⁡)ma + r′Q − r″ ⁡r′Q = r″ ⁡m b + r″ ⁡Q − r″ ⁡r′Q (1 − r″ ⁡)ma − r″ ⁡mb = r″ ⁡Q − r″ ⁡r′Q − r′Q + r″ ⁡r′Q β = (1 − r″ ⁡)ma − r″ ⁡mb = (1 − r″ ⁡)ma − r″ ⁡mb β = (r″ ⁡ − r″ ⁡r′− r′ + r″ ⁡r′)Q β = (r″ ⁡ − r′)Q β = (r″ ⁡ − r′) V 12.2 Tar′ + Tb(1 − r′) β(Tar′ + T b(1 − r′)) = (r″ ⁡ − r′)V 12.2 βTar′ + βT b(1 − r′) = r″ ⁡V 12.2 − r′V 12.2 βTar′ + βT b − βTbr′ = r″ ⁡V 12.2 − r′V 12.2 βTb − r″ ⁡V 12.2 = βTbr′− r′V 12.2 − βT ar′ βTb − r″ ⁡V 12.2 = (β(Tb − Ta) − V 12.2)r′ βTb − r″ ⁡V 12.2 β(Tb − Ta) − V 12.2 = r′

In order to turn r′ into the r we need to set on the gas mixer

r′ = r Ta r Ta + 1−r Tb r′( r Ta + 1 − r Tb ) = r Ta r′( 1 Tar + 1 Tb − 1 Tbr) = r Ta r′( 1 Tb + ( 1 Ta − 1 Tb)r) = r Ta r′ Tb + r′( 1 Ta − 1 Tb)r = 1 Tar r′ Tb = 1 Tar − r′( 1 Ta − 1 Tb)r r′ Tb = ( 1 Ta − r′( 1 Ta − 1 Tb))r r′ Tb( 1 Ta − r′( 1 Ta − 1 Tb)) = r r′ Tb Ta − r′(Tb Ta −Tb Tb)) = r r′Ta Tb − r′(Tb − Ta) = r r′Ta (1 − r′)Tb + r′Ta = r

I wonder how many lines of MIPS that will turn into...