HyperWorks Solvers

SHF

SHF

Previous topic Next topic No expanding text in this topic  

SHF

Previous topic Next topic JavaScript is required for expanding text JavaScript is required for the print function  

Subroutine Type

Utility/General

Definition

Evaluates a Simple Harmonic.

Use

This function can be called by any user-defined subroutine.

Calling Syntax

Fortran

CALL SHF (X, X0, A, W, PHI, B, IORD, VALUE, ERRFLG)

 

C

c_shf(x, x0, a, w, phi, b, iord, value, errflg)

 

Python

[value, errflg] = py_shf(x, x0, a, w, phi, b, irod)

 

MATLAB

[value, errflg] = m_shf(x, x0, a, w, phi, b, irod)

Input Arguments

X [double precision]

Any valid expression used as an independent variable for the Simple Harmonic Function (SHF).

 

X0 [double precision]

The independent variable offset.

 

A [double precision]

The amplitude of the simple harmonic function.

 

W [double precision]

The frequency of the simple harmonic function.  It is assumed to be specified in radians per unit of the independent variable unless a D is used after the value.

 

PHI [double precision]

A phase shift in the simple harmonic function.  It is assumed to be in radians unless a D is used after the value.

 

B [double precision]

The average value of the simple harmonic function.

 

IROD [integer]

The order of the derivative that SHF has to return.  Order can be 0, 1 or 2.

Output Values

VALUE [integer]

The value that the subroutine returns.

 

ERRFLG [logical]

A variable (true or false) that SHF returns to the calling subroutine.  If SHF detects an error while calling the subroutine, it sets the error flag to true.

See Also:

Data Access Subroutines