*Tip: Start typing in the input box for immediate search results.Can't find what you're looking for? Submit a support request here.*

# Formula & Calculator Options

## Introduction

Any combination of the standard StressCheck functions can be computed through user-specified formulas or through the use of the StressCheck Calculator. Additionally, user-specified formulas which are independent of the solution may be fringe-plotted for reference.

## User-Specified Formula (Fmla)

User-specified formulas can be used to combine the standard StressCheck functions into a mathematical expression for a given solution (Solution ID/Run #). The formula (defined via Edit > Formulae…) can be used for plotting, computing resultants, computing data points or computing minimal or maximal values.

To compute a user-specified formula, simply select “Fmla” as the function name, and then select the formula name from the “Formula:” combo-box. Figure 1 shows the formula option for the Plot tab of the Results dialog:

### Example #1: Linkage Arm Margin of Safety Extraction

To illustrate the use of a formula computation, let us consider the linkage arm shown below for a Margin Check analysis (LinkageArm.scw, loaded from the Tutorial handbook folder). Suppose we are interested in computing an expression based on the tangential stress distributions around the inner hole which has been loaded by a normal traction: where σ_{t} is the tangential stress and σ_{0} is some constant reference value defined by a parameter “S0” equal to 60000 psi.

To define the formula, click on Edit > Formulae…, then specify the formula name (“MS”) and the coordinate system option in which the formula is defined (e.g. Cartesian) and complete the expression as shown below:

1 – abs(Sy)/S0

Click on the Accept button of the Formula(e) dialogue to create the formula “MS”.

Then, select the Points tab from the Results dialog and complete the Points extraction input. Select the Function: Fmla, the name of the formula (“MS”), and the name of the local Cylindrical system of the circle (SYS4). Note: The name of the coordinate system for the inner circle can be found selecting Display > Objects from the Main Menu Bar. The list of systems is also available in the system combo box of the Points extraction interface. When a system is selected from the list, it is highlighted in the Model View.

Finally, click on the Accept button in the Results interface (Figure 2):

Note that the solution variable name used to indicate the tangential stress is Sy, because a local Cylindrical system was selected. The results of the computation of the formula MS for 120 equally spaced points (not counting the end points) along the circle will be displayed in the Graph pane as shown below. Note: You can extract results from only one formula at a time.

For more information on using formulae for post-processing, refer to Can I Use Formulaic Expressions for Results Processing?

### Plotting Formulae Fringes

In some cases you may wish to plot a function over the mesh defined by a formula which is not related with the solution; for example, to visualize a formula which may be used as a boundary condition and/or which varies with spatial location(s).

In that case, select the Plot tab from the Results dialog, select Plot: Formula, select the “Fringe” button, define the formula (if it does not exist), and supply its name and the corresponding coordinate system name in the input area of the Results dialog. The default coordinate system is the global one. Click Accept to plot the formula fringes over the mesh (Figure 3). In this case, a formula “Test = 1-X^2” is plotted:

For an example of plotting formulae fringes, refer to StressCheck Tutorial: Plotting Formulae Fringes.

## StressCheck Calculator (Calc)

Using the Calculator (“Calc”) option, any mathematical expression containing standard functions can be computed for any arbitrary combination of solutions. The function calculator can be used to combine solutions in an arbitrary way. When you select Calc. from the Functions list, the StressCheck Calculator dialog shown below will be displayed (Figure 4). This dialog allows you to combine the results from any of the available solutions in the current session. This option is especially useful for combining solutions corresponding to different load cases, linear and nonlinear solutions, etc.

To complete the Calculator dialog, simply supply the names of Solutions ID’s you want to combine, the corresponding run numbers, and the algebraic expression you wish to evaluate. The formula field uses the StressCheck functions with the operand number of the corresponding Solution ID. The entries in Figure 4 indicate that we are interested in the difference between 2 times the X-displacement corresponding to SOLA, Run 8 and the X-displacement corresponding to SOLB, Run 7:

2*Ux_1-Ux_2

### Rules and Guidelines

The following are rules and guidelines for the StressCheck Calculator:

- When combining principal strains or stresses, a warning message will be issued by the program. Combination of principal quantities may not be valid because a direction is involved. Refer to Helpful Hints and Tips: Stress Transformation Formulae for Results Processing.
- Combination of directional quantities (displacement, strains or stresses) in the StressCheck Calculator are generally valid. The only exception is when combining solutions with different constraints.
- The use of the Average option in the Points extraction is not supported for the calculator.
- Expressions supplied in the StressCheck Calculator are limited to 80 characters. If you require an expression longer than this limit, you may define your expression in the Formula(e) dialog, then reference this formula from the calculator expression field by prefixing the formula name with the pipe symbol (“|”). The expression defined in the Formula(e) dialog should follow the same rules as if it were defined directly in the StressCheck Calculator dialog.
- For example, you should refer to engineering quantities in the format “sx_1”. The Formula(e) dialog will issue an error message indicating that “Parameter “SX_1” not defined for formula.” But this error message should be ignored.

For examples of using the StressCheck Calculator to superimpose linear solutions, refer to StressCheck Tutorial: Plot Overview, StressCheck Tutorial: Superposition of Axial and Bending Load Case Results and Helpful Hints and Tips: Superposition of Linear Solution Results.