### RunningSimulations

The model is created with zero initial conditions for all variables (with exception of the variables we set differently). We have changed only the value of the input force. Thus, the response of the system corresponds to the system step response to the applied force. After the model was built we may start the simulation by clicking the Run toolbar button (a large red arrow), or choosing Run command in Simulation menu. A dialogue appears which serves to input the necessary simulation parameters (see below).

Simulation option dialog We check the Restart button, which indicates that we wish to start the simulation from the beginning, not to continue the pervious run. The Reset plot box is checked automatically. This means that the previous plots if any are removed before the start of the new simulation. We may remove the Reset plot check if we wish to plot the next simulation results over the results of the previous one.

We need also to define the duration of Simulation interval, Output interval, Maximum stepsize, the simulation Method and Error tolerances. These values depend on the problem being simulated. To define them we conduct a short analysis.

The problem parameters that were already set during the model development were:

•    The body mass m = 5 kg
•    The spring stiffness k = 112.5 kN/m
•    Linear damping coefficient b = 150 N∙s/m
•    The input force F = 500 N

Thus, we can find the natural frequency of the system as

Similarly, the damping ratio is given by Thus, the natural frequency of the system is about 24 Hz, hence the period is 1/24 ≈0.04 s. We can expect that the transients die out after about five periods, or 0.2 s. Thus, we use a slightly greater Simulation interval, e.g. 0.5 s, to be sure that the transient has settled down. We set the Output interval and Maximum stepsize to one hundredth of this value, i.e. to 0.005 s. The maximum step-size should not be greater than the output interval, but may be shorter. It is usually set to the same value as the output interval. We can choose a smaller value for the output interval if we wish to get better resolution and the smoother diagrams. This means, however, that there are more calculations and the simulation run needs more computer time and memory resources. The last parameter Output Delay in ms (milliseconds) is not used and might be left at the default value (0 ms). (It is used when BondSim simulation is used to drive 3D models in BondSim3DVisual.)

Default error tolerances are set to 10-6 for both the absolute and the relative errors and we can accept them both. The integration method is the BDF (Backward Differentiation Formula) method with default sparse matrix linear equation solver (Sparse 1.4). We accept it. By the way there is only one solver that is used for all problems. Only some optional parameters may be changed, such as linear equation solver, error criteria, etc.

When the simulation starts, the messages in the Output window, under the Run tab, inform the user on the simulation actions completed. Simultaneously, at the right end of the status bar, a progress bar appears. This shows the progress of the simulation. When the simulation finishes, the progress bar disappears and a message informs the user of this fact. If the simulation time is short, as is in this case, the progress bars shortly appears and disappears.

Note that in the central window there is a tabbed window containing the X-Y plot. We can activate this window by clicking its tab. However, before we do this we may select the variables we wish to be shown in the plot because they are of quite different ranges. To exclude e.g. the body velocity we double click the corresponding port (the top left one) and select None (see Editing Project, Output Port dialog). Now we may activate the plot document. The resulting plot is shown in the next figure.

The response of the body position The plot shows the body position response to a step of the input force. Due to low damping in the system the body goes up and down several times until it finally settles at the position of about 4.5 mm. We can examine the values of the variable by clicking the curve. The horizontal and vertical lines appear which intersect on the curve. The corresponding time and variable values appear below the plot. The exact value can be easily evaluated as F/k = 0.00444...  m and compare with the shown value.

We can apply different operations on the generated plot by right-clicking on the plot. A drop-down menu appears from which different commands can be selected (see the figure below).

Post processing of simulation results The Show data command creates a window, which lists time-variable data points symmetrically about the right-clicked point. The next command Expand enables expanding of a part of the plot by drawing a selection rectangle, which define a part of the plot that we wish to expand. The operation is explained in the message at the bottom of the screen. This command does have sense if there are generated enough points so that expanded curve is not a trivial one, e.g. consisting of only few points.

The next commands apply the specific post-processing operations on the data points such as the time averaging or applying different Fast Fourier Transform operations.

There is also a command to append the marks to the curves. The descriptions could be also added to the plot as well as the pointing arrows. These are mostly used for documentation purpose.

The plotted curves could be exported in form of text files of the plotted values. Such files could be imported into e.g. MS Excel or similar programs for further processing.