Stationeers

Stationeers

Not enough ratings
[PoC] Heat Exchanger Control (Heating) rev. 1
   
Award
Favorite
Favorited
Unfavorite
File Size
Posted
320.883 KB
Sep 7, 2021 @ 2:43pm
1 Change Note ( view )

Subscribe to download
[PoC] Heat Exchanger Control (Heating) rev. 1

Description
​I play on Europa so I needed a way to heat the cold O2 and store it afterwards.

Basically, I have a large tank with O2 at -145°C and a large tank of hot (X+CO2) at ~2140°C.
I want to have a small tank of warm O2 at 20°C. Using electricity is both extremely inefficient and slow, so I decided to give Heat Exchanger a go

The result is the following IC10 code, example setup included.

I suspect that I may miss something obvious in my setup and/or IC10 so feel free to correct me or suggest a way to improve this.

It’s pretty much a quick PoC.

IC10 code with all comments available here[gist.github.com]

Overview
This setup and IC10 code allow you to specify exact temperature you want to get in your tank («target tank») and, given you have a hot gas source («hot pipe») with a higher temperature, perform heat exchanging between the two to achieve desired temperature.

System in action
Shown on the screenshots (set to 20°C)

Details
What you need:
  • Tank with a cold gas that you want to heat
  • Hot gas source with a temperature greater than your target
  • 1× Heat Exchanger
  • 1× Volume Pump
  • IC10 housing and circuit
  • 3× Pipe Analyzer
What you get:
  • You specify a temperature between [T cold] and [T hot] and IC10 controls how much hot gas to inject into Heat Exchanger input line (buffer) to achieve exactly that temperature.
Setup:
  • Look at the screenshot;
  • Purple is hot gas (called «hot» in code), white is cold gas (called «target» in code);
  • Network after volume pump is called «buffer» in code;
  • Heat Exchanger is «Heat Exchanger – Gas» variant, placement shown on the screenshot.
IC10 setup:
  • d0 — target tank (cold)
  • d1 — Pipe Analyzer in cold network
  • d2 — Pipe Analyzer in buffer network
  • d3 — Volume Pump that moves hot gas
  • d4 — Pipe Analyzer before Volume Pump that tells info about hot gas

This code, unlike my previous, is not so simple.
Overall, it works like that:
  1. We calculate amount of energy inside the cold network. To do that we need to count all moles inside a tank, pipes between tank and Heat Exchanger and also moles inside Heat Exchanger internal atmosphere #1 (Heat Exchanger has two internal atmospheres inside, both have 500L volume); also, we take into account that different gases have different heat capacity;
  2. Then we calculate expected amount of energy at the specified temperature;
  3. We do the same for the hot «buffer» network; As I said, buffer is a network between Volume Pump and Heat Exchanger + Heat Exchanger internal atmosphere #2;
  4. We get the delta between current energy and expected energy;
  5. We calculate energy of the 1 hot gas mole;
  6. We move needed amount of the hot moles to compensate energy delta and thus achieve desired temperature in the cold network.

I haven’t really tested it for different setups, such as ones with lower hot gas temperature.
I mean it works with 100% accuracy for me but I think I could miss something.
Feel free to experiment and share results.

Notes:
  1. You need to control the buffer line pressure. Volume Pump doesn’t care about buffer pressure so if you try to heat big amount of cold gas or use a low temperature hot gas, then it may move big amount of moles (to achieve needed energy), overflow and explode the buffer. Eventually you would need to remove some gas from the buffer but it’s a trivial task.
    Note: currently it doesn't support connecting anything else to the buffer pipes. If you connect them to the Tank to increase the volume then it will not work correctly. This is because it calculates energy based on the moles inside buffer pipes but any other storage will store matter as well. On the other hand, you can just add more pipes to the buffer.
  2. Buffer shouldn’t be completely empty. Otherwise IC10 will not be able to get its temperature and perform calculations. Pump any amount of gas manually before the first launch.
  3. I artificially slow down the volume pump in the code (throttle it’s setting). Without that I had wrong results, it moved too much hot moles. I suspect that it’s because the gas needs some time (atmospheric ticks) to equalize between all pipe networks and energy delta fluctuates. I still don’t quite understand why it fluctuates because the energy shouldn’t change without external assistance but for my test setup it works as is.

Further work:
  1. Make it usable for the reverse process — cooling the hot gas using colder gas. Heat Exchanger transfers energy from the high energy side to the low energy side. I think we may need to add calculated amount of moles to the buffer to absorb the heat from the hot side. Maybe it’s better to do that in separate IC10 code but use the same input/output system so it would be possible to just switch between two IC10 chips to do either heating or cooling.
  2. Figure out why Volume Pump without throttling may overshoot.
  3. Maybe I just over-engineered (or did it wrong???) the whole thing and it can be done much simpler, I'm still very new! :)