18
0
mirror of https://github.com/MaSzyna-EU07/maszyna.git synced 2026-12-03 12:25:27 +01:00
Files
maszyna/tests/unit/data
maj00r 0e51e37fa9 feat(steam): the boiler, fire and cylinders of a steam locomotive (EngineType=SteamEngine)
EngineType=SteamEngine was read and did nothing: no force, no controls, no AI. A vehicle of that type now runs
a lumped model of its engine (McZapkie/steam.h), driven by TMoverParameters::steam_Update() every step:

- the boiler: its pressure the saturation pressure of its water (the steam tables), the heat of the fire, the
  steam taken, the feed water warmed up and the heat lost; the level in the glass with its swell, priming over
  the top of the glass, the fusible plug melting under the bottom; the safety valves;
- the fire: the coal burned as the exhaust, the blower and a little natural draught let it, the efficiency
  falling with the firing rate, the heat reaching the water with a delay;
- the regulator as a throttle into the steam chest, choked under the critical pressure ratio, so the chest
  pressure falls at speed with the regulator part open;
- the cylinders: the indicator diagram (admission to the cutoff, hyperbolic expansion, the back pressure of the
  blast pipe, the clearance), wire drawing with speed, the steam taken a revolution, the force swinging with the
  cranks at low speed; the pressure equalisers drifting;
- the automatic fireman keeping the pressure and the water, the injectors and the blower; by hand in
  SteamControls;
- the master controller works the regulator, the secondary controller the cutoff (0 full gear, the last
  position the shortest cutoff), the reverser at 0 is mid gear;
- CompressorPower=Engine (and the legacy Main) of a steam locomotive is its steam air pump, running with the
  boiler over 3 bar;
- a locomotive in steam keeps its physics awake, its boiler going on with no one in the cab.

The new optional Steam: section of the .fiz sets a locomotive's own figures; without it they are those of the
PKP Ty2 (DRB class 52). steam_doc.md lists the keys and what is still to come. No vehicle of the game data uses
EngineType=SteamEngine, so nothing changes for any of them.

Unit tests (tests/unit/test_steam.cpp): the steam tables, the starting force of the Ty2 (214 kN), a boiler kept
standing by the fireman, the fusible plug, priming, the power the boiler keeps up at 65 km/h (about 1280 kW
indicated), and the Ty2 of data/steam_ty2.json taking 1200 t up to about 61 km/h on the level.

Game data: a placeholder Ty2 to drive, made in the SVN working copy and not committed there:
dynamic/pkp/ty2_v1/ with ty2.fiz, ty2.mmd, ty2.t3d, ty2-1.tga (the locomotive) and ty2t.fiz, ty2t.mmd,
ty2t.t3d, ty2t-1.tga (its tender), textures.txt. The code needs none of it.
2026-11-24 21:57:09 +01:00
..
2026-11-07 12:37:12 +01:00
2026-11-07 12:37:12 +01:00
2026-10-15 17:56:41 +02:00