IThe INTERP function returns the iord derivative of the interpolated value of SPLINE/id at time=x. The INTERP function supports time-series splines, which are splines that include a FILE argument that specifies a time history file of type DAC or RPC III.
Format
INTERP (x, method, id [,iord])
Arguments
x | A real variable that specifies the value of time, the independent variable along the x-axis of the time series spline that is being interpolated. |
method | An integer variable that specifies the method of interpolation, either linear or cubic interpolation. Range: method = 1 (linear interpolation) method = 3 (cubic interpolation) |
id | An integer variable that specifies the identifier of a SPLINE statement that you define in the Adams Solver dataset. The SPLINE id must reference time series data from a DAC or RPC III file. |
iord | An integer variable specifying the order of the derivative that Adams Solver takes at the interpolated point, and then returns through INTERP. Default: 0 (take no derivative) Range: 0 < iord < 2 |
Extended Definition
The INTERP function uses linear or cubic interpolation to create a function across a set of data points. The data points are defined in a SPLINE statement in the Adams Solver data deck. The SPLINE statement with the FILE argument that you define in the Adams Solver dataset must reference a time series file of type DAC or RPC III. For more information on these file types, see
Adams Durability.
In general, the INTERP function with linear interpolation will not be a smooth function because, in almost all cases, the function will be discontinuous in the first derivative. Therefore, the estimate of the first derivative may be erroneous even though, by definition, the data points of a DAC or RPC time history file are evenly spaced. In all cases, the second derivative of the function being approximated is unreliable with linear interpolation.
On the other hand, with cubic interpolation, the INTERP function will be continuous to the second derivative. Therefore, we recommend that you use cubic interpolation, especially if first or second derivatives of the function will be evaluated.
Examples
SPLINE/101
,FILE=test_data.rsp
,CHANNEL=9
SFORCE/1, I=409, J=109, TRANSLATION
,FUNCTION=INTERP(TIME,3,101)
The SFORCE statement defines a translational force that acts between Markers 409 and 109. The SPLINE statement specifies that the discrete data used to interpolate the value of the SFORCE comes from CHANNEL 9 of the RPC III file test_data.rsp.
The INTERP function references this spline, defines the independent variable to be simply, TIME, and selects cubic as the method of interpolation.
See other
Interpolation available.