Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  
Pages: [1] 2 3 4

Author Topic: Water Clock  (Read 4697 times)

Sir Pseudonymous

  • Bay Watcher
    • View Profile
Water Clock
« on: August 06, 2009, 05:30:03 am »

I'm trying to come up with some parameters to build a working water clock of sorts. My idea was to produce a test device wherein a single pump would fill a number of deep holes in a line, starting at the beginning of a season, and then seeing how many were filled at the end, multiplying that by their dimensions, and ending up with a ballpark idea of how much water is pumped by a single pump, given no limits to the level of the intake or the area it's dumping it, in a season. My test range was (slightly) too small, but I got a rough monthly number somewhere between ~880 and ~920 7/7 blocks.

I've just started trying to build a test model, so I don't know if this works, or if there are variables I don't know about at work. Has anyone else tried to make a clock, this way or some other? Is there something I'm missing?
Logged
I'm all for eating the heart of your enemies to gain their courage though.

Puck

  • Bay Watcher
    • View Profile
Re: Water Clock
« Reply #1 on: August 06, 2009, 05:41:23 am »

DeathOfRats

  • Bay Watcher
    • View Profile
Re: Water Clock
« Reply #2 on: August 06, 2009, 06:23:16 am »

The problem with water clocks (I'm trying to build one myself - currently working on the energy requirements. I should have enough water wheels ready to go in a day or so) is that the movement of water is not constant. It doesn't move every tick, or even every n-ticks. Rather, it moves somewhat randomly, so you can't count on having an accurate clock if you let the water move by itself. I tried basing it on a design similar to the mist generator/repeater that's somewhere in the forums, but I ran against this problem.

My current design does take care of that, but it's via brute force, which is a pain in the rear because it requires I build an enormous amount of pumps (I'm not kidding. The earliest design required around 1400 pumps just for counting a day. I think I can reduce that requirement a bit, maybe by half or so, but it still requires a considerable amount of pumps to make sure you take all the randomness out of the system (basically, while the speed at which water moves or falls is random, pumps aren't. They always put whatever is in their input square - as long as it has a depth of more than 1 - into their output square in a single tick).
Logged

Flaede

  • Bay Watcher
  • Beware the Moon Creatures.
    • View Profile
Re: Water Clock
« Reply #3 on: August 06, 2009, 06:39:44 am »

I seem to recall someone taking out some of the randomness by using single-square reservoirs and draining to the actual "clock mechansism" on the diagonal, because of water pressure not working at angles, or something like that.

wouldn't that produce a predictable flow of water? Then your "timing" wouldn't have to depend on the pump timing, just the water flow.

Also, If you add a bit of the Dwarfputer tech, you can use presure plates to mark timing, instead of it always having to be measured by how many pits filled.

Not that I've managed to set this up, my testing forts all died in horrible tantrum spirals.
Logged
Toady typically doesn't do things by half measures.  As evidenced by turning "make hauling work better" into "implement mine carts with physics".
There are many issues with this statement.
[/quote]

DeathOfRats

  • Bay Watcher
    • View Profile
Re: Water Clock
« Reply #4 on: August 06, 2009, 06:59:31 am »

In my case, I'm doing a mix, with pumps to fill pits and pressure plates to count every n-th pit (so they can empty and begin filling again). And I just had an idea on using bridges and floodgates to slow down the computation and reduce the number of pumps. Still needs fleshing out, so I'll post it once I'm sure-ish it'll work.

As to the diagonal thing, I'm not sure, I might have to test it out. I don't have DF running atm (due to graphic card problems, it won't run on linux on my laptop :'( ), so I can't tell.
Logged

Sir Pseudonymous

  • Bay Watcher
    • View Profile
Re: Water Clock
« Reply #5 on: August 06, 2009, 07:21:28 am »

The pit filling was just a quick construction to get a rough estimate as to how much water would be moved. My ultimate design is intended to use a pressure plate to determine when a cistern is filled. Assuming I can iron out sources of error, that is.

Now, if you have a tunnel filled to the end with 7/7 water, water added in is added to the first open space, correct? So if, say, you had several pumps drawing from individual holes in an aquifer, feeding another pump, feeding a tunnel to a tower of pumps, you'd have a reasonably constant flow?
Logged
I'm all for eating the heart of your enemies to gain their courage though.

DeathOfRats

  • Bay Watcher
    • View Profile
Re: Water Clock
« Reply #6 on: August 06, 2009, 07:29:36 am »

I'm not sure (i.e., I haven't tested it), but it might be possible. You could have trouble making sure the input of the pump is constantly fed, though, since the pump operates much faster than the normal flow of water.
Logged

AlienChickenPie

  • Bay Watcher
    • View Profile
Re: Water Clock
« Reply #7 on: August 06, 2009, 08:09:49 am »

Given an accurate repeater, you could just tie it to a long series of full adders, count how many repeats are in a year and then use that number and some basic binary math to create a bit that flips exactly one year after the clock is reset.
Logged

DeathOfRats

  • Bay Watcher
    • View Profile
Re: Water Clock
« Reply #8 on: August 06, 2009, 08:25:07 am »

That's the problem, though. Most repeaters rely on the movement of water to repeat (see the mist generator thing, for example. It relies on water falling) which is not accurate. Over a long period of time it might give that impression, however.

Having a unit that activates n-ticks after you turn it on is ridiculously easy, if you assume a) unlimited z-levels and b) unlimited power. Just stack n pumps and put a pressure plate on the top level. The problem is making this repeat. One of my ideas (which I just had, this is proving pretty inspiring ;D ) involves having some way to dispose of the water when it gets to the top, and a never-ending supply of water at the bottom. Between that, and a floodgate/bridge setup to slow things down, I think I can reduce pumps by a lot. Maybe down to 100 pumps total or so for a perfectly accurate clock and calendar, down to the day.
Logged

Shakma

  • Bay Watcher
    • View Profile
Re: Water Clock
« Reply #9 on: August 06, 2009, 08:56:30 am »

Using the mini repeater and a high water pressure should provide a really steady repeater timing as it will fill pretty much instantly.  Then have your input be something like this at the top of your cistern/water clock:

Code: [Select]
######
#dDWWW
######

dD - drawbridge with D the up portion
W - water

Hook the bridge up to the repeater and the d portion of the bridge over the cistern.  Should drop 7/7 water every repeater tick and be very steady I think.
Logged

DeathOfRats

  • Bay Watcher
    • View Profile
Re: Water Clock
« Reply #10 on: August 06, 2009, 09:32:53 am »

Hmm, I've got a design here for a repeater that should take 102 ticks to operate once. the number of ticks can be increased by adding pumps in the middle. The ideal would be 120 ticks, which would mean 18 pumps/z-levels. I'm trying to think of some other way to add those 18 ticks, but I don't have much time to put into it at the moment. I'll look back at it in an hour or so.

Code: [Select]
Side view:
#B<< ####
# ##_<< #
D ## >> #
#  X_####

The << and >> represent pumps, and which direction they pump in.
the top _ is a pressure plate hooked to the retractable bridge (that's the B),  the bottom floodgate (that's the X), and the gear running the rightmost pumps.
The D is a door that lets water into the system. Should only be needed the first time, to prime it.
The bottom _ is another pressure plate, also hooked to the bridge and floodgate (but not the gear).

This should work, but it needs another 100 ticks after operation so that it returns to usable conditions, and something to activate the gear after that.

EDIT: Actually, it wouldn't work because floodgates and bridges don't work on toggle. Ah, well. t'was a good idea.
« Last Edit: August 06, 2009, 10:53:28 am by DeathOfRats »
Logged

Shakma

  • Bay Watcher
    • View Profile
Re: Water Clock
« Reply #11 on: August 06, 2009, 10:17:37 am »

DeathOfRats

I think yours works fine but I don't know that it has clockwork accuracy.  I think you'd need to eliminate any water falling or flowing.  The water flow from the three pump inputs might be enough to throw it off a little. 

If pressure can be made high enough on a repeater input that it always moves in one tick, it should fix that. 
Logged

jseah

  • Bay Watcher
    • View Profile
Re: Water Clock
« Reply #12 on: August 06, 2009, 10:27:16 am »

Actually, no.  You don't need it to be perfectly accurate.  Just accurate on average. 

It's the Central Limit Theorem basically.  At around 50+ die rolls of "random" water movement, it'll tend towards a normal distribution. 

Given that it's 900+ 7/7 water blocks per season from a pump, we're talking about an error rate that's tiny in the extreme. 
Logged

DeathOfRats

  • Bay Watcher
    • View Profile
Re: Water Clock
« Reply #13 on: August 06, 2009, 10:32:22 am »

Shakma, it's perfectly accurate for one reason: 100 ticks to close the bridge & floodgate >>> time necessary for the water to clear the top and achieve 7/7 on the bottom pump input. Other than that, there's no more water flow.

EDIT: Actually, it'd be accurate... if it worked. Since floodgates and bridges don't work on toggle, unlike gears, it doesn't work. Pity

I haven't tested the one you mentioned yet, since I wasn't going to fire up DF at work :P Also, can you please provide a link to that mini repeater you mentioned? That's the key part for your design, since it needs to repeat perfectly every tick.
« Last Edit: August 06, 2009, 10:54:32 am by DeathOfRats »
Logged

Shakma

  • Bay Watcher
    • View Profile
Re: Water Clock
« Reply #14 on: August 06, 2009, 11:01:44 am »

Shakma, it's perfectly accurate for one reason: 100 ticks to close the bridge & floodgate >>> time necessary for the water to clear the top and achieve 7/7 on the bottom pump input. Other than that, there's no more water flow.

I haven't tested the one you mentioned yet, since I wasn't going to fire up DF at work :P Also, can you please provide a link to that mini repeater you mentioned? That's the key part for your design, since it needs to repeat perfectly every tick.

Repeater link:
http://www.bay12games.com/forum/index.php?topic=33563.0
Although I think you'd still need a little work to make it have any change in timing. 

I don't quite get all of yours Death.  Why do you need a second pressure plate at the bottom and won't the FG destroy water and mess it up?  The one pressure plate seems enough and the FG seems unnecessary.  The timing will still depend on the water falling from the top to allow the pump to clear the water off the top PP so I don't know that it will work with perfect accuracy.

jseah-

You can have it average but it depends on if someone wants it to the exact tick or not.  Also, figuring out average timing would be a hugh pain.  Getting somthing with exact accuracy would make it easy to project over a year or season.
Logged
Pages: [1] 2 3 4