Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement brake relay valve #833

Merged
merged 6 commits into from
Jul 13, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
23 changes: 23 additions & 0 deletions Source/Documentation/Manual/physics.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2972,10 +2972,15 @@ MaxAuxilaryChargingRate and EmergencyResChargingRate.

.. index::
single: BrakePipeVolume
single: ORTSBrakeCylinderVolume
single: ORTSEmergencyValveActuationRate
single: ORTSEmergencyDumpValveRate
single: ORTSEmergencyDumpValveTimer
single: ORTSMainResPipeAuxResCharging
single: ORTSBrakeRelayValveRatio
single: ORTSEngineBrakeRelayValveRatio
single: ORTSBrakeRelayValveApplicationRate
single: ORTSBrakeRelayValveReleaseRate
single: ORTSMainResChargingRate
single: ORTSEngineBrakeReleaseRate
single: ORTSEngineBrakeApplicationRate
Expand All @@ -2999,6 +3004,10 @@ MaxAuxilaryChargingRate and EmergencyResChargingRate.
brake servicetimefactor instead, but the Open Rails Development team
doesn't believe this is worth the effort by the user for the added
realism.
- ``Wagon(ORTSBrakeCylinderVolume`` - Volume of car's brake cylinder. This allows
specifying the brake cylinder volume independently of triple valve ratio.
This is useful when the cylinder is not directly attached to a triple valve,
e. g. when a relay valve exists.
- ``Wagon(ORTSEmergencyValveActuationRate`` -- Threshold rate for emergency
brake actuation of the triple valve. If the pressure in the brake pipe
decreases at a higher rate than specified, the triple valve will switch to
Expand All @@ -3014,6 +3023,20 @@ MaxAuxilaryChargingRate and EmergencyResChargingRate.
by the brake system.
- ``Wagon(ORTSEPBrakeControlsBrakePipe`` -- Set to 1 for UIC EP brake: brake pipe
pressure is electrically controlled at every fitted car.
- ``Wagon(ORTSBrakeRelayValveRatio`` -- Determines the proportionality constant
between pressure as demanded by the triple valve and brake cylinder pressure.
This is achieved via a relay valve which sets BC pressure proportionally.
Relay valves may be installed to achieve higher brake cylinder pressures,
dynamic brake blending or variable load compensation.
- ``Wagon(ORTSBrakeRelayValveRatio`` -- Same as above, but for the engine brake
- ``Wagon(ORTSBrakeRelayValveApplicationRate`` -- Brake cylinder pressure application
rate achieved by the relay valve, if fitted.
- ``Wagon(ORTSBrakeRelayValveReleaseRate`` -- Brake cylinder pressure release
rate achieved by the relay valve, if fitted.
- ``Wagon(ORTSMaxTripleValveCylinderPressure`` -- Maximum cylinder pressure demanded
by the triple valve. For example, UIC distributors set maximum cylinder pressure
to 3.8 bar when brake pipe is below 3.5 bar, and further brake pipe discharging
does not increase cylinder pressure.
- ``Engine(ORTSMainResChargingRate`` -- Rate of main reservoir pressure change
in psi per second when the compressor is on (default .4).
- ``Engine(ORTSEngineBrakeReleaseRate`` -- Rate of engine brake pressure
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1813,7 +1813,7 @@ public void DynamicBrakeBlending(float elapsedClockSeconds)
&& ThrottlePercent == 0 && !(DynamicBrakeController != null && DynamicBrakeBlendingOverride && DynamicBrakeController.CurrentValue > 0))
{
float maxCylPressurePSI = airPipeSystem.GetMaxCylPressurePSI();
float target = airPipeSystem.AutoCylPressurePSI / maxCylPressurePSI;
float target = airPipeSystem.AutoCylPressurePSI * airPipeSystem.RelayValveRatio / maxCylPressurePSI;

if (!DynamicBrakeBlended)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -86,11 +86,11 @@ public abstract class BrakeSystem
/// but for vacuum brakes it is a conversion to an internally used equivalent pressure.
/// </summary>
public abstract float InternalPressure(float realPressure);

public abstract void Initialize(bool handbrakeOn, float maxPressurePSI, float fullServPressurePSI, bool immediateRelease);
public abstract void SetHandbrakePercent(float percent);
public abstract bool GetHandbrakeStatus();
public abstract void SetRetainer(RetainerSetting setting);
public virtual void Initialize() {}
public abstract void InitializeMoving(); // starting conditions when starting speed > 0
public abstract void LocoInitializeMoving(); // starting conditions when starting speed > 0
public abstract bool IsBraking(); // return true if the wagon is braking above a certain threshold
Expand Down