Fill out the form to download

Required field
Required field
Not a valid email address
Required field
Required field

Formulas

Formulas are one possibility, besides tables, that allow to specify a variable or parameter (velocity, temperature, etc.) as a function of other independent variables ( e.g. time or distance). You can add mathematical operations involving different variables, which gives you the chance to easily implement any distribution with no need to add a great number of discrete values in a table.

Defining in the Workbench

Not every variable is allowed to be defined as a function of other variables. If formulas are allowed, you can find the icon of a graph next to the variable you want to define. In Figure 1, the Fixed value boundary condition can be defined by entering the displacement as a formula.

formulas simscale
Figure 1: Some boundary conditions can be defined using formulas. Make sure to look for the icon of a graph as highlighted.

Once you click on the table icon simscale icon, a dialogue box appears to define the table. However, click on the ‘Formula’ tab next to Table and access the interface where you can input your data as shown below:

formulas interface with mathematical operators in simscale
Figure 2: Formula input interface for an inlet velocity boundary condition.

Figure 1 shows an example input formula for an inlet velocity boundary condition. Three velocity components can be defined in this case either as a single value or a formula. Different units are available next to each component if desired.

The space variables x, y, z or time variable t that can be included in the formula. Furthermore, all the numbers, mathematical operators, trigonometric functions, exponential, and logarithmic functions are also available. Please note that for the sin, cos, and tan functions, the angles are always given in radians.

Note

It is also possible to add conditional statements like <, >, = useful for piecewise functions.

Try Yourself

Following documentation will help you get more insight into the applications of the formula feature in SimScale:

Last updated: August 26th, 2022

Contents