In other languages: Čeština Deutsch Español Français 日本語 Polski Русский Українська 简体中文

Fluid system: Difference between revisions

From Official Factorio Wiki
Jump to navigation Jump to search
No edit summary
(Update to 2.0 fluid mechanics:)
 
(107 intermediate revisions by 31 users not shown)
Line 1: Line 1:
{{Languages}}
{{Languages}}
Liquids are fluids or gases.
{{Cleanup|This page needs to be updated for Factorio 2.0 release, due to changes in fluid mechanics.}}
'''Fluids''' are non-solid items, such as [[water]] and [[oil]]. They can normally only exist inside entities for fluid handling (like [[pipe]]s), and buildings that have fluids as input ingredients or products (like an [[oil refinery]]).


In v0.9 new liquids like crude oil or petroleum gas were added.
== Fluids ==
[[File:fluids_gui.png|thumb|300px|right|"Fluids" tab on the [[production statistics]] screen.]]
The following fluids are available in-game:


== Types of Liquids ==
: {{Imagelink|Water}} {{Imagelink|Steam}} {{Imagelink|Crude oil}} {{Imagelink|Petroleum gas}} {{Imagelink|Light oil}} {{Imagelink|Heavy oil}} {{Imagelink|Lubricant}} {{Imagelink|Sulfuric acid}} {{Imagelink|Thruster fuel}}{{SA}} {{Imagelink|Thruster oxidizer}}{{SA}} {{Imagelink| Lava}}{{SA}} {{Imagelink| Molten iron}}{{SA}} {{Imagelink|Molten copper}}{{SA}} {{Imagelink|Holmium solution}}{{SA}} {{Imagelink|Electrolyte}}{{SA}} {{Imagelink|Ammoniacal solution}}{{SA}} {{Imagelink|Ammonia}}{{SA}} {{Imagelink|Fluorine}}{{SA}} {{Imagelink|Fluoroketone (hot)}}{{SA}} {{Imagelink|Fluoroketone (cold)}}{{SA}} {{Imagelink|Lithium brine}}{{SA}} {{Imagelink|Plasma}}{{SA}}


* [[Liquids/Types]]
== Mechanics ==
Fluids cannot be carried by the player, moved using [[inserters]], dropped on the ground, nor stored in chests, unless the fluids are stored in [[barrel]]s. They cannot be spilled or even dumped in a lake, and are counted in continuous fractions, rather than discrete integers.<br>
When the player picks up a structure that contains fluids, the contained fluid will try to flow into connected structures and any excess fluid that does not fit is destroyed.


== Piping ==
=== Storage ===
In the game, fluid is held in entities that behave as vessels (fluid boxes) of a defined size (volume). The vessels automatically connect to each other if their inputs/outputs are adjacent (pipes connect to all directions) and allow fluids to flow between them.


* [[Liquids/Piping]]
The '''volume''' of fluid contained in a fluid box is a value between 0 and the maximum volume. For instance, the pipe can hold 100 units of fluid, therefore the value in the pipe can be a number between 0 and 100. The '''level''' of fluid in a given entity is manifested by a percentage of the entity's maximum volume that is being occupied by a fluid. It can be observed in pipes and tanks; they have windows through which the fluid is seen at a certain level, or perhaps even as just a small trickle.
* [[Liquids/Machines]]
* [[Liquids/Pipe physics]]
* [[Liquids/Throughput]]


== Using Water to Generate Power ==
=== Fluid mixing ===
[[File:Pipe_GUI.png|right|frame|GUI of a pipe inside a fluid system containing mixed fluids. Clicking the trash can icon next to a fluid will flush that fluid from the system.]]
The game will prevent players from accidentally mixing fluids when placing most buildings, e.g. [[pipe]]s containing different fluids cannot be placed directly next to each other. However, not every possible case of fluid mixing is considered, so the player may still mix fluids accidentally or by purposely working around the building restrictions. A fluid system containing mixed fluids can be cleared of the undesired fluids in the GUI of a pipe or [[storage tank]] that is part of that fluid system. Fluids that are flushed from pipes or storage tanks are deleted permanently.


You can use every type of liquid, but hot water is the obvious solution.
In a fluid system that contains mixed fluids, the alt-mode fluids icons on its pipes/storage tanks will reflect the fluid that is contained in that specific structure. So, it may look like a fluid system only contains one fluid when looking at the alt-mode icons, when in reality it contains multiple fluids which are located in some other connected structures. The GUI of a connected pipe or storage tank will always show all fluids contained in the fluid system.<br>
This means that if the game disallows connecting two pipes that look like they contain the same fluid with "Cannot connect systems with different fluids", one of the fluid systems contains multiple fluids. This can solved easily by opening the GUIs of the pipes that the game refuses to connect which will show the extra fluid and allow flushing it from the fluid system.


* [[Liquids/Hot]]
=== Flow ===
* [[Electricity/Generator]]
All connected tanks and pipes are treated as a single vessel in that ''the level of fluid must be equal in all parts'', to even out pressure exacted by a higher fluid level on smaller ones. This is why level is also often referred to as ''pressure'', even though pressure is actually caused by a difference in level between two entities. All flow of fluid that happens between pipes is to achieve this balance (pumps practically ignore it and buildings disrupt it; more on that further below). The flow rate between pipes is dependent on pressure (the difference in level between the adjacent entities), it becomes slower as pipes even their levels out.
* [[Power Production]]


== Oil Processing ==
Coming back to how the 'level' is defined, this also means that all connected pipes and tanks attempt to even out to the same percentage of their respective volumes. For example, if 12,550 units of fluid are left to flow into a storage tank of 25,000-unit capacity with one pipe of 100-unit capacity connected, there will be 12,500 units in the storage tank and 50 units in the pipe, both being filled to the same '''percentage''' (50%) of their capacities, even though the amounts themselves are unequal.


* [[Liquids/Oil processing]]
Machines that produce fluids put them in their output slots, which are related to a specifically labeled output pipe socket somewhere on the machine (pressing {{Keybinding|Alt}} reveals the labels). The slot will attempt to empty itself into the entity connected to the machine's socket, unless it is full, or contains a non-matching fluid. Machines that consume fluids also have an accordingly labeled pipe input socket. If an entity containing the correct fluid is connected to it, the machine will start behaving like a pipe that can never be filled, meaning the fluid from connected pipes and tanks drains into the machine at a fixed rate, until the machine's input slot is full. There may be machines that have pipe sockets for both input and output (like a [[electric mining drill|drill]] placed over [[uranium ore]]). They then drain the fluid for themselves first, and once full, behave as a regular pipe that attempts to even out its level with adjacent entitites. If there are multiple output/input sockets for one fluid on a machine, their activity is distributed to them equally unless some of them are blocked/full.


== History ==
=== Temperature ===
Temperature is currently only relevant in heating water as a medium for power generation. Even though all fluids in the game have a temperature value, it is generally the default 15°C.


The only liquid available in Factorio <0.9 was [[Water]].
Energy, whether harnessed from [[fuel]] in [[boiler]]s, or from [[Nuclear power (research)|nuclear power]] through [[heat exchanger]]s, can be used to turn [[water]] to [[steam]], being a [[Energy and work|liquid form of work]]. Steam holds energy at a ratio of 0.2 kJ per °C per unit. In other words: 0.2 kJ of work is necessary to heat a unit of steam by one °C. Since steam/water is set to have a maximum temperature of 1000°C and minimum of 15°C, the most work that can be done on one unit is 197 kJ.
 
In practice, this is barely utilized in a great variety: Boilers only output steam of 165°C temperature, and heat exchangers only output 500°C hot steam, never hotter, never colder; if insufficient energy is supplied, the heaters do not output steam altogether. The steam also does not grow colder over time. Using the 165°C steam in a [[steam engine]] has the same effect as using it in a [[steam turbine]], although it is impractical, since turbines are made to consume 500°C (superheated) steam, generating proportionally more power. All of this makes for no need of exact calculations.
 
== Transport ==
Fluids can be transported through pipelines, barrels, or railway. It is generally practical to use piping for short-distance distribution to machines (or barrelling, if there is need to use belts), and railway transportation for longer distances.
 
=== Pipelines ===
[[File:pipes_carrying_fluids.png|thumb|312px|Eight pipelines, each carrying a different fluid.]]
 
'''[[Pipe|Pipes]]''' are the most basic way to channel fluids from A to B. They automatically connect to any adjacent pipe and can do so to all four cardinal directions simultaneously. [[Pipe to ground|Underground pipes]] only work in two opposite directions, linking to another underground pipe on one side, and to another entity on the other. If a pipe section becomes too long without using pumps (spreading outside a 320x320 block or 10x10 chunk area), fluid will not flow until the pipeline is broken up by a pump. '''[[Storage tank|Tanks]]''' behave the same as pipes, except their volume is much greater.
 
'''[[Pump]]s''' use electrical power to transfer fluids in one direction. They also block any back-flow, which means they can pressurize a section of piping, filling it as much as possible. They can also be disabled using the [[circuit network]] which stops fluid flow through the pump.
 
A continuous pipeline (meaning one that is not split by pumps) will transfer fluid instantly, with no flow restriction, irrespective of the distance, as long as the pipeline is not too long (as defined above).
 
=== Barrels ===
'''[[Barrel]]s''' are used by [[Assembling machine]]s to effectively "bottle" fluids into an item that can be handled like any other item; carried in an inventory, placed in chests and handled by [[Inserters]]. This allows the player to transport fluids via the [[belt transport system]] and the [[logistic network]] (as well as the [[railway]], although fluid wagons are also an option on rails). Assembling machines are also used to empty the barrels, depositing their contents to pipes and leaving an empty barrel for another use.
 
=== Railway ===
'''[[Railway]]''' is another method of transporting fluids, and can be conducted in two ways: Either the fluids are directly pumped into a [[fluid wagon]], or they are poured into barrels and loaded into [[cargo wagon]]s. Both methods have their advantages:
 
'''Advantages of using fluid wagons'''
* Higher capacity (50k vs 20k)
 
'''Advantages of using barrels in cargo wagons'''
* A single cargo wagon can transport multiple types of barrelled fluid (and regular items at the same time)
* Cargo wagons, [[Fluid wagon#Troubleshooting|as opposed to fluid wagons]], don't need to be perfectly aligned to be (un-)loaded, allowing for more flexible train station designs


== See also ==
== See also ==
* [[Oil processing]]
* [[Power production]]


* Video about basics of liquids: http://www.youtube.com/watch?v=jlYN7C7iBmQ
{{C|Logistics{{!}}#Fluid system}}
* About the new pump: http://www.factorioforums.com/forum/viewtopic.php?f=6&t=2317#p17318
{{C|Energy and fluid distribution{{!}}#Fluid system}}
* About usage of oil and how it is pumped: http://www.factorioforums.com/forum/viewtopic.php?f=5&t=2301
* About chemical industry: http://www.factorioforums.com/forum/viewtopic.php?f=5&t=2343#p17289
* About creating energy: http://www.factorioforums.com/forum/viewtopic.php?f=18&t=2755&p=20280#p20265
* About splitting liquids equally: http://www.factorioforums.com/forum/viewtopic.php?f=18&t=4823&p=47506#p47048
* About throughput in a pipe (and how to check it): http://www.factorioforums.com/forum/viewtopic.php?f=5&t=6066

Latest revision as of 23:05, 10 November 2024

Not-enough-repair-packs-icon.png
Page "Fluid system" has been recommended for clean-up. Reason: This page needs to be updated for Factorio 2.0 release, due to changes in fluid mechanics.
This may mean fixing grammar or broken links, providing better explanations, or removing incorrect/outdated info.
Further recommendations for this page's clean-up can be made at Talk:Fluid system.

Fluids are non-solid items, such as water and oil. They can normally only exist inside entities for fluid handling (like pipes), and buildings that have fluids as input ingredients or products (like an oil refinery).

Fluids

"Fluids" tab on the production statistics screen.

The following fluids are available in-game:

Water.png
Water
Steam.png
Steam
Crude oil.png
Crude oil
Petroleum gas.png
Petroleum gas
Light oil.png
Light oil
Heavy oil.png
Heavy oil
Lubricant.png
Lubricant
Sulfuric acid.png
Sulfuric acid
Thruster fuel.png
Thruster fuel
Thruster oxidizer.png
Thruster oxidizer
Lava.png
Lava
Molten iron.png
Molten iron
Molten copper.png
Molten copper
Holmium solution.png
Holmium solution
Electrolyte.png
Electrolyte
Ammoniacal solution.png
Ammoniacal solution
Ammonia.png
Ammonia
Fluorine.png
Fluorine
Fluoroketone (hot).png
Fluoroketone (hot)
Fluoroketone (cold).png
Fluoroketone (cold)
Lithium brine.png
Lithium brine
Plasma.png
Plasma

Mechanics

Fluids cannot be carried by the player, moved using inserters, dropped on the ground, nor stored in chests, unless the fluids are stored in barrels. They cannot be spilled or even dumped in a lake, and are counted in continuous fractions, rather than discrete integers.
When the player picks up a structure that contains fluids, the contained fluid will try to flow into connected structures and any excess fluid that does not fit is destroyed.

Storage

In the game, fluid is held in entities that behave as vessels (fluid boxes) of a defined size (volume). The vessels automatically connect to each other if their inputs/outputs are adjacent (pipes connect to all directions) and allow fluids to flow between them.

The volume of fluid contained in a fluid box is a value between 0 and the maximum volume. For instance, the pipe can hold 100 units of fluid, therefore the value in the pipe can be a number between 0 and 100. The level of fluid in a given entity is manifested by a percentage of the entity's maximum volume that is being occupied by a fluid. It can be observed in pipes and tanks; they have windows through which the fluid is seen at a certain level, or perhaps even as just a small trickle.

Fluid mixing

GUI of a pipe inside a fluid system containing mixed fluids. Clicking the trash can icon next to a fluid will flush that fluid from the system.

The game will prevent players from accidentally mixing fluids when placing most buildings, e.g. pipes containing different fluids cannot be placed directly next to each other. However, not every possible case of fluid mixing is considered, so the player may still mix fluids accidentally or by purposely working around the building restrictions. A fluid system containing mixed fluids can be cleared of the undesired fluids in the GUI of a pipe or storage tank that is part of that fluid system. Fluids that are flushed from pipes or storage tanks are deleted permanently.

In a fluid system that contains mixed fluids, the alt-mode fluids icons on its pipes/storage tanks will reflect the fluid that is contained in that specific structure. So, it may look like a fluid system only contains one fluid when looking at the alt-mode icons, when in reality it contains multiple fluids which are located in some other connected structures. The GUI of a connected pipe or storage tank will always show all fluids contained in the fluid system.
This means that if the game disallows connecting two pipes that look like they contain the same fluid with "Cannot connect systems with different fluids", one of the fluid systems contains multiple fluids. This can solved easily by opening the GUIs of the pipes that the game refuses to connect which will show the extra fluid and allow flushing it from the fluid system.

Flow

All connected tanks and pipes are treated as a single vessel in that the level of fluid must be equal in all parts, to even out pressure exacted by a higher fluid level on smaller ones. This is why level is also often referred to as pressure, even though pressure is actually caused by a difference in level between two entities. All flow of fluid that happens between pipes is to achieve this balance (pumps practically ignore it and buildings disrupt it; more on that further below). The flow rate between pipes is dependent on pressure (the difference in level between the adjacent entities), it becomes slower as pipes even their levels out.

Coming back to how the 'level' is defined, this also means that all connected pipes and tanks attempt to even out to the same percentage of their respective volumes. For example, if 12,550 units of fluid are left to flow into a storage tank of 25,000-unit capacity with one pipe of 100-unit capacity connected, there will be 12,500 units in the storage tank and 50 units in the pipe, both being filled to the same percentage (50%) of their capacities, even though the amounts themselves are unequal.

Machines that produce fluids put them in their output slots, which are related to a specifically labeled output pipe socket somewhere on the machine (pressing Alt reveals the labels). The slot will attempt to empty itself into the entity connected to the machine's socket, unless it is full, or contains a non-matching fluid. Machines that consume fluids also have an accordingly labeled pipe input socket. If an entity containing the correct fluid is connected to it, the machine will start behaving like a pipe that can never be filled, meaning the fluid from connected pipes and tanks drains into the machine at a fixed rate, until the machine's input slot is full. There may be machines that have pipe sockets for both input and output (like a drill placed over uranium ore). They then drain the fluid for themselves first, and once full, behave as a regular pipe that attempts to even out its level with adjacent entitites. If there are multiple output/input sockets for one fluid on a machine, their activity is distributed to them equally unless some of them are blocked/full.

Temperature

Temperature is currently only relevant in heating water as a medium for power generation. Even though all fluids in the game have a temperature value, it is generally the default 15°C.

Energy, whether harnessed from fuel in boilers, or from nuclear power through heat exchangers, can be used to turn water to steam, being a liquid form of work. Steam holds energy at a ratio of 0.2 kJ per °C per unit. In other words: 0.2 kJ of work is necessary to heat a unit of steam by one °C. Since steam/water is set to have a maximum temperature of 1000°C and minimum of 15°C, the most work that can be done on one unit is 197 kJ.

In practice, this is barely utilized in a great variety: Boilers only output steam of 165°C temperature, and heat exchangers only output 500°C hot steam, never hotter, never colder; if insufficient energy is supplied, the heaters do not output steam altogether. The steam also does not grow colder over time. Using the 165°C steam in a steam engine has the same effect as using it in a steam turbine, although it is impractical, since turbines are made to consume 500°C (superheated) steam, generating proportionally more power. All of this makes for no need of exact calculations.

Transport

Fluids can be transported through pipelines, barrels, or railway. It is generally practical to use piping for short-distance distribution to machines (or barrelling, if there is need to use belts), and railway transportation for longer distances.

Pipelines

Eight pipelines, each carrying a different fluid.

Pipes are the most basic way to channel fluids from A to B. They automatically connect to any adjacent pipe and can do so to all four cardinal directions simultaneously. Underground pipes only work in two opposite directions, linking to another underground pipe on one side, and to another entity on the other. If a pipe section becomes too long without using pumps (spreading outside a 320x320 block or 10x10 chunk area), fluid will not flow until the pipeline is broken up by a pump. Tanks behave the same as pipes, except their volume is much greater.

Pumps use electrical power to transfer fluids in one direction. They also block any back-flow, which means they can pressurize a section of piping, filling it as much as possible. They can also be disabled using the circuit network which stops fluid flow through the pump.

A continuous pipeline (meaning one that is not split by pumps) will transfer fluid instantly, with no flow restriction, irrespective of the distance, as long as the pipeline is not too long (as defined above).

Barrels

Barrels are used by Assembling machines to effectively "bottle" fluids into an item that can be handled like any other item; carried in an inventory, placed in chests and handled by Inserters. This allows the player to transport fluids via the belt transport system and the logistic network (as well as the railway, although fluid wagons are also an option on rails). Assembling machines are also used to empty the barrels, depositing their contents to pipes and leaving an empty barrel for another use.

Railway

Railway is another method of transporting fluids, and can be conducted in two ways: Either the fluids are directly pumped into a fluid wagon, or they are poured into barrels and loaded into cargo wagons. Both methods have their advantages:

Advantages of using fluid wagons

  • Higher capacity (50k vs 20k)

Advantages of using barrels in cargo wagons

  • A single cargo wagon can transport multiple types of barrelled fluid (and regular items at the same time)
  • Cargo wagons, as opposed to fluid wagons, don't need to be perfectly aligned to be (un-)loaded, allowing for more flexible train station designs

See also