Skip to content

Commit b930903

Browse files
authored
Merge pull request #593 from peternewell/diesel-mechanic#2
Initial Diesel Mechanic Locomotive Simulation
2 parents 5b89a36 + d56da76 commit b930903

File tree

9 files changed

+1427
-143
lines changed

9 files changed

+1427
-143
lines changed

Source/Documentation/Manual/physics.rst

Lines changed: 73 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -355,7 +355,7 @@ The diesel locomotive model in ORTS simulates the behavior of two basic
355355
types of diesel engine driven locomotives-- diesel-electric and
356356
diesel-mechanical. The diesel engine model is the same for both types, but
357357
acts differently because of the different type of load. Basic controls
358-
(direction, throttle, dynamic brake, air brakes) are common across all
358+
(direction, throttle, and brakes) are common across all
359359
classes of engines. Diesel engines can be started or stopped by pressing
360360
the START/STOP key (``<Shift+Y>`` in English keyboards). The starting and
361361
stopping sequence is driven by a *starter* logic, which can be customized,
@@ -689,6 +689,78 @@ Output performance is very different compared with MSTS. The output force
689689
is computed using the diesel engine torque characteristics to get results
690690
that are more precise.
691691

692+
To indicate that the diesel is a mechanical transmission, ``ORTSDieselTransmissionType``
693+
needs to be set to "Mechanic".
694+
695+
Two ORTS mechanical gearbox configurations can be set up.
696+
697+
These two gearboxes can be selected by the use of the following parameter:
698+
699+
``ORTSGearBoxType ( A )`` - represents a semi-automatic pre-selector gearbox that gives
700+
a continuous power output that is not interrupted when changing gears.
701+
702+
``ORTSGearBoxType ( B )`` - represents a semi-automatic pre-selector type gear box where
703+
although there is a break in tractive effort when changing from one gear to another,
704+
the engine speed is reduced by a shaft brake if needed, so that there is no need for
705+
the driver to adjust the throttle.
706+
707+
One of three possible types of main clutch are selectable for each of the above gear box
708+
types, as follows:
709+
710+
``ORTSMainClutchType ( Friction )`` - represents a mechanical friction clutch.
711+
712+
``ORTSMainClutchType ( Fluid )`` - represents a fluid coupling. Where a transmission includes
713+
both a friction clutch and a fluid coupling then ORTSMainClutchType ( “Fluid” ) should be
714+
used in the eng file.
715+
716+
``ORTSMainClutchType ( Scoop )`` - represents a fluid coupling that includes a scoop device to
717+
disconnect the engine from the transmission at idle speed.
718+
719+
``ORTSGearBoxFreeWheel`` - indicates whether a freewheel mechanism is included in the transmission.
720+
( 0 ) - should be used for transmissions that do not include a freewheel. This option will allow
721+
‘engine braking’ to occur when appropriate.
722+
( 1 ) - should be used for transmissions that include a freewheel. This option will allow the train
723+
to coast with the engine in gear.
724+
725+
``GearBoxNumberOfGears`` - The number of gears available in the gear box.
726+
727+
Currently only a BASIC model configuration is available (ie no user defined traction curves or
728+
diesel engine curves are supported). OR calculates the tractive force curves for each gear based
729+
on the "inbuilt" torque curve of a typical diesel engine.
730+
731+
``GearBoxMaxSpeedForGears`` - sets the maximum speed for each gear, corresponding to maximum engine
732+
rpm and maximum power . As an example, the values for a typical British Railways first generation dmu are:
733+
734+
GearBoxMaxSpeedForGears( 15.3 27 41 65.5 ) The default values are in mph, although other units can be entered.
735+
In the above case the maximum permitted speed of the train is 70 mph; a small amount of ‘overspeed’ being allowed
736+
in top gear. The fourth gear speed of 65.5 mph corresponds to the maximum engine rpm set in the eng file by
737+
``DieselEngineMaxRPM``. The diesel engine may continue to ‘runaway’ above its normal ‘maximum speed’ until it
738+
reaches the maximum governed speed or ‘redline’ speed at which the engine governor will cut off the fuel
739+
supply until the engine speed is reduced. This speed can be set in basic Open Rails eng files using ``ORTSDieselEngineGovenorRpM``.
740+
In the case of the above train, then these would be
741+
742+
DieselEngineMaxRPM( 1800 )
743+
ORTSDieselEngineGovenorRpM ( 2000 )
744+
745+
If under any circumstances the engine reaches ``ORTSDieselEngineGovenorRpM`` then the diesel engine will automatically be shut down.
746+
747+
"ORTSGearBoxTractiveForceAtSpeed" - The tractive force available in each gear at the speed indicated in GearBoxMaxSpeedForGears. Units
748+
by default are in N, however lbf, N or kN. Published values for tractive effort of geared locomotives and multiple units
749+
are generally those at the maximum speed for each gear.
750+
751+
Hence a typical gear configuration for a diesel mechanic locomotive might look like the following:
752+
753+
ORTSDieselTransmissionType ( Mechanic )
754+
755+
ORTSGearBoxType ( B )
756+
ORTSMainClutchType ( "Friction" )
757+
ORTSGearBoxFreeWheel ( 0 )
758+
759+
GearBoxOperation( Manual )
760+
GearBoxNumberOfGears( 6 )
761+
GearBoxMaxSpeedForGears( 4.5mph 6mph 9mph 14.5mph 21mph 33mph )
762+
ORTSGearBoxTractiveForceatSpeed( 35400lbf 26600lbf 17700lbf 11200lbf 7600lbf 4830lbf )
763+
692764
.. _physics-traction-cut-off-relay:
693765

694766
Traction cut-off relay

Source/Orts.Simulation/Common/Scripting/PowerSupply/PowerSupply.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -145,6 +145,7 @@ public enum PowerSupplyEvent
145145
ServiceRetentionCancellationButtonReleased,
146146
SwitchOnElectricTrainSupply,
147147
SwitchOffElectricTrainSupply,
148+
StallEngine,
148149
}
149150

150151
public enum PowerSupplyType

0 commit comments

Comments
 (0)