WOLFRAM

Interacting with the System Modeler Kernel

Kernel Command ViewClearing the View
Kernel Commands

Kernel Command View

The Kernel Command view is available in both Model Center and Simulation Center. It provides a way to interact with the System Modeler kernel by executing commands and evaluating Modelica expressions. When opening the Kernel Command view by choosing View Kernel Command, it will appear in the bottom area of the main window.

1.gif

Executing commands in the Kernel Command view.

Kernel Commands

To interact with the kernel, the commands described in this section can be used.

General

Variables and Evaluation

The Kernel Command view can also be used as a Modelica expression evaluator. This is an example of a session, showing evaluation of expressions and functions and assignment of variables. Inputs are shown in bold:

1 + 2
3
Modelica.Math.sin(0.1)
0.09983341664682815
a := 2;
2
b := Modelica.Constants.pi / 2;
1.570796326794897
a + Modelica.Math.sin(b)
3.0
ndims({{1, 2}, {3, 4}})
2
size({{1, 2}, {3, 4}})
{2,2}

These commands can be used to handle variables defined in the kernel session:

Clearing the View

The Kernel Command view can be cleared by right-clicking anywhere within the view and choosing Clear All.