18
0
mirror of https://github.com/MaSzyna-EU07/maszyna.git synced 2026-11-19 08:46:00 +01:00

fix: EN57 brakes hauled with the brake hose alone, Knorr EP brake without control power

eu07/maszyna#87: the EP2 (and EP1) valve charged its auxiliary reservoir only
from the main reservoir pipe. A dead EN57 hauled by a locomotive coupled with
the hook and the brake hose alone ("3") never charged it, its control
reservoir stopped at about 2.5 bar and the unit didn't brake. The valve now
refills the auxiliary reservoir from the brake pipe through the slide valve's
check valve, as every ESt does (TESt::FillBrakeRes, shared with TESt::GetPF,
which stays bit for bit the same). With the main reservoir pipe charged the
auxiliary reservoir stays above the brake pipe and nothing changes; the
reservoir now also takes air from the brake pipe while it is below it, e.g.
at start-up before the compressor has charged the main reservoir pipe.

eu07/maszyna#134: the EP brake of the Knorr St113 handle (EN57-001) worked
with the reverser in neutral, the battery off or the EP fuse switched off
(Ctrl+Z). It now needs the control powered, as the Oerlikon handle's does
(EPBrakeControlPowered: battery, reverser out of neutral, EP fuse), and an
EP brake switched on drops out (holding the cylinder pressure) when the
control loses power. The positions of the EP release and brake were already
moved by 810b7ad07; a test pins them.

No change to game data needed.
This commit is contained in:
jerrrrycho
2026-11-08 04:25:34 +01:00
parent 68fdf1efdf
commit 87f1d960a0
6 changed files with 200 additions and 11 deletions

View File

@@ -968,6 +968,28 @@ double TESt::BVs(double const BCP) const
return 0;
}
/// <summary>
/// Refills the auxiliary reservoir (ZP) from the valve pre-chamber through the
/// check valve of the slide valve, opened as far as <see cref="BVs"/> says for the
/// given cylinder (or impulse-chamber) pressure, while the pre-chamber is more
/// than 0.05 bar above the reservoir. The flows wait for the caller's Act().
/// </summary>
/// <param name="BCP">Brake cylinder (or impulse-chamber) pressure.</param>
/// <param name="dt">Time step [s].</param>
/// <returns>Volume taken into the auxiliary reservoir, 0.96 of it drawn from the brake pipe.</returns>
double TESt::FillBrakeRes(double const BCP, double const dt)
{
double const BVP{BrakeRes->P()};
double const VVP{ValveRes->P()};
double const temp{BVs(BCP)};
double dv{0.0};
if (VVP - 0.05 > BVP)
dv = PF(BVP, VVP, 0.02 * SizeBR * temp / 1.87) * dt;
BrakeRes->Flow(dv);
ValveRes->Flow(-0.04 * dv);
return dv;
}
/// <summary>
/// One-step Oerlikon ESt distributor advance: runs CheckState/CheckReleaser,
/// integrates the ZS &lt;-&gt; PG, ZP &lt;-&gt; cylinder, ZP &lt;-&gt; pre-chamber and
@@ -1021,15 +1043,7 @@ double TESt::GetPF(double const PP, double const dt, double const Vel)
BrakeCyl->Flow(-dv);
// przeplyw ZP <-> rozdzielacz
temp = BVs(BCP);
// if(BrakeStatus and b_hld)=b_off then
if (VVP - 0.05 > BVP)
dv = PF(BVP, VVP, 0.02 * SizeBR * temp / 1.87) * dt;
else
dv = 0;
BrakeRes->Flow(dv);
dV1 = dV1 + dv * 0.96;
ValveRes->Flow(-0.04 * dv);
dV1 = dV1 + FillBrakeRes(BCP, dt) * 0.96;
// przeplyw PG <-> rozdzielacz
dv = PF(PP, VVP, 0.01) * dt;
ValveRes->Flow(-dv);
@@ -1191,6 +1205,10 @@ double TEStEP2::GetPF(double const PP, double const dt, double const Vel)
ValveRes->Flow(-0.04 * dv);
dV1 = dV1 - 0.96 * dv;
// przeplyw ZP <-> rozdzielacz: as in every ESt, the auxiliary reservoir also charges from the brake pipe,
// not from the main reservoir pipe alone, so a unit hauled with the brake hose alone charges and brakes
dV1 = dV1 + FillBrakeRes(BCP, dt) * 0.96;
// hamulec EP
EPCalc(dt);