Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: Simple flood-free water control  (Read 963 times)

Derakon

  • Bay Watcher
    • View Profile
Simple flood-free water control
« on: September 13, 2009, 12:48:06 pm »

This is a pretty straightforward way to block off water pressure for underground water supplies. It's very easy to use; you pull the lever once to fill a cistern, and then a second time to let the water into your use area, whatever that is. It takes advantage of the fact that floodgates and bridges "oppose" each other (i.e. when attached to the same lever, floodgates are closed when bridges are open and vice versa).

Code: [Select]
#####.#####           ^ To your fortress
#####B##### Bridge    |
#.........#
#.........# Cistern
#.........#
#####F##### Floodgate |
#####.#####           v To the river
When you pull the lever once, the floodgate opens and the bridge closes. Water flows into the cistern. When you pull the lever a second time, the floodgate closes and the bridge opens. Water flows into your fortress.

This is such a simple design that I'm certain many people have come up with it in the past; however, for those who hadn't (like myself), I figured I'd point it out. I'm currently using this system to fill a small "river" on the farming level of my fortress, and using a manually-operated pump to irrigate the farms.

The only problem with this system is that it's basically impossible to fill the area past the bridge to 7/7 depth. You need water pressure to do that.
Logged
Jetblade - an open-source Metroid/Castlevania game with procedurally-generated levels

Ironhand

  • Bay Watcher
  • the llama is laughing
    • View Profile
Re: Simple flood-free water control
« Reply #1 on: September 13, 2009, 12:52:35 pm »

Very nice!

Fill that area with cage traps, and you've got yourself a critter-filter, too.
Logged

Angellus

  • Guest
Re: Simple flood-free water control
« Reply #2 on: September 13, 2009, 01:23:03 pm »

Very nice!

Fill that area with cage traps, and you've got yourself a critter-filter, too.
Weapon traps! Armok's dwarves will love the quality of the water!
Logged

Albedo

  • Bay Watcher
  • Menacing with spikes of curmudgeonite.
    • View Profile
Re: Simple flood-free water control
« Reply #3 on: September 13, 2009, 01:47:14 pm »

I've posted this setup many times over the last months, but as a way to pre-measure fluids for obsidian farming, irrigating and such, not (specifically) for flood control.

The latest was... two days ago, here, longer post toward the bottom:
http://www.bay12games.com/forum/index.php?topic=41113.15

(For people new to this, if you put it above the target area, it will fill to 7/7, or more.)
« Last Edit: September 13, 2009, 01:50:20 pm by Albedo »
Logged

Dorf3000

  • Bay Watcher
    • View Profile
Re: Simple flood-free water control
« Reply #4 on: September 14, 2009, 04:11:06 am »

Its only flood-free as long as you don't set the lever on repeat...   ;)

Also if you have big fish coming in they might happen to block the floodgate at the vital moment.  As far as I know you can only get big fish from an actual river, not a brook.
Logged
I had a tigerman get elected mayor and he promptly mandated 3 bowls of cereal.

kurisukun

  • Bay Watcher
    • View Profile
Re: Simple flood-free water control
« Reply #5 on: September 14, 2009, 09:29:16 am »

Doesn't that still provide some pressure though?  Or is the pressure lost once it's disconnected from the source?

Derakon

  • Bay Watcher
    • View Profile
Re: Simple flood-free water control
« Reply #6 on: September 14, 2009, 09:46:52 am »

Correct -- when the floodgates are closed, the system has zero pressure. And when the floodgates are open, the bridges are closed, so the portion of the system leading to your fortress has zero pressure.
Logged
Jetblade - an open-source Metroid/Castlevania game with procedurally-generated levels

Starver

  • Bay Watcher
    • View Profile
Re: Simple flood-free water control
« Reply #7 on: September 14, 2009, 10:10:58 am »

I'd probably build them as two bridges, connect lever to bridge A, pull lever*, connect lever to bridge B.  And that should give you a 'symmetric' system with the same properties (one up, one down, roughly the same response time immedaitely after the a lever-pull), and no chance of the system being blocked up by objects/creatures/stray pets/little lost dwarfchildren.

But TIMTOWTDI.

[* - if you make the first connection to the "entry" bridge/pseudo-floodgate then you can connect the water-source to the entryway immediately after this pull is done...  but make sure you don't need to make other adjustements/rescue dwarfs** who have decide to become trapped on the wrong side... :)]

[** - It's always wise to build in escape mechanisms, anyhow.  Pity you can't implement Cryptonomicon-style floodchamber escape bubbles*** yet. :)

[*** - Well, constantly powered pumps that suck the water out of an area that would be flooded into and back into the stream below would probably emmultate diving-bell air-chambers in chambers that would normally flood**** under DF's current fluid physics system, but I still wouldn't gamble upon the lives of my workers with such a system.  Any more than I normally gamble with their lives, anyhow.]

[**** - Too many footnotes, I know.]
Logged

kurisukun

  • Bay Watcher
    • View Profile
Re: Simple flood-free water control
« Reply #8 on: September 14, 2009, 10:16:17 am »

I still prefer a self powered pump/wheel/bridge system that gives unpressurized water.   Course, that requires more space/resources/wood.

Dorf3000

  • Bay Watcher
    • View Profile
Re: Simple flood-free water control
« Reply #9 on: September 14, 2009, 10:55:01 am »

I'd probably build them as two bridges, connect lever to bridge A, pull lever*, connect lever to bridge B.  And that should give you a 'symmetric' system with the same properties (one up, one down, roughly the same response time immedaitely after the a lever-pull), and no chance of the system being blocked up by objects/creatures/stray pets/little lost dwarfchildren.


Levers don't work like that.. one lever will open or close both bridges, no matter what state they were in before.  You'll have Fun for sure ;)
Logged
I had a tigerman get elected mayor and he promptly mandated 3 bowls of cereal.

Starver

  • Bay Watcher
    • View Profile
Re: Simple flood-free water control
« Reply #10 on: September 14, 2009, 11:07:03 am »

Levers don't work like that.. one lever will open or close both bridges, no matter what state they were in before.  You'll have Fun for sure ;)
You sure?  What if you had one lever on one bridge and another on both, does the solo-lever pulled make it alternate in an XOR/XNOR sort of way?  I think that's what I've done in the past (with bridges as bridges, rather than flood-control). But it's a long time since I've done this, so the entire logic may have revamped, or I misremember.  I've never actually done my above minimilist solution.

Will try this tonight.  Maybe.
Logged

Shurhaian

  • Bay Watcher
    • View Profile
Re: Simple flood-free water control
« Reply #11 on: September 14, 2009, 11:32:39 am »

Most things linked up to a lever are not simply toggled by it. Throwing a lever to the right sends bridges a "raise/retract" instruction, floodgates and doors an "open" instruction; throwing it to the left sends the opposite, no matter what state that bridge/door/floodgate may be in at the time.

The exceptions are one-use triggers like cages and restraints, and gear assemblies(which ARE toggled).

If you want to invert a switch, you could use a system of mechanically-powered pumps and a pressure plate. When the main lever is thrown, it turns on a disengaged pump and puts water on the pressure plate. Throw the lever again, and that pump disengages, and the OTHER pump re-engages, sucking that water off the plate and sending it back to the reservoir. Or something similar. Rig the pressure plate to the things you want in the reverse state.

The bridge vs floodgate system is wonderfully elegant, by comparison. Put a fortification upstream and you can be sure a large creature won't get in to block the floodgate.

You'd probably still want a backup lever somewhere for the floodgate alone, in case it DOES get jammed in the wrong state.
Logged
Working on: drakes - making the skies(mostly) a bit more varied

My guards need something better to do than make my nobles happy with hugs and justice.

The_Fool76

  • Bay Watcher
    • View Profile
Re: Simple flood-free water control
« Reply #12 on: September 14, 2009, 11:56:03 am »

Things that can be open or closed (bridges, floodgates, doors, hatches) behave as if the lever has an Open and Closed setting.  Gears, on the other hand, toggle regardless of the lever state.  Go figure.

To make it even more fun, if a floodgate (or whatever) is in the process of opening or closing then it will ignore all signals from a lever.   If you hook a lever up to a floodgate and pull it twice in a row, then the floodgate will open and stay open, despite the lever now being in the 'closed' state.  Again, gear boxes behave differently and toggle state the moment the lever is pulled so they never miss a signal.

If you want two floodgates to behave as you describe (with one open when the other is closed) then you have to build them as you described but rather than pull the lever once, pull it twice each time you want to toggle the gates.   

Assuming we are starting with the lever in the "open" position, what will happen is this:

Pull 1 (lever now 'closed'): The open gate gets the close signal and starts to close.  The closed gate ignores it since it is already closed.

Pull 2 (lever now 'open'): The open gate is still closing so it ignores the signal.  The closed gate gets the open signal so it starts to open.

A little while later: Both gates finish their respective operations and it is now safe(er) to toggle them again without getting them both stuck in the same state.

Now if you really want to be safe, you will build a second lever anyway, because if both your floodgates wind up in sync then there is no way to put them back in opposition with just one lever.
Logged
Tis far better to be a witty fool than a foolish wit.