Debugging Model
Debugging Model
Debugging Model
2 Adams/View
About Building Your Model Correctly
• Create a measure of your entire function or key elements of it - In addition, you may find it
helpful to build measures of your entire function or key elements of it and view strip charts of the
measures as your simulation progresses.
For example, if you create a function that defines the force of a spring-damper, you can create an object
measure that tracks the force of the spring-damper over time. In addition, if you create a function that
defines an impact force, you can create a function measure of either the displacement or velocity term in
the impact function. Learn About Measures.
Debugging Your Model 5
Debugging Your Model Using Eprint
Eprint displays the same information that the DEBUG command does when used with the argument
EPRINT. For more information, see the Adams/Solver online help.
Note: You can close the command window and use your aview.log file to view the debugging
information. Learn about Using the Adams/View Log File.
6 Adams/View
Using the Simulation Debugger
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.
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:
1. On the Main Toolbox, select the Simulation tool .
2. Set the pull-down menu at the bottom of the toolbox to Table.
Debugging Your Model 7
Using the Simulation Debugger
To display the Debug table from the Solver Settings dialog box:
1. From the Settings menu, point to Solver, and then select Debugging.
2. In the Solver Settings dialog box, set Display to Table.
The Debug table appears.
3. Set Track Maximum to the element that you want to track. Learn about Setting Up Tracking of
Modeling Objects.
4. Run an interactive simulation as explained in Performing an Interactive Simulation.
5. Select Debug from the Simulation container on the Main Toolbox or the Simulation Controls
dialog box.
Note: Selecting highlighting of objects will significantly slow down your simulation.
To highlight objects:
1. Turn on the debugging tool as explained in Running the Simulation Debugger.
2. From the Solver Settings dialog box, set Track Maximum to select the element that you want to
track. Learn about Setting Up Tracking of Modeling Objects.
3. Set Display to Highlighting.
Debugging Your Model 9
Using the Simulation Debugger
• 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.
Debugging Your Model 11
Setting Simulation Display
For tips on how to build modeling objects so that you avoid problems when building or simulating your
model, see:
• Tips on Constraining Your Model
• Tips on Creating Higher-Pair Constraints
• Tips on Creating Motions
• Tips on Running an Interactive Simulation
To ensure that you assigned geometry and markers to the correct parts, do one of the
following:
• Use the Model Topology by Connection tool to check the connections of your parts.
• Turn on icons during animations and watch carefully how markers move.
• Use the Table Editor to display all parts in your model so you can perform a quick check of each
part's mass and inertia and quickly fix the individual part masses and inertia. Learn about Editing
Objects Using the Table Editor.
• Use the Modify command to check an individual part's mass and inertia and to change it as
appropriate. Learn about modifying mass and inertia for rigid bodies in Modifying Part
Properties.
For example, often you set your length units in meters but data for bushing stiffness are given in Newtons
per millimeters. In this case, you need to convert your units.
Also, be sure that the constants that you use in applied force expressions and user-written subroutines are
consistent with the current set of Adams/View units. Adams/View does not change the units of constants
if you change the default units settings.
In addition, make sure that you select a set of units that minimizes the difference in magnitude (scale) of
all of your input data. For example, if you are modeling the vibration of a 75-ton industrial press, you
might want to select mass = Kilopounds mass and displacement = inches.
If you divide the mass (about 150 klbm) by the expected vibration magnitude (1.5 inches), you obtain a
model scale number of approximately 100, which is well within the range for an easy numerical solution.
Using grams and meters in the same model would result in a scale number of about 109; other units would
be even worse. Poorly scaled models can present numerical difficulties to Adams/Solver, and you should
avoid them.