voper#
- Mapdl.voper(parr='', par1='', oper='', par2='', con1='', con2='', **kwargs)#
Operates on two array parameters.
APDL Command:
*VOPER- Parameters:
- PARR
The name of the resulting array parameter vector. See
*SETfor name restrictions.- PAR1
First array parameter vector in the operation. May also be a scalar parameter or a literal constant.
- OPER
Operations:
ADDAddition:Par1+Par2.SUBSubtraction:Par1-Par2.MULTMultiplication:Par1*Par2.DIVDivision:Par1/Par2(a divide by zero results in a value of zero).MINMinimum: minimum ofPar1andPar2.MAXMaximum: maximum ofPar1andPar2.LTLess than comparison:Par1<Par2gives 1.0 if true, 0.0 if false.LELess than or equal comparison:Par1 <= Par2gives 1.0 if true, 0.0 if false.EQEqual comparison:Par1 = Par2gives 1.0 if true, 0.0 if false.NENot equal comparison:Par1 ≠ Par2gives 1.0 if true, 0.0 if false.GEGreater than or equal comparison:Par1 >= Par2gives 1.0 if true, 0.0 if false.GTGreater than comparison:Par1>Par2gives 1.0 if true, 0.0 if false.DERFirst derivative:\[\dfrac{\mathrm{d}(\mathrm{Par1})}{\mathrm{d}(\mathrm{Par2})}\]The derivative at a point is determined over points half way between the previous and next points (by linear interpolation).
Par1must be a function (a uniquePar1value for eachPar2value) andPar2must be in ascending order.DER2Second derivative:\[\dfrac{\mathrm{d}^2(\mathrm{Par1})}{\mathrm{d}(\mathrm{Par2})^2}\]See also
DER1.INT1Single integral:\[\int Par1 \, d(Par2)\]where
CON1is the integration constant. The integral at a point is determined by using the single integration procedure described in the Mechanical APDL Theory Reference.INT2Double integral:\[\iint Par1 \, d(Par2)\]where
CON1is the integration constant of the first integral andCON2is the integration constant of the second integral. IfPar1contains acceleration data,CON1is the initial velocity andCON2is the initial displacement. See alsoINT1.DOTDot product:Par1 . Par2.Par1andPar2must each have three consecutive columns of data, with the columns containing thei,j, andkvector components, respectively. Only the starting row index and the column index for theicomponents are specified forPar1andPar2, such asA(1,1). Thejandkcomponents of the vector are assumed to begin in the corresponding next columns, such asA(1,2)andA(1,3).CROSSCross product:Par1 x Par2.Par1,Par2, andParRmust each have 3 components, respectively. Only the starting row index and the column index for the i components are specified forPar1,Par2, andParR, such asA(1,1). The j and k components of the vector are assumed to begin in the corresponding next columns, such asA(1,2)andA(1,3).GATHGather: For a vector of position numbers,Par2, copy the value ofPar1at each position number to ParR. Example: forPar1 = 10,20,30,40andPar2 = 2,4,1;ParR = 20,40,10.SCATScatter: Opposite ofGATHoperation. For a vector of position numbers,Par2, copy the value ofPar1to that position number inParR. Example: forPar1 = 10,20,30,40,50andPar2 = 2,1,0,5,3;ParR = 20,10,50,0,40.ATN2Arctangent: arctangent ofPar1/Par2with the sign of each component considered.LOCALTransform the data inPar1from the global Cartesian coordinate system to the local coordinate system given inCON1.Par1must be anNx 3 (i.e., vector) or anNx 6 (i.e., stress or strain tensor) array. If the local coordinate system is a cylindrical, spherical, or toroidal system, then you must provide the global Cartesian coordinates inPar2as anNx 3 array. SetCON2 = 1if the data is strain data.GLOBALTransform the data inPar1from the local coordinate system given inCON1to the global Cartesian coordinate system.Par1must be anNx 3 (that is, vector) or anNx 6 (that is, stress or strain tensor) array. If the local coordinate system is a cylindrical, spherical, or toroidal system, then you must provide the global Cartesian coordinates inPar2as anNx 3 array. SetCON2 = 1if the data is strain data.
- PAR2
Second array parameter vector in the operation. May also be a scalar parameter or a literal constant.
- CON1
First constant (used only with the
INT1andINT2operations).- CON2
Second constant (used only with the
INT2operation).
Notes
Operates on two input array parameter vectors and produces one output array parameter vector according to:
ParR = Par1 o Par2where the operations (o) are described below. ParR may be the same as
Par1orPar2. Absolute values and scale factors may be applied to all parameters [*VABS,*VFACT]. Results may be cumulative [*VCUM]. Starting array element numbers must be defined for each array parameter vector if it does not start at the first location, such as*VOPER,A,B(5),ADD,C(3)which adds the third element of C to 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. Skipping array elements via*VMASKor*VLENfor theDERandINTfunctions skips only the writing of the results (skipped array element data are used in all calculations).Parameter functions and operations are available to operate on a scalar parameter or a single element of an array parameter, such as
SQRT(B)orSQRT(A(4)). See the*SETcommand for details. Operations on a sequence of array elements can be done by repeating the desired function or operation in a do-loop[*DO]. The vector operations within the ANSYS program (*VXXcommands) are internally programmed do-loops that conveniently perform the indicated operation over a sequence of array elements. If the array is multidimensional, only the first subscript is incremented in the do-loop, that is, the operation repeats in column vector fashion "down" the array. For example, forA(1,5),A(2,5),A(3,5), etc. The starting location of the row index must be defined for each parameter read and for the result written.The default number of loops is from the starting result location to the last result location and can be altered with the
*VLENcommand. A logical mask vector may be defined to control at which locations the operations are to be skipped [*VMASK]. The default is to skip no locations. Repeat operations automatically terminate at the last array element of the result array column if the number of loops is undefined or if it exceeds the last result array element. Zeroes are used in operations for values read beyond the last array element of an input array column. Existing values in the rows and columns of the results matrix