The Simscape language enables you to add new physical domains and to create your own physical modeling components and libraries. It is based on the MATLAB programming language, well-known by engineers. Using this object-oriented modeling language, you can define custom components, complete with parameterization, physical connections, and equations represented as acausal implicit DAEs. You can also use MATLAB to analyze the parameter values, perform preliminary computations, and initialize system variables. The Simulink block and dialog box for the component are automatically created from the Simscape file.
Simscape Language: Electronic Example
Model custom electronic components using the Simscape™ language. Define a resistor whose behavior varies with temperature.
The components you create can reuse the physical domain definitions provided with Simscape to ensure that your components are compatible with the standard Simscape components. You can also add your own physical domains. You can automatically build and manage Simulink libraries of your Simscape components and domains, enabling you to share these models across your organization. You can also generate C code from Simulink models that contain your custom components.
Simscape Language: Hydraulic Example
Model custom hydraulic components. A fixed hydraulic orifice is defined using implicit equations.
Using the Simscape language, you can control exactly which effects are captured in the models of your physical components. This approach enables you to balance the tradeoff between model fidelity and simulation speed.