Formulas

Formulas are used to assign values to nodes or elements and help to define the geometry of 3D objects.  The simplest formula is simply a numerical value such as "100." or "1.”.  In a new model, if the user selects Data|Edit Data Sets..., the Data Sets dialog box (p. 38) will appear and it can be seen that the default formulas for Kx and Kz respectively are "100." and "1.".  This means that in the absence of any other method (see “Assigning Values to Data Sets” on p. 9) for assigning a value to an element, Kx and Kz for all elements will be 100 and 1 respectively.  By using a slightly more complicated formula it is possible to see the power of formulas.  Here is an example.

In the absence of any other method for assigning a value of Kz to an element, this makes Kz for all elements will be equal to the value of Kx for that element divided by 100.  Now merely by specifying the spatial distribution of Kx, the spatial distribution of Kz is also specified.

If the user selects the cell for the default formula for Kz again and clicks the button labeled "F()" that appears in the cell, the "Formula Editor" will appear.  The Formula Editor can help set up complex formulas correctly. See the discussion of the Formula Editor Dialog Box on p. 42 for more information.

When a Formula is applied to a data set or boundary condition in the Data Sets tab of the Object Properties dialog box, the formula will only be used for those nodes or elements that the object affects. (See “Objects” on p. 8.)

Formulas are, in essence, mathematical expressions that can be evaluated to produce real-numbers, integers, Booleans, or text.  A formula can include constants, any of the operators or functions in the following two sections.  Text constant must be enclosed in double quotes.  Boolean constants must be either True or False.  Numeric constants that do not have a decimal point and that are not expressed in engineering notation (such as 1E0) are considered integers.  Other numeric constants are real numbers.  Integers are 32 bit values. Real numbers are double-precision values.  Spaces and line breaks in formulas are considered white space and are otherwise ignored.  Loop constructs such as “while”, “for” and “do” are not supported.