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)Build a BaseSession object from fluent_connection object.
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.
exit
(**kwargs)Exit session.
Terminate session.
Terminate Docker container session.
Gets and returns the fluent version.
start_journal
(file_path)Executes tui command to start journal.
Executes tui command to stop journal.
upload
(file_path[, remote_file_name])Uploads a file on the server.
Attributes:
Return the session ID.
- __init__(fluent_connection)#
BaseSession.
- Args:
fluent_connection (fluent_connection): Encapsulates a Fluent connection.
- build_from_fluent_connection(fluent_connection)#
Build a BaseSession object from fluent_connection object.
- classmethod create_from_server_info_file(server_info_filepath, **connection_kwargs)#
Create a Session instance from server-info file.
- Parameters:
- server_info_filepath
str
Path to server-info file written out by Fluent server
- **connection_kwargs
dict
,optional
Additional keyword arguments may be specified, and they will be passed to the FluentConnection being initialized. For example,
cleanup_on_exit = True
, orstart_transcript = True
. SeeFluentConnection initialization
for more details and possible arguments.
- server_info_filepath
- Returns:
Session
Session instance
- download(file_name, local_file_path=None)#
Downloads a file from the server.
- execute_tui(command)#
Executes a tui command.
- exit(**kwargs)#
Exit session.
- force_exit()#
Terminate session.
- force_exit_container()#
Terminate Docker container session.
- get_fluent_version()#
Gets and returns the fluent version.
- start_journal(file_path)#
Executes tui command to start journal.
- stop_journal()#
Executes tui command to stop journal.
- upload(file_path, remote_file_name=None)#
Uploads a file on the server.