Recent and strict regulations in the maritime sector regarding exhaust gas emissions has led to an evolution of shipboard systems with a progressive increase of complexity, from the early utilization of electric propulsion to the realization of an integrated shipboard power system organized as a microgrid. Therefore, novel approaches, such as the model-based design, start to be experimented by industries to obtain multiphysics models able to study the impact of different designing solutions. In this context, this paper illustrates in detail the development of a multiphysics simulation framework, able to mimic the behaviour of a DC electric ship equipped with electric propulsion, rotating generators and battery energy storage systems. The simulation platform has been realized within the retrofitting project of a Ro-Ro Pax vessel, to size components and to validate control strategies before the system commissioning. It has been implemented on the Opal-RT simulator, as the core component of the future research infrastructure of the University of Genoa, which will include power converters, storage systems, and a ship bridge simulator. The proposed model includes the propulsion plant, characterized by propellers and ship dynamics, and the entire shipboard power system. Each component has been detailed together with its own regulators, such as the automatic voltage regulator of synchronous generators, the torque control of permanent magnet synchronous motors and the current control loop of power converters. The paper illustrates also details concerning the practical deployment of the proposed models within the real-time simulator, in order to share the computational effort among the available processor cores.