1# Use this file to tweak the model parameters for engines
2# All force values are in kN
3
4# The x-value where the two curves intersect should match
5# the maximum speed for the real engine
6
7# Stationary tractive effort
8ps(x) = 34.7
9
10# Knee point where tractive effort tails off (m/s)
11knee = 10.0
12
13# Continuous tractive effort
14pc(x) = (ps(0) * knee)/x
15
16p(x) = x < knee ? ps(x) : pc(x)
17
18# Resistance
19# There should be at least an order of magnitude difference a << b << c
20a = 4
21b = 0.05
22c = 0.006
23q(x) = a + b*x + c*x*x
24
25set xrange [0:100]
26set yrange [0:50]
27set xlabel "Velocity (m/s)"
28set ylabel "Force (kN)"
29
30plot p(x) title 'Tractive effort', \
31     q(x) title 'Resistance'