Calculation of vehicle behavior in traction and braking

Program TSIM in the GENSYS package can be used for studying braking and traction forces.

• Brake simulation
Create springs between the bogie and the axles, located at the same place as the brake disks. The property of the springs does not include a stiffness, they only contains a preload force which corresponds to the braking force.
```
func  const  Fbrake=  28553.362
func  const  Rbrake=  0.235

coupl p_lin  kdbrakep1=  Fbrake  0.
coupl p_lin  kdbrakep2= -Fbrake  0.

coupl k kdbr_111 axl_111 -Rbrake 0 -ro  bog_11  (aba-Rbrake) 0 -ro  kdbrakep1 esys1 z
coupl k kdbr_112 axl_112 +Rbrake 0 -ro  bog_11 -(aba-Rbrake) 0 -ro  kdbrakep2 esys1 z
coupl k kdbr_121 axl_121 -Rbrake 0 -ro  bog_12  (aba-Rbrake) 0 -ro  kdbrakep1 esys1 z
coupl k kdbr_122 axl_122 +Rbrake 0 -ro  bog_12 -(aba-Rbrake) 0 -ro  kdbrakep2 esys1 z

```

• Traction simulation
Create a spring at the cog-wheel of the axle, at the same place where the cog-wheel of the motor is attached. The property of the spring should not include a stiffness, only containing a preload force corresponding to the traction force. The angle of the spring between the cog-wheels should correspond to the direction of the cog-force between the two cog-wheels.
```
func  const  Ftrac=   28553.362
coupl p_lin  kdtracp1=  Ftrac  0.
coupl p_lin  kdtracp2= -Ftrac  0.

func  const  Aatrac1= -0.235
func  const  Batrac1= 0.435
func  const  Hatrac1= 0.65
func  const  Abtrac1= aba-0.2
func  const  Bbtrac1= 0.435
func  const  Hbtrac1= 0.75

coupl k kdbr_111 axl_111 +Aatrac1 +Batrac1 -Hatrac1
bog_11  +Abtrac1 +Bbtrac1 -Hbtrac1 kdtracp1 esys1 c
coupl k kdbr_112 axl_112 -Aatrac1 -Batrac1 -Hatrac1
bog_11  -Abtrac1 -Bbtrac1 -Hbtrac1 kdtracp2 esys1 c
coupl k kdbr_121 axl_121 +Aatrac1 +Batrac1 -Hatrac1
bog_12  +Abtrac1 +Bbtrac1 -Hbtrac1 kdtracp1 esys1 c
coupl k kdbr_122 axl_122 -Aatrac1 -Batrac1 -Hatrac1
bog_12  -Abtrac1 -Bbtrac1 -Hbtrac1 kdtracp2 esys1 c

```

With the applied traction or braking force the vehicle will accelerate or retardate, and the longitudinal displacements of all masses in the vehicle with respect to the moving coordinate systems lsys will increase or decrease. To avoid too big longitudinal displacements between the vehicle and the moving coordinate systems the user has two possibilities to solve this problem:

• Apply a longitudinal force on the coupler of the vehicle, avoiding an acceleration or retardation.
```
force rel_lsys1 coupler_force car_1 0 0 -1.  -Fx 0 0  0 0 0

```
• Regulate the longitudinal position of the esys coordinate system, forcing the coordinate system to follow the vehicle.
```
lsys e_reg_xpos esys1 car_1 1. 1.

```