ansys.fluent.core.session#
Module containing class encapsulating Fluent connection and the Base Session.
Classes:
|
Encapsulates a Fluent session. |
- class ansys.fluent.core.session.BaseSession(fluent_connection, scheme_eval, file_transfer_service=None, start_transcript=True, launcher_args=None, event_type=None)#
Bases:
object
Encapsulates a Fluent session.
This class exposes methods for interacting with a Fluent session.
- Attributes:
- scheme_eval: SchemeEval
Instance of
SchemeEval
to execute Fluent’s scheme code on.
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, scheme_eval[, ...])BaseSession.
download
(file_name[, local_directory])Download a file from the server.
execute_tui
(command)Executes a tui command.
exit
(**kwargs)Exit session.
file_exists_on_remote
(file_name)Check if remote file exists.
Forces the Fluent session to exit, losing unsaved progress and data.
Gets and returns the fluent version.
start_journal
(file_name)Executes tui command to start journal.
Executes tui command to stop journal.
upload
(file_name[, remote_file_name])Upload a file to the server.
Attributes:
Fluent field data on surfaces.
Field gRPC streaming service of Fluent.
Provides access to Fluent field information.
Return the session ID.
- __init__(fluent_connection, scheme_eval, file_transfer_service=None, start_transcript=True, launcher_args=None, event_type=None)#
BaseSession.
- Parameters:
- fluent_connection (:ref:`ref_fluent_connection`):
Encapsulates a Fluent connection.
- scheme_eval: SchemeEval
Instance of
SchemeEval
to execute Fluent’s scheme code on.- file_transfer_service
Optional
Service for uploading and downloading files.
- start_transcriptbool,
optional
Whether to start the Fluent transcript in the client. The default is
True
, in which case the Fluent transcript can be subsequently started and stopped using method calls on theSession
object.- event_type
Enum
,optional
Event enumeration specific to the session type.
- download(file_name, local_directory='.')#
Download a file from the server.
- 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.
- file_exists_on_remote(file_name)#
Check if remote file exists.
- Parameters:
- file_name: str
File name.
- Returns:
Whether
file
exists.
- force_exit()#
Forces the Fluent session to exit, 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.