Using Piecewise Linear Functions in Expressions

The following piecewise linear intrinsic functions are accepted in expressions:

pwl (dataset_expression, variable)

pwlx (dataset_expression, variable)

pwl_periodic (dataset_expression, variable)

The pwl and pwlx functions interpolate linearly along the x axis and returns a corresponding y value. The pwl_periodic function also interpolates linearly along the x axis but periodically.

You can use pwl in an expression that uses array variables and datasets for uses such as a frequency dependent material property. (Refer to Adding Datasets for related information on working with datasets.) For example, you specify BulkConductivity as

pwlx($dsArr[$dsIndex], Freq) where $dsArr=["$ds1", "$ds2"]

You can create a Design Variable representing dimension xSize as pwl(arr[idx], 1) where arr is an array variable and idx is an array index variable.

In this case, create a variable named xSize with pwl(arr[idx], 1) like this:

This value for xSize automatically opens a dialog box first for the idx index variable:

And then dialog boxes automatically open for each dataset variable implicit for the predefined array variable:

Then the Design Properties dialog box shows as follows:

Note: pwl can be used with datasets for design variables, but not for project variables.

Related Topics 

Adding Datasets

Adding a Design Variable

Modifying Datasets

Using Dataset Expressions