Strand7 Interface: Entering Numeric Data and Formulas

Description

When entering numeric data into an edit box, the values can either be a numeric constant (e.g., "54.667") or an equation/formula. The equation can be one without parameters, such as "23.4*Sin(30)", or one with parameters, such as "X*Sin(30)" - in this case the value used for X depends on the context of the X in the equation. For example, if you are applying node forces, the value of the applied force will depend on the X coordinate of the node to which the force is applied.

You can also right-click the edit box or press the f(x) icon on the edit box in various dialogs such as that in Plate Attributes: Face Normal Pressure, to open the Strand7 Interface: Equation Editor; this can be used to define, store, edit and retrieve formulas.

The coordinate used to evaluate the equation depends on the type of attribute being assigned and the type of element to which the attribute is to be applied, or the type of function being performed. The following table summarises the coordinates used to evaluate the equation when an attribute is applied in this way:

Element and Attribute Type Coordinates used for Calculation of Attribute Value
Nodes Coordinates of the node.
Beam constant attributes Coordinates of the mid point along the beam element.
Beam linearly varying attributes Separate values of the attribute are calculated using the coordinates of the nodes at each end of the beam; the attribute is applied with linear variation between these two values.
Plate surface attributes Coordinates of the centroid of the plate.
Plate edge attributes Coordinates of the mid point of the plate edge.
Brick constant attributes Coordinates of the centroid of the brick element.
Brick surface attributes Coordinates of the centroid of each surface.

The equations are always defined in terms of the coordinates of the three orthogonal axes in the current coordinate system. The following table shows the letters used as the variables for each type of coordinate system. These letters may be entered in either upper or lower case.

Coordinate System Type Variables in Equation (not case sensitive)
Cartesian X,Y,Z or x,y,z
Cylindrical R,T,Z or r,t,z
Spherical/Toroidal R,T,P or r,t,p

Element geometric properties may also be used to apply attributes in equations. For example, to apply the pressure equivalent of a 1000 N force on the face of a plate, the pressure can be entered as 1000/A (with A being the area of the plate automatically calculated by Strand7). If the same total force is to be applied to a region comprising more than one plate element, the pressure can then be entered as 1000/TA to assign the load as a pressure over the total selected plate area (with TA being the total area automatically calculated by Strand7). The following table summarises the available operators:

Operator (not case sensitive) Description
L Length of selected beam*see note or selected edge of a plate.
TL Total length of selected beams or selected edges of plates.
A Area of selected plate, selected brick face or selected geometry face.
TA Total area of selected plates, selected brick faces or selected geometry faces.
V Volume of selected beam, plate, brick or geometry face.
TV Total volume of selected beams, plates, bricks or geometry faces.
MT Membrane thickness assigned to plates and geometry faces.
BT Bending thickness assigned to plates and geometry faces.
ID This is an integer value equivalent to the entity ID attribute, if assigned, and zero otherwise.
N This is an integer value equivalent to the entity number (e.g., the beam number).

* if applying a distributed load, L is defined as the length of the beam minus (a+b).

When evaluating formulas directly within a grid/spreadsheet, the following grid-specific operators can also be used:

Operator (not case sensitive) Description
C

Column number of the grid. Columns are numbered from 0, where 0 refers to the fixed column; this column cannot be edited in any grid and therefore the editable columns start at column 1.

R Row number of the grid. Rows are numbered from 0, where 0 refers to the fixed row; this row cannot be edited in any grid and therefore the editable rows start at row 1.

A Factor vs Position table may also be used to define a function that is interpolated at specified values. For example, by entering 2.5*PT[3](x), Strand7 evaluates (interpolates) the table (finds the y-intercept) at position "x" and generates a result equal to 2.5 times the y-intercept.

Operator Description
PT[TableID] Factor vs Position table number

The following symbols and operators may be used in the equations:

Operator (not case sensitive, unless otherwise noted) Description
¼ Evaluates to 0.25 (ASCII 188 character).
½ Evaluates to 0.50 (ASCII 189 character).
¾ Evaluates to 0.75 (ASCII 190 character).
. , Decimal point (this may be either a period or a comma, depending on the regional setting used on your system).
+ Add.
- Subtract.
Same as subtract (ASCII 150 character).
Same as subtract (ASCII 151 character).
- Same as subtract (ASCII 173 character).
/ Divide.
÷ Same as divide (ASCII 247 character).
* Multiply.
× Same as multiply (ASCII 215 character).
^ Raise to the power of (e.g., X^2 = X2).
( Left open bracket.
) Right close bracket.
SQRT(X) Square root of X.
SQR(X) X2
ABS(X) Absolute value of X.
E Exponential as in 1.25E+2.
PI A constant 3.141592654.
G A constant equal to the acceleration due to gravity in the units of the model. For example, 9.80665 if model uses SI units, or 386.089 if model uses IPS units.
IF(logical test; value if true; value if false)

In the logical test, any of the following logical comparison symbols can be used:

  • "=" equals
  • "==" equals
  • ">" greater than
  • ">=" greater than or equal to
  • "<" less than
  • "<=" less than or equal to
  • "<>" not equal to
  • "><" not equal to

The two parameter separators are the Windows list separator. The IF() function can be nested within other Strand7 functions, including other IF() functions.

IFPOS(X) Evaluates to X if X is positive and to zero if X is not positive.
IFNEG(X) Evaluates to X if X is negative and to zero if X is not negative.
IFPOSB(X) Evaluates to +1.0 if X is positive and to zero if X is not positive.
IFNEGB(X) Evaluates to +1.0 if X is negative and to zero if X is not negative.
SIGN(X) Evaluates to +1.0 if X is positive, to -1.0 if X is negative, and to zero if X is zero.
MIN(X; Y; Z; ...) Returns the minimum (i.e., the most negative) value of the entered values or expressions separated by the Windows list separator.
MAX(X; Y; Z; ...) Returns the maximum (i.e., the most positive) value of the entered values or expressions separated by the Windows list separator.
RAND(X) Generates a random number between 0 and X.
ROUND(X) Rounds to the nearest integer to X (0.5 is rounded up).
TRUNC(X) Returns an integer by truncating the fractional part of X.
SIN(X) Sine of X where X is in degrees.
COS(X) Cosine of X where X is in degrees.
TAN(X) Tangent of X where X is in degrees.
ASIN(X) Arcsine of X, returning a result in degrees.
ACOS(X) Arccosine of X, returning a result in degrees.
ATAN(X) Arctangent of X, returning a result in degrees.
LN(X) Natural logarithm of X.
LOG(X) Logarithm of X to Base 10.
EXP(X) eX
HSIN(X) Hyperbolic sine of X.
HCOS(X) Hyperbolic cosine of X.
HTAN(X) Hyperbolic tangent of X.
HASIN(X) Hyperbolic arcsine of X.
HACOS(X) Hyperbolic arccosine of X.
HATAN(X) Hyperbolic arctangent of X.

Some notes when entering formulas:

How to use

Let's apply a hydrostatic pressure to the face of a dam modelled with brick elements. In this example, the water depth direction is parallel to the global Z axis, so we will select the default Global XYZ [Cartesian] coordinate system from VISUAL: Cases in which to define the pressure.

The brick faces can be selected using Selection Functions: Select Brick Faces, and the pressure load then applied using the Brick Attributes: Face Normal Pressure attribute.

The hydrostatic pressure formula is:

where

is the density of water, taken as 1000 kg/m3.

is the acceleration due to gravity.

is the water depth measured from the waterline. The Z coordinate of the water surface is taken as 12.0 m in this example.

Enter the formula "ifpos(1000*g*(12-z))" and click Apply.

Note that you can also right-click the Value edit box, or press the f(x) icon on the edit box, to open the Equation Editor dialog to facilitate defining, storing and editing formulas.

The g symbol in the formula represents the acceleration due to gravity, automatically assigned by Strand7 in the correct units of the model.

The "ifpos" function is used to ensure that the pressure attribute above the waterline is set to zero. The function, 'if positive', returns the value within the brackets if it is positive, and zero otherwise. The resulting pressure attributes are shown below. The pressure attributes can be re-evaluated using Attributes: Evaluate Attribute Formulas if conditions have changed.

See Also