# Engine

Jump to: navigation, search

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

## Fuel engines

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

!!! add formulas for turbocharger curve and supercharger Curve plz 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

### 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, 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 1000 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 $q$ and the power output is set to $\alpha$.

• The maximum charge consumption is $0.4 \alpha q$. At full charge this is 40 kW / m3.
• The efficiency is $\frac{2}{1 + \alpha}$.
• The maximum power output is the product of the two, or $\frac{0.8 \alpha q}{1 + \alpha}$.

### Optimal RTG ratio and throttle

RTGs cost 375 resources and produce 25 battery power per second per cubic metre. Suppose we want to support a maximum power output of $M$ times the sustainable output (for at least 1 second). This means the maximum battery consumption per cubic metre of RTG is $\underbrace{40 \alpha b}_\text{output} \cdot \underbrace{\frac{1 + \alpha}{2}}_\text{inverse efficiency} = \underbrace{25M}_\text{battery consumption}$

where $b$ is the volume ratio of batteries to RTGs.

Solving for $b$, we have $b = \frac{1.25 M}{\alpha \left(1 + \alpha\right)}$

The maximum sustainable power output (per cubic metre of RTG) is $\frac{50}{1 + \alpha}$

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

maximize $\frac{50}{\left(1 + \alpha\right) \left(b + c\right)}$

minimize $\left(1 + \alpha\right) \left(b + c\right) = \frac{1.25 M}{\alpha} + c + \alpha c$ $\frac{1.25M}{\alpha^2} = c$ $\alpha = \sqrt{\frac{1.25M}{c}}$

For $M = 1.2$ (a 20% headroom) and material optimality ( $c = 18.75$), we have optimal throttle $\alpha = 0.28$ and optimal battery ratio $b \approx 4.2$.

## Steam Engine

Further information is a just assumption. More exact information and formulae is needed!

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.

### Some science

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.

• Steam by itself m. In kilograms. It is very impotent 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 g/sm^2, I suppose (values are to high to be atmos)
• Volume V - this is were 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: $\frac{PV}{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: ${\textstyle PV=const.*m}$

or: $\frac{PV}{ m } =const.$

It hard to calculate that constant for the game now (cause we know only m and P for tubes and V and P  for boilers and turbines - so on must use timing and solve some differentials to do it). It means we can just put this constant to 1 (unit is velocity squared). And consider that volume times pressure is amount of steam in part PV=m. It is quite a reasonable assumption and it seems to work just fine.

Here ends the science and engineering starts.

### How it works

Steam system consists of 4 functional parts:

1. Steam producers - These are boilers, which "burn" resources to produce steam. Boiler steam production is constant no mater what. While you have resources - you will get an exact amount of steam per second. Comes in small and large sizes.
2. Steam transport system. Steam pipes. Has volume of 0.2 m^3. One continuous pipe assembly has one "common" volume, which is equal to the sum of all pipes volumes in this assembly.
3. Steam consumption devices. These are pistons, turbines, "leaks" (i.e. opened pipes), and pressure release valve (has the same volume as a pipe). Comes in small and large sizes.
4. Energy and power producing devices. Gears, generators are all here. Comes in small and large sizes.

#### Flow

Steam is generated by producers, put into transport systems, and then consumed by consumers. If there is no steam consumers in the system, steam mass will accumulate indefinitely (may cause crash due to overflow?). This can actually be used as some sort of energy reserve (precise building skills required - there is no way to switch off consumer by now)

Steam consumers will not consume steam directly from produces. They need to be connected to pipes. Different sizes of producers and consumers can be connected to the same pipe assembly (i.e. large and small boilers  to small piston and large turbine).

Pipes will take steam only from producers (boilers) and give it only to consumers. No boiler-to-boiler or turbine-to-piston flow. It means boilers will never interfere with each other production.

Steam comes from one part of the system to another (i.e. from boiler to pipes or from pipes to piston) only due to pressure difference. Equal pressure - no steam flow. "Physics" is very simple the number of units of steam ("volumes" or kilograms) transferred per second is exactly equal to pressure difference between two parts ΔP=Δm.

How to use this information? For example we have small boiler (0.8 m^3) set on full burn (320 steam per second). And a very simple steam engine - some pipework and one, say compact turbine (0.8m^3). At static regime the amount of steam produced is always equals the amount of steam consumed (it is the reason why regime is static). That means that pressure in pipe is 320 greater than in turbine and pressure in boiler will be 640 greater. Now we adding one small piston. Difference in pressure between turbine and pipe drops to 45. It means that turbine now consumes only 45 steam per second and piston took 275 of steam per second.

It also matters when one starts using large boilers (or large amount of boilers): boilers will need time to build up pressure to push all generated steam to pipes.

#### Production

Steam is produced by boilers, while the rate of production is managed by a Steam Control. At present there does not appear to be a difference between large and small steam controls. The rate of steam production appears to be determined as $Steam = 400 * V_{boiler} * r_{burn}$, where V is the total boiler volume in cubic meters and r is the burn rate set by the steam control.

#### Consumption

##### Turbine

Turbines are working in a very similar fashion to pipes. They consume the amount of steam per second equal to pressure. 1 unit of pressure = 1 unit of energy per second.  It means that if you use your steam only in turbines, then the amount of produced energy is equal to amount of steam produced by boilers (in steady regime). Compact turbine and large turbine with 10 middle parts will produce exactly the same amount of energy per second for a given boiler. And the sum of pressures in all turbines (or pressure in a single turbines) will be equal to steam production of boilers. Combined with information from previous section this gives us, that in such a setup (turbines only) pressure in boiler will always be triple the amount of generated steam.

The difference between turbines is only the time required to achieve this steady regime and amount of energy turbine will produce after boiler is shutdown ore destroyed (or depletion of resource) (it actually equals to amount of steam in turbine P*V)

##### Piston

Pistons do not have their own pressure or volume (e.g. they do not contain any steam). The use connected pipe assembly volume and consume steam from it. Their power output is dependent on power required. It is equals to steam consumed at no "load" and is half of that at full load. It means that loads pistons are no better, but half as effective compared to turbines+battery+electric engines. The maximum engine power is half of total amount of steam produced by boilers for "piston only" setups. For example, if you need 10000 engine power, you will need to produce 20000 steam per second. It is 7 large boilers at full power (10 resources per second) or 63 small boilers (13 resources per second).

It is not quite understood how pistons consume steam in mixed setups (i.e. with turbines). Consumption is independent on current piston RPM. But piston minimum RPM is proportional to steam pressure in pipe. Assumption is that piston consumption is calculated only for minimum RPM: minimum RPM is calculated as 95% of pressure in pipea and consumption is 1,05 of steam mass per degree per second for 2m piston. And pressure in pipe drops when steam is consumed (PV=m) - so do RPM.

##### Pressure Release Valve

Pressure release valve is exactly what its name suggests. It always has a pressure no more than it is set. But it means (see flow section) that pipes to which this valve connects can and will have greater pressure to steam flow to the vent. If went is only consumer - the pressure in the pipe will be boiler stream production greater than pressure set in valve. If not - some math required. It will release the amount of steam per second equals to difference between pipe pressure and set pressure.

##### Leaks

Leaks works as pressure release valve set to 0. It does not set the pressure in system to 0, so other consumers (pistons, turbines, valves, other leaks) will continue to produce power, energy, nice visual effects.

#### Piston physics

here should be something about RPM, gearboxes and generators