Route Building Tutorial 3: Curves, Smooth Curves & An Adjacant Track

In this third tutorial, we will add some curves to our route and make it twin track.

Time to open the route file and get coding…

The route file we created previously should look something like this (it does not matter if you have changed the timings, altered the stop markers or if double line spacing is used),

The route as it is at the moment is perfectly straight and therefore completely unrealistic. We can change this by using the .curve command:

.curve a;b,
Where a is the radius of the curve in metres (using negative values for left hand curves and positive values for right hand curves) and b is the amount of cant (tilt).

Cant is the name used to describe the tilt angle of track on a curve which is used to compensate for lateral (sideways) forces generated by the train as it passes through the curve. In effect, the sleepers are laid at an angle so that the outer rail on the curve is at a higher level than the inner rail. On standard gauge track, 150 mm is the normal maximum in the UK, the actual amount present will be a compromise based on the actual train speeds on the line. Higher maximum speeds and tighter curves demand higher levels of cant. However, consideration must be given to slower running passenger trains – overdoing the cant will result in drinks sliding off the tables when running over the curve at slow speed!

To add a moderately tight left hand curve after 100metres, add the following code at position 100:

This has resulted in a right hand curve of 500m radius starting at 100metres.

Obviously we don’t want to go round and round in circles so we must end the curve at some point. If we want to straighten up at 800metres, we need to add this code at position 800:

In our fictional route, we can meander about to our hearts content but before adding more curves we need to think a little about why they are present.

Considering why curves are present, early railway builders had several design constraints placed on them. One of the major reasons for curving the railway was because of the landscape – early locomotives had insufficient power to deal with steep gradients while constructing earthworks (embankments and cuttings) to overcome these could be very expensive. Tunnels were often prohibitively expensive (depending on the ground conditions) and were only really used where diverting around the obstructing hill was not an option.

The need to minimise gradients resulted in railways generally being built to follow the contours of the land, and this is the reason why features such as escarpments, rivers and canals are often followed by railways.

Another major reason for introducing curvature is to overcome man-made obstacles. Typical of these would be landowners not wishing to sell, Lord Snooty not wanting the view out of his bedroom window destroyed by a railway (NIMBYism!!) or the wish to preserve existing buildings.

To some extent, much more powerful traction has overcome the problem of gradients, with modern high speed lines being noticeably less flat than older lines.

The curves we add to our route should therefore be present for a reason – slowing down for a curve without reason is not desirable.

A further point to consider when constructing curves is that if a tight curve is entered at high speed, a noticeable jolt would result. To overcome this, the start and end of a curve should be graduated (smoothed out).

To graduate our curve, we can change our curve to read this:

Notice how the radius of the curve tightens gradually after 50metres and the degree of cant increases. No doubt a competent railway engineer would not be too happy with this construction but at least it is a bit more realistic.

When we drive our route now (or view it in viewer mode), a major problem is revealed. The curve is not smooth but composed of a series of straight sections. This is because we have defined the rail type as being a straight section.

Before we can smooth our curves, we must index some track objects in the ‘with structure’ section of the route. Although the curve in our route only uses radii of 2000, 1000 and 500m, we may as well index a few others which may be of use at some point later in the route.

The curved track objects themselves are contained in the zip folder referenced in the introduction – these objects should be located in the \DLTUTORIAL_1 objects directory.

These objects were generated using SWITCH 1.5, available here

To index the smooth curved track objects, add the following code to our route,

To smooth the curves in our route, we must use curved track objects of the appropriate radius using the rail type command,

Railtype x;y,
Where x is the index of the rail and y defines the track object.

So to modify our curves we must change the rail type of track 0 (which is always the running rail) to the appropriate curved track objects by using the following code:

Go for a drive now and see the improvement!

It is also apparent that the curve is rather too sharp and long, turning through nearly 90° . For the scenic construction which will be demonstrated in later parts of this tutorial, it would be good to increase the length of the straight and ease the curve by changing our curve to this:

Notice that our curve now starts at 350m, and the sharpest part of the curve has been removed.

Suppose we want our route to be twin track, the second track can be added using the railstart command;

.railstart n;x;y;t,
Where n is the index of the running rail (between 1-16),

x is the distance, in metres, to the left (negative values) or right (positive values), y is the distance, in metres, below (negative values) or above (positive values) the running rail and t is the rail type as defined in the ‘with structure’ part of the route file.

We want the adjacent track to be 3.5 metres to the right of the running rail and at the same height and also, at the start of the route, to be straight. To achieve this, our first line of the routefile must be changed to this:

If we have a look at the route now, it is apparent that the adjacent track also needs smoothing as it goes around the curve. This can be performed using the same principle as was used for the running rail, so our code will now look like this:

Here, we are changing the track objects of the adjacent rail (1) to match the curve radius, a principle that should be maintained throughout the route.

We now have a 5km route with three ‘stations’, twin track and a smooth curve.

In the next tutorial, we will take a look changing the position of the adjacent track, change the appearance of the track and introduce run sounds.

Leave a Reply

Your email address will not be published. Required fields are marked *