# Engine

Engines produce power.

## Units[edit | edit source]

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).

## Fuel Engines[edit | edit source]

### Components[edit | edit source]

- 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[edit | edit source]

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

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 cooling.
- Each cylinder has natural cooling of about , or about 1/10 of an exhaust.
- Turbochargers provide cooling of about , or about half as effective as exhausts.
- Radiators cool all cylinders evenly. Cooling per cylinder from radiators for radiators and cylinders is estimated to be . Fuel consumption is multiplied by a factor .

### Efficiency[edit | edit source]

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).

## Electric engines[edit | edit source]

### Components[edit | edit source]

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

### Functional principle[edit | edit source]

Instead of being used immediately, energy can be stored in batteries.

The stored energy can then be discharged via electric engines at some loss of efficiency. Each cubic meter of battery can store 2000 kJ of energy. The efficiency and power can be traded off via the power output slider which goes from 0 to 1. Suppose the battery has a charge of and the power output is set to .

- The maximum charge consumption is . At full charge and at an efficiency of 1 this is 80 kW / m
^{3}. - The efficiency is .
- The maximum power output is the product of the two, or .

### Optimal RTG ratio and throttle[edit | edit source]

RTGs cost 375 resources and produce 25 battery power per second per cubic metre. Suppose we want to support a maximum power output of times the sustainable output (for at least 1 second). This means the maximum battery consumption per cubic metre of RTG is

where is the volume ratio of batteries to RTGs.

Solving for , we have

The maximum sustainable power output (per cubic metre of RTG) is

Let the cost ratio of RTGs to batteries be . We want to maximize the ratio of power output to cost:

maximize

minimize

For (a 20% headroom) and material optimality (), we have optimal throttle and optimal battery ratio .

## Steam Engine[edit | edit source]

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

Steam engine can produce both engine power and electric energy 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.

### How it works[edit | edit source]

Steam system consists of 4 functional parts:

- Steam producers - These are boilers, which "burn" resources to produce steam. Boiler steam production is constant as long as you have resources, regardless of power usage. Comes in small and large sizes.
- Steam transport system. Steam pipes. Has 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 one "common" volume, which is equal to the sum of all pipes volumes in this assembly.
- Steam consumption devices. These are pistons, turbines, "leaks" (i.e. opened pipes), and pressure release vent (has the same volume as a pipe). Comes in small and large sizes.
- Energy and power producing devices. Namely gears and generators as part of the piston and turbine system. Comes in small and large sizes.

*This section will be light on information and some formulas will be simplified. See "Advanced" for more information.*

#### Boilers[edit | edit source]

Steam 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 rate of steam production appears to be determined as , where is the total boiler volume in cubic meters and is the burn rate set by the steam control. Note that material consumption is no longer directly dependent on the steam production. Now, . The pressure inside depends on the amount of steam inside the boiler as well as the pressure inside the connected pipes.

#### Pipes[edit | edit source]

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.

##### Turbines[edit | edit source]

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 at steady state of a pure turbine and boiler set up is:

Where is the volume of the turbines and the amount of steam produced by the boiler.

##### Pistons[edit | edit source]

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:

Where is the mass of the contraption and 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[edit | edit source]

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

##### Leaks[edit | edit source]

Leaks works as pressure release valve set to 0.

### Trivia[edit | edit source]

- 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)

Steam is considered to be an ideal gas, for which this formula is true:

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:. 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: .

Now using ; the n (moles) can be replaced giving: we can rearrange this for density of the steam: and since we already know that we can then find that

So for steam in FTD the absolute pressure equals the density .

Also we can work out the temperature of Neter using: If we assume that the of steam is 0.018 kgmol^{-1} and that R is 8.314 Jmol^{-1}K^{-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 and a gauge pressure of and the steam mass is the density is simply found by and as we know the density equals the absolute pressure we can say 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 m^{3} 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:. Where is the pressure of the boiler and pipe respectively and the amount of steam produced.

### Advanced[edit | edit source]

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

#### Pressure[edit | edit source]

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 . Where is the current pressure of the system and 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:

Where is the steam produced by the boiler, is the pressure of the pipe system, is the number of leaks, small, large and huge pistons connected to the pipes, is the sum of all steam consumed by vents with their respective setting and the sum of all steam consumed by turbines with their respective volume .

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[edit | edit source]

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:

Where is the power produce, the pressure of the pipe, the consumption rate (choose either one of the 3 based on the gear+shaft size used), the number of piston connected to the shaft AND to the pipe system and 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[edit | edit source]

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 component from the previous equation with . We get:

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