17  Ansys Fluent

17.1 License usage

ansys_root=/path/to/ansys/installation
ansys_version=version-number

export LMUTIL="${ansys_root}$/ansys_inc/${ansys_version}/licensingclient/linx64/lmutil"

"${LMUTIL}" lmstat -c 1055@<ip> -a | grep "Users of" | \
    awk -F"[ ]" "{printf "%-25s %3s /%3s\n", $3, $13, $7}"

17.2 Getting started with PyFluent

Install sequentially the following packages as described here:

pip install ansys-fluent-core
pip install ansys-fluent-parametric
pip install ansys-fluent-visualization

Note: ansys-fluent-parametric requires an outdated version of NumPy (<2.0), so you probably need to consider working in a virtual environment.

17.2.1 Journaling

(api-start-python-journal "journal.py")

17.2.2 First steps

import ansys.fluent.core as pyfluent
config = dict(
    ui_mode   = "gui",
    precision = "double",
    dimension = 3,
    processor_count = 1,
)
session = pyfluent.launch_fluent(mode = "solver", **config)
session.exit()