您的当前位置:首页正文

FLUENT高手进阶—Text User Interface and Scheme Commands

来源:画鸵萌宠网
Commonly used TUI and Scheme Commands in FLUENT

Purpose: This document contains a brief description of some of the frequently used Text User Interface (TUI) and Scheme commands. It discusses the purpose of the commands and provides the syntax for their use. The document also contains references to Scheme language.

Introduction

FLUENT uses a dialect of Lisp called Scheme for creating the graphical user interface. All of the case setup related information is passed to the solver and retrieved via Scheme programming. The Graphical User Interface (GUI) is simple by design for better usability, but the use of Text User Interface (TUI) and Scheme commands allow access to many hidden features in the solver. These commands range from grid operations, solver settings, model selection, and even postprocessing. They can be executed by:

• Typing the command in FLUENT’s console window • Reading a file containing a set of commands

1. Repairing the face handedness

The grid check operation may fail when the mesh file contains cells with left-handed faces. The face orientation can be corrected using the TUI command:

grid/modify-zones/repair-face-handedness

Note: Perform the GridÆ Check operation after using this command to ensure the corrections have been made.

2. Increasing the matching tolerance while creating periodic boundaries

FLUENT has a default tolerance value for matching the mesh on periodic boundaries. If the periodic boundary creation fails, the default tolerance value can be increased using the TUI command: grid/modify-zones/matching-tolerance

3. Enabling non-Newtonian fluid properties with turbulent flow conditions

FLUENT’s GUI does not allow for the selection of non-Newtonian viscosity options when the flow is modeled as turbulent. The user has to explicitly activate the formulation using the TUI command: define/models/viscous/turbulence-expert/turb-non-newtonian

Note: The Materials panel will be updated to include more options after this command has been issued.

4. Activating low-Reynolds-number turbulence models

In addition to the three k-ε models available in the GUI, FLUENT is equipped with six variants of the low-Reynolds-number turbulence model. The user can activate these models using the TUI command: define/models/viscous/turbulence-expert/low-re-ke To select the required variant of the model, use the command:

define/models/viscous/turbulence-expert/low-re-ke-index

Specify the index between 0 to 5, per the table of index values for these models available at: http://www.fluentusers.com/fluent/doc/ori/html/tuilist/node3.htmNote: This command can only be issued after selecting the k-ε turbulence model in the Viscous Model panel.

5. Activating LES/DES in 2D

By default, the Large Eddy Simulation (LES) option is activated while working with 3D models. However, the LES option in 2D or axi-symmetric models can be enabled using the Scheme command: (rpsetvar ‘les-2d? #t)

6. Starting the V2F turbulence model

The V2F model is available as an ‘add-on’ turbulence model in FLUENT. This model offers the capability to take into account the anisotropy of near-wall turbulence while keeping a robust eddy viscosity assumption, and is recommended in many separated flow conditions. The model is available in the GUI only after using the Scheme command: (allow-v2f-model)

Note: The V2F model requires an additional feature in the license key.

7. Allocating memory for gradient storage

Sometimes it is necessary to access solution gradients from user-defined functions. FLUENT removes any irrelevant gradient values from memory by default. If the gradients are relevant, the user can prevent the solver from freeing up the memory and clearing these gradients by using the TUI command: solve/set/expert

8. Specifying the smallest diameter and mass for discrete phase particles

FLUENT’s default values for smallest particle diameter and mass are 1e-8 m and 5.236e-25 kg/s, respectively. In simulations that have particle diameter or mass smaller than these values, it is recommended to set the values using the Scheme commands: (rpsetvar 'dpm/lowest-diameter 1e-15) (rpsetvar 'dpm/lowest-mass 1e-30)

9. Obtaining the computational time for iterations

The computational time for a serial simulation can be obtained using Scheme commands. To retrieve the solver time for 10 iterations, use the command: (benchmark ‘(iterate 10))

To retrieve the computational time for a transient simulation of 5 time-steps with a maximum of 20 iterations per time-step, use the command:

(benchmark ‘(physical-time-steps 5 20))

The computational time for a parallel simulation can be obtained using the ParallelÆ TimerÆ Usage menu item. This feature is very useful while carrying out benchmark studies on different platforms.

Tips and Troubleshooting

• Changes made using TUI and Scheme commands are stored in the case file when it is saved. Hence, there is no need to supply these commands again after reopening the case.

• The brackets and syntax used with Scheme commands are important. Errors will result if the sequence of the brackets and syntax are not rigidly followed.

• The TUI commands mentioned above are not complete. The user may need to answer yes/no, etc., or provide numbers as requested. For example, upon issuing the TUI command: grid/modify-zones/matching-tolerance, the solver prints the default value of the tolerance as:

matching tolerance [0.05], and the user needs to provide a new tolerance limit. Thus, the complete command will be: grid/modify-zones/matching-tolerance 0.1, as an example.

• Some TUI commands may not be available with the parallel version of FLUENT. In such situations, the case needs to be setup in the serial mode, but may then be partitioned and run using parallel solver.

• Some of these commands may change with the product version. Verify that the command is appropriate with your FLUENT version before using it.

References

TUI command related references:

Details: http://www.fluentusers.com/fluent/doc/ori/html/ug/node48.htmList of commands: http://www.fluentusers.com/fluent/doc/ori/html/tuilist/main_pre.htm

Scheme related references: http://www.scheme.com/http://www.schemers.org/http://en.wikipedia.org/wiki/Scheme_programming_languagehttp://www.cs.washington.edu/education/courses/341/99su/lectures/scheme/ppframe.htm

Product Version: Fluent 6.2 and onward

Authors: Ashish Kulkarni and Ramesh Behera

因篇幅问题不能全部显示,请点此查看更多更全内容

Top