Engine

Engines produce power.

Units
No units are given in game. We will say each unit of fuel is 1 liter (L) and each unit of power is 1 kilowatt (kW) (1,34 horsepower). One power-second is then 1 kilojoule (kJ).

Components

 * Fuel Engine Generator: The root piece of a fuel engine.
 * Crank Shaft: Connects in a line from the front of the Fuel Engine Generator.
 * Adapter: Connects to Crank Shafts, but not each other.
 * Cylinder: Connects to Adapters and Crank Shafts. A fuel engine's characteristics are merely the sum of its Cylinders.
 * Injector: Connects to up to two Cylinders on adjacent faces and produces 200 power for each cylinder connected. Low efficiency.
 * Carburettor: Connects to Cylinders. Produces 100 power for each cylinder connected.
 * Supercharger: Connects to Carburettors. Increases the efficiency of Carburettors at low RPM.
 * Turbocharger: Connects to Cylinders and Carburettors. Cools the cylinder and increases the efficiency of the Carburettor at high RPM.

Heat
Each cylinder has a heat percentage. When it reaches 95% the cylinder is forced to shut down and cool. Higher heat levels also reduce efficiency and power, which is multiplied by a factor

$$1 - \frac{h^3}{2}$$ Where h is (temp in c°? Apparently) Heat generation appears to be proportional to fuel usage. We will use the heat generated by 1 fuel per second as our unit.

Cooling rate appears to be proportional to current heat and depends on the number of cooling components:


 * Exhausts cool only the cylinder(s) they are connected to. They provide about $$4 h$$ cooling.
 * Each cylinder has natural cooling of about $$0.4 h$$, or about 1/10 of an exhaust.
 * Turbochargers provide cooling of about $$2 h$$, or about half as effective as exhausts.
 * Radiators cool all cylinders evenly. Cooling per cylinder from radiators for $$n_r$$ radiators and $$n_c$$ cylinders is estimated to be $$2 \sqrt{\frac{n_r}{n_c}}h$$. Fuel consumption is multiplied by a factor $$1 + 0.01 \sqrt{n_r}$$.

Efficiency
Let's define Relative RPM as the current RPM fraction relative to the engine's max RPM. An engine at 70% load would have a Relative RPM factor of 0.7. All of the following formulas will have RPM defined as Relative RPM.

The game uses a basic efficiency curve applied to all engine types. Said curve is: 0.8+(0.4*RPM) We'll abbreviate this as BasicEngineCurve.

Bare cylinders burn fuel at a rate 10*RPM/100*1.2*BasicEngineCurve(RPM) L/s.

Cylinders with one or more carburetors/injectors on them burn Injectors*RPM*200/100*1.1*BasicEngineCurve(RPM) L/s plus the sum of the fuel consumption of attached carburetors.

A carburetor injects RPM*100/100*BasicEngineCurve(RPM)*(SuperChargerCurve(RPM)^NumSuperchargers)*(TurboChargerCurve(RPM)^NumTurboChargers) L/s to each cylinder attached to it.

A cylinder's efficiency can be calculated by getting the fuel consumption at a given RPM and dividing it by the amount of power generated(dependent on heat).

Components
Electric engines consist of one electric engine block connected to a battery pack build from a desired amount of batteries.

Functional principle
Instead of being used immediately, power can be stored in batteries.

The stored energy can then be discharged via electric engines to create power, at a ratio of 1 energy to 1 power used. The available power of the engine scales linearly with available energy, and does not consume energy when idle. Each cubic meter of battery can hold 15000 energy and produce 90 power when full.

.

Steam Power
''Some of these formula were simplified for ease of use. You can find more accurate ones further down the page.''

Steam power is an umbrella term covering the processes of design, construction, and operation of Steam Plants.

What is a Steam plant?
A steam plant consists of 4 functional parts:

''This section will be light on information and some formulas will be simplified. See "Advanced" for more information.''
 * 1) Steam generators - These boiler vessels "burn" resources to boil water into steam. Their control blocks allow for manual or automated (via ACBs) adjustment of the burn rate, but as long as you have resources to burn, steam production will continue regardless of the pressure in the boiler or throughout the pipe system.
 * 2) A steam distribution system - This is the network of pipes and other parts, which move steam from the point(s) of production to the point(s) of consumption.
 * 3) *Pipes - Steam goes in one end and out the other.
 * 4) *Valves - Set to open or close at certain pressures changes, or operated by an ACB, these can be used to isolate parts of a pipe network from each other:
 * 5) *Tanks - These have a volume of either 30'000 or 300'000 per metre of length for the 1x1m and 3x3m versions, respectively, and mitigate pressure and flow irregularities within a steam plant.
 * 6) Steam consumers - These are parts (or non-parts) which use steam from the distribution system.
 * 7) *Leaks - Although less dangerous than overpressure, leaks (i.e. broken pipes spewing steam into nowhere) will bring the entire plant to a standstill. They should be isolated immediately by means of appropriately located Valves.
 * 8) *Pipe Vents - A controllable leak for use in case of uncontrollable overpressure.
 * 9) *Steam Jets - The most primitive method of converting steam into Thrust.
 * 10) *Steam Piston - A piston and a crankshaft makes a steam engine, which uses steam to impart rotary kinetic energy into the crankshaft and everything attached to it.
 * 11) *Steam Turbines - Like Pistons, these use steam to turn a shaft, but the RPM is too high for everything except the power generator.
 * 12) Energy converters - The Steam Jet pulls double duty as both steam consumer and energy converter, but the Piston and Turbine engines also have a set of parts which convert their mechanical power into thrust, power, or in the case of the Steam Drill parts, damage.

Boilers
The boiler is the starting point of every steam plant BoilerSteam is produced by boilers, while the rate of production is managed by a Steam Control. At present there is no difference between small, large and huge steam controls. The parameters of boiler are determined the formulas: $$V_{boiler}$$ is the total boiler volume in cubic meters. $$r_{burn}$$ is the burn rate set by the steam control. $$Steam=400*V_{boiler}*r_{burn}$$ $$Consumption=V_{boiler}*\frac{(r_{burn}+1)^2-1}{4}$$ $$SPM=\frac{1600}{r_{burn}+2}$$ $$P=\frac{V_{steam}}{V_{boiler}}$$
 * The rate of steam production
 * Material consumption
 * Steam per material
 * Pressure

The pressure inside depends on the amount of steam inside the boiler as well as the pressure inside the connected pipes.

Like the Spin/Turn Block and Dedicated heliblade Spinner, a Steam Engine produces local rotary mechanical power (torque multiplied by shaft rpm). Unlike the first two, however, the Steam Engine does not draw electrical power from Batteries or Fuel Engines, it runs on steam. The steam, in turn, is provided by Boilers

This mechanical power cannot be directlySteam engine can produce both power and directly from resources, rather then fuel. While It sounds very promising, there is some drawbacks. Most obvious one is that steam engine can explode and requires more (much more) space than fuel engine.

Pipes
Steam is transported inside the pipes from the producers (boilers) and the consumers (leaks, vents, pistons, turbines). In a way they "consume" steam from boilers before passing it down to consumers. Most the time we do not need to worry about them at all but they are still an important chain if you want accurate calculation of Steam to Energy production.

They have a volume of 0.2 m^3 for all single block pipes, 0.39 m^3 for 2m pipe and .79 m^3 for 4m pipe. One continuous pipe assembly has a "common" volume, equal to the sum volume of all pipes in the assembly.

Valves
Do not currently work properly

Turbines
Turbines consume Steam provided by pipes to produce electrical energy. Although compared to other consumers, they store this steam before releasing it, a bit as if the pipe was a boiler, the turbine a pipe and a leak would be directly connected to it. The equation for the electricity produced $$E$$ at steady state of a pure turbine and boiler set up is:

$$E = \left( 1 - \frac{1}{40 * V_{turbine}} \right) Steam$$ Where $$ V_{turbine} $$ is the volume of the turbines and $$ Steam $$ the amount of steam produced by the boiler.

Pistons
Pistons consume Steam to provide energy to a gearbox + shaft assembly. They do not have their own pressure or volume, they directly consume the steam from connected pipes. Their power output (power displayed on the assembly) is dependent on power required. It is approximately equal to steam produced by the boiler at when idle (no load) and about half of that at full load (~98.51% when idle and ~49.62% when maxed). Because their maximum power output is half of the steam production, it is about half the energy produced by a turbine, making them quite inefficient compared to the later. The RPM of a piston is:

$$RPM = \frac{6*m_{assembly}}{Power}$$

Where $$m_{assembly}$$ is the mass of the contraption and $$Power$$ is the power output displayed. From this equation, you can easily calculate the maximum and minimum RPM of a system to avoid breaking pistons. Further more, this means that adding mass allows to reduce the RPM, and so adding piston will reduce RPM regardless of them being connected to pipes or not. The only reason to connect them would be to reduce the pressure inside the pipes which currently doesn't have any limit anyway. Note that all pistons and related items to the gear+shaft system work exactly the same, the only 2 main differences being the mass of each block added to the system and the steam consumption rate (which affect the pipes' pressure as well). Most of them have the same mass per volume/block used so there is no real reason to using them aside to reduce the pipe pressure yet again (or if you want to use a steam propeller).

Pressure Release Valves
Pressure release valve is a special pipe that allows to control at which pressure to release steam from the pipe system.

Leaks
Leaks works as pressure release valve set to 0.

Trivia
Steam is considered to be an ideal gas, for which this formula is true:
 * Steam by itself m. In kilograms. It is very important to understand that amount of steam is mass (which is contrary to what it is called in game: steam volume). For example large turbine and small turbine can both contain the same amount of steam "volume" (say 500 kg) - but it will produce different steam density and different pressure.
 * Pressure P - this value is responsible for "production" of power and energy and for moving steam through the pipes. The more - the better. But things (pistons for now, but who knows what else they implement) may explode. Units are unknown. 1 Pa, I suppose (values are to high to be atmospheres)
 * Volume V - this is where steam is contained. Just good old cubic meters. For now any volume (boilers at most) may contain any amount of steam (reaching and exceeding sun core density)

$$\frac{P*V}{T}=const.$$

Temperature T seems to be constant for any part of the steam system, and pressure is directly proportional to density, i.e. mass of steam contained in given volume V. It means that for FtD steam "physics" we can write down this equation as:$P*V=const.*m$. We can calculate that constant using pipes as we know their volume V from the item selection screen and pressure P and "volume" m are indicated when hovering over one of the pipe. To do so we use pipes with no piston attached to them and a pressure release vent to reach a stable system. We can easily find that this constant is equal to 1, so: $$ P * V = m $$.

Now using $$PV=nRT$$; the n (moles) can be replaced giving: $$PV=\frac{M}{m_r}RT$$ we can rearrange this for density of the steam: $$\rho=\frac{M}{V}=\frac{Pm_r}{RT}$$ and since we already know that $$\frac{RT}{m_r}=1$$ we can then find that $$P=\rho$$

So for steam in FTD the absolute pressure $$P$$ equals the density $$\rho$$.

Also we can work out the temperature of Neter using: $$T=\frac{m_r}{R}$$ If we assume that the $$m_r$$ of steam is 0.018 kgmol-1 and that R is 8.314 Jmol-1K-1 giving a temperature of ~2.165x10-3 K.

Now knowing all of this we can use that to also find out the atmospheric pressure for Neter. For a sealed pipe that has a volume of $$V$$ and a gauge pressure of $$P$$ and the steam mass is $$M$$ the density $$\rho$$ is simply found by $$\rho=\frac{M}{V}$$ and as we know the density equals the absolute pressure we can say $$\frac{M}{V}=P+x$$ Where x is the atmospheric pressure.

Now if we take some in game values to fill the previous equation: so for a single 1m sealed pipe with a volume of 0.2 m3 and a pressure of 2260 Pa and a mass of 452 kg then the equation above can be solved for x. This gives an atmospheric pressure of zero. (This works for any pressure and volume and mass of steam)

The pressure in the boilers always relates to the pressure in the pipe and the amount of steam produced:$$P_{boiler}=P_{pipe}+Steam$$. Where $$P_{boiler/pipe}$$ is the pressure of the boiler and pipe respectively and $$Steam$$ the amount of steam produced.

Advanced
This section will go in more details about the steam engine. Unless new formulas are given here, the formula above stand true.

Pressure
There is one "big" misconception when doing the simplified systems: Power and Energy produced does not directly relates to Steam produced but to pressure given by the connected pipes. This explains why complex system with multiple consumers are more complex to calculate, as each of them make the pipes' pressure go down. Further more, the game does not calculate everything with one big complex formula, but instead calculate the flow rate between each stage before transferring steam according to it and recalculating the new pressure based on the volume and new mass of steam available. Repeating this on each cycle. There appears to be a limit when reaching close to the maximum possible pressure. Either coded limit or number precision limit, but the pressure will usually stabalize when $$P_{current} >= 0.9999 * P_{max}$$. Where $$P_{current}$$ is the current pressure of the system and $$P_{max}$$ the maximum possible pressure of the system. Last, since the game calculates this flow of steam twice, from Boiler to Pipe and from Pipes to Consumers, this error can lead to a pressure as low as 99.98% of the maximum possible. While this might seem trivial, this explains why you might never reach the maximum power in a system when using a high steam production boiler.

This flow rate in the case of boiler to pipe is always the difference between the pressure on both sides. While the flow rate from the pipe to different consumers varies. Hence why a piston will create less pressure in a pipe than a leak. Turbines and Vents are similar to how Boiler to Pipe flow is handled: Vents will consume the difference between the pipe pressure and the vent pressure setting; Turbines are the same but use their own internal pressure for the difference. The following formulas are not always needed to calculate the next sub-section's formula, you can directly use the pipe pressure indicated on the boiler control. Leaks will consume steam at a rate of 1, small piston at a rate of 2, large pistons 4 and huge pistons 45. As Stated above, Vents and Turbines don't have a different consumption rate but instead use the pressure differential. There is no easy way to calculate the exact maximum pressure possible but since we know that for a stable system the consumed steam is equal to the amount of steam produced, we can solve the following equation:

$$Steam = P_{pipe}*(n_{leaks} + 2*n_{small} + 4*n_{large} + 45*n_{huge}) + \sum(Max(P_{pipe}-S_{vent},0)) + \sum(P_{pipe} * \frac{40*V_{turbine}}{80*V_{turbine}-1})$$

Where $$Steam$$ is the steam produced by the boiler, $$P_{pipe}$$ is the pressure of the pipe system, $$n_{leaks/small/large/huge}$$ is the number of leaks, small, large and huge pistons connected to the pipes, $$\sum(Max(P_{pipe}-S_{vent},0))$$ is the sum of all steam consumed by vents with their respective setting $$S_{vent}$$ and $$\sum(P_{pipe} * \frac{40*V_{turbine}}{80*V_{turbine}-1})$$ the sum of all steam consumed by turbines with their respective volume $$V_{turbine}$$.

Systems with no vents or turbine will be easy to calculate while more complex system including vents or turbines will need to write down each vent settings and turbines' volume to calculate the pressure of the pipe system. Remember that this formula is to get the perfect maximum pipe pressure possible which may be slightly more than the actual pipe system pressure. And the other way around too, if you use it to calculate Steam production based on the pipe pressure, you might have a slightly lower result than the actual steam production.

Power
As said earlier, Power does not directly relate to the production of steam. Here is the formula for power produced by a gear+shaft system:

$$Power = P_{pipe} * [2,4,45] * N_{piston} * [0.4962,.9851]$$

Where $$Power$$ is the power produce, $$P_{pipe}$$ the pressure of the pipe, $$[2,4,45]$$ the consumption rate (choose either one of the 3 based on the gear+shaft size used), $$N_{piston}$$ the number of piston connected to the shaft AND to the pipe system and $$[0.4962,.9851]$$ for Max or Idle power (as explained before). Note that depending on wither you used the max possible pressure or the current pressure, you will have a possible error of ~0.01-0.02% (see explanation above). Last this assumes all pistons have pipes connected to them with the same pressure, if not, simply add together the power of each respective pressure.

Energy
Again, Energy produced by turbines does not relate to steam production but instead to the consumed steam, which relateds to the pressure available on the connected pipe minus the pressure inside the turbine, which is equal to the energy output of the latter. We "simply" have to replace the $$Steam$$ component from the previous equation with $$(P_{pipe} - E)$$. We get:

$$E = ( 1 - \frac{1}{40 * V_{turbine}} ) * (P_{pipe} - E)$$

Which we can simplify to use the pipe pressure as the input:

$$ E = P_{pipe} * \frac{40V_{turbine}-1}{80V_{turbine}-1} $$