Analyzing Variable Dependencies for a Normal Simulation

You can display the dependencies of a selected variable by plotting them. You can use the plots understand the simulation as well as debugging it.

Note that you can also plot variable dependencies after a failed initialization. For more information, see About Analyzing Variable Dependencies and Equation Incidence.


Before you begin: To have a model to work with, do the following:
  • Create a behavior experience from the Dymola model example Coupled Clutches. For more information, see Creating a Behavior Experience from a Model.
    Note: To select the model example Coupled Clutches in the first step, replace step 1 in the reference with the following: In the Dymola Behavior Modeling app, from the Behavior Tools section of the action bar, display the model example flyout by clicking Model Examples , then select Coupled Clutches .
  • Display the Simulation Setup dialog box, see Setting up a Simulation. In the Debug tab, activate Provide variable dependencies and equation incidence for plotting.
  • Simulate the model. For more information, see Simulating and Generating Results.
    Note: The simulation must be finished before analyzing variable dependencies.
  • Display the Variable Browser. See Simulating and Generating Results on how to display the Variable Browser.

In this scenario, you investigate why the acceleration of the mass J3 in the model jumps at the time t=0.8.

  1. In the Variable Browser, do the following to see the plot of the acceleration of J3 around the time t=0.8:
    1. Expand the node J3, right-click the signal J3.a, and select Add to Plot > New Plot
    2. Pause over the curve to see the tooltip, you see that the time for the jump is actually t=0.791.
  2. To see on what signals J3.a is dependent on, in the Variable Browser, right-click the signal J3.a and select Browse Dependencies .
    A Browse Dependencies browser for J3.a appears. In the browser the signals that J3.a depends on are listed, including type and unit. Also the equation of the browsed variable is displayed.

    In the browser you can:

    • Search signals by start entering the signal name in the Variable filter field.
      Note: You cannot use wildcards or dot notation, for example, clutch1.mode when searching.
    • Expand or collapse nodes.
    • Double-click a signal to see the signal name, type, and the underlying dependency equation.
      Note: To get back, click Back.
    • Plot a signal by right-clicking it and selecting Plot.

  3. To investigate jumps in mass acceleration, the modes of the clutches are of particularly interest. You plot these modes by right-clicking them in the Browse Dependencies and selecting Plot.
    You get the plots, for clutch1.mode, clutch2.mode, and clutch3.mode.

    Zooming in on them by dragging in the plots, you see that clutch1.mode changes at the time t=791.

  4. Repeat Step 2 but for the signal clutch1.mode.
  5. In the Browse Dependencies browser for clutch1.mode, investigate the signals by right-clicking them, selecting Plot and zoom around the time t=0.791.
    You realize that the underlying reason for the jump in acceleration of the mass J3.a is that the relative angular velocity of clutch1 (clutch1.w_rel) reaches 0 at t=0.791 and the clutch switches to stuck mode.