next up previous contents index
Next: RESULTS CALCULATE EXTRAPOL Up: RESULTS CALCULATE Previous: RESULTS CALCULATE DIFFERENT Control

RESULTS CALCULATE EXPRESSN Loadcase_name [Step_number]

                                                                                      

This command allows the user to perform calculations on the attributes of result data sets stored in the database. The resulting data is stored as either a new or an existing loadcase


Loadcase_name = The name of the loadcase in which the calculated results
will be stored.
Step_number = This defines the step number required for non linear analysis
results.

The command has four parts each having its own prompt sequence, they are:


- Output loadcase definition.
- Expression definition.
- Operand definition.
- Output attribute definition.

Having completed the calculation successfully the program will create the new attribute and components, and select the (new) loadcase, but not the attribute.

If the `/' character is used to abort, the user will be placed at the begining of the current definition except when the user is at the begining of the definition when the complete command will be abandoned.

OUTPUT LOADCASE DEFINITION

The loadcase name given as part of the command defines the name of the loadcase which will be used to store the results of the calculation. If required a step number can be specified as well.

If the specified loadcase does not exist then the user is prompted for a 20 character title to be associated with it.

20 Character Ref =$\gt$ new loadcase text

If a step number is specified with the loadcase name then further prompts will be issued to define the type of analysis, starting with

ANALYSIS TYPE =$\gt$

The user has the choice between `STATIC', `TIME-STEP', `FREQUENCY', `LOAD-STEP', `USER-1NAM' and `USER-2NAM'. If `TIME-STEP', `FREQUENCY' or `LOAD-STEP' are selected then the user will be prompted to enter the associated step value, if `USER-1NAM' is chosen then the user will be prompted to enter the analysis name followed by the associated step value, and if `USER-2NAM' is chosen then the user will be prompted to enter an analysis name followed by an associated step value twice.

EXPRESSION DEFINITION

The user is then prompted to enter an expression by the following prompt:

EXPRESSION =$\gt$

An expression is defined in terms of operands and unary and binary operators. Expressions are evaluated in left to right order with no operator precedence. Brackets cannot be used. FEMVIEW uses an accumulator to store the intermediate results.

The syntax of an expression is :-

->[Subtract]-+-> [Unary operator] Operand -+--->
             ^                             |
             |                             v
             +<--[Binary operator] --------+

An Operand is a user supplied name of up to eight alphanumeric characters. This name will be used to prompt for its definition (see Operand Definition below). An operand name may appear more than once in an expression.

Unary operators perform an operation on the subsequent operand putting the result in the accumulator. Available unary operators are defined below.


POWER Each component of the operand is raised to the power of the input
real number.
SQUARE ROOT The square root is taken of each component of the operand.
RESULTANT Forms the resultant of a vector, produces a SCALAR.
GRADIENT Forms the gradient of a scalar, produces a VECTOR.
DIVERGENCE Forms the divergence of a vector, produces a SCALAR.
CURL Forms the curl of a vector, produces a VECTOR.
$\mbox{VON MISES}^{1}$ Calculates the Von Mises Stress from a 3 by 3 symmetric `stress'
matrix, produces a SCALAR.
$\mbox{P-STRESS}^{1}$ Calculates the Principal Stresses from a 3 by 3 symmetric `stress'
matrix, produces 3 Principal stresses, which can be 'sorted'.
See 'RESULTS CALCULATE P-STRESS'
$\mbox{P-SHEAR}^{1}$ Calculates the Principal Shears from either a 3 by 3 symmetric
`stress' matrix or Principal Stresses, produces 4 SCALARS.
$\mbox{P-YIELD}^{1}$ Calculates the Plastic Yield from a 3 by 3 symmetric `stress' matrix,
produces a SCALAR.
$\mbox{PRESSURE}^{1}$ Calculates the Pressure from a 3 by 3 symmetric `stress' matrix,
produces a SCALAR.
STRESS Forms a stress matrix from Principal Stresses.

$\mbox{\ }^{1}$ These calculations are defined in Appendix H of the User Manual Appendices.

Binary operators perform an operation on the current contents of the accumulator and the subsequent operand. Available binary operators are defined below.


ADD Adds each component of this operand to its corresponding
component in the accumulator.
SUBTRACT Subtracts each component of this operand from its corresponding
component in the accumulator.
MULTIPLY Multiplies the accumulator by the operand by a method determined
from data types involved.
DIVIDE Divides the accumulator by the operand by a method determined
from data types involved.
DOT PRODUCT Forms the dot product of a VECTOR in the accumulator with the
VECTOR operand, produces a SCALAR.
CROSS PRODUCT Forms the cross product of a VECTOR in the accumulator with the
VECTOR operand, produces a VECTOR.

The resultant output types for the MULTIPLY operator are:


SCALAR $\times$ 'any' Multiplies each component of `any' data type with the
SCALAR, produces `any' data type.
`any' $\times$ SCALAR Multiplies each component of `any' data type with the
SCALAR, produces `any' data type.
VECTOR $\times$ VECTOR Not defined, use DOT or CROSS.
VECTOR $\times$ MATRIX Performs homogeneous transformation, produces a VECTOR
(NB: assumes MATRIX is suitable).
MATRIX $\times$ VECTOR Performs homogeneous transformation, produces a VECTOR
(NB: assumes MATRIX is suitable).
MATRIX $\times$ MATRIX Performs matrix concatenation, produces a MATRIX.

The resultant output types for the DIVIDE operator are:


`any' $\div$ SCALAR Divides each component of `any' type with the SCALAR,
produces `any' data type.
`any' $\div$ VECTOR Not defined.
SCALAR $\div$ MATRIX Inverts the MATRIX and multiplies by SCALAR, produces a
MATRIX (NB: assumes MATRIX is suitable).
VECTOR $\div$ MATRIX Inverts the matrix and performs homogeneous transformation,
produces a VECTOR (NB assumes MATRIX is suitable).
MATRIX $\div$ MATRIX Inverts the operand MATRIX and performs matrix
concatenation, produces a MATRIX.

OPERAND DEFINITION

After the expression has been entered the definition of each unique operand will be prompted for by the following sequence.

OPERAND `operand' =$\gt$

where `operand' is the name of a user entered operand.

The syntax of the operand definition is:

 ->+->SCALAR-->'value'-------------------->-----------------------+-->
   |                                                              ^
   |->VECTOR-->`x-comp' `y-comp' `z-comp'-------------->----------|
   |                                                              |
   |->MATRIX--> `1,1' `2,1' `3,1' `4,1' `1,2' `2,2' `3,2' `4,2'   |
   |            `1,3' `2,3' `3,3' `4,3' `1,4' `2,4' `3,4' `4,4'->-+
   |                                                              |
   +->LOADCASE->'Loadcase name'--+------->--------+------+        |
                                 +->'Step number'-+      |        ^
                                                         |        |
   +------------------------<----------------------------+        |
   |                                                              |
   +---->---+->NODAL ----+----> `attribute name'-->'scale factor'-+
            |->ELEMENT --|
            |->GAUSSIAN -|
            +->INVARIANT +

The first three operand types are constants requiring the input of the indicated numbers.

The fourth type specifies the loadcase from which values for this operand will be taken. If loadcase is specified then the user is prompted for the attribute within the loadcase by:

ATTRIBUTE =$\gt$

and a scale factor to be applied:

SCALE FACTOR (1.0)=$\gt$ `factor'

the factor will be applied to the components of the attribute before any other processing (default of 1.0).

Notes:

1.
At present one of the first two operands in an expression has to be defined in terms of an existing loadcase.
2.
At present the definition of a constant is in terms of real numbers only.
3.
The attributes have to be of the same type e.g. only nodal.
4.
GRAD, DIV and CURL are calculated on an element by element basis and will produce element results.

OUTPUT ATTRIBUTE DEFINITION

The preceeding sequences completely define the calculation to be performed and FEMVIEW will determine the type of output that it will produce. FEMVIEW will then prompt for the names of the attribute and components of the result.

OUTPUT ATTRIBUTE NAME =$\gt$ `name'

If output is a vector then further prompts for the components are issued:

COMPONENT (i) NAME =$\gt$ `name'

or if output is a matrix then further prompts:

COMPONENT (i,j) NAME =$\gt$ `name'

Notes:

1.
FEMVIEW will automatically add the calculation ALL to a vector.

BATCH FILE INPUT

Commonly used expressions can be stored in named batch files.

For example to rotate a vector by a 45 degree angle about the x axis, a batch file called TRAN45X could be created containing:

  MATRIX MULT VECTOR
  .707 .707  0  0 -.707  .707  0  0
  0     0    1  0  0     0    0  1
  @

and then invoked by:

EXPRESSION =$\gt$ @TRAN45X

Examples:

1.
Transformation of a Vector

To transform a vector, for example displacement, one would enter the following sequence of commands.

(a)
To define the loadcase.
  RESULTS CALCULATE EXPRESSN CASE4
(b)
To define the expression
  EXPRESSION => MATRIX MULT VECTOR
(c)
To define the operands.
  OPERAND MATRIX   => load case1
  ATTRIBUTE => NODAL local
  SCALE FACTOR (1.0)=>
  OPERAND VECTOR    => VECTOR 0.0 0.0 1.0

(d)
The program will have determined that the output will be a vector and the following sequence will define the output:

  OUTPUT ATTRIBUTE NAME => normal
  COMPONENT (1) NAME => x
  COMPONENT (2) NAME => y
  COMPONENT (3) NAME => z

2.
To find the dot product between two displacement vectors

(a)
To define the loadcase, with a step number.
 RESULTS CALCULATE EXPRESSN R4 1
(b)
To enter the title associated with the new loadcase.
 20 Character Ref =>dot2

(c)
To define the analysis type.
 ANALYSIS TYPE => TIME-STEP

(d)
To define the step value.
 TIME STEP =>.5

(e)
To define the expression.

 EXPRESSION =>r1 dot r2

(f)
To define the operands.

 OPERAND R1       => l l1 2
 ATTRIBUTE =>n d
 SCALE FACTOR (1.0)=>
 OPERAND R2       => l l1 4
 ATTRIBUTE =>n d
 SCALE FACTOR (1.0)=>

(g)
The program will have determined that the output will be a scalar and the following sequence will define the output:

 OUTPUT ATTRIBUTE NAME =>dot14


next up previous contents index
Next: RESULTS CALCULATE EXTRAPOL Up: RESULTS CALCULATE Previous: RESULTS CALCULATE DIFFERENT Control

Femsys Limited
1st October 1999