Object-oriented modelling and simulation of physical systems