session#
Module containing class encapsulating Fluent connection and the Base Session.
Classes:
|
Instantiates a Fluent connection. |
- class ansys.fluent.core.session.BaseSession(fluent_connection)#
Bases:
object
Instantiates a Fluent connection.
- Attributes:
- scheme_eval: SchemeEval
Instance of SchemeEval on which Fluent’s scheme code can be executed.
Methods
create_from_server_info_file(
server_info_filepath, cleanup_on_exit, start_transcript ) Create a Session instance from server-info file
exit()
Close the Fluent connection and exit Fluent.
Methods:
__init__
(fluent_connection)BaseSession
build_from_fluent_connection
(fluent_connection)create_from_server_info_file
(...[, ...])Create a Session instance from server-info file.
download
(file_name[, local_file_path])Downloads a file from the server.
execute_tui
(command)Executes a tui command.
upload
(file_path[, remote_file_name])Uploads a file on the server.
- __init__(fluent_connection)#
BaseSession
- Args:
fluent_connection (fluent_connection): Encapsulates a Fluent connection.
- build_from_fluent_connection(fluent_connection)#
- classmethod create_from_server_info_file(server_info_filepath, cleanup_on_exit=True, start_transcript=True, launcher_args=None)#
Create a Session instance from server-info file.
- Parameters:
- server_info_filepath
str
Path to server-info file written out by Fluent server
- cleanup_on_exitbool,
optional
When True, the connected Fluent session will be shut down when PyFluent is exited or exit() is called on the session instance, by default True.
- start_transcriptbool,
optional
The Fluent transcript is started in the client only when start_transcript is True. It can be started and stopped subsequently via method calls on the Session object. Defaults to true.
- server_info_filepath
- Returns:
Session
Session instance
- download(file_name, local_file_path=None)#
Downloads a file from the server.
- upload(file_path, remote_file_name=None)#
Uploads a file on the server.