1.3. Starting Fluent in Meshing Mode

Starting Fluent in meshing mode is accomplished by selecting the Meshing option in the Fluent Launcher, or by adding the directive -meshing when using the command line interface.

See Starting and Executing Ansys Fluent for full details on setting dimension and other options for starting in meshing mode.

The .tgrid File

When starting up in meshing mode, Fluent looks in your home directory for an optional file called .tgrid. This file is then loaded using the Scheme function load. You can use the .tgrid file to customize the operation of the code in meshing mode.

For example, the Scheme function ti-menu-load-string is used to include text commands in the .tgrid file. If the .tgrid file contains (ti-menu-load-string "file read-case test.msh"), then the mesh file test.msh will be read in. For more details about the function ti-menu-load-string, see Text Menu Input from Character Strings in the Fluent Text Command List.


Important:  Another optional file, .fluent, if present, is also loaded at start up. This file may contain Scheme functions that customize the operation of the code in solution mode. When both the .tgrid and .fluent files are present, the .fluent file will be loaded first, followed by the .tgrid file, when the meshing mode is launched. Hence, the functions in the .tgrid file will take precedence over those in the .fluent file for the meshing mode.

The .fluent file is not loaded again automatically when switching to solution mode from meshing mode. You will need to load the file separately using the Scheme load function, if needed.


1.3.1. Starting the Dual Process Build

The dual process build allows you to run Cortex on your local machine (host) and Fluent on a remote machine. The advantage of using the dual process build is faster response to graphics actions (such as zoom-in, zoom-out, opening a dialog box, and so on) when you use Fluent remotely. If the network connectivity is slow, then graphics actions may appear slow and jerky. By controlling the graphics actions locally, the slow response of the graphics actions can be avoided. For example, if you are handling a big mesh (such as the underhood mesh), you can start a dual process build to run Fluent remotely with only the display set to your local machine.

To start the dual process build of Fluent in meshing mode, do the following:

  1. Start Fluent on your local machine using the command fluent -serv -meshing.

    The Fluent window will appear with the version prompt in the console.

  2. Type listen and press Enter.

    You will be prompted for a timeout (the period of time to wait for a connection from remote Fluent). The default value is 300 seconds. You can also specify the timeout value based on your requirement. Utilize this time to log into the remote machine and to start Fluent.

  3. Press Enter again.

    A message will prompt you to start Fluent on the remote machine with the following arguments:

    -cx host:p1:p2

    where,

    host is the name of the host (local) machine on which Cortex is running.

    p1 and p2 are the two integers indicating the connecting port numbers that are used to communicate information between Cortex on the host machine and Fluent on the remote machine.

  4. Login to the remote machine and set the display to the host machine.

  5. Start Fluent from the remote machine using the following command: fluent 3d -cx host:p1:p2

    The host and port numbers are displayed in the message window.


Note:  The user interface commands related to the File menu (such as reading files, importing files) and other Select File dialog boxes do not work for the dual process build. You need to use the TUI commands instead (for example, /file/read-mesh).



Important:
  • The host cannot be detached and reattached; once the connection is broken the data is lost. You need to save the data if the machine needs to be shut down in between.

  • All graphics information will be sent over the network, so initially it could take a long time to assemble graphical information (especially if the host and remote server are across continents) but after that the graphics manipulation is fast.


1.3.2. Dynamically Spawning Processes Between Fluent Meshing and Fluent Solution Modes

For parallel simulations started in meshing mode with more than one process, the Fluent session will be started by using the number of processes requested for meshing. When switching to solution mode, Fluent will automatically spawn the remaining parallel node processes needed to achieve the requested number of total solution processes. Even though automatic spawning is used by default at start up for runs using more than one process, you can always change the number of additional processes to be spawned before switching to solution mode using the /parallel/spawn-solver-process text user interface (TUI) command.

This text command prompts you for:

  • Total number of desired processes (must be greater than or equal to the number of meshing processes). Fluent will spawn additional processes as necessary.

  • Interconnect type to be used for the distributed parallel simulation. You can choose from infiniband, ethernet, shared memory, or you can retain the default value.

  • Machine list or host file. If you decide to run in parallel using more than one machine, then you should provide the machine list or host file, otherwise, you can skip this option by pressing Enter.

  • Option to use ssh for distributed simulations, otherwise, you can skip this option by pressing Enter to retain the default option.


Important:  Note the following:

  • Dynamic process spawning is not supported on Windows. While you can keep the same number of cores for meshing mode as for solver mode, it is recommended that you continue the solver iterations using another separate solver session.

  • Dynamic process spawning is only supported on Linux, with the following MPIs:

    • default

    • intel

  • While running under the Fluent–supported load managers (for example, SGE/LSF/PBS Pro/Slurm), the total number of required parallel node processes must be requested at the start of Fluent session, and Fluent will initially start with the specified number of processes for meshing mode and will automatically spawn the remaining node processes while switching to solution mode. Note that to allow such dynamic spawning when running under Slurm, you must include the -gui_machine=<hostname> command line option or select either Current Machine or Specify Machine from the Graphics Display Machine list in the Scheduler tab of Fluent Launcher.

  • Using a single machine host file with different numbers of meshing and solver cores at the start of an Ansys Fluent session may result in an unintended host allocation. Instead, you should specify a machine host file only for the initial (meshing) mode. Then before switching from the meshing to the solution mode, you should use the parallel/spawn-solver-processes text command to request additional cores and specify a separate machine host file for the additional cores.