Splines

The Splines feature allows you to add and edit three-dimensional spline data. Spline data can be used to capture non-linear characteristics of a force, bushing, or motion, by use of a linked data file or internal data table.

A 2D spline entity can be used to define non-linear behavior that varies about a single independent variable. An example is having a force defined as a function of velocity of another entity for characterizing a non-linear damper.
Figure 1. Example of a 2D Spline
A 3D spline, on the other hand, can be used to define non-linear behavior that varies about two independent variables. An example is the combustion force of a piston engine, where the combustion pressure is dependent on both the angle of rotation and speed of the crank.
Figure 2. Example of a 3D Spline

For information on how to add an entity like a spline, see Entity Creation.

Create or Edit a Spline

Define 2D or 3D splines to serve as a response curve or surface for use in other entities.

  1. Select the spline.
  2. On the Motion ribbon, under Profile, select Analyst.

  3. Under References, select the Splines tool.

    The Spline guide panel appears.
  4. To select a Parent system, use the selector.
  5. Enter the Name.
  6. Only for creating a spline: Select a Dimension:
    • 2D: Flat plane using two input variables (x, y).
    • 3D: Volumetric space with three input variables (x, y, z).
  7. Only for creating a spline: Select a Data Source:
    Option Description
    Value The data source is user-defined values.

    Double-click each cell in the table to edit the data values.

    • For 2D, enter the X and Y data values for each point.
    • For 3D, enter the Z data values at the top of the table, and then enter the x values in the first column below. Enter the Y values, which have one column for each z value entered.
    You have the following options:
    • Read : Read values from a .csv file. The correct format of data in the .csv file is shown below for a 3D spline:


    • Export: Export the data to a .csv file.
    • Insert Before First Data Point (): Insert a value before the first data point.
    • Insert After Selected Data Points (): Insert a value after the selected data points.
    • Insert After Last Data Point (): Insert a value after the last data point.
    • Delete Selected Data Points (): Delete the selected data points.
    File If the data is available in a .csv file with the above described format, you can do the following:
    • Next to X File, click to import the X data from a .csv file.
    • Next to Y File, click to import the Y data from a .csv file.
    • To localize all the data points in the file to the model as values, click the Convert to Values button.
    The data in the .csv file will be imported as values.
    Note:
    • When importing data from a file, the values are considered unitless. Not until the spline is used in the simulation does the solver then interpret them in a specific unit type. The interpreted unit type is based on the Solver Units setting specified under Preferences, Inspire Motion, Run Options.
    • If the Type is set as File and a .csv file is referred, toggling to Value will automatically import the values.
    Math (2D only) The data source is math expressions.

    Define the vector mathematically in the X Expression and Y Expression fields.

    Below are two sample expressions for a spline with Variable name as Spline_0:
    Expression Description
    X Expression 0:10:1 X vector expression to generate a series of numbers from 0 to 10 at regular intervals of 1.
    Y Expression cos(Spline_0.x) Y vector expression to apply a cosine function on the X vector of the spline.
  8. Adjust the Visualization of the spline:
    Option Description
    Interpolation Preview (Value only) Select an interpolation method:
    • Akima
    • Cubic
    • Linear
    • Quintic
    Note: The selected Interpolation method will be used as the default fit method when referencing splines through other entities, such a forces or motions.
    Extrapolation Select True if the spline data has to be linearly extrapolated at each end of the y-vector during simulation.
    Tip:
    • Sometimes it is easier to remove the left side data by clicking Remove left side, work on the right side data, and then use the Reflect to left side button to reflect your data.
    • Clicking the Replace with linear equivalent button will use the Stiffness value (shown grayed out on the microdialog) and display it as an editable curve in the graphical area of the Profile Editor.
  9. Right-click and mouse through the check mark to exit, or double-right-click.

Spline Properties

Descriptions of spline properties in the Property Editor.

Table 1.
Property Name Description
General
Name Name of the entity
Variable Name The variable name, a unique identifier string of the entity
ID A unique identifying integer
Type 2D or 3D, which is set in the guide panel.
Extrapolation Select the check box enable the solver to extrapolate the spline linearly when the computed value for the independent variable goes out of the specified bounds.
Properties (2D)
X Data source File

This is set in the guide panel.

File Browse for location of .csv file with data values.
Type The Type is a block of data. Options are Unknown, column_names, and Index where column_names refer to the name assigned to the column in the header row of the .csv file for each column. If the .csv does not have any header row, column_names take default names as Column 1, Column 2 etc.
Request The Request is a sub-block of data. Options available depend on the value of Type.

If Type is set to Unknown, Request is set to Block 1.

If Type is set to Column 1 or Index, Request is set to Index.

Component The component is a vector (or column) within a sub-block of data. Options available depend on the value of Type.

If Type is set to Unknown, options are column_names.

If Type is set to Column 1, Component is set to Column 1.

If Type is set to Index, Component is set to Index.

Data source Value

This is set in the guide panel.

Values Click to open the guide panel and set values.
Data source Math

This is set in the guide panel.

Math Enter an expression for the X vector.
Y Data source File

This is set in the guide panel.

File Browse for location of .csv file with data values.
Type The Type is a block of data. Options are Unknown, column_names, and Index where column_names refer to the name assigned to the column in the header row of the .csv file for each column. If the .csv does not have any header row, column_names take default names as Column 1, Column 2, etc.
Request The Request is a sub-block of data. Options available depend on the value of Type.

If Type is set to Unknown, Request is set to Block 1.

If Type is set to Column 1 or Index, Request is set to Index.

Component The component is a vector (or column) within a sub-block of data. Options available depend on the value of Type.

If Type is set to Unknown, options are column_names.

If Type is set to Column 1, Component is set to Column 1.

If Type is set to Index, Component is set to Index.

Data source Value

This is set in the guide panel.

Values Click to open the guide panel and set values.
Data source Math

This is set in the guide panel.

Math Enter an expression for the Y vector.
Properties (3D)
Data source File
CSV File Browse for location of .csv file with data values.
Data source Value
XY Values Click to open the guide panel and set values.
Z Values Click to open the guide panel and set values.
Attributes
X Scale

Define the scale for the X vector. When a data vector is scaled, the vector is multiplied by a specified value. The original data values are not actually altered.

Offset Define the offset for the X vector. Offsetting a data vector shifts the data along the corresponding axis.
Y Scale

Define the scale for the Y vector. When a data vector is scaled, the vector is multiplied by a specified value. The original data values are not actually altered.

Offset Define the offset for the Y vector. Offsetting a data vector shifts the data along the corresponding axis.
Z Scale

Define the scale for the Z vector. When a data vector is scaled, the vector is multiplied by a specified value. The original data values are not actually altered.

Offset Define the offset for the Z vector. Offsetting a data vector shifts the data along the corresponding axis.
Signal
User-defined Use a subroutine to define the spline.
  • For User expr, provide an expression with the USER solver function with parameters being passed to the user subroutine.
  • Turn on Use local file and function name to provide a local file for the subroutine. Otherwise, Inspire Motion will search for the subroutine within its search path.
    1. Specify a Local file where the subroutine code can be accessed by the solver. If this option is not specified, the application will search for a subroutine following its user subroutine loading rules.
      Note: The type of file to be specified will depend on the selected function type. For example, if DLL/SO is selected, you can specify a file with a .dll extension (for Windows) or an .so extension (for Linux).
    2. Select a Function type from the dropdown menu:
      • DLL/SO
      • Python
      • MatLab
      • Compose
    3. Specify the Function name in the subroutine that defines the entity, or accept the default name provided by the application.