vfun

Mapdl.vfun(parr='', func='', par1='', con1='', con2='', con3='', **kwargs)

Performs a function on a single array parameter.

APDL Command: *VFUN

Parameters
  • parr – The name of the resulting numeric array parameter vector. See *SET for name restrictions.

  • func

    Function to be performed:

    Arccosine: ACOS(Par1). - Arcsine: ASIN(Par1).

    Par1 is sorted in ascending order. *VCOL, *VMASK, *VCUM, and *VLEN,,NINC do not apply. *VLEN,NROW does apply. - Arctangent: ATAN(Par1).

    Compress: Selectively compresses data set. “True” (*VMASK) values of Par1 (or row positions to be considered according to the NINC value on the *VLEN command) are written in compressed form to ParR, starting at the specified position. - Copy: Par1 copied to ParR.

    Cosine: COS(Par1). - Hyperbolic cosine: COSH(Par1).

    Direction cosines of the principal stresses (nX9). Par1 contains the nX6 component stresses for the n locations of the calculations. - Par1 is sorted in descending order. *VCOL, *VMASK, *VCUM, and *VLEN,,NINC do

    not apply. *VLEN,NROW does apply.

    Euler angles of the principal stresses (nX3). Par1 contains the nX6 component stresses for the n locations of the calculations. - Exponential: EXP(Par1).

    Expand: Reverse of the COMP function. All elements of Par1 (starting at the position specified) are written in expanded form to corresponding “true” (*VMASK) positions (or row positions to be considered according to the NINC value on the *VLEN command) of ParR. - Natural logarithm: LOG(Par1).

    Common logarithm: LOG10(Par1). - Nearest integer: 2.783 becomes 3.0, -1.75 becomes -2.0.

    Logical complement: values 0.0 (false) become 1.0 (true). Values > 0.0 (true) become 0.0 (false). - Principal stresses (nX5). Par1 contains the nX6 component stresses for the n

    locations of the calculations.

    Power function: Par1**CON1. Exponentiation of any negative number in the vector Par1 to a non-integer power is performed by exponentiating the positive number and prepending the minus sign. For example, -4**2.3 is -(4**2.3). - Sine: SIN(Par1).

    Hyperbolic sine: SINH(Par1). - Square root: SQRT(Par1).

    Tangent: TAN(Par1). - Hyperbolic tangent: TANH(Par1).

    Tangent to a path at a point: the slope at a point is determined by linear interpolation half way between the previous and next points. Points are assumed to be in the global Cartesian coordinate system. Path points are specified in array Par1 (having 3 consecutive columns of data, with the columns containing the x, y, and z coordinate locations, respectively, of the points). Only the starting row index and the column index for the x coordinates are specified, such as A(1,1). The y and z coordinates of the vector are assumed to begin in the corresponding next columns, such as A(1,2) and A(1,3). The tangent result, ParR, must also have 3 consecutive columns of data and will contain the tangent direction vector (normalized to 1.0); such as 1,0,0 for an x-direction vector. - Normal to a path and an input vector at a point: determined from the cross-

    product of the calculated tangent vector (see TANG) and the input direction vector (with the i, j, and k components input as CON1, CON2, and CON3). Points are assumed to be in the global Cartesian coordinate system. Path points are specified in array Par1 (having 3 consecutive columns of data, with the columns containing the x, y, and z coordinate locations, respectively, of the points). Only the starting row index and the column index for the x coordinates are specified, such as A(1,1). The y and z coordinates of the vector are assumed to begin in the corresponding next columns, such as A(1,2) and A(1,3). The normal result, ParR, must also have 3 consecutive columns of data and will contain the normal direction vector (normalized to 1.0); such as 1,0,0 for an x-direction vector.

    Transforms global Cartesian coordinates of a point to the coordinates of a specified system: points to be transformed are specified in array Par1 (having 3 consecutive columns of data, with the columns containing the x, y, and z global Cartesian coordinate locations, respectively, of the points). Only the starting row index and the column index for the x coordinates are specified, such as A(1,1). The y and z coordinates of the vector are assumed to begin in the corresponding next columns, such as A(1,2) and A(1,3). Results are transformed to coordinate system CON1 (which may be any valid coordinate system number, such as 1,2,11,12, etc.). The transformed result, ParR, must also have 3 consecutive columns of data and will contain the corresponding transformed coordinate locations. - Transforms specified coordinates of a point to global Cartesian coordinates:

    points to be transformed are specified in array Par1 (having 3 consecutive columns of data, with the columns containing the local coordinate locations (x, y, z or r, θ, z or etc.) of the points). Only the starting row index and the column index for the x coordinates are specified, such as A(1,1). The y and z coordinates (or θ and z, or etc.) of the vector are assumed to begin in the corresponding next columns, such as A(1,2) and A(1,3). Local coordinate locations are assumed to be in coordinate system CON1 (which may be any valid coordinate system number, such as 1,2,11,12, etc.). The transformed result, ParR, must also have 3 consecutive columns of data, with the columns containing the global Cartesian x, y, and z coordinate locations, respectively.

  • par1 – Array parameter vector in the operation.

  • con1 – Constants (used only with the PWR, NORM, LOCAL, and GLOBAL functions).

  • con2 – Constants (used only with the PWR, NORM, LOCAL, and GLOBAL functions).

  • con3 – Constants (used only with the PWR, NORM, LOCAL, and GLOBAL functions).

Notes

Operates on one input array parameter vector and produces one output array parameter vector according to:

ParR = f(Par1)

where the functions (f) are described below. Functions are based on the standard FORTRAN definitions where possible. Out-of-range function results (or results with exponents whose magnitudes are approximately greater than 32 or less than -32) produce a zero value. Input and output for angular functions may be radians (default) or degrees [*AFUN]. ParR may be the same as Par1. Starting array element numbers must be defined for each array parameter vector if it does not start at the first location. For example, *VFUN,A,SQRT,B(5) takes the square root of the fifth element of B and stores the result in the first element of A. Operations continue on successive array elements [*VLEN, *VMASK] with the default being all successive elements. Absolute values and scale factors may be applied to all parameters [*VABS, *VFACT]. Results may be cumulative [*VCUM]. Skipping array elements via *VMASK or *VLEN for the TANG and NORM functions skips only the writing of the results (skipped array element data are used in all calculations). See the *VOPER command for detail s . / p > p > T h i s c o m m a n d i s v a l i d i n a n y p r o c e s s o r . / p > / d i v > d i v c l a s s = ” r e f s e c t 1 ” t i t l e = ” M e n u P a t h s ” > a n a m e = ” d 0 e 2 9 2 8 5 8 ” > / a > h 2 > M e n u P a t h s / h 2 > t a b l e b o r d e r = ” 0 ” s u m m a r y = ” S i m p l e l i s t ” c l a s s = ” s i m p l e l i s t ” > t r > t d > s p a n c l a s s = ” g u i m e n u ” > s t r o n g > U t i l i t y M e n u &g t ; P a r a m e t e r s &g t ; A r r a y O p e r a t i o n s &g t ; V e c t o r F u n c t i o n s / s t r o n g > / s p a n > / t d > / t r > / t a b l e > / d i v > / d i v > h r > p c l a s s = ” l e g a l f o o t e r ” > s m a l l > i > R e l e a s e 1 6 . 2 - &c o p y ; S A S I P , I n c . A l l r i g h t s r e s e r v e d . / i > / s m a l l > / p > / b o d y > / h t m l >