18
0
mirror of https://github.com/MaSzyna-EU07/maszyna.git synced 2026-11-21 00:24:57 +01:00

Merge remote-tracking branch 'origin/master' into fix/freight-brake-setting-cw1

# Conflicts:
#	CMakeLists.txt
#	utilities/Globals.cpp
This commit is contained in:
jerrrrycho
2026-11-09 15:32:03 +01:00
74 changed files with 3963 additions and 490 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) const
{
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);