Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: Pumps, Oceans, and Pressure  (Read 613 times)

Jairl

  • Bay Watcher
    • View Profile
Pumps, Oceans, and Pressure
« on: February 26, 2015, 11:00:46 am »

Well, I was toying with things learning how they worked and I tried to "dig" into the ocean using a series of parallel pumps.

The first row drained away a sizable area and left a 'hole' if you will, for me to build a wall under the first row and put a pump such that it would pump a tile 1 z level down, and then the upper pump would pull it away. These were roughly in the center of the map.

Now, I realised shortly after that this wouldn't work due to the pressure model; but what I am not quite getting is what happened next, as I began to slowly drain a z level of the ocean.

Note that the "overflow" did not reach the map edge, but only displaced the water. So somewhere along the lines, the water either got destroyed or was forced off the map edge, it's just that I'm not exactly certain how.
Logged

PatrikLundell

  • Bay Watcher
    • View Profile
Re: Pumps, Oceans, and Pressure
« Reply #1 on: February 26, 2015, 11:50:35 am »

I'm not quite getting your description. Did you pump water away from a straight line of the water, or was it from a box around a patch of ocean?
In the second case, you should be able to pump water away faster than it was replenished, with the water pumped away draining from the ocean's edges rather than replacing water pouring into your hole from below.

There is also a pressure oddity that causes water that is pushed down and then up to only fill the second space to one Z level lower than the source. I've seen that with chambers dug into rock, but I guess you could also do it on the open ocean. If this is the case, the square should be possible to drain completely to 1 Z level below the ocean outside the square and it would stay that way (given that you've built a wall into the ocean in the pumped tiles), but when you'd start on the second Z level pressure would compete with your pumps. You should still be able to build a new level of walls where the pumps remove the water, but the inner square would constantly refill from below.
Logged

Jairl

  • Bay Watcher
    • View Profile
Re: Pumps, Oceans, and Pressure
« Reply #2 on: February 26, 2015, 12:56:49 pm »

It was a half box in an ocean. Two rows of pumps such that they pump water away in the direction of the edge creating an area of (1/2)/7 water inside that I could build in.

So something like (from the Z level perspective)
<-%%.
~~||<-%%.
~~~~~~~~
Logged

PatrikLundell

  • Bay Watcher
    • View Profile
Re: Pumps, Oceans, and Pressure
« Reply #3 on: February 26, 2015, 03:06:33 pm »

Sorry if I'm dense, but I'm still not sure I get it.

To me it looks like you have two walls with a pump on top, and inside that, on the level below, another pump (presumably on a pair of floors) that feeds the first one.
If that's the case, you'd have needed to do some pumping to be able to build the first two walls in the water, on which the topmost pump is placed. The lower pump should only be possible to be constructed if the wall completely cut off a section of the sea (e.g. a bay), but if the section was cut off, yes, the pressure oddity would have the water level at one Z level lower than the ocean itself, while I think the second pump would fail to repeat the trick even after a second wall is built.
Logged

Jairl

  • Bay Watcher
    • View Profile
Re: Pumps, Oceans, and Pressure
« Reply #4 on: February 26, 2015, 04:23:03 pm »

I think you generally get it, I had two rows of those set up, Connected to the shore but not on the outside, So a small semi-box

Code: [Select]
%% . . . . %%
%% . . . . %%
%% . . . . %%
===========

(Well, bigger than that... much bigger ;p)

And it created a small "hole" (some additional pumping here and there); but the problem occurs with the second pair of pumps.

Considering how DF handles pressure, it makes a fair bit of sense for it to not work. But what I don't get is that the pumps only fed back into the ocean with no place for them to drain off, yet water got destroyed in their operation.

i.e. After several min, I found that the pumps weren't draining the area under my hole, but draining from the side of the map and approaching my hole.
« Last Edit: February 26, 2015, 04:28:06 pm by Jairl »
Logged

PatrikLundell

  • Bay Watcher
    • View Profile
Re: Pumps, Oceans, and Pressure
« Reply #5 on: February 27, 2015, 03:50:11 am »

Ah, I didn't understand there was a second array.

Given the number of pumps, I'm not surprised if they pump water away faster than it can flow in from the open side, but I would expect there to be a "bulge" with gradually higher water levels towards the middle of the open side.

My (rather unsuccessful) attempts at pumping open water in cavern lakes have resulted in currents that sweep the pump operator off the pump into the water, but your array would firstly block back currents with the neighboring pumps, and seconds, probably use power rather than dwarves to do the pumping. However, the water pumped away generated a 1/7 layer on top of the regular lake level, and this would speed away towards the edges to drain there.

My guess is that your pumping resulted in a strange current where incoming water immediately flowed over to fill an empty tile beside it, and then the water from the tile beside it immediately flowed in to fill that square, propagated all the way to the edge. If that is correct, you should be able to see that by single-stepping DF one tick at a time.

However, if you close off the last side as well, I predict things will change, although, I'm not quite sure on how...
Logged

Loci

  • Bay Watcher
    • View Profile
Re: Pumps, Oceans, and Pressure
« Reply #6 on: February 27, 2015, 03:22:20 pm »

The "pressure" mechanic causes the "highest" tile of water to teleport to the "closest" empty lower tile. When you pumped the water up on top of other water, it became the highest, and teleported to any gaps, including those "off screen" if they were "closest" (causing the water to appear to vanish). When you started pumping the second layer, the entire first layer could teleport via "pressure" to fill those empty tiles. The key is that the empty tile doesn't choose the closest full tile, but each full tile chooses the closest empty tile, and the full tiles are evaluated in a specific order. The tiles at the edge of the map that emptied first were being evaluated before the tiles closer to the project.
Logged

PatrikLundell

  • Bay Watcher
    • View Profile
Re: Pumps, Oceans, and Pressure
« Reply #7 on: February 27, 2015, 04:30:57 pm »

Interesting mechanism, but it sounds like it could save a lot of computations.
Logged