RETURN
Simulation
March 2024

Ansys Fluent on Qarnot Cloud

Ansys Fluent is a powerful computational fluid dynamics (CFD) software that simulates fluid flow, heat transfer, and other related phenomena. It is widely utilized in various sectors, including aerospace, automotive, energy, and environmental engineering.

Researchers, engineers, and designers rely on Fluent to analyze complex fluid behavior, optimize designs, and improve performance. The software employs numerical methods to solve partial differential equations governing fluid flow, providing accurate predictions and insights for real-world applications.

License

In order to launch a Fluent simulation on Qarnot, you must grant Qarnot access to your license. For more details, please reach out to our team at qlab@qarnot-computing.com.

We will assume your license setup with us is already complete from this point on.

Versions

Here are the current available versions on Qarnot:

If you are interested in another version, please send us an email qlab@qarnot-computing.com.

Prerequisites

Before launching a computation task, please ensure that the following prerequisites have been met:

Launching an MPI test

Ansys-Fluent mpitest can run without a license. To start a MPI test on Qarnot, copy the following code in a Python script. Be sure you have copied your authentication token in the script (instead of MY_SECRET_TOKEN) to be able to launch the task on Qarnot.

run_fluent_mpi-test.py

#!/usr/bin/env python3

# Import the Qarnot SDK
import qarnot

# Create a connection
conn = qarnot.connection.Connection(client_token='MY_SECRET_TOKEN')

# Create a task
task = conn.create_task('ansys-fluent-mpitest', 'ansys-fluent', 2)

# Fluent command based on this template : 'fluent 3ddp -t56 -i run.jou'
task.constants['FLUENT_CMD'] = "fluent 3ddp -mpitest -t56"

# Fluent tag version. E.g: latest, 2021R2, 2023R2, 2024R1, ...
task.constants["DOCKER_TAG"] = "2023R2"

# Submit the task to the API
task.submit()
Good to know :  when you create a task with conn.create_task, you have to specify its name, the profile you want to use and in a cluster case, the number of instances you want run.

To run this script, open a terminal in your working directory and execute python3 run_fluent_mpi-test.py. It will launch the MPI test on Qarnot.

Launching a use-case

Here is an example of how to run an Ansys-Fluent use-case on the platform. It assumes that

If needed, here is the generic use case aicraft_wing_14m. You can download it and extract it inside an input/ directory.

Once you have all setup, it's time to execute run_fluent_aircraft-wing.py below. In this script you can

#!/usr/bin/env python3

# Import the Qarnot SDK
import qarnot

# Create a connection
conn = qarnot.connection.Connection(client_token='MY_SECRET_TOKEN')

# Create a task
task = conn.create_task('fluent-aircraft', 'ansys-fluent', 2)

# Create and append input bucket
input_bucket = conn.retrieve_or_create_bucket("fluent-aircraft-input")
input_bucket.sync_directory("input")
task.resources.append(input_bucket)

# Create output bucket
task.results = conn.create_bucket("fluent-aircraft-output")

# Fluent Command
task.constants['FLUENT_CMD'] = "fluent -g 3ddp -t56 -i run.jou"
task.constants["DOCKER_TAG"] = "2023R2"

# Your license server informations
task.constants["QARNOT_SECRET__ANSYSLMD_LICENSE_IP"] = ""
task.constants["QARNOT_SECRET__ANSYSLMD_LICENSE_SERVER_PORT"] = ""

# Take a snapshot every 10 seconds
task.snapshot(10)

# Submit the task to the API, that will launch it on the cluster
task.submit()

To launch the computation on Qarnot, copy the following code in a Python script in your working directory. Be sure you have copied your authentication token in the script (instead of MY_SECRET_TOKEN) and execute python3 run_fluent_aircraft_wing.py.

Launching a Fluent task with SSH connectivity enabled

Here is an example of how to run an Ansys-Fluent with SSH activated on the platform. You will need:

#!/usr/bin/env python3

# Import the Qarnot SDK
import qarnot

# Create a connection
conn = qarnot.connection.Connection(client_token='MY_SECRET_TOKEN')

# Create a task
task = conn.create_task('fluent-aircraft-ssh', 'ansys-fluent-ssh', 2)

# Create, sync and link your Bucket
input_bucket = conn.retrieve_or_create_bucket("fluent-aircraft")
input_bucket.sync_directory("input")
task.resources.append(input_bucket)

# Fluent tag version. E.g: latest, 2021R2, 2023R2, 2024R1, ...
task.constants["DOCKER_TAG"] = "2023R2"

# Set your SSH key
task.constants["DOCKER_SSH"] = ""

# Set BATCH to true in order to initiate a batch launch with ssh connectivity
# task.constants["BATCH"] = "true"
# Fluent command based on this template : 'fluent 3ddp -t56 -i run.jou'
# task.constants['FLUENT_CMD'] = "fluent 3ddp -mpitest -t56"

# Your license server informations
task.constants["QARNOT_SECRET__ANSYSLMD_LICENSE_IP"] = ""
task.constants["QARNOT_SECRET__ANSYSLMD_LICENSE_SERVER_PORT"] = ""

# Submit the task to the API
task.submit()

To launch the computation on Qarnot, copy the following code in a Python script in your working directory. Be sure you have:

And now, you can execute python3 run_fluent_ssh.py.

Please note the profile used has changed, its now ansys-fluent-ssh.

While connected to the master node, you can launch a simulation on your cluster with this command:

fluent 3ddp -g mpi=openmpi -pinfiniband -cnf=/job/mpihosts -i run.jou

Where mpi=openmpi -pinfiniband -cnf=/job/mpihosts are MPI settings needed for more than 1 node simulation.

Monitoring

At any given time, you can monitor the status of your task on Tasq.

On this page you can monitor your instances states, logs or execution time and check your task configuration you set up such as a profile name, the Fluent version or your SSH key.

In case of an SSH task, IP and port can be found under the Port Forward section.

Your results will be stored in the fluent-aircraft-output bucket and can be retrieved with three methods:

Wrapping up

If you have any questions, please contact qlab@qarnot-computing.com and we will help you with pleasure!

Return

Our articles