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
Click on a component icon with the mouse right button.
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
Use the Unlock All and Lock All buttons, or
Click on an individual check box.
Figure 109: Lock and unlock options
To globally change the locked states status of all state variables of selected components
Procedure
Select the components you are interested in.
Use the Simulate menu.
Select Lock States > Unlock all states or Lock all states:
Figure 110: Simulate menu
To view the locked/unlocked status of all the state variables of a complete model
Procedure
Use the Simulate menu.
Select Lock States > Status.
A dialog as shown below is produced. Figure 111: 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 112: 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
Select the Stabilizing radio button in the Run parameters dialog box and start a run.
Select the heavy mass and note that it still has a displacement and velocity of 0.0.
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.
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 113: 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 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 when the run failed.
Figure 114: 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
Specify a tighter (smaller) integrator tolerance.
Adjust the error type, often Relative can make a lot of difference.
Select the Cautious option.Figure 115: Simulation options
Source: https://docs.sw.siemens.com/en-US/doc/254352342/PL20250521841123434.amesim_collection.Tutorial/Locked_states · retrieved 2026-07-17