Ansys Remote Visualization Client Startup Guide

Using ANSYS Remote Visualization Client at Mines

These application notes are adapted for use at Mines for our clusters, Wendian and Mio. For detailed information read the Fluent User’s Guide, Part IV: Application Clients Chapter 1: Remote Visualization and Accessing Fluent Remotely, see Ansyshelp.ansys.com. Major and minor version numbers must match. For example, this is operational from Ansys Version 2019 R1 on campus lab computers to Apps/ansys/v191trial on Mio, or from your install of 2021 R1 to apps/ansys/v211ansys on Wendian, etc. The purpose of using the ANSYS Fluent Remote Visualization Client is to access remotely running simulations without directly owning the process in case of the network disconnecting. Using this application you can connect to a total of 6 running simulations and display the mesh, contour and vector plots, residual and monitor plots, and modify settings and send text commands to the TUI on the running Fluent (meshing or solver) server.

Step 1: Submit a SLURM job

To get started create a SLURM submit script with the following in a directory with a Fluent case file.
#!/bin/bash
#SLURM submit script filename: flremote-svr-start.submit
#SBATCH -t 00:30:00
#SBATCH -n1
#Opening 2-12 ports depending on host_node operation more than one server (2 minimum)
export REMOTING_PORTS=2678/portspan=2
# Loading Wendian module for Ansys version 2021R1
module load apps/ansys/v211ansys
# Or uncomment this line to load Mio module for Ansys version 2019R1
# module load Apps/ansys/v191trial # 3d for 3Dimension single precision; -t1 for 1 cpu; -g for enabling graphics; -driver null for no graphical interface # -sifile= for enabling the fluent server and giving a filename to store IP and PASSWORD
# use -i journal_of_TUI_commands.jou # Filename starts with the Variable SLURM_JOBID for uniqueness fluent 3d -t1 -g -driver null -sifile=./"$SLURM_JOBID"_fluent_server_info.txt

Submit this to the scheduler

[joeuser@wendian001.mines.ed]$ sbatch flremote-svr-start.submit
Submitted batch job 6033061
[joeuser@wendian001.mines.ed]$ ls 
6033061_fluent_server_info.txt  cleanup-fluent-node136-20180.sh  fluent-20210216-154942-19982.trn  slurm-6033061.out
catalytic_converter.cas         flremote-svr-start.submit

Once the Fluent job starts the file with the SLURM_JOBID_fluent_server_info.txt is created with the connection information, the Fluent cleanup script (run by ‘sh FILENAME’), a transcript files, and the slurm-SLURM_JOBID output file. The connection information file identifies the IP address and password needed to create the network port tunnel from the client machine to this node.

As an alternative to an HPC running server. You may test running this from a Fluent GUI (Linux or Windows) by selecting “File” -> “Start/Stop Server” or run the TUI “server/start-server”. You can connect to local running copies of the server on the same machine to practice setting up commands or running scripts. 

Alternative Fluent startup using a Journal file

Submit a Fluent job using predefined commands

Fluent executes command through the TUI (Text User Interface). The format is a command followed by white space, comma, or answer to the prompted question. For a detailed list see the Ansys Help documentation for Fluent -> Fluent Text Command List -> Solution Mode. General navigation from a the fluent console is a directory structure. Press ‘enter/return’ will list available entries that are either commands or directories. Pressing ‘q’ will take you back one, and entering a command in the shortest unique letters will begin the prompts for options regarding that command. For example, ‘define/models/viscous/ke-realizable?’ is a simple yes or no, but ‘/define/boundary-conditions/velocity-inlet’ requires further information such as which surface(s), velocity, turbulent parameters, temperature, species, etc.

The simplest journal file will contain a read case line, initialize or read data, iterate, save and exit. However, for our purposes here starting a visualization client server and reading a case is sufficient. The file “read_case.jou” contains these two lines (Note v20.2 uses different commands and requires a reply to start the server: server/start-server filename.txt).

;Journal file to start the visualization client server and read a case
server/start-client
file/read-case myFluentCase.cas

Then the command in the batch script to start fluent changes to call this journal file. Using multiple processors and nodes the variables $cpus and $SLURM_JOB_ID.nodes are created in the script with calls to ‘expands’ and ‘wc -l’. See Fluent using Multiple Nodes. So the last line becomes:

fluent 3ddp -t$cpus -cnf=$SLURM_JOB_ID.nodes -gu -i read_case.jou
Using MobaXterm to view Wendian files and Download the server information file

Step 2: Downloading the Fluent Server Configuration File

Using MobaXterm access the file location and download the “SLURM_JOBID_fluent_server_info.txt” file to your Desktop. Using the built in SCP file transfer tab on the left of MobaXterm from terminal that is logged in to Wendian navigate to your scratch directory.  The icon shows up as a link file icon not a directory from your home directory. The file contains the internal IP address, port number, and password for connection to Remote Visualization Client. The IP address will be used to setup the tunnel and then changed to direct the connection through the “localhost” port for tunneling through the SSH connection and encription. 

Step 3: Examining the Contents of the Configuration File

Using the ‘cat’ command to list the file content to the terminal, or use the build in MobaTextEditor under the “Tools” tab -> “Office”. The IP address, in this case, is 172.20.101.136 and the port number, 2678, as was setup in the Slurm submit script. The last line is the password that Ansys Fluent Remote Visualization will use.  This IP address on your local file will be changed to “localhost” in a later step.

Terminal output of configuration files content
The tunnel setup in MobaXterm

Step 4: Settings for the Tunnel in MobaXterm

From the icons across the top of MobaXterm select “Tunneling”, or from the “Tools” -> “MobaSSHTunnel (port forwarding)”. Then select “New SSH tunnel” or under “Settings”  the gears icon of a previous tunnel. This will open the settings window for the tunnel. In the upper left select the radial button “Local port forwarding” then starting from the “Local clients” to “My computer with MobaXterm” input box add the port number from your local copy of the file “SLURM_JOBID_fluent_server_info.txt” downloaded, in this case, the port number is 2678 (but could be anything as long as they match). Next, from “My computer with MobaXterm” through the SSH tunnel Firewall to “SSH server” enter in the input box the HPC platform “wendian.mines.edu” (or mio.mines.edu), your USERNAME, and port “22” used for the ssh connections. Finally, in the upper right from “SSH server” to “Remote server” enter the IP address of the node and the port number where Fluent is running the server, in this case, the IP address from the file is 172.20.101.136 and the port is 2678. Click “Save” and then the “Play” button after which you will be prompted to enter your password to initiate the port forwarding.

Play button has been press and the SSH tunnel is running after entering your password. Note the “play” button is greyed out.

MobaXterm active tunnel
File contents and changes

Step 5: edit server file

Edit your local copy of SLURM_JOBID_fluent_server_info.txt file and change the IP address from the internal node address, in this case, 172.20.101.136 to localhost. Using the text editor of your choice, Notepad, Notepad++ or ‘vim’ in the terminal. Also, MobaXterm has build in “MobaTextEditor” under “Tools” office. The new file will be used to direct the Remote Visualization Client to use the SSH tunnel to connect to the node running the Fluent server.

Step 6: Start Client and Connection File

Start the Ansys “Remote Visualization Client” with the matching version as the Fluent server running.

Windows start menu with flremote.exe
Connection success and node infomation

Under “Properties – RemoteSession1: the click the yellow box and select the file you edited, the SLURM_JOBID_fluent_server_info.txt file. Or select under “Actions” -> “Connection” -> “New Connection…” if you already have one. Highlight a session to connect to labeled, for example, “RemoteSession-1” in the “Tree” on the left and click “Connect” in the upper left under :”Actions” -> “Connection”. Once the connection succeeds the information about the case loaded, solver selected, host, and configuration is shown. Here, only node136 is shown as a case is not loaded yet.

Error Connection to the Server

Check that your fluent jobs is still running and the transcript output that the server is started. Check this IP with the one in your tunnel. Also, check that the server_info.txt file contains “localhost:port” as the first line. Also, Ansys version must match.

Error box from a failed connection

Step 7: Send Command to Server

Click under “Actions” -> “Connection” -> “Send Command…” to open the “Send Command to Server” window and select the Remote Session Name. Running the command ‘ls’ will execute on the Fluent server and list the working directory’s content. To see the outputs you will need to select the “RemoteSession-1” tab below to see the text output. The output will also be record in the transcript on the node.

Send Command to Server box
Loaded case file

Loading a Fluent Case File remotely through the TUI Command

The output of the ‘ls’ command shows the tutorial case file “catalytic_converter.cas” in the working directory. Send the command ‘file/read-case catalytic_converter.cas’ will load this case into the Fluent server. The properties update to the configuration settings and name.

Step 8: Remote Visualization Client 2021 R1 Display of Mesh

Once a case is loaded on the Fluent server the Remote Visualization Client will show the “Outline View” tree of the available Solution controls, and Results controls. To display the mesh select “Meshes” and click “New…”. Then enter the Surfaces in the yellow box and select all the inlet, outlet, and walls that you want to display. Click display and a new render window will open with the “RemoteSession-1:mesh-1”. Windows are dockable and un-dockable enabling multiple display layouts for configuring your work flow, managing up to 6 Fluent server connections, and using the full potential of separate monitors to setup post-processing. This takes advantage of your GPU graphics card for displaying and rendering the resulting data and image transmitted to your client machine. The example, running below shows the mesh on a mirror like surface and grid plane, available only because of the RTX 5000 rendering capabilities, unlike the last example screenshot.

Fluent Remote Visualization Client program window

Step 9: Remote Visualization Client 2019 R1 Iteration Monitor

After initializing the case and starting the solver the “RemoteSession-1 – Residuals” will be graphed in the graphics window, and the convergence of each iteration is output to the console “RemoteSession-1”. Once the iteration is started the client can be disconnected under “Action” -> “Connection” -> “Disconnect” and the Fluent server will remain running on the compute node. Using a Mines campus labby.mines.edu computer connecting to Wendian on three Fluent running servers monitoring 2 sets of residuals and display a pressure contour plot in the tiled graphics windows. This shows the change in output because of the available graphics card and running a different version of Ansys, 2019 R1.

Connected to 3 servers at once

For further help related to visualization of your data submit a Mines Help Center ticket at https://helpcenter.mines.edu/TDClient/1946/Portal/Requests/ServiceDet?ID=48220