standalone_launcher#

Provides a module for launching Fluent in standalone mode.

Examples#

>>>
>>> from ansys.fluent.core.launcher.launcher import create_launcher
>>> from ansys.fluent.core.launcher.pyfluent_enums import LaunchMode, FluentMode
>>>
>>> standalone_meshing_launcher = create_launcher(LaunchMode.STANDALONE, mode=FluentMode.MESHING)
>>> standalone_meshing_session = standalone_meshing_launcher()
>>>
>>> standalone_solver_launcher = create_launcher(LaunchMode.STANDALONE)
>>> standalone_solver_session = standalone_solver_launcher()

Classes:

StandaloneLauncher([mode, ui_mode, ...])

Instantiates Fluent session in standalone mode.

class ansys.fluent.core.launcher.standalone_launcher.StandaloneLauncher(mode=None, ui_mode=None, graphics_driver=None, product_version=None, dimension=None, precision=None, processor_count=None, journal_file_names=None, start_timeout=60, additional_arguments='', env=None, cleanup_on_exit=True, dry_run=False, start_transcript=True, case_file_name=None, case_data_file_name=None, lightweight_mode=None, py=None, gpu=None, cwd=None, fluent_path=None, topy=None, start_watchdog=None, file_transfer_service=None)#

Bases: object

Instantiates Fluent session in standalone mode.

Methods:

__init__([mode, ui_mode, graphics_driver, ...])

Launch a Fluent session in standalone mode.

__init__(mode=None, ui_mode=None, graphics_driver=None, product_version=None, dimension=None, precision=None, processor_count=None, journal_file_names=None, start_timeout=60, additional_arguments='', env=None, cleanup_on_exit=True, dry_run=False, start_transcript=True, case_file_name=None, case_data_file_name=None, lightweight_mode=None, py=None, gpu=None, cwd=None, fluent_path=None, topy=None, start_watchdog=None, file_transfer_service=None)#

Launch a Fluent session in standalone mode.

Parameters:
modeFluentMode

Specifies the launch mode of Fluent to target a specific session type.

ui_modeUIMode

Defines the user interface mode for Fluent. Options correspond to values in the UIMode enum.

graphics_driverFluentWindowsGraphicsDriver or FluentLinuxGraphicsDriver

Specifies the graphics driver for Fluent. Options are from the FluentWindowsGraphicsDriver enum (for Windows) or the FluentLinuxGraphicsDriver enum (for Linux).

product_versionFluentVersion or str or float or int, optional

Indicates the version of Ansys Fluent to launch. For example, to use version 2025 R1, pass FluentVersion.v251, "25.1.0", "25.1", 25.1, or 251. Defaults to None, which uses the newest installed version.

dimensionDimension or int, optional

Specifies the geometric dimensionality of the Fluent simulation. Defaults to None, which corresponds to Dimension.THREE. Acceptable values are from the Dimension enum (Dimension.TWO or Dimension.THREE) or integers 2 and 3.

precisionPrecision or str, optional

Defines the floating point precision. Defaults to None, which corresponds to Precision.DOUBLE. Acceptable values are from the Precision enum (Precision.SINGLE or Precision.DOUBLE) or strings "single" and "double".

processor_countint, optional

Specifies the number of processors to use. Defaults to None, which uses 1 processor. In job scheduler environments, this value limits the total number of allocated cores.

journal_file_namesstr or list of str, optional

Path(s) to a Fluent journal file(s) that Fluent will execute. Defaults to None.

start_timeoutint, optional

Maximum time in seconds allowed for connecting to the Fluent server. Defaults to 60 seconds.

additional_argumentsstr, optional

Additional command-line arguments for Fluent, formatted as they would be on the command line.

envdict[str, str], optional

A mapping for modifying environment variables in Fluent. Defaults to None.

cleanup_on_exitbool, optional

Determines whether to shut down the connected Fluent session when exiting PyFluent or calling the session’s exit() method. Defaults to True.

dry_runbool, optional

If True, does not launch Fluent but prints configuration information instead. The call() method returns a tuple containing the launch string and server info file name. Defaults to False.

start_transcriptbool, optional

Indicates whether to start streaming the Fluent transcript in the client. Defaults to True; streaming can be controlled via transcript.start() and transcript.stop() methods on the session object.

case_file_namestr, optional

Name of the case file to read into the Fluent session. Defaults to None.

case_data_file_namestr, optional

Name of the case data file. If both case and data files are provided, they are read into the session.

lightweight_modebool, optional

If True, runs in lightweight mode where mesh settings are read into a background solver session, replacing it once complete. This parameter is only applicable when case_file_name is provided; defaults to False.

pybool, optional

If True, runs Fluent in Python mode. Defaults to None.

gpubool, optional

If True, starts Fluent with GPU Solver enabled.

cwdstr, optional

Working directory for the Fluent client.

fluent_path: str, optional

User-specified path for Fluent installation.

topybool or str, optional

A flag indicating whether to write equivalent Python journals from provided journal files; can also specify a filename for the new Python journal.

start_watchdogbool, optional

When cleanup_on_exit is True, defaults to True; an independent watchdog process ensures that any local GUI-less Fluent sessions started by PyFluent are properly closed when the current Python process ends.

file_transfer_serviceAny

Service for uploading/downloading files to/from the server.

Raises:
UnexpectedKeywordArgument

If an unexpected keyword argument is provided.

Notes

In job scheduler environments (e.g., SLURM, LSF, PBS), resources and compute nodes are allocated, and core counts are queried from these environments before being passed to Fluent.