AmesimKnowledge

Customizing submodels

Example 2: Creating two customized submodels from a cam generic submodel

Objective

To construct more complex customized submodels.

The cam submodel CAM00 belongs to the Mechanical library. The associated icon is shown here. This is a submodel of a cam profile with cam follower. An ASCII file is read which defines the linear displacement of the contact point in mm at various angular displacements in degrees in the range 0 to 360. The file containing the cam profile is defined by the user in Parameter mode.

A simple modification can be made to CAM00 to produce INCAM50 and EXCAM50, which will be used as inlet and exhaust cam respectively.

Step 1: Load the cam submodel into Component Customization

Procedure

  1. On the left-hand side of the Component Customization display are the Categories buttons. Select the Mechanical category and then click on the standard cam icon shown (this icon is in the Transformers folder).

The Open Submodel dialog box opens.

  1. Select the submodel CAM00 in the list and click on Open.

The following figure shows the new display. Figure 16: Component Customization main interface with submodel loaded

Results

We are going to alter the characteristics of the submodel CAM00 to get our own inlet cam submodel INCAM50. Then we will do the same for the exhaust cam submodel EXCAM50.

Step 2: Customize CAM00 to produce INCAM50

Procedure

  1. In the Brief description field, replace the current description by the following: inlet cam and cam follower.

This field contains text, which will be displayed when the submodel will be selected in Simcenter Amesim.

  1. Click on the button labeled Full description and change the title and description as shown below, and then click OK:

Figure 17: Full description

  1. In the External variables table, modify the title of the external variables named displacement of the cam follower and velocity of the cam follower as follows:

Figure 18: Modify the titles of the external variables

Ideally we would replace the word cam in all parameters and variables with inlet cam.

  1. Select the Integer parameters tab from the Internal items table and set the default value of the parameter 1 for linear splines 2 for cubic splines to 2. Both integer parameters must be hidden:

Figure 19: Check boxes in the hidden column

  1. Select the Text parameters tab from the Internal items table and set the default value of the parameter file of cam position function of angular displacement to $AME/tutorial/data/inlet_cam_profile.data or %AME%\tutorial\data\inlet_cam_profile.data.

Note You can use a file browser for this by clicking on the button, provided you know the value of the environment variable AME. Ensure this parameter is also hidden:

  1. At this stage the customization of the submodel is complete and you can save it by clicking on the Save button. This one will be called INCAM50 and put in your tutorial directory.

Step 3: Customize CAM00 to produce EXCAM50

Repeat the procedure above (points 1 to 6) for EXCAM50 ensuring that in points 1, 2 and 3:

  • inlet cam is replaced by exhaust cam, and

  • INCAM50 is replaced byEXCAM50

(Alternatively with INCAM50 still loaded in Component Customization do File > Save as specifying EXCAM50 and then make the changes.)

Procedure

  1. Select the Integer parameters tab from the Internal items table and set the default value of the parameter 1 for linear splines 2 for cubic splines to 2. Both integer parameters must be hidden:

Figure 20: Check boxes in the hidden column

  1. Select the Text parameters tab from the Internal items table and set the default value of the parameter file of cam position function of angular displacement to $AME/tutorial/data/exhaust_cam_profile.data or %AME%\tutorial\data\exhaust_cam_profile.data.

Figure 21: Result of point 5

Step 4: Test your customized submodels in Simcenter Amesim

Procedure

  1. Start Simcenter Amesim and build the model shown in the figure below in order to test your new submodels.

You might get LCON12 instead of LCON11 depending on use of "flip" operations but this is not important. Save this model in your tutorial directory.

Figure 22: Build this model

  1. Use the following parameters for the intake and exhaust side:

Submodel

Title

Value

SPR000A

spring force with both displacements zero [N]

500

MAS005

mass [kg]

0.01

lower displacement limit [m]

0

higher displacement limit [m]

0.03

LSTP00A

gap or clearance with both displacements zero [mm]

0.1

contact stiffness [N/m]

1.0e9

contact damping [N/(m/s)]

1000

penetration for full damping [mm]

0.01

  1. Run a simulation for 0.08 seconds with a print interval of 0.0001 seconds and plot the two cam displacements against their angular displacement. You should get the following curves:

Figure 23: Cam displacements against their angular displacement

  1. Save this model carefully because it will be used again in the next section.

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