AmesimKnowledge

Advanced examples > A Catapult to demonstrate locked states

Locked states

If an explicit state or implicit state variable is locked, it is held at a fixed value during a stabilizing run. Constraint state variables cannot be locked. This can be used to obtain partial equilibrium states. By default all state variables are unlocked and are allowed to evolve in a stabilizing run in an attempt to find an equilibrium state.

To Lock/Unlock individual state variables

Locked states status individual state variables

Procedure

  1. Click on a component icon with the mouse right button.

  2. Select View lock states in the menu.

Results

The Locked states status dialog box appears (see following figure). It shows the explicit or implicit state variables, if any, of the submodel. The locked/unlocked status is shown in a check box.

To change the status of each variable you can either

Procedure

  1. Use the Unlock All and Lock All buttons, or

  2. Click on an individual check box.

Figure 94: Lock and unlock options

To globally change the locked states status of all state variables of selected components

Procedure

  1. Select the components you are interested in.

  2. Use the Simulate menu.

  3. Select Lock States > Unlock all states or Lock all states:

Figure 95: Simulate menu

To view the locked/unlocked status of all the state variables of a complete model

Procedure

  1. Use the Simulate menu.

  2. Select Lock States > Status.

A dialog as shown below is produced. Figure 96: Locked States Summary

In the present example

We must lock 2 state variables (displacement and velocity) in the heavy mass (both of which are set to 0.0).

Figure 97: Lock the velocity and displacement state variables of the mass

We want all the other states to evolve to a partial equilibrium so that the lever is at rest with its right-hand side at its lowest position.

Procedure

  1. Select the Stabilizing radio button in the Run parameters dialog box and start a run.

  2. Select the heavy mass and note that it still has a displacement and velocity of 0.0.

  3. Select the other components and note that many variables have changed. For instance in the left LSPT00A the gap, which was originally 2000 mm, is now 1970 mm which is due to the movement of the lever. In the right LSPT00A the gap is about -1.96e-4 mm which is the deformation due to the weight of the projectile.

  4. To finish this example, select the Stabilizing + Dynamic radio button and start a final run.

If you update the plot with the two masses' displacements you will find that the small mass initial displacement is -0.15, which means it is at rest until the big mass hits the lever: Figure 98: Small mass initial displacement

In the above screenshot we have zoomed in to observe this detail.

This example turns out to be extremely easy for the solver. However, this is not always the case. On some occasions it is necessary to "tune" parameters in order to get a successful run. Simcenter Amesim Run integrators are designed to give a good compromise between speed and reliability. Normally the default settings lead to a successful run. The following figure shows the results on the current example with an earlier version of Simcenter Amesim Run when the run failed.

Figure 99: Warning message

There are 3 options you can try to assist the numerical algorithm in these circumstances. In the Run Parameters dialog box you should try the following options:

Procedure

  1. Specify a tighter (smaller) integrator tolerance.

  2. Adjust the error type, often Relative can make a lot of difference.

  3. Select the Cautious option.Figure 100: Simulation options

Source: https://docs.sw.siemens.com/en-US/doc/254352342/PL20250521841123434.amesim_collection.Tutorial_Run/Locked_states · retrieved 2026-07-17