[Fluent Inc. Logo] return to home search
next up previous contents index

30.5.1 Creating a Custom Field Function

To create your own field function, you will use the Custom Field Function Calculator panel (Figure  30.5.1). This panel allows you to define field functions based on existing functions, using simple calculator operators. Any functions that you define will be added to the list of default flow variables and other field functions provided by the solver.

Define $\rightarrow$ Custom Field Functions...

figure   

Recall that you must enter all constants in the function definition in SI units.

Figure 30.5.1: The Custom Field Function Calculator Panel
figure

The steps for creating a custom field function are as follows:

1.   Use the calculator buttons and the Field Functions list and Select button to specify the function definition, as described below. (As you select each item from the Field Functions list or click a button in the calculator keypad, its symbol will appear in the Definition text entry box. You cannot edit the contents of this box directly; if you want to delete part of a function, use the DEL button on the keypad.)

figure   

The range of integers and real numbers that can be stored is as follows:


 -2147483648 > integers < 2147483647


 -1.79769e+308 > real < 1.79769e+308

Note that using a number less than 1e-39 may produce inaccurate results, while values less than 1e-45 will produce a result of zero.

2.   Specify the name of the function in the New Function Name field.

figure   

Be sure that you do not specify a name that is already used for a standard field function (e.g., velocity-magnitude); you can see a complete list of the predefined field functions in FLUENT by selecting the display/contours text command and viewing the available choices for contours of.

3.   Click the Define button.

When you click Define, the solver will create the function and add it to the list of Custom Field Functions within the drop-down list of available field functions. The Define push button is grayed out after you create a new function or if the Definition text entry box is empty.

Should you decide to rename or delete the function after you have completed the definition, you can do so in the Field Function Definitions panel, which you can open by clicking on the Manage... push button. See Section  30.5.2 for details.



Using the Calculator Buttons


Your function definition can include many basic calculator operations (e.g., addition, subtraction, multiplication, square root). When you select a calculator button (by clicking on it), the appropriate symbol will appear in the Definition text entry box. The meaning of the buttons is straightforward; they are similar to the buttons you would find on any standard calculator. You should, however, note the following:



Using the Field Functions List


Your function definition can also include any of the field functions defined by the solver (and listed in Section  30.4) or by you. To include one of these variables/functions in your function definition, select it in the Field Functions drop-down list and then click the Select button below the list. The symbol for the selected item will appear in the Definition text entry box (e.g., p will appear if you select Static Pressure).


next up previous contents index Previous: 30.5 Custom Field Functions
Up: 30.5 Custom Field Functions
Next: 30.5.2 Manipulating, Saving, and
© Fluent Inc. 2006-09-20