Professional Documents
Culture Documents
Array Parameters
2. Array Parameters
Training Manual
17.1
-47.6
AA = -5.2
25.0
107.9
5x1 array
BB =
814
1057
1033
7141
622
17
-47
-52
25
107
386
704
348
-66
111
5x3 array
CC =
mxnx3 array
Octo
...Array Parameters
Training Manual
Topics covered:
A. Types of Array Parameters
B. How to Define
C. Retrieving Database Information
D. Array Operations
E. Workshop
Octo
Array Parameters
BB =
814
1057
1033
7141
622
17
-47
-52
25
107
386
704
348
-66
111
5x3 array
Training Manual
Octo
Array Parameters
Training Manual
Octo
Array Parameters
JOB1
JOB2
jobs = JOB3
JOB4
JOB5
UX
UY
dofs = UZ
ROTY
ROTZ
Training Manual
Octo
Array Parameters
B. How to Define
1. Specify name, type and dimension.
Utility Menu > Parameters > Array
Parameters > Define/Edit > Add
or *DIM command. Example:
*dim,aa,array,4
! 4x1x1 array
*dim,force,table,5
! 5x1x1 table
*dim,bb,array,5,3
! 5x3x1 array
*dim,dofs,char,6
Training Manual
Octo
Array Parameters
...How to Define
Utility Menu > Parameters > Array
Parameters > Define/Edit > Edit
Or *VEDIT command
Or =command. Example:
bb(1,1)=11,21,31,41,51
bb(1,2)=12,22,32,42,52
bb(1,3)=13,23,33,43,53
Training Manual
Octo
Array Parameters
...How to Define
For table type arrays, you
must fill in values for the
zeroth locations. Otherwise,
their values will default to the
tiny number 7.8886E-31.
For example:
force(1,1)=0,560,560,238.5,0
force(1,0)=1E-6,0.8,7.2,8.5,9.3
force(0,1)=0
Training Manual
Octo
Array Parameters
...How to Define
For character arrays, there is no
graphical way to fill in the strings.
Use the =command to type in the
values, then use *STAT to list them.
Each string must be enclosed in single
quotes.
Example:
dofs(1) = ux, uy, uz, rotx, roty, rotz
*stat,dofs
Training Manual
Octo
Array Parameters
...How to Define
There are many other ways to fill arrays:
Predefined functions in *VFILL command (Utility Menu >
Parameters > Array Parameters > Fill)
ramp function
random function
etc.
Read data from a file:
*VREAD for arrays
*TREAD for tables
Or Utility Menu > Parameters > Read from File
Retrieve data from the database (discussed next).
Training Manual
Octo
Array Parameters
Just as *GET retrieves scalar data from the database, you can
use *VGET to retrieve array information.
Or Utility Menu > Parameters > Get Array Data
Example:
*dim,dispval,array,20,3
! 20x3 array
*vget,dispval(1,1),node,1,u,x
*vget,dispval(1,2),node,1,u,y
! UY in column 2
*vget,dispval(1,3),node,1,u,z
! UZ in column 3
Training Manual
Octo
Array Parameters
Training Manual
Octo
Array Parameters
D. Array Operations
Training Manual
Octo
Array Parameters
...Array Operations
*VFUN operates on a single array
parameter.
*vfun,b(1),sin,a(1) will result in b(j)=sin(a(j))
Other operations include:
natural log, common log, exponential
Square root, sort, copy
Conversion from local to global
coordinates and vice-versa
Tangent and normal vectors to a path
etc.
Training Manual
Octo
Array Parameters
...Array Operations
*VOPER operates on two array
parameters.
*voper,c(1),a(1),sub,b(1) will result in
c(k)=a(k)-b(k)
Other operations include:
addition, subtraction, multiplication,
division
min, max, logical operations
derivatives, integrals
dot and cross products
Training Manual
Octo
Array Parameters
...Array Operations
*VSCFUN determines properties of an
array parameter.
*vscfun,maxval,max,a(1) will result in a
scalar parameter maxval = max(a(i))
Other operations include:
sum of all the elements of an array
statistical quantities such as mean,
median, standard deviation,
variance and rms
min/max, index location of
min/max
index locations of first and last
non-zero entry
Training Manual
Octo
Array Parameters
...Array Operations
*VWRITE writes data to a file in a formatted
sequence.
Utility Menu > Parameters > Array Parameters >
Write to File
Example:
*cfopen,wing,dat
*vwrite
(/,3x,Node Number,4x,Temperature,/)
*vwrite,nnum(1),tval(1)
(5x,f6.0,6x,e14.8)
*cfclose
will create a file called wing.dat with the nnum
and tval arrays written in specified format.
Training Manual
Octo
Array Parameters
...Array Operations
Training Manual
Octo
Array Parameters
E. Workshop
Training Manual
Octo