17
0
mirror of https://github.com/MaSzyna-EU07/maszyna.git synced 2026-11-09 12:32:24 +01:00

Merge pull request #260 from MaSzyna-EU07/fix/sx45-line-contactors-lamp

fix(cab): on the SU45 and SU46 the open line contactors lamp lights with the contactors opened by the pressure switch (eu07/maszyna#263)
This commit is contained in:
2026-11-07 20:22:53 +00:00
committed by GitHub
3 changed files with 124 additions and 1 deletions

View File

@@ -0,0 +1,46 @@
{
"_comment": "Diesel-electric locomotive made after the SU46 (303D): the line contactors close on the first power position of the master controller, the pressure switch (on by default) opens them with too low a pressure in the main pipe or the brakes applied.",
"Param": { "Category": "train", "M": 105000, "Mred": 15000, "Vmax": 120, "PWR": 1400, "SandCap": 400 },
"Dimensions": { "L": 18.99, "H": 4.292, "W": 2.904, "Cx": 0.3 },
"Wheels": { "D": 1.1, "AIM": 4000, "Tw": 1.435, "Axle": "Co'Co'", "Ad": 1.75, "Bd": 10.3, "Rmin": 100 },
"Brake": {
"BrakeValve": "LSt", "NBpA": 4, "MBF": 85.0, "MaxBP": 4.4, "LocMaxBP": 4.4, "MaxASBP": 1.3, "RM": 0.71, "BCN": 12, "BCR": 0.114,
"BCD": 0.06, "BCM": 5.84, "HiPP": 5, "LoPP": 3.5, "Vv": 0.9, "MinCP": 7, "MaxCP": 8.5, "CompressorSpeed": 0.05, "BCS": 1, "BSA": 2,
"BM": "P10-Bgu", "CompressorPower": "Converter", "BVV": 200, "BRE": 0.8
},
"BuffCoupl": { "CType": "Screw", "kB": 9200, "DmaxB": 0.15, "FmaxB": 740, "kC": 4800, "DmaxC": 0.15, "FmaxC": 780, "beta": 0.58, "AllowedFlag": 103 },
"Cntrl": {
"BrakeHandle": "FV4a", "LocBrakeHandle": "FD1", "BrakeSystem": "Pneumatic", "BDelay1": 15, "BDelay2": 6, "BDelay3": 36, "BDelay4": 32,
"ASB": "Manual", "LocalBrake": "PneumaticBrake", "MCPN": 15, "SCPN": 4, "AutoRelay": "Yes", "IniCDelay": 0.5, "SCDelay": 0.1,
"BrakeDelays": "GPR", "ConverterStart": "Automatic", "ConverterStartDelay": 10
},
"Light": { "Light": "Generator", "LGeneratorEngine": "ElectricSeriesMotor", "LMaxVoltage": 110, "LMaxCurrent": 100 },
"Engine": {
"AIM": 1.6, "EngineType": "DumbDE", "Trans": "18:62", "Ftmax": 317000, "Flat": 0, "Vhyp": 15.0, "Vadd": 3.8, "Cr": 1.0, "RelayType": 46,
"OilMinPressure": 0.055, "OilMaxPressure": 0.6, "WaterMinTemperature": 40, "WaterMaxTemperature": 92, "WaterCoolingTemperature": 76,
"HeatKW": 0.068599, "HeatKV": 0.3, "HeatKFE": 1, "HeatKFS": 87.76269, "HeatKFO": 26.72716, "HeatKFO2": 57.72
},
"Circuit": { "CircuitRes": 0.01, "ImaxLo": 3300, "IminLo": 2500 },
"_power": "rows: engine speed [rpm], power [kW], generator voltage limit, current limit, one per master controller position",
"WWList": {
"Size": 15,
"rows": [
[696, 0, 0, 0],
[696, 0, 0, 0],
[696, 80, 350, 1000],
[696, 80, 350, 1000],
[763, 214, 455, 1400],
[830, 321, 500, 1600],
[897, 428, 545, 1800],
[964, 535, 590, 2000],
[1031, 642, 635, 2200],
[1098, 748, 680, 2400],
[1165, 855, 725, 2600],
[1232, 962, 770, 2800],
[1299, 1069, 815, 3000],
[1366, 1176, 865, 3200],
[1433, 1283, 910, 3400],
[1500, 1390, 960, 3600]
]
}
}

View File

@@ -57,3 +57,74 @@ TEST_CASE("line contactors: the ground relay and overload lamps follow the same
vehicle->MotorConnectorsCheck();
CHECK_FALSE(vehicle->MainCircuitLampsEnabled());
}
// on the diesel-electric SU45 and SU46 (eu07/maszyna#263) the lamp tells just the line contactors are open: lit with the
// master controller at 0 and with the start cut off by too low a pressure in the main pipe, out on the power positions
namespace {
// the diesel-electric locomotive with its engine running and the brakes released, the master controller at 0
test::vehicle diesel_electric() {
test::vehicle vehicle{test::definition::load("diesel_electric")};
vehicle->CabOccupied = 1;
vehicle->CabActivisation();
vehicle->BatterySwitch(true);
vehicle->OilPumpSwitch(true);
vehicle->FuelPumpSwitch(true);
vehicle.run(20.0); // the oil pressure builds up
vehicle.hold_brake_pipe(5.0); // bar
vehicle->MainSwitch(true);
vehicle.run(30.0);
vehicle->DirectionForward();
vehicle.run(60.0); // the brakes release
return vehicle;
}
} // namespace
TEST_CASE("line contactors: on a diesel-electric the lamp is lit at 0 and goes out on a power position") {
auto vehicle{diesel_electric()};
REQUIRE(vehicle->EngineType == TEngineType::DieselElectric);
REQUIRE(vehicle->Mains);
REQUIRE_FALSE(vehicle->ControlPressureSwitch);
CHECK_FALSE(vehicle->StLinFlag);
CHECK(vehicle->LineContactorsLampLit());
vehicle->IncMainCtrl(1);
vehicle.run(3.0);
CHECK(vehicle->StLinFlag);
CHECK_FALSE(vehicle->LineContactorsLampLit());
vehicle->DecMainCtrl(1);
vehicle.run(3.0);
CHECK_FALSE(vehicle->StLinFlag);
CHECK(vehicle->LineContactorsLampLit());
}
TEST_CASE("line contactors: on a diesel-electric the lamp lights with the contactors opened by too low a main pipe pressure") {
auto vehicle{diesel_electric()};
vehicle->IncMainCtrl(1);
vehicle.run(1.0);
vehicle->IncMainCtrl(1);
vehicle.run(2.0);
REQUIRE(vehicle->StLinFlag);
vehicle.hold_brake_pipe(2.5); // bar, below the 3.6 bar of the pressure switch
vehicle.run(10.0);
REQUIRE(vehicle->ControlPressureSwitch);
CHECK_FALSE(vehicle->StLinFlag);
CHECK(vehicle->LineContactorsLampLit()); // it went out here
CHECK_FALSE(vehicle->MainCircuitLampsEnabled()); // the ground relay and overload lamps still go out with the start cut off
// the pressure back, the contactors stay open on the second position and the lamp stays lit, as it should;
// they close again only on the first one
vehicle.hold_brake_pipe(5.0);
vehicle.run(60.0);
REQUIRE_FALSE(vehicle->ControlPressureSwitch);
CHECK_FALSE(vehicle->StLinFlag);
CHECK(vehicle->LineContactorsLampLit());
vehicle->DecMainCtrl(1);
vehicle.run(3.0);
CHECK(vehicle->StLinFlag);
CHECK_FALSE(vehicle->LineContactorsLampLit());
}