Using the Simulation Debugger
The
Simulation Debugger has several options for how you want to view its debugging information:
You can select to view any or all of these options during a single simulation. Note, however, that the options significantly slow down your simulation.
Note: | You can only use the Simulation Debugger with an Adams View interactive custom or standard library, not an Adams Solver stand-alone executable. Learn how to Set what type of Adams Solver to run. |
Running the Simulation Debugger
There are several ways to access the
Simulation Debugger. You can access it from the
Settings menu or through the
Solver Settings dialog box.
To access the Simulation Debugger from the Settings menu:
1. From the Settings menu, point to Solver, and then select Debugging.
The
Solver Settings dialog box appears with options for the Simulation Debugger.
2. Set Debugger to On.
3. Select OK.
To turn on the Simulation Debugger and Debug table from the Simulation Control dialog box:
1. From the Simulate menu, select Interactive Controls.
2. Set the pull-down menu in the middle of the Simulations Control dialog box to Table.
To turn on the Simulation Debugger and Debug table from the Main toolbox:
2. Set the pull-down menu at the bottom of the toolbox to Table.
Setting Up Tracking of Modeling Objects
As you run an
Interactive Simulation, you can track modeling objects based on their having the most error or the greatest change, acceleration, or force. You can display the objects in a table or highlight the objects during a simulation. You can only select to track one element at a time. For more information on how Adams Solver tracks elements, see the
DEBUG command in the
Adams Solver online help.
To set up the elements to be tracked:
1. From the Settings menu, point to Solver, and then select Debugging.
2. Set Track Maximum to one of the values explained below:
■Error - Track objects with the largest equation residual error. This number is an indicator of how far Adams Solver is from a solution. It should decrease with every iteration.
■Force - Track objects generating the greatest force. Includes forces and constraints.
■Change - Track variables with the most change.
■Acceleration - Track objects experiencing the greatest acceleration. Includes only parts.
3. Select OK.
Stepping Through a Simulation
You can set up the
Simulation Debugger so it pauses after each
Simulation Output step, time step, or iteration so you can closely inspect the simulation behavior. You can step through a simulation with any of the other debugger options selected, such as strip charts, tables, or object highlighting.
To step through a simulation:
1. From the Settings menu, point to Solver, and then select Debugging.
2. Select More and then set Single Step to Yes.
As you run a simulation, Adams View displays a dialog box that gives you the option to continue with the simulation or cancel it.
3. Select either Continue or Cancel.
Displaying Debugging Information in a Table
You can display debugging information in the Debug table (see
Maximum Equation Error (Debug Table) dialog box help). The table lets you track the object with the most error or the greatest amount of change, acceleration, or force. You can also track Adams Solver
Integrator progress. The Debug table contains a running count of the iterations needed to solve the equations of motion for the current simulation. You can use the information as a measure of how many computations Adams Solver is performing.
Displaying the Debug Table
To display the Debug table from the Solver Settings dialog box:
1. From the Settings menu, point to Solver, and then select Debugging.
The Debug table appears.
Setting Debug Table Options
You can set the following options for the information that the Debug table displays:
■Number of objects that can appear in the maximum element list. By default, Adams View displays three objects in the list at any one time.
■Number of elements that appeared in the last number of iterations.
To set the maximum number of objects:
■In the Show text box in the Debug table, enter the number of objects, and select Apply.
To set the history:
■In the History text box in the Debug table, enter the number of iterations to track, and select Apply.
Highlighting Objects During a Simulation
Throughout a
Simulation, you can highlight those objects experiencing the most error or the most change, force, or acceleration, depending on the element you selected to track. If you selected to also display the
Debug table, the objects highlighted are the same objects shown at the top of the Element list in the Debug table.
Note: | Selecting highlighting of objects will significantly slow down your simulation. |
To highlight objects:
3. Set Display to Highlighting.
As the simulation runs, Adams View highlights the objects.
Displaying Strip Charts of Adams Solver Settings
You can display four types of debugging strip charts during an
Interactive Simulation to help you debug your simulation. The first three apply to any default
Transient simulation, and the last one applies to a
static or
quasi-static equilibrium simulation. The strip charts can provide you with insight into how the Adams Solver
Integrator acts, particularly if you display strip charts of
measures of modeling objects, such as key forces and accelerations, side-by-side with the debugging strip charts.
To turn on the display of strip charts:
1. From the Settings menu, point to Solver, and then select Debugging.
3. From the Display Stripcharts area of the dialog box, select the type of strip chart you want to display, as explained below. Learn about the
Types of Strip Charts.
Types of Strip Charts
The strip charts you can display are:
■Step Size - The Step Size strip chart displays the integrator step size (units of model time), as the simulation progresses, on a logarithmic scale. The step size strip chart provides useful information for debugging a model because, in general, the integrator step size becomes much smaller in response to rapidly changing dynamics. Rapidly changing dynamics are, in some cases, intentional (for example, contacts that engage or disengage over a short duration), but can often be a symptom of modeling errors. For example, they can indicate that there is an incorrect damping values in an IMPACT function that causes unrealistically high forces. It also can indicate the use of discontinuous function expressions, such as an IF function.
For more information on the step size and how to control it, see
Running an Interactive Simulation.
■Iterations per Step - The Iterations per Step strip chart displays the number of iterations that Adams Solver needed to successfully progress to the next integration time step, over the course of a simulation. These iterations occur during the corrector phase of the integration. For more information on the phases in a dynamic simulation, see the
INTEGRATOR statement in the Adams Solver online help.
The information in the Iterations per Step strip chart can provide you with several insights into your model:
♦If your simulation progresses with very few iterations at each time step, Adams Solver is having an easy time simulating your model. You can further increase performance or speed by increasing the allowed maximum time step.
♦If Adams Solver requires many iterations for any particular step, it is likely encountering a period of rapidly changing dynamics that can require corrective action as described for the Step Size strip chart explained in the previous section.
♦If you notice that Adams Solver requires many iterations right from the beginning of a simulation, it is likely that you have chosen an integration step size that is too large for the dynamics in your model. You can obtain better performance if you choose a smaller time step. For information on changing the time step, see
Running an Interactive Simulation.
■Integrator order - The Integrator Order strip chart displays the order of the polynomial that Adams Solver uses during the predictor phase of integration. Adams Solver uses a polynomial to predict the future value of the state variables in an Adams model. In general, lower order polynomials are required to successfully integrate more difficult portions of a simulation, characterized either by nonlinearities or rapidly changing dynamics.
Similar to the Iterations per Step strip chart, if the Integrator Order strip chart shows the consistent use of high-order (three or more) polynomials, you may be able to increase performance by increasing the maximum allowed time step. If Adams Solver consistently or periodically uses low-order polynomials, it is symptomatic of a period of rapidly changing dynamics that may require corrective action as described for the Step Size strip chart or the integration step size may be too large for the dynamics in your model.
■Static Imbalance - The Static Imbalance strip chart displays the current imbalance in the equilibrium equations that Adams Solver computes during a static equilibrium simulation. A static equilibrium simulation is an iterative process to compute a position in which your model assumes a minimum energy configuration. Learn about
Performing Static Equilibrium Simulations.
The Static Imbalance strip chart displays a measure of how close the solution is coming to a complete balance of the equilibrium equations at each equilibrium iteration, in units of your selected force units.
You need to select Update Every Iteration to watch the iteration-by-iteration progress of an equilibrium simulation. Learn about
Setting Simulation Controls.