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.

Difference between revisions of "v0.31:Pressure"

From Dwarf Fortress Wiki
Jump to navigation Jump to search
(→‎Advanced Pressure: Added diagram to clarify the lazy model of pressure.)
Line 40: Line 40:
  
 
==Advanced Pressure==
 
==Advanced Pressure==
 +
=== Lazy model ===
 
Pressure is a lazy model, but will ''always'' behave like above. For example, a system on z0 receives water from a cistern z3 in amounts of ~3/tick. This system consists of a tree of passages, one tile wide, and contains 'underpasses' on z-1. Water will flow into the system to a depth of 7 before coming up on the other side of a the first underpass, as is expected. However, if faced with ''two'' underpasses, it will choose the nearest one and fill all the system on the other side of that underpass to a depth of 7 before filling the system on the other side of the far underpass. Similarly, if faced with multiple exits from the system, the whole flow will flow out of ''one'' exit, the nearest lowest one.{{verify}}
 
Pressure is a lazy model, but will ''always'' behave like above. For example, a system on z0 receives water from a cistern z3 in amounts of ~3/tick. This system consists of a tree of passages, one tile wide, and contains 'underpasses' on z-1. Water will flow into the system to a depth of 7 before coming up on the other side of a the first underpass, as is expected. However, if faced with ''two'' underpasses, it will choose the nearest one and fill all the system on the other side of that underpass to a depth of 7 before filling the system on the other side of the far underpass. Similarly, if faced with multiple exits from the system, the whole flow will flow out of ''one'' exit, the nearest lowest one.{{verify}}
 +
Lazy Pressure Illustrated
 +
    Two step reservoir     
 +
        Side View
 +
 +
supply
 +
  |
 +
  v %%<font color=blue>≈≈≈</font>▒      %% = Pump
 +
  <font color=blue>≈≈≈</font>▒▒<font color=blue>≈≈≈</font>▒<font color=blue>≈≈≈</font>▒  <font color=blue>≈</font> = Water
 +
  ▒▒▒▒▒▒▒<font color=blue>≈≈≈≈≈</font>▒  ▒ = Solid Ground
 +
        ▒<font color=blue>≈≈≈≈≈</font>▒
 +
        ▒▒▒▒▒▒▒
 +
Here the upper left part of the reservoir (directly right of the pump) will fill to 7/7 before the rightmost part will start overflowing the rightmost wall.
  
 
===Waterfalls===
 
===Waterfalls===

Revision as of 15:13, 10 April 2011

This article is about an older version of DF.


Dwarf Fortress features some pretty complex behavior in an attempt to simulate fluid mechanics. One aspect of this behavior is seen in the form of pressure. The basic idea here is quite simple, Template:L such as Template:L and in some cases Template:L can become pressurized which can result in them being pushed back up into other areas by the weight of the fluid.

A demonstration of pressure using U-Bends

A U-Bend is a channel that digs down, and curves back up. With pressure a Template:L will be pushed up the other side of the u-bend in an attempt to equalize the pressure. By understanding how pressure works in a u-bend you should be able to adapt this knowledge to use fluids in any configuration you desire without any unexpected surprises that could make life in your fortress more Template:L than anticipated. Template:L and Template:L both behave very differently with regards to pressure, so read carefully.

Water in a U-Bend

The following three diagrams demonstrate different ways water might behave in a u-bend. In all three cases, the water source is on the left side of the diagram and water is filling the area to the right. In the first example (Diagram A), we have water taken directly from a river used to fill a u-bend. In this case, because the river is free to flow out the edge of the map the water never fully pressurizes which results in the water stopping one level below the actual level of the river itself. This behavior applies to water taken from any infinite water source.

In the next example (Diagram B), a dam has been placed preventing the river from flowing off the edge of the map. Because of this, the water soon becomes fully pressurized and quickly fills up the remaining level of the u-bend. Use caution when placing a dam on your river.

The final example (Diagram C), demonstrates how a Template:L pressurizes water up to the level of the pump. In this case the water is actually being taken to one level above the river because it is being pressurized by the pump.

With these three simple examples, you should be ready to go build your enormous plumbing masterpiece, and be relatively safe from any unanticipated flooding. If you plan to work with Template:L as well however, you should read further.

  Diagram A       Diagram B       Diagram C
    River       Dammed River      Screw Pump
  Side View       Side View       Side View
≈≈≈▒ ▒≈≈≈≈≈≈▒ %%≈≈≈▒ %% = Template:L ▒▒▒≈≈≈▒ ▒▒▒≈≈≈▒ ▒≈≈≈▒▒≈≈≈ = Water ▒≈≈≈▒ ▒≈≈≈▒ ▒▒▒▒▒▒≈≈≈▒ ▒ = Solid Ground ▒≈≈≈≈≈▒ ▒≈≈≈≈≈▒ ▒≈≈≈≈≈▒ ▒▒▒▒▒▒▒ ▒▒▒▒▒▒▒ ▒▒▒▒▒▒▒

Magma in a U-bend

Template:L behaves very differently from Template:L because it will not normally retain any pressure. In our first magma example (Diagram A) we show how this works by creating a short u-bend and connecting it up to a magma pipe - because Template:L is not a pressurized fluid, it simply fills the lowest point and makes no further attempt to go back up.

Do not however make the mistake of thinking that Template:L can never be pressurized. In the second diagram (Diagram B) we see how with the addition of a single Template:L, the entire situation changes dramatically. The screw pump is pressurizing the magma so that it will now fill the area back up to the level of the pump. Accidentally flooding your fortress with Template:L is considerably more Template:L than a flood of Template:L.

  Diagram A       Diagram B
  Magma Pipe      Screw Pump
  Side View       Side View
≈≈≈▒ %%≈≈≈▒ %% = Template:L≈≈≈▒ ▒ ▒≈≈≈▒▒≈≈≈ = Magma ▒≈≈≈▒ ▒ ▒≈≈≈▒▒≈≈≈▒ ▒ = Solid Ground ▒≈≈≈≈≈≈≈▒ ▒≈≈≈▒▒≈≈≈≈≈▒ ▒≈≈≈▒▒▒▒▒ ▒≈≈≈▒▒▒▒▒▒▒▒

Advanced Pressure

Lazy model

Pressure is a lazy model, but will always behave like above. For example, a system on z0 receives water from a cistern z3 in amounts of ~3/tick. This system consists of a tree of passages, one tile wide, and contains 'underpasses' on z-1. Water will flow into the system to a depth of 7 before coming up on the other side of a the first underpass, as is expected. However, if faced with two underpasses, it will choose the nearest one and fill all the system on the other side of that underpass to a depth of 7 before filling the system on the other side of the far underpass. Similarly, if faced with multiple exits from the system, the whole flow will flow out of one exit, the nearest lowest one.[Verify]

Lazy Pressure Illustrated
   Two step reservoir      
       Side View 

supply
  |
  v %%≈≈≈▒       %% = Pump
 ≈≈≈▒▒≈≈≈≈≈≈ = Water
 ▒▒▒▒▒▒▒≈≈≈≈≈▒   ▒ = Solid Ground
       ▒≈≈≈≈≈▒ 
       ▒▒▒▒▒▒▒ 

Here the upper left part of the reservoir (directly right of the pump) will fill to 7/7 before the rightmost part will start overflowing the rightmost wall.

Waterfalls

Waterfalls are of special concern. When drawing water from a waterfall it is important to understand that this water may be pressurized up to the highest point of the waterfall. So that if you tap into a natural waterfall at the low side you could very easily flood your entire fortress very quickly.

Neutralizing Pressure

There are two methods for depressurizing fluids when this is needed. Either Diagonal connections or carefully used screw pumps can eliminate problems with pressurized fluids. Knowing how to pressurize and depressurize water as needed allows you to quickly move fluids wherever you wish in your fortress allowing you to build things a dwarf can be proud of.

Diagonal Flow

Diagonal Template:L fluids create a unique behavior which neutralizes all pressure. By forcing fluids through a diagonal connection you can neutralize all pressure quite easily. Neutralized water will fill U-bends to exactly one z-level below the level that the diagonal is on. A result of this is that a tunnel system that spans several z-levels, but is connected to a river only by a diagonal tile, will fill only to one z-level lower than the river, but if an orthogonal connection is created, it will fill up another level.

Here is a top-down diagram of neutralizing the flow of a river.

Top View
▒▒▒▒▒▒ ▒▒▒▒▒▒▒▒▒≈≈≈≈▒▒▒▒▒▒▒▒ Direction -> ≈≈≈≈≈≈≈≈≈≈ -> of -> ≈≈≈≈≈≈≈≈≈≈ -> Flow -> ≈≈≈≈≈≈≈≈≈≈ -> ▒▒▒▒▒▒▒▒≈≈≈≈▒▒▒▒▒▒▒▒▒ ▒▒▒▒▒▒
▒ = wall, constructed or undug = pressurized water = neutral/normal water pressure

This does not work on a vertical basis - water only travels vertically to a different z-level, never diagonally.

If you wish to maintain the rate of Template:L after de-pressurizing, it's recommended that you have more diagonals than water tiles - that is, if the source is 3-tiles wide, you may wish 4 or more diagonal passages.

Checker-Board Pressure Regulator

Top View
▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒ > > > ▒ ▒ ▒ > > > 4Z Deep ▒ ▒ 1Z Deep > > > ▒ ▒ ▒ > > > ▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒
Side View 
▒ V ▒ ▒ V ▒ Well ▒ V ▒▒▒▒▒▒▒▒▒▒▒▒▒▒ ▒ ▒ > > RRR >>> ^▒ RRR = Regulator design as seen in top view ▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒

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 Template:L instead of Template:L, 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 axles or gear assemblies need to be placed above the solid 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 transfer power between themselves automatically.

Side view
                      
    Power  Water       Key
      ↓    ↓↓↓↓↓       ▒ = Normal wall
▒▒▒▒▒▒▒▒▒▒≈≈≈≈≈        = Wall that pressurised water would flow into if it were to be dug out
▒▒▒▒▒▒▒▒▒▒▒≈≈≈≈        = Regular water
_ ___▒▒▒▒▒▒▒▒≈≈        = Pressurised water
▒≈≈≈≈≈%%≈≈≈≈≈≈≈≈      %% = Pump
▒▒▒▒▒▒▒▒≈▒▒▒▒▒▒▒        = Axle
▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒       _ = Floor

Do note that the water output from the screw pump will be pressurized as per the U-bend diagrams above, but said pressure will be independent of the source and can be subsequently 'reset' by additional pumps or diagonal gaps.

Hatches

Template:L can be placed over Template:L, Template:L, Template:L etc to prevent Template:L moving vertically but will still allow the tile to be used, even as a water source (and possibly still for fishing too).

See Also