Electrical modelling of rail tracks with multiple running trains is complex due to the difficulties in solving the power flow. The train positions, speed and acceleration are constantly varying resulting in a nonlinear system. In this work, a method is proposed for modelling DC electric railways to support power flow analysis of a simulated metro train service. The method exploits the MathWorks simulation tool Simscape, using it to model the mechanical and electrical characteristics of the rail track system. The model can be simulated to provide voltages at any position in the track and additionally, the voltages seen by any train. The model includes regenerative braking on trains, this is demonstrated to cause overvoltage in the feeding line if it is higher than the power demand of the other trains at that time. Braking resistors are used to protect the network from overvoltage by burning the excess energy. Through the implementation of Energy Storage Systems (ESSs), it will be possible to improve the energy efficiency and remove timetabling restrictions of electric railways by effectively controlling the rail track voltage. The paper proposes several methods to validate the model.