To model physical systems in the Simulink® environment, consider using Simscape™ software.
Simscape extends Simulink with tools for modeling systems spanning mechanical, electrical, hydraulic, and other physical domains as physical networks. It provides fundamental building blocks from these domains to let you create models of custom components. The MATLAB® based Simscape language enables text-based authoring of physical modeling components, domains, and libraries.
For more information on Simscape software, see Simscape.