v50 Steam/Premium information for editors
  • v50 information can now be added to pages in the main namespace. v0.47 information can still be found in the DF2014 namespace. See here for more details on the new versioning policy.
  • Use this page to report any issues related to the migration.
This notice may be cached—the current version can be found here.

Editing 40d:Pressure

Jump to navigation Jump to search

Warning: You are not logged in.
Your IP address will be recorded in this page's edit history.

You are editing a page for an older version of Dwarf Fortress ("Main" is the current version, not "40d"). Please make sure you intend to do this. If you are here by mistake, see the current page instead.

The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then save the changes below to finish undoing the edit.

Latest revision Your text
Line 1: Line 1:
{{av}}{{Quality|Masterwork}}
+
{{av}}
 
There are several mechanisms at work that try to simulate '''water pressure''' in game. While on the whole amazingly accurate, there are several unexpected quirks concerning speed and displacement. Never think you are on the safe side, especially when trying to trick the game.
 
There are several mechanisms at work that try to simulate '''water pressure''' in game. While on the whole amazingly accurate, there are several unexpected quirks concerning speed and displacement. Never think you are on the safe side, especially when trying to trick the game.
  
Line 9: Line 9:
 
This is probably one of the most prominent components, as Toady discussed it at length in an interview with [http://www.gamasutra.com/view/feature/3549/interview_the_making_of_dwarf_.php?page=10 gamasutra].
 
This is probably one of the most prominent components, as Toady discussed it at length in an interview with [http://www.gamasutra.com/view/feature/3549/interview_the_making_of_dwarf_.php?page=10 gamasutra].
  
In layman's terms, if you have a body of water that is higher than an open space below it (such as a tall tower full of water and a hose from it, or a [[lake]] over a mine), and an open route between them, then the water at the lowest [[z-level]] will be 'pressed' by the weight of the water above it.  
+
In layman's terms, if you have a body of water that is higher than an open space below it (such as a tall tower full of water and a hose from it, or a {{L|lake}} over a mine), and an open route between them, then the water at the lowest {{L|z-level}} will be 'pressed' by the weight of the water above it.  
  
As a simple model, think of a pipe shaped like a "J". If you pour water in the taller end of the pipe, it will come "up" out of the lower end until the water levels on both sides are equal.  If you put your thumb over the lower end and fill the taller end, then release your thumb, the water will move with remarkable speed, and water will continue to come "up" out that lower end until all the water in the taller part is at the same level as the lower part.  This is one part of Dwarf Fortress "water pressure" -  that if the source is higher, water can come up [[stair]]s, up [[ramp]]s, and over [[channel]], and will continue flowing until it runs out of space or runs out of water above it.
+
As a simple model, think of a pipe shaped like a "J". If you pour water in the taller end of the pipe, it will come "up" out of the lower end until the water levels on both sides are equal.  If you put your thumb over the lower end and fill the taller end, then release your thumb, the water will move with remarkable speed, and water will continue to come "up" out that lower end until all the water in the taller part is at the same level as the lower part.  This is one part of Dwarf Fortress "water pressure" -  that if the source is higher, water can come up {{L|stair}}s, up {{L|ramp}}s, and over {{L|channel}}, and will continue flowing until it runs out of space or runs out of water above it.
  
Note that DF water pressure does not ''exactly'' match natural hydrostatic water pressure - it fills to a [[z-level]] ''one level lower'' than the source.  (This is for reasons of CPU time-saving, as stated by [[Toady]]; the game stops not when all ends of the system are on the same level, but when the far levels are one-lower than the source.) The above behaviour does only apply to finite water sources like murky pools, artificially created reservoirs and any body of water connected to an infinite water source only diagonally. More to the point, it applies always, but is in many cases not the final mechanism causing equilibrium.
+
Note that DF water pressure does not ''exactly'' match natural hydrostatic water pressure - it fills to a {{L|z-level}} ''one level lower'' than the source.  (This is for reasons of CPU time-saving, as stated by [[Toady]]; the game stops not when all ends of the system are on the same level, but when the far levels are one-lower than the source.) The above behaviour does only apply to finite water sources like murky pools, artificially created reservoirs and any body of water connected to an infinite water source only diagonally. More to the point, it applies always, but is in many cases not the final mechanism causing equilibrium.
  
 
== Pressure from infinite water sources ==
 
== Pressure from infinite water sources ==
 
Different from the above, a river that pushes water into a tunnel system will fill it up to the z-level of the river itself, but not higher (again, unless only connected by diagonal flow, see below).
 
Different from the above, a river that pushes water into a tunnel system will fill it up to the z-level of the river itself, but not higher (again, unless only connected by diagonal flow, see below).
  
When the water source is a [[river]] which is allowed to drain off the edge of the map, the final Z-level will never fill - however, if a [[dam]] prevents the river from draining, it will continue to fill up to its own Z-level.
+
When the water source is a {{L|river}} which is allowed to drain off the edge of the map, the final Z-level will never fill - however, if a {{L|dam}} prevents the river from draining, it will continue to fill up to its own Z-level.
  
 
== Other/Missing mechanisms==
 
== Other/Missing mechanisms==
 
Dwarf Fortress does not model surface friction nor air pressure, so the water will not slow in transit nor will 'trapped air bubbles' form. Unless pumped, magma does not have pressure (it cannot flow up, and doesn't appear to move at greater speeds).
 
Dwarf Fortress does not model surface friction nor air pressure, so the water will not slow in transit nor will 'trapped air bubbles' form. Unless pumped, magma does not have pressure (it cannot flow up, and doesn't appear to move at greater speeds).
  
As can be expected, if water is continuously pushed into a room, either by an unlimited water source like a river or by means of a [[pump]], the water will not stop when the room is filled, but search for an outlet, even on higher z-levels. If there is an outlet, but it can not take all the water coming in, the water will look for further outlets.  
+
As can be expected, if water is continuously pushed into a room, either by an unlimited water source like a river or by means of a {{L|pump}}, the water will not stop when the room is filled, but search for an outlet, even on higher z-levels. If there is an outlet, but it can not take all the water coming in, the water will look for further outlets.  
  
It's possible for dwarf-built [[pump]]s to pick liquid up and lift it higher, possibly back to the source and thus creating a closed cycle. Beware that operating pumps obey the same pressure rules as infinite water sources, capable of pushing both water '''and''' magma down through tunnels and back up to the original Z-level of the pump's output tile.
+
It's possible for dwarf-built {{L|pump}}s to pick liquid up and lift it higher, possibly back to the source and thus creating a closed cycle. Beware that operating pumps obey the same pressure rules as infinite water sources, capable of pushing both water '''and''' magma down through tunnels and back up to the original Z-level of the pump's output tile.
  
 
== Dangers ==
 
== Dangers ==
 
It is easy to flood your fortress accidentally by not accounting for water pressure. For example:
 
It is easy to flood your fortress accidentally by not accounting for water pressure. For example:
* It is safe to dig out a [[cistern]] one level below a murky pool, and to channel above a few tiles of the [[cistern]] so that your dwarves can get water from it without having to go outside.
+
* It is safe to dig out a {{L|cistern}} one level below a murky pool, and to channel above a few tiles of the {{L|cistern}} so that your dwarves can get water from it without having to go outside.
 
* It is safe to refill a murky pool with water from a pump or brook/river/etc on the same level.
 
* It is safe to refill a murky pool with water from a pump or brook/river/etc on the same level.
* It is not safe to do both to the same pool! The water from the pump/brook/river/whatever will fill the pool to 7/7, and will then pressurize the water in the [[cistern]], which will then flow up out of your channels and flood your fort.
+
* It is not safe to do both to the same pool! The water from the pump/brook/river/whatever will fill the pool to 7/7, and will then pressurize the water in the {{L|cistern}}, which will then flow up out of your channels and flood your fort.
  
 
===Waterfalls===
 
===Waterfalls===
Line 45: Line 45:
 
                 ######
 
                 ######
 
         #########<font color="#2FB6FF">≈</font><font color="#2FB6FF">≈</font><font color="#2FB6FF">≈</font><font color="#2FB6FF">≈</font>########
 
         #########<font color="#2FB6FF">≈</font><font color="#2FB6FF">≈</font><font color="#2FB6FF">≈</font><font color="#2FB6FF">≈</font>########
   <font color="blue">'''Direction->'''</font><font color="blue">≈</font><font color="blue">≈</font><font color="blue">≈</font><font color="blue">≈</font>#<font color="#2FB6FF">≈</font><font color="#2FB6FF">≈</font><font color="#2FB6FF">≈</font><font color="#2FB6FF">≈</font><font color="#2FB6FF">≈</font><font color="#2FB6FF">≈</font> <font color="#2FB6FF">-></font>
+
   <font color="blue">'''Direction->'''</font> <font color="blue">≈</font><font color="blue">≈</font><font color="blue">≈</font><font color="blue">≈</font>#<font color="#2FB6FF">≈</font><font color="#2FB6FF">≈</font><font color="#2FB6FF">≈</font><font color="#2FB6FF">≈</font><font color="#2FB6FF">≈</font><font color="#2FB6FF">≈</font> <font color="#2FB6FF">-></font>
   <font color="blue">'''  of    ->'''</font><font color="blue">≈</font><font color="blue">≈</font><font color="blue">≈</font><font color="blue">≈</font><font color="blue">≈</font>#<font color="#2FB6FF">≈</font><font color="#2FB6FF">≈</font><font color="#2FB6FF">≈</font><font color="#2FB6FF">≈</font><font color="#2FB6FF">≈</font> <font color="#2FB6FF">-></font>
+
   <font color="blue">'''  of    ->''' </font><font color="blue">≈</font><font color="blue">≈</font><font color="blue">≈</font><font color="blue">≈</font><font color="blue">≈</font>#<font color="#2FB6FF">≈</font><font color="#2FB6FF">≈</font><font color="#2FB6FF">≈</font><font color="#2FB6FF">≈</font><font color="#2FB6FF">≈</font> <font color="#2FB6FF">-></font>
   <font color="blue">'''  Flow  ->'''</font><font color="blue">≈</font><font color="blue">≈</font><font color="blue">≈</font><font color="blue">≈</font><font color="blue">≈</font><font color="blue">≈</font>#<font color="#2FB6FF">≈</font><font color="#2FB6FF">≈</font><font color="#2FB6FF">≈</font><font color="#2FB6FF">≈</font> <font color="#2FB6FF">-></font>
+
   <font color="blue">'''  Flow  ->'''</font> <font color="blue">≈</font><font color="blue">≈</font><font color="blue">≈</font><font color="blue">≈</font><font color="blue">≈</font><font color="blue">≈</font>#<font color="#2FB6FF">≈</font><font color="#2FB6FF">≈</font><font color="#2FB6FF">≈</font><font color="#2FB6FF">≈</font> <font color="#2FB6FF">-></font>
 
         ###########<font color="#2FB6FF">≈</font>#########
 
         ###########<font color="#2FB6FF">≈</font>#########
 
                   ###<br />
 
                   ###<br />
Line 61: Line 61:
  
 
=====Hatches=====
 
=====Hatches=====
[[Hatch]]es can be placed over [[channel]]s, [[stair]]s, [[ramp]]s etc. to prevent [[water]] moving vertically but still allow the tile to be used, even as a water source (and possibly still for fishing too).
+
{{L|Hatch}}es can be placed over {{L|channel}}s, {{L|stair}}s, {{L|ramp}}s etc to prevent {{L|water}} moving vertically but still allow the tile to be used, even as a water source (and possibly still for fishing too).
  
 
=====Pumps=====
 
=====Pumps=====
Water pressure does not propagate through pumps, so it is possible to fill a pool using a screw pump without it having the same pressure as its source. Of course, there is a downside - you still have to run the pumps and due to the source water's pressure, the pump must be [[power]]ed instead of [[pump operator|run by a dwarf]], as the tile the dwarf needs to stand on is filled by water. Furthermore, the pump will likely need to be powered from above or below (as water would simply flow around a gear or axle placed next to the pump), though creative setups are still possible by using additional screw pumps to transmit power.
+
Water pressure does not propagate through pumps, so it is possible to fill a pool using a screw pump without it having the same pressure as its source. Of course, there is a downside - you still have to run the pumps and due to the source water's pressure, the pump must be {{L|power}}ed instead of {{L|pump operator|run by a dwarf}}, as the tile the dwarf needs to stand on is filled by water. Furthermore, the pump will likely need to be powered from above or below (as water would simply flow around a gear or axle placed next to the pump), though creative setups are still possible by using additional screw pumps to transmit power.
  
Your vertical [[axle]]s or gear assemblies need to be placed above the unwalkable tile of the pump, and there must not be a channel over the walkable pump tile. (Water can only flow straight upward, not up and to the side at the same time.) Multiple adjacent pumps will also [[Power#Power transfer|transfer power]] between themselves automatically.
+
Your vertical {{L|axle}}s or gear assemblies need to be placed above the unwalkable tile of the pump, and there must not be a channel over the walkable pump tile. (Water can only flow straight upward, not up and to the side at the same time.) Multiple adjacent pumps will also {{L|Power#Power transfer|transfer power}} between themselves automatically.
  
 
  Side view
 
  Side view
Line 84: Line 84:
  
 
* If a tile contains water which is floating on top of another tile of 7/7 water (and apparently only if there is no water above it{{verify}}), the water in the upper Z-level will be pushed downward and moved to the nearest orthogonal (not diagonal) tile on the lowest available Z-level, up to the Z-level just below the top. Each tile of liquid performs this check once every few steps. This type of pressure applies only to water, and is what causes large bodies of water multiple Z-levels deep to rapidly drain when opened.
 
* If a tile contains water which is floating on top of another tile of 7/7 water (and apparently only if there is no water above it{{verify}}), the water in the upper Z-level will be pushed downward and moved to the nearest orthogonal (not diagonal) tile on the lowest available Z-level, up to the Z-level just below the top. Each tile of liquid performs this check once every few steps. This type of pressure applies only to water, and is what causes large bodies of water multiple Z-levels deep to rapidly drain when opened.
* If a liquid source (river/brook source, underground river waterfall tile, map edge, or [[screw pump]] output) attempts to create liquid in its output tile but cannot due to it being full already, the liquid will be created in the nearest orthogonal (not diagonal) tile on the lowest available Z-level, up to the ''same'' Z-level as the source. This applies to both water and magma, and can be observed by damming a river.
+
* If a liquid source (river/brook source, underground river waterfall tile, map edge, or {{L|screw pump}} output) attempts to create liquid in its output tile but cannot due to it being full already, the liquid will be created in the nearest orthogonal (not diagonal) tile on the lowest available Z-level, up to the ''same'' Z-level as the source. This applies to both water and magma, and can be observed by damming a river.
* Liquids adjacent (both orthogonally and diagonally) to non-full tiles will flow into them and average their depths, pushing lightweight objects and creating flow (which will power [[water wheel]]s) if the depth difference was 2 or more.
+
* Liquids adjacent (both orthogonally and diagonally) to non-full tiles will flow into them and average their depths, pushing lightweight objects and creating flow (which will power {{L|water wheel}}s) if the depth difference was 2 or more.
  
 
See [http://www.gamasutra.com/view/feature/3549/interview_the_making_of_dwarf_.php?page=9] and [http://www.gamasutra.com/view/feature/3549/interview_the_making_of_dwarf_.php?page=10] for more info from Toady.
 
See [http://www.gamasutra.com/view/feature/3549/interview_the_making_of_dwarf_.php?page=9] and [http://www.gamasutra.com/view/feature/3549/interview_the_making_of_dwarf_.php?page=10] for more info from Toady.
Line 99: Line 99:
 
* From a pump, fill a cistern which is several levels lower. Shut off the pump and the higher level tiles with hatches once the whole thing is 7/7. Open other hatches above the cistern, combine water with unpressurized water, and see what happens.
 
* From a pump, fill a cistern which is several levels lower. Shut off the pump and the higher level tiles with hatches once the whole thing is 7/7. Open other hatches above the cistern, combine water with unpressurized water, and see what happens.
 
* Determine how much "drainage" is required to handle the output of a single, fully flowing pump.
 
* Determine how much "drainage" is required to handle the output of a single, fully flowing pump.
* Confirm whether water "flow" is slowed by diagonal vs. [[Main:orthogonal|orthogonal]] passages.  Develop some numbers for portioning water flow into smaller amounts, that can be handled by single-tile sized drains.
+
* Confirm whether water "flow" is slowed by diagonal vs. {{L|orthogonal}} passages.  Develop some numbers for portioning water flow into smaller amounts, that can be handled by single-tile sized drains.
  
 
== See Also==
 
== See Also==
:* [[flow]]
+
:* {{L|flow}}
:* [[flood]]ing
+
:* {{L|flood}}ing
:* [[magma]]
+
:* {{L|magma}}
:* [[water]]
+
:* {{L|water}}
:* [[pump]]
+
:* {{L|pump}}
:* [[fun]]
+
:* {{L|fun}}
  
 
{{Water FAQ}}
 
{{Water FAQ}}
  
{{Category|Physics}}
+
[[Category:Physics]]

Please note that all contributions to Dwarf Fortress Wiki are considered to be released under the GFDL & MIT (see Dwarf Fortress Wiki:Copyrights for details). If you do not want your writing to be edited mercilessly and redistributed at will, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource. Do not submit copyrighted work without permission!

To protect the wiki against automated edit spam, we kindly ask you to solve the following CAPTCHA:

Cancel Editing help (opens in new window)