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, file_transfer_service=None)#

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_file_name, 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.

download(file_name[, local_directory])

Download a file from the server.

execute_tui(command)

Executes a tui command.

exit(**kwargs)

Exit session.

force_exit()

Immediately terminates the Fluent session, losing unsaved progress and data.

get_fluent_version()

Gets and returns the fluent version.

start_journal(file_name)

Executes tui command to start journal.

stop_journal()

Executes tui command to stop journal.

upload(file_name[, remote_file_name])

Upload a file to the server.

Attributes:

field_data

Fluent field data on surfaces.

field_data_streaming

Field gRPC streaming service of Fluent.

field_info

Provides access to Fluent field information.

id

Return the session ID.

__init__(fluent_connection, file_transfer_service=None)#

BaseSession.

Args:

fluent_connection (fluent_connection): Encapsulates a Fluent connection. file_transfer_service: Supports file upload and download.

build_from_fluent_connection(fluent_connection, file_transfer_service=None)#

Build a BaseSession object from fluent_connection object.

download(file_name, local_directory='.')#

Download a file from the server.

Parameters:
file_namestr

Name of the file to download from the server.

local_directorystr, optional

Local destination directory. The default is the current working directory.

execute_tui(command)#

Executes a tui command.

exit(**kwargs)#

Exit session.

property field_data#

Fluent field data on surfaces.

property field_data_streaming#

Field gRPC streaming service of Fluent.

property field_info#

Provides access to Fluent field information.

force_exit()#

Immediately terminates the Fluent session, losing unsaved progress and data.

get_fluent_version()#

Gets and returns the fluent version.

property id: str#

Return the session ID.

start_journal(file_name)#

Executes tui command to start journal.

stop_journal()#

Executes tui command to stop journal.

upload(file_name, remote_file_name=None)#

Upload a file to the server.

Parameters:
file_namestr

Name of the local file to upload to the server.

remote_file_namestr, optional

remote file name, by default None