launch_fluent#

ansys.fluent.core.launcher.launcher.launch_fluent(product_version=None, version=None, precision=None, processor_count=None, journal_filename=None, start_timeout=100, additional_arguments='', env=None, start_instance=None, ip=None, port=None, cleanup_on_exit=True, start_transcript=True, show_gui=None, case_filepath=None, mode=None, server_info_filepath=None, password=None, py=None, cwd=None, topy=None, **kwargs)#

Launch Fluent locally in server mode or connect to a running Fluent server instance.

Parameters:
product_versionstr, optional

Version of Fluent to use in the numeric format (such as "23.1.0" for 2023 R1). The default is None, in which case the active version or latest installed version is used.

versionstr, optional

Dimensions for modeling. The default is None, in which case "3d" is used. Options are "3d" and "2d".

precisionstr, optional

Floating point precision. The default is None, in which case "double" is used. Options are "double" and "single".

processor_countint, optional

Number of processors. The default is None, in which case 1 processor is used. In job scheduler environments the total number of allocated cores is clamped to this value.

journal_filenamestr, optional

Name of the journal file to read. The default is None.

start_timeoutint, optional

Maximum allowable time in seconds for connecting to the Fluent server. The default is 100.

additional_argumentsstr, optional

Additional arguments to send to Fluent. The default is "".

envdict[str, str], optional

Mapping to modify environment variables in Fluent. The default is None.

start_instancebool, optional

Whether to connect to an existing Fluent instance at a specified IP address on a specified port. The default is None, in which case a local instance of Fluent is started. When False, use the next two parameters to specify the IP address and port. You can also use the environment variable PYFLUENT_START_INSTANCE=<0 or 1> to set this parameter.

ipstr, optional

IP address for connecting to an existing Fluent instance. This parameter is used only when start_instance is False. Otherwise, the IP address defaults to "127.0.0.1". You can also use the environment variable PYFLUENT_FLUENT_IP=<ip> to set this parameter.

portint, optional

Port to listen on for an existing Fluent instance. This parameter is used only when start_instance is False. You can use the environment variable PYFLUENT_FLUENT_PORT=<port> to set a default value.

cleanup_on_exitbool, optional

Whether to shut down the connected Fluent session when PyFluent is exited or the exit() method is called on the session instance. The default is True.

start_transcriptbool, optional

Whether to start streaming the Fluent transcript in the client. The default is True. You can stop and start the streaming of the Fluent transcript subsequently via method calls on the session object.

show_guibool, optional

Whether to display the Fluent GUI when start_instance is set to ‘’True``. The default is None so that explicit False settings can be detected. This is because you can use also use the environment variable PYFLUENT_SHOW_SERVER_GUI=<0 or 1> to set this parameter. The show-gui parameter overrides the PYFLUENT_SHOW_SERVER_GUI environment variable. For example, if PYFLUENT_SHOW_SERVER_GUI is set to 1 and the show-gui parameter is set to False, the GUI is hidden.

case_filepathstr, optional

If provided, reads a fluent case file and sets the required settings in the fluent session

modestr, optional

Launch mode of Fluent to point to a specific session type. The default value is None. Options are "meshing", "pure-meshing" and "solver".

server_info_filepath: str

Path to server-info file written out by Fluent server. The default is None.

passwordstr, optional

Password to connect to existing Fluent instance.

pybool, optional

Passes "-py" as an additional_argument to launch fluent in python mode. The default is None.

cwd: str, Optional

Path to specify current working directory to launch fluent from the defined directory as current working directory.

topy: str or list, optional

Automates scheme to python journal creation.

Returns:
ansys.fluent.session.Session

Fluent session.

Notes

In job scheduler environments such as SLURM, LSF, PBS, etc… the allocated machines and core counts are queried from the scheduler environment and passed to Fluent.

Return type:

_BaseSession