DEQATN



Your Ad Here

Bulk Data Entry

DEQATN – Design Equation Definition

Description

Specifies one or more equations for use in optimization.

Format

(1)

(2)

(3)

(4)

(5)

(6)

(7)

(8)

(9)

(10)

DEQATN

EQUID

EQN1;

EQN2;

EQN3;

 

 

  …;     … ; EQNn-1; EQNn

 

Example 1

DEQATN

3

y(x1, x2) = x1 + x2**-3.0*(2-1)+5.0;

 

 

z = -y*1.3E-2

 

Example 2

DEQATN

104

z(x1, x2) = min(sin(x1), x2);

 

 

y = max(0.3, -2.0, z) + 4.0

 

Field

Contents

EQUID

Unique equation identification number.

(Integer > 0)

EQNi

i-th equation.

(Character string)

Comments

  1. All equation identification numbers must be unique.

  2. Each equation card is specified in a fixed format, without the limitation of data field boundaries. Equations are located in columns 17-72 on the first card, and in columns 9-72 on each continuation card. There is no limit on the total length of any equation.

  3. Large field format is not allowed.

  4. Free field format is allowed, but OptiStruct will accept only the same number of characters as in the fixed format (56 on the first line and 64 on the continuation lines) and will not accept characters after the 72nd column. Excess characters are silently disregarded, which may result in DEQATN error or in a valid expression different from that intended. On the continuation card in free format, the comma must be present within the first 8 columns, otherwise, the card will be interpreted in a fixed field format.

  5. Blank characters in the equation have no effect, even within a constant, variable or function name. Lower and upper case letters are equivalent.

  6. There must be only one variable at the left-hand side of each equation in any equation card. The variable of the first equation must be followed by an argument list in the following format:

v1(x1,x2,…,xn) = expression(x1,x2,…,xn);

v2 = expression(x1,x2,…,xn,v1);

vi = expression(x1,x2,…,xn,v1,v2,…,vi-1);

vn = expression(x1,x2,…,xn,v1,v2,…,vn-1);

where vi is the variable of equation i. (x1, x2, …, xn) is the argument list for variable v1. (v1,v2,…,vi-1) is the variable list which corresponds to the result of equation 1 through equation i-1.

Only the value of the last expression is returned to the bulk data card referencing EQUID (e.g. DRESP2).

  1. Constants can be specified in a format of either integer or floating point. A floating point number can be in a format of either normal decimal-point format ("3.90") or scientific notation ("-2.0E-3"), which means image\sci_note.gif.

The list of supported mathematical functions is as follows:

One-argument functions

abs(x)

acos(x)

acosh(x)

asin(x)

asinh(x)

atan(x)  

atanh(x)

cos(x)  

cosh(x)  

exp(x)  

log(x)  

log10(x)

pi(x)

sin(x)

sinh(x)

int (x)

absolute value

arccosine

hyperbolic arccosine

arcsine

hyperbolic arcsine

arctangent

hyperbolic arctangent

cosine

hyperbolic cosine

exponential

natural logarithm

common logarithm

multiples of image\pi.gif

sine

hyperbolic sine

real to integer conversion

 

Two-argument functions

image\2_arg_funct.gif

 

Multi-argument functions

image\more_arg_func.gif

 

  1. The supported operators are listed below:

Symbol

Meaning

Example

+

binary +

x+y

-

binary - 

x-y

*

multiplication,

image\xxy.gif

/

division 

image\division.gif

**

power 

x**y

+

unary + 

+1.0

-

unary -  

-1.0

  1. The precedence of mathematical calculations follows the rules of Fortran language. Parenthesis has a higher priority in the order of precedence than the operators listed in 8. Two consecutive operators are allowed only if the second one is unary plus or minus.

Examples of operator precedence:

Expression

Result

2**-3

0.128

1 / 2 + 3

3.5

2*3-4

2.0

-2**3**2

-512.0

2 + -5

-3.0

2 * -5

-10.0

2 - -5

7.0

2/3/4

0.16666666…

2/(3/4)

2.6666666…

  1. Functions can be defined in a layered format, e.g. min(sin(x1), x2). There is no limit on the number of layers.

  2. The DEQATN entry is referenced by DRESP2 and/or DVPREL2 bulk data cards.
    DRESP2 card, the variable identified by DVIDi, LABj, NRk, Gr and DPIP correspond to variable arguments listed in the left-hand side of the first equation of a DEQATN card identified by EQUID. The variable arguments x1 through xN (where N = n + m + p + q + s) are assigned in the order DVID1, DVID2, …, DVIDn, LAB1, LAB2, …, LABm, NR1,NR2, …, NRp, G1, …, Gq, DPIP1,…,DPIPS. In a DVPREL2 card, the variables identified by DVIDi and LABj correspond to variable arguments listed in the left-hand side of the first equation of a DEQATN card identified by EQUID. The variable arguments x1 through xN (where N = n + m ) are assigned in the order DVID1, DVID2, …, DVIDn, LAB1, LAB2, …, LABm.

Only the computed value of the last expression (i.e. vn) is used by DRESP2 and/or DVPREL2 entry.

Restrictions

·       Variable names longer than 8 characters are truncated, which may create an error in equation if two names are identical after such truncation.

·      All trigonometric arguments are in radians.

·      Only alphanumeric characters may be used in variable names (i.e. do not use underscores, monetary symbols, punctuation symbols, mathematical operators, letters from non-English alphabet, etc.).

·      Mathematical function names (such as those listed in comment 7 above) should not be used as variable names.

Possible Errors

If OptiStruct fails to parse an equation, an informative error message will be displayed with the DEQATN ID. However, in certain cases, the following generic message will be provided:

Error 1690:

This equation could not be parsed. Please see the DEQATN entry in the OptiStruct manual.

This error message means that OptiStruct has not been able to clearly identify the reason for the failure. If this happens, please check for the following possible causes, and contact ossupport@altair.com:

·     The length of the equation exceeds the 72 character per line limitation.

·     The last character of the equation is an operator.

·     There are two adjacent operators in the equation.

·      There are non-alphanumeric characters (besides operators) in the equation.

Go To

Bulk Data Section

Guidelines for Bulk Data Entries

Alphabetical List of Bulk Data Entries

The Input File

Return to Altair HyperWorks Index