Skip to content

Commit ebafd5d

Browse files
authored
Merge pull request #833 from cesarBLG/relay-valve
Implement brake relay valve
2 parents d06a7b6 + 50e8499 commit ebafd5d

File tree

7 files changed

+133
-65
lines changed

7 files changed

+133
-65
lines changed

Source/Documentation/Manual/physics.rst

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2972,10 +2972,15 @@ MaxAuxilaryChargingRate and EmergencyResChargingRate.
29722972

29732973
.. index::
29742974
single: BrakePipeVolume
2975+
single: ORTSBrakeCylinderVolume
29752976
single: ORTSEmergencyValveActuationRate
29762977
single: ORTSEmergencyDumpValveRate
29772978
single: ORTSEmergencyDumpValveTimer
29782979
single: ORTSMainResPipeAuxResCharging
2980+
single: ORTSBrakeRelayValveRatio
2981+
single: ORTSEngineBrakeRelayValveRatio
2982+
single: ORTSBrakeRelayValveApplicationRate
2983+
single: ORTSBrakeRelayValveReleaseRate
29792984
single: ORTSMainResChargingRate
29802985
single: ORTSEngineBrakeReleaseRate
29812986
single: ORTSEngineBrakeApplicationRate
@@ -2999,6 +3004,10 @@ MaxAuxilaryChargingRate and EmergencyResChargingRate.
29993004
brake servicetimefactor instead, but the Open Rails Development team
30003005
doesn't believe this is worth the effort by the user for the added
30013006
realism.
3007+
- ``Wagon(ORTSBrakeCylinderVolume`` - Volume of car's brake cylinder. This allows
3008+
specifying the brake cylinder volume independently of triple valve ratio.
3009+
This is useful when the cylinder is not directly attached to a triple valve,
3010+
e. g. when a relay valve exists.
30023011
- ``Wagon(ORTSEmergencyValveActuationRate`` -- Threshold rate for emergency
30033012
brake actuation of the triple valve. If the pressure in the brake pipe
30043013
decreases at a higher rate than specified, the triple valve will switch to
@@ -3014,6 +3023,20 @@ MaxAuxilaryChargingRate and EmergencyResChargingRate.
30143023
by the brake system.
30153024
- ``Wagon(ORTSEPBrakeControlsBrakePipe`` -- Set to 1 for UIC EP brake: brake pipe
30163025
pressure is electrically controlled at every fitted car.
3026+
- ``Wagon(ORTSBrakeRelayValveRatio`` -- Determines the proportionality constant
3027+
between pressure as demanded by the triple valve and brake cylinder pressure.
3028+
This is achieved via a relay valve which sets BC pressure proportionally.
3029+
Relay valves may be installed to achieve higher brake cylinder pressures,
3030+
dynamic brake blending or variable load compensation.
3031+
- ``Wagon(ORTSBrakeRelayValveRatio`` -- Same as above, but for the engine brake
3032+
- ``Wagon(ORTSBrakeRelayValveApplicationRate`` -- Brake cylinder pressure application
3033+
rate achieved by the relay valve, if fitted.
3034+
- ``Wagon(ORTSBrakeRelayValveReleaseRate`` -- Brake cylinder pressure release
3035+
rate achieved by the relay valve, if fitted.
3036+
- ``Wagon(ORTSMaxTripleValveCylinderPressure`` -- Maximum cylinder pressure demanded
3037+
by the triple valve. For example, UIC distributors set maximum cylinder pressure
3038+
to 3.8 bar when brake pipe is below 3.5 bar, and further brake pipe discharging
3039+
does not increase cylinder pressure.
30173040
- ``Engine(ORTSMainResChargingRate`` -- Rate of main reservoir pressure change
30183041
in psi per second when the compressor is on (default .4).
30193042
- ``Engine(ORTSEngineBrakeReleaseRate`` -- Rate of engine brake pressure

Source/Orts.Simulation/Simulation/RollingStocks/MSTSLocomotive.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1813,7 +1813,7 @@ public void DynamicBrakeBlending(float elapsedClockSeconds)
18131813
&& ThrottlePercent == 0 && !(DynamicBrakeController != null && DynamicBrakeBlendingOverride && DynamicBrakeController.CurrentValue > 0))
18141814
{
18151815
float maxCylPressurePSI = airPipeSystem.GetMaxCylPressurePSI();
1816-
float target = airPipeSystem.AutoCylPressurePSI / maxCylPressurePSI;
1816+
float target = airPipeSystem.AutoCylPressurePSI * airPipeSystem.RelayValveRatio / maxCylPressurePSI;
18171817

18181818
if (!DynamicBrakeBlended)
18191819
{

Source/Orts.Simulation/Simulation/RollingStocks/SubSystems/Brakes/BrakeSystem.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,11 +86,11 @@ public abstract class BrakeSystem
8686
/// but for vacuum brakes it is a conversion to an internally used equivalent pressure.
8787
/// </summary>
8888
public abstract float InternalPressure(float realPressure);
89-
9089
public abstract void Initialize(bool handbrakeOn, float maxPressurePSI, float fullServPressurePSI, bool immediateRelease);
9190
public abstract void SetHandbrakePercent(float percent);
9291
public abstract bool GetHandbrakeStatus();
9392
public abstract void SetRetainer(RetainerSetting setting);
93+
public virtual void Initialize() {}
9494
public abstract void InitializeMoving(); // starting conditions when starting speed > 0
9595
public abstract void LocoInitializeMoving(); // starting conditions when starting speed > 0
9696
public abstract bool IsBraking(); // return true if the wagon is braking above a certain threshold

0 commit comments

Comments
 (0)