Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: A hydrodynamics question  (Read 2075 times)

h27kim

  • Bay Watcher
    • View Profile
A hydrodynamics question
« on: April 06, 2017, 09:35:28 pm »

Something that I kept running into while designing the plumbing system to a fortress, as this seems a bit different from my understanding of how hydrodynamics in DF is supposed to work.

My understanding was that, if the water is pressurized (i.e. it does not flow out anywhere), it rises to the same z level as with the source in a u-tube, but it does not seem to me if the rule applies if the "source" is an artificial reservoir.

What I did was to first create a moat/reservoir by diverting the local stream via a dam.  This, reservoir, in turn, was connected via a u-tube, blocked by a bridge along the way, to another system of pipes/corridors inside the fortress, complete with what I expected would be a fully automated system powered by a water wheel--which required the corridor to fill up slowly.  The first attempt, where I set up the pipe/corridor at the same z level as the source failed because the water wouldn't rise to the level--it just rose to the z-level below.  But, when I revised the set up so that the water wheel was set up one z-level below, it still wouldn't kick off because the entire level (with the water "pipe") got flooded at once and the water wheel didn't budge--which, I suppose, is what the "hydrodynamics" discussion refers to as the water being "teleported." 

So is it at all possible to use a u-tube to gradually fill up the ductwork at a particular z-level?  I suppose I could have made things a lot simpler if I just used fortifications and bridge to fill the pipes directly from the moat/reservoir...but that's not very dwarfy, I think.
Logged

MrWiggles

  • Bay Watcher
  • Doubt Everything
    • View Profile
Re: A hydrodynamics question
« Reply #1 on: April 06, 2017, 09:38:33 pm »

I think this needs pictures, or drawings.
Logged
Doesn't like running from bears = clearly isn't an Eastern European
I'm Making a Mush! Navitas: City Limits ~ Inspired by Dresden Files and SCP.
http://www.bay12forums.com/smf/index.php?topic=113699.msg3470055#msg3470055
http://www.tf2items.com/id/MisterWigggles666#

Mostali

  • Bay Watcher
    • View Profile
Re: A hydrodynamics question
« Reply #2 on: April 06, 2017, 10:33:03 pm »

Let's assume you've read Water in a U-Bend, specifically drawing attention to diagram A and diagram B.  How is your water behaving differently than those diagrams?

As for "gradually filling" - teleporting water is extremely fast.  Flowing water, on the other hand, is pretty slow - at least slow enough for dwarves to outrun.  If you want something to gradually fill then you need a pressure regulator so the water flows into where you want it.

Edit:  On rereading, I think I realize the problem.  You are correct that a reservoir will behave differently than a river.  A river has water getting pushed into it from the edge of the map.  If it has an acceptable exit - then no pressure.  But if dammed, then it is pressured.  The top layer of a standing reservoir isn't pressured since nothing is trying to fill it.  But every layer below the top layer is pressured by the layers above it.
« Last Edit: April 06, 2017, 10:40:17 pm by Mostali »
Logged

h27kim

  • Bay Watcher
    • View Profile
Re: A hydrodynamics question
« Reply #3 on: April 07, 2017, 04:07:31 pm »

It's a mix of the situation in Diagram A and Diagram B, from the linked wiki page, with a water wheel located on the right side.

The reservoir was initially being fed from a stream that was not dammed.  So I was thinking the situation was that of Diagram A.  So I tried again, after damming the stream--the water is still being fed from the reservoir.  Same thing.  The water fills up to z-1 level only.  But, in both cases, water fills up the entire area instantaneously--not good since you need water level differential to power the water wheel.  So, I'm trying to devise a scheme where water rises up to some level on "the other side" via the u-tube, but, at least for the top level, the water fills up gradually (in order to power the water wheel).  I wonder if, given the current state of hydrodynamic modeling, this is at all possible.

I think Mostali is right that a reservoir, no matter what, is not going to be "pressurized" the way a river is, with the water being actively fed into it.  But, it also leaves unresolved whether a water wheel can be powered at the top of a u-tube, so to speak, whether at the same z level or z-1 level:  if water fills up the entire length, no water level differential, so no u-tube with an automatic water wheel, it seems.

Thanks!
Logged

vanatteveldt

  • Bay Watcher
    • View Profile
Re: A hydrodynamics question
« Reply #4 on: April 07, 2017, 10:14:42 pm »

IIRC, a water wheel requires that the water has flowed to the edge of the map once. So you can divert a river to drain to the map edge or cavern, then close off the drain again, and the water will remember the "flow" and can be used safely for wheels. But maybe this changed in recent updates?
Logged

Mostali

  • Bay Watcher
    • View Profile
Re: A hydrodynamics question
« Reply #5 on: April 08, 2017, 12:41:00 am »

A water wheel doesn't require that water flow to the edge of the map, it's just an easy way to guarantee the water flows.  There are also a number of exploits to get small amounts of water to be considered "flowing" for the purpose of water wheels.  For a larger yet still finite amount of water you can construct a pump to move water from one side of the water wheel to the other creating a continuous artificial flow for a small portion of the water wheel's power.  I'm still pretty sure this would be considered an exploit since it does provide perpetual excess power.

My frank advice, if you're not into using exploits, is to design a system that should work if the model were perfect, and then use an exploit to actually make it work.
Logged

Dunamisdeos

  • Bay Watcher
  • Duggin was the hero we needed.
    • View Profile
Re: A hydrodynamics question
« Reply #6 on: April 08, 2017, 10:21:38 am »

I think this needs pictures, or drawings.

*diagrams fly from Dunamisdeos' outstretched hands*

DON'T WORRY BROS I GOT THIS.


It is also easy to add wells to your underground pipe system. Just make sure that the water flows diagonally from the pressurized pipe to the well area. Your dwarves should have no problem escaping the rapidly filling well area, and the water will not rise above the well level.


*vanishes in smoke*
« Last Edit: April 08, 2017, 10:26:19 am by Dunamisdeos »
Logged
FACT I: Post note art is best art.
FACT II: Dunamisdeos is a forum-certified wordsmith.
FACT III: "All life begins with Post-it notes and ends with Post-it notes. This is the truth! This is my belief!...At least for now."
FACT IV: SPEECHO THE TRUSTWORM IS YOUR FRIEND or BEHOLD: THE FRUIT ENGINE 3.0

PatrikLundell

  • Bay Watcher
    • View Profile
Re: A hydrodynamics question
« Reply #7 on: April 08, 2017, 12:50:24 pm »

I would not take Dunamisdeos' assurance of dwarf escapes for granted. I've lost morons while filling a cistern because they found it was a good idea to take the shortcut through it when hauling stone from the other side. Since then I set up traffic restrictions in the cistern AND forbid any stone on the other side of it until it's full.
Logged

Dunamisdeos

  • Bay Watcher
  • Duggin was the hero we needed.
    • View Profile
Re: A hydrodynamics question
« Reply #8 on: April 08, 2017, 01:02:02 pm »

I would not take Dunamisdeos' assurance of dwarf escapes for granted. I've lost morons while filling a cistern because they found it was a good idea to take the shortcut through it when hauling stone from the other side. Since then I set up traffic restrictions in the cistern AND forbid any stone on the other side of it until it's full.

I second this if your cistern is anywhere near a walking path. My method is, however, designed to tap into already-existing bodies of water like lakes, aquifers, and cavern sources.
« Last Edit: April 08, 2017, 02:42:28 pm by Dunamisdeos »
Logged
FACT I: Post note art is best art.
FACT II: Dunamisdeos is a forum-certified wordsmith.
FACT III: "All life begins with Post-it notes and ends with Post-it notes. This is the truth! This is my belief!...At least for now."
FACT IV: SPEECHO THE TRUSTWORM IS YOUR FRIEND or BEHOLD: THE FRUIT ENGINE 3.0

Pseudo

  • Bay Watcher
    • View Profile
Re: A hydrodynamics question
« Reply #9 on: April 08, 2017, 04:01:57 pm »

I like to think of pumps and river edges as though they were pouring water into the tile in question from above. If you do that, then flow mechanics are substantially more consistent: fluids will move down or toward equalization with a neighbor, and water (or pumped magma) will teleport anywhere orthogonally connected to a water (magma) tile below, so long as it doesn't ever go up above the level of said tile.

Also: floor grates are your friend when it comes to digging into water.
Logged
The lady the dog the paper the boy writ hit bit knit.

English is weird.