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 v0.34:Flow

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 "v0.34"). 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 12: Line 12:
 
Fluids move mostly as one might expect: they will fall straight down if they can, or else they will spread out to the sides. Fluids can flow diagonally on the same z-level, but will never move sideways and down at the same time. Under basic fluid motion, fluid never moves back up, but it can appear to do so if pressure is involved.
 
Fluids move mostly as one might expect: they will fall straight down if they can, or else they will spread out to the sides. Fluids can flow diagonally on the same z-level, but will never move sideways and down at the same time. Under basic fluid motion, fluid never moves back up, but it can appear to do so if pressure is involved.
  
Here is a quick example of how fluids can move to adjacent tiles. Also as water moves to an adjacent tile flow is generated in both tiles. This flow will remain for a short time before reverting to being non-flowing water. Falling water does ''not'' generate flow, so only the 3rd example will result in flow (in both tiles).  
+
Here is a quick example of how fluids can move to adjacent tiles. Also as water moves to an adjacent tile flow is generated in both tiles. This flow will remain for a short time before reverting back to being non-flowing water. Falling water does ''not'' generate flow, so only the 3rd example will result in flow (in both tiles).  
<diagram>
 
Before (side view)
 
▒[#00f]7[#]▒  ▒[#00f]7[#]▒  ▒
 
▒ ▒  ▒[#00f]2[#]▒  ▒[#00f]7[#]
 
▒▒▒  ▒▒▒  ▒▒▒▒▒
 
  
After (side view)
+
                        '''Before (side view)'''
▒ ▒ ▒[#00f]2[#]▒ 
+
                        ▒7▒      ▒7▒     
[#00f]7[#] [#00f]7[#]▒  ▒[#00f]43[#]
+
                        ▒ ▒       ▒2▒      ▒7
▒▒▒ ▒▒▒ ▒▒▒▒▒
+
                        ▒▒▒      ▒▒▒      ▒▒▒▒▒
</diagram>
+
 
# Fluids move down  
+
                        '''After (side view)'''  
# Fluids spread out to the sides
+
                        ▒ ▒       ▒2▒     
 +
                        ▒7▒      ▒7▒      ▒43
 +
                        ▒▒▒       ▒▒▒       ▒▒▒▒▒
 +
 
 +
*1. Fluids move down  
 +
*2. Fluids spread out to the sides
  
 
These rules are incomplete, however, without consideration of [[pressure]].
 
These rules are incomplete, however, without consideration of [[pressure]].
Line 31: Line 31:
 
==Fluids under pressure, aka Teleportation==
 
==Fluids under pressure, aka Teleportation==
  
Magma, which has no natural pressure, flows according to the rules of basic fluid motion. Water, however, can move by pressure when it falls down on top of full 7/7 water. In addition, pumps create pressure in both water and magma, and water entering the map from a stream or river follows pressure as well.
+
Magma, which has no natural pressure, flows according to the rules of basic fluid motion. Water, however, can move by pressure when it falls down on top of full 7/7 water. In addition, pumps create pressure in both water and magma, and water entering the map at from a stream or river follows pressure as well.
  
 
Fluids moving under '''[[pressure]]''' do not just move to adjacent tiles, they also trace a path through other full tiles of fluid trying to move to more distant tiles. Fluids moving under [[pressure]] can effectively teleport through other tiles that are already filled with fluid. When teleporting, fluids do not generate '''any''' flow, neither will they push objects around.
 
Fluids moving under '''[[pressure]]''' do not just move to adjacent tiles, they also trace a path through other full tiles of fluid trying to move to more distant tiles. Fluids moving under [[pressure]] can effectively teleport through other tiles that are already filled with fluid. When teleporting, fluids do not generate '''any''' flow, neither will they push objects around.
  
<diagram>
+
{{diagram|spaces=yes|\
                 ▒[#00f]7[#]▒
+
                 ▒[#00f]7▒
   Before      ▒[#00f]7[#]▒
+
   Before      ▒[#00f]7▒
                 ▒[#00f]777[#]
+
                 ▒[#00f]7[#00f]7[#00f]7▒
 
                 ▒▒▒▒▒
 
                 ▒▒▒▒▒
 
--------------------
 
--------------------
 
                 ▒ ▒ ▒
 
                 ▒ ▒ ▒
   After        ▒[#00f]7[#]▒[#00f]7[#]
+
   After        ▒[#00f]7▒[#00f]7▒
                ▒[#00f]777[#]▒
+
                ▒[#00f]7[#00f]7[#00f]7▒
 
                 ▒▒▒▒▒
 
                 ▒▒▒▒▒
</diagram>
+
}}
 
 
 
When a fluid tries to move by pressure, it tries to trace a path through full 7/7 fluids going down, and horizontally, but ''not'' diagonally.  In this way it is like basic flow, except that pressure works faster; fluid from the source is teleported to the open space at the end, rather than having to wait for open space to open up at the source via normal flow. This is why, for example, diagonal squeezes in channels make water flow slower (they block pressure, forcing it to only spread out sideways), and why rivers and streams on the map are usually full of 7/7 water until close to the edge of the map where the rules of basic fluid motion are draining the water off the map while pressure teleports new water from the source all the way down to the end.
 
When a fluid tries to move by pressure, it tries to trace a path through full 7/7 fluids going down, and horizontally, but ''not'' diagonally.  In this way it is like basic flow, except that pressure works faster; fluid from the source is teleported to the open space at the end, rather than having to wait for open space to open up at the source via normal flow. This is why, for example, diagonal squeezes in channels make water flow slower (they block pressure, forcing it to only spread out sideways), and why rivers and streams on the map are usually full of 7/7 water until close to the edge of the map where the rules of basic fluid motion are draining the water off the map while pressure teleports new water from the source all the way down to the end.
  
Line 58: Line 57:
 
There's one way to push a fluid higher than its starting level, but it might be considered a bug on the flow mechanics and probably will be changed in following versions since allows for what could be considered exploits.
 
There's one way to push a fluid higher than its starting level, but it might be considered a bug on the flow mechanics and probably will be changed in following versions since allows for what could be considered exploits.
  
A ''natural'' wall of any material '''[[cave-in|falling]]''' onto either water ''or'' '''[[magma]]''' will teleport each tile of displaced fluid to open space directly above it, leaving 1 additional tile of open space directly above the wall itself:
+
A ''natural'' wall of any material '''[[cave-in|falling]]''' onto both water ''or'' '''[[magma]]''' will teleport each tile of displaced fluid to open space directly above it, leaving 1 additional tile of open space directly above the wall itself:
<diagram>
 
 
  Start              Step 1            Step 2
 
  Start              Step 1            Step 2
 
  ▒ ▒ ▒              ▒ ▒ ▒              ▒ ▒ ▒
 
  ▒ ▒ ▒              ▒ ▒ ▒              ▒ ▒ ▒
 
  ▒ I ▒  Collapse  ▒  ▒    Fluid    ▒  ▒
 
  ▒ I ▒  Collapse  ▒  ▒    Fluid    ▒  ▒
  ▒ ▒ ▒ -----------> ▒ [#f00]7[#] ▒ -----------> ▒  ▒
+
  ▒ ▒ ▒ -----------> ▒ 7 ▒ -----------> ▒  ▒
  ▒  ▒  Support    ▒  ▒  Spreads    ▒[#f00]232[#]▒
+
  ▒  ▒  Support    ▒  ▒  Spreads    ▒232▒
  ▒▒[#f00]7[#]▒▒             ▒▒▒▒▒              ▒▒▒▒▒
+
  ▒▒7▒▒             ▒▒▒▒▒              ▒▒▒▒▒
 
  ▒▒▒▒▒              ▒▒▒▒▒              ▒▒▒▒▒
 
  ▒▒▒▒▒              ▒▒▒▒▒              ▒▒▒▒▒
</diagram>
 
 
When done in an u-bend example the pushing above original fluid level can be easily appreciated, although it breaks the laws of regular fluid physics:
 
When done in an u-bend example the pushing above original fluid level can be easily appreciated, although it breaks the laws of regular fluid physics:
<diagram>
 
 
   Start              Step 1              Step 2     
 
   Start              Step 1              Step 2     
 
  ▒ ▒ ▒ ▒              ▒ ▒ ▒ ▒              ▒ ▒ ▒ ▒
 
  ▒ ▒ ▒ ▒              ▒ ▒ ▒ ▒              ▒ ▒ ▒ ▒
 
  ▒ I ▒ ▒              ▒  ▒ ▒              ▒  ▒ ▒
 
  ▒ I ▒ ▒              ▒  ▒ ▒              ▒  ▒ ▒
 
  ▒ ▒ ▒ ▒              ▒  ▒ ▒              ▒  ▒ ▒
 
  ▒ ▒ ▒ ▒              ▒  ▒ ▒              ▒  ▒ ▒
  ▒ ▒ ▒ ▒              ▒ [#f00]7[#] ▒ ▒              ▒  ▒ ▒
+
  ▒ ▒ ▒ ▒              ▒ 7 ▒ ▒              ▒  ▒ ▒
  ▒  ▒ ▒  Collapse  ▒ [#f00]7[#] ▒ ▒    Fluid    ▒  ▒ ▒
+
  ▒  ▒ ▒  Collapse  ▒ 7 ▒ ▒    Fluid    ▒  ▒ ▒
  ▒  ▒ ▒ -----------> ▒  ▒ ▒ -----------> ▒[#f00]545[#]▒
+
  ▒  ▒ ▒ -----------> ▒  ▒ ▒ -----------> ▒545▒
  ▒▒[#f00]7[#]▒▒[#f00]7[#]▒   Support    ▒▒▒▒▒[#f00]7[#]▒   Spreads    ▒▒▒▒▒[#f00]7[#]▒
+
  ▒▒7▒▒7▒   Support    ▒▒▒▒▒7▒   Spreads    ▒▒▒▒▒7▒
  ▒▒[#f00]7777[#]▒             ▒▒▒[#f00]777[#]▒             ▒▒▒[#f00]777[#]▒
+
  ▒▒7777▒             ▒▒▒777▒             ▒▒▒777▒
 
  ▒▒▒▒▒▒▒              ▒▒▒▒▒▒▒              ▒▒▒▒▒▒▒
 
  ▒▒▒▒▒▒▒              ▒▒▒▒▒▒▒              ▒▒▒▒▒▒▒
</diagram>
+
This is the basic principle that the '''[[magma piston]]''' exploit, if you want to prevent a future fix or simply want to simulate regular physics fluid behaviour, you can do something like this:
This is the basic principle that the '''[[magma piston]]''' exploit, if you want to anticipate a future fix or simply want to simulate regular physics fluid behaviour, you can do something like this:
 
<diagram>
 
 
  z-level  Start                  Step 1                Step 2
 
  z-level  Start                  Step 1                Step 2
 
   z+0  ▒ ▒  ▒ ▒              ▒ ▒  ▒ ▒              ▒ ▒  ▒ ▒
 
   z+0  ▒ ▒  ▒ ▒              ▒ ▒  ▒ ▒              ▒ ▒  ▒ ▒
 
   z-1  ▒ |  ▒ ▒              ▒    ▒ ▒              ▒    ▒ ▒
 
   z-1  ▒ |  ▒ ▒              ▒    ▒ ▒              ▒    ▒ ▒
   z-2  ▒ ▒ ▒ ▒ ▒              ▒ [#f00]7 7[#] ▒ ▒              ▒    ▒ ▒
+
   z-2  ▒ ▒ ▒ ▒ ▒              ▒ 7 7 ▒ ▒              ▒    ▒ ▒
   z-3  ▒ ▒ ▒ ▒ ▒  Collapse  ▒ [#f00]7 7[#] ▒ ▒    Fluid    ▒    ▒ ▒
+
   z-3  ▒ ▒ ▒ ▒ ▒  Collapse  ▒ 7 7 ▒ ▒    Fluid    ▒    ▒ ▒
   z-4  ▒    ▒[#f00]?[#]▒ -----------> ▒    ▒[#f00]?[#]▒ -----------> ▒[#f00]55455[#]▒[#f00]?[#]
+
   z-4  ▒    ▒?▒ -----------> ▒    ▒?▒ -----------> ▒55455▒?▒
   z-5  ▒▒[#f00]777[#]▒▒[#f00]7[#]▒   Support    ▒▒▒[#f00]7[#]▒▒▒[#f00]7[#]▒   Spreads    ▒▒▒[#f00]7[#]▒▒▒[#f00]7[#]▒
+
   z-5  ▒▒777▒▒7▒   Support    ▒▒▒7▒▒▒7▒   Spreads    ▒▒▒7▒▒▒7▒
   z-6  ▒▒[#f00]777777[#]▒             ▒▒▒[#f00]7[#]▒[#f00]777[#]▒             ▒▒▒[#f00]7[#]▒[#f00]777[#]▒
+
   z-6  ▒▒777777▒             ▒▒▒7▒777▒             ▒▒▒7▒777▒
 
   z-7  ▒▒▒▒▒▒▒▒▒              ▒▒▒▒▒▒▒▒▒              ▒▒▒▒▒▒▒▒▒
 
   z-7  ▒▒▒▒▒▒▒▒▒              ▒▒▒▒▒▒▒▒▒              ▒▒▒▒▒▒▒▒▒
  
 
       z-3 Top View          z-5 Top View          z-3 Top View (Step 1) z-4 Top View (Step 2)
 
       z-3 Top View          z-5 Top View          z-3 Top View (Step 1) z-4 Top View (Step 2)
 
         ▒▒▒▒▒▒▒                ▒▒▒▒▒▒▒                ▒▒▒▒▒▒▒                ▒▒▒▒▒▒▒
 
         ▒▒▒▒▒▒▒                ▒▒▒▒▒▒▒                ▒▒▒▒▒▒▒                ▒▒▒▒▒▒▒
         ▒    ▒                ▒▒▒▒▒▒▒                ▒    ▒                ▒[#f00]44544[#]▒
+
         ▒    ▒                ▒▒▒▒▒▒▒                ▒    ▒                ▒44544▒
   Axis  ▒ ▒▒▒ ▒▒▒              ▒▒[#f00]777[#]▒▒▒▒             ▒ [#f00]777[#] ▒▒▒              ▒[#f00]45554[#]▒▒▒   Axis
+
   Axis  ▒ ▒▒▒ ▒▒▒              ▒▒777▒▒▒▒             ▒ 777 ▒▒▒              ▒45554▒▒▒   Axis
  --------▒ ▒ ▒ ▒ ▒--------------▒▒[#f00]777[#]▒▒[#f00]7[#]▒--------------▒ [#f00]7 7[#] [#f00]?[#]▒---------------▒[#f00]55455[#]▒[#f00]?[#]▒--------
+
  --------▒ ▒ ▒ ▒ ▒--------------▒▒777▒▒7▒--------------▒ 7 7 ▒?▒---------------▒55455▒?▒--------
   Cut    ▒ ▒▒▒ ▒▒▒              ▒▒[#f00]777[#]▒▒▒▒             ▒ [#f00]777[#] ▒▒▒              ▒[#f00]45554[#]▒▒▒   Cut
+
   Cut    ▒ ▒▒▒ ▒▒▒              ▒▒777▒▒▒▒             ▒ 777 ▒▒▒              ▒45554▒▒▒   Cut
         ▒    ▒                ▒▒▒▒▒▒▒                ▒    ▒                ▒[#f00]44544[#]▒
+
         ▒    ▒                ▒▒▒▒▒▒▒                ▒    ▒                ▒44544▒
 
         ▒▒▒▒▒▒▒                ▒▒▒▒▒▒▒                ▒▒▒▒▒▒▒                ▒▒▒▒▒▒▒
 
         ▒▒▒▒▒▒▒                ▒▒▒▒▒▒▒                ▒▒▒▒▒▒▒                ▒▒▒▒▒▒▒
</diagram>
 
 
This example involves dropping a giant ''(minimum size 3x3x1)'' donut/cylinder/tube of natural walls onto the fluid pool, given that it will teleport a donut/cylinder/tube of fluid in the same way ''(step 1)'' but after it spreads ''(step 2)'' it'll seem that the fluid actually went through the opening in the middle of the donut/cylinder/tube like a real fluid should behave, of course one exception it won't be pushed through the right tube like it should, you'll probably want to close the tile marked with a question mark "?" so it can give the impression of real fluid mechanics.
 
This example involves dropping a giant ''(minimum size 3x3x1)'' donut/cylinder/tube of natural walls onto the fluid pool, given that it will teleport a donut/cylinder/tube of fluid in the same way ''(step 1)'' but after it spreads ''(step 2)'' it'll seem that the fluid actually went through the opening in the middle of the donut/cylinder/tube like a real fluid should behave, of course one exception it won't be pushed through the right tube like it should, you'll probably want to close the tile marked with a question mark "?" so it can give the impression of real fluid mechanics.
  

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)

Templates used on this page: