Distributed solvers provide several benefits, such as linear scalability and good numerical robustness. By separating components with transmission line elements, simulations can be run in parallel on multi-core processors. At the same time, equation-based modelling offers an intuitive way of writing models. This paper presents an algorithm for generating distributed models from Modelica code using bilinear transform. This also enables hard limitations on variables and their derivatives. The generated Jacobian is linearised and solved using LU-decomposition. The algorithm is implemented in the Hopsan simulation tool. Equations are transformed and differentiated by using the SymPy package for symbolic mathematics. An example model is created andverified against a reference model. Simulation results are similar, but the equation-based model is four to five times slower. Further optimisation of the algorithm is thus required. The future aim is to develop a distributed simulation environment with integrated support for equation-based modelling.