session#

Module containing class encapsulating Fluent connection and the Base Session.

Classes:

BaseSession(fluent_connection)

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_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.

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])

Uploads a file on the server.

Attributes:

id

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_filepathstr

Path to server-info file written out by Fluent server

**connection_kwargsdict, optional

Additional keyword arguments may be specified, and they will be passed to the FluentConnection being initialized. For example, cleanup_on_exit = True, or start_transcript = True. See FluentConnection initialization for more details and possible arguments.

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.

property id: str#

Return the session id.

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.