Algorithms for simulation of trains as coupled detailed spatial and simplified one-dimensional models of rail vehicles are considered. Such an approach to train dynamics allows evaluation of in-train forces and their influence on dynamic characteristics related, e.g. to the safety problems or ride comfort. Initially, the method has been developed for the analysis of derailment accidents and further it has been implemented as a mechanical solver in six-degrees-offreedom train simulator TRENSIM, which features are discussed in the paper. An algorithm for parallelisation on multi-core processors for the simulation of rail vehicles and trains is presented.