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:
|
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:
- mode
FluentMode
Specifies the launch mode of Fluent to target a specific session type.
- ui_mode
UIMode
Defines the user interface mode for Fluent. Options correspond to values in the
UIMode
enum.- graphics_driver
FluentWindowsGraphicsDriver
orFluentLinuxGraphicsDriver
Specifies the graphics driver for Fluent. Options are from the
FluentWindowsGraphicsDriver
enum (for Windows) or theFluentLinuxGraphicsDriver
enum (for Linux).- product_version
FluentVersion
orstr
orfloat
orint
,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
, or251
. Defaults toNone
, which uses the newest installed version.- dimension
Dimension
orint
,optional
Specifies the geometric dimensionality of the Fluent simulation. Defaults to
None
, which corresponds toDimension.THREE
. Acceptable values are from theDimension
enum (Dimension.TWO
orDimension.THREE
) or integers2
and3
.- precision
Precision
orstr
,optional
Defines the floating point precision. Defaults to
None
, which corresponds toPrecision.DOUBLE
. Acceptable values are from thePrecision
enum (Precision.SINGLE
orPrecision.DOUBLE
) or strings"single"
and"double"
.- processor_count
int
,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_names
str
orlist
of
str
,optional
Path(s) to a Fluent journal file(s) that Fluent will execute. Defaults to
None
.- start_timeout
int
,optional
Maximum time in seconds allowed for connecting to the Fluent server. Defaults to 60 seconds.
- additional_arguments
str
,optional
Additional command-line arguments for Fluent, formatted as they would be on the command line.
- env
dict
[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_name
str
,optional
Name of the case file to read into the Fluent session. Defaults to None.
- case_data_file_name
str
,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.
- cwd
str
,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_service
Any
Service for uploading/downloading files to/from the server.
- mode
- 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.