session#
Module containing class encapsulating Fluent connection and the Base Session.
Classes:
|
Encapsulates a Fluent session. |
|
Container for field and solution variables. |
- class ansys.fluent.core.session.BaseSession(fluent_connection, scheme_eval, file_transfer_service=None, start_transcript=True, launcher_args=None, event_type=None, get_zones_info=None)#
Bases:
object
Encapsulates a Fluent session.
This class exposes methods for interacting with a Fluent session.
- Attributes:
- scheme: 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.
chdir
(path)Change Fluent working directory.
download
(file_name[, local_directory])Download a file from the server.
Enable access to Fluent beta-features
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.
Whether the current session is active.
Whether the current session is healthy (i.e. The server is 'SERVING').
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.
Provides access to Health Check service.
Return the session ID.
Provides access to Fluent field information.
- __init__(fluent_connection, scheme_eval, file_transfer_service=None, start_transcript=True, launcher_args=None, event_type=None, get_zones_info=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=None)#
Download a file from the server.
- enable_beta_features()#
Enable access to Fluent beta-features
- execute_tui(command)#
Executes a tui command.
- exit(**kwargs)#
Exit session.
- property field_data#
Fluent field data on surfaces.
Deprecated since version 0.20.dev9: Use
session.fields.field_data
.
- property field_data_streaming#
Field gRPC streaming service of Fluent.
Deprecated since version 0.20.dev9: Use
session.fields.field_data_streaming
.
- property field_info#
Provides access to Fluent field information.
Deprecated since version 0.20.dev9: Use
session.fields.field_info
.
- 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.
- property health_check#
Provides access to Health Check service.
Deprecated since version 0.32: Use
session.is_server_healthy
.
- is_active()#
Whether the current session is active.
- is_server_healthy()#
Whether the current session is healthy (i.e. The server is ‘SERVING’).
- property scheme_eval#
Provides access to Fluent field information.
Deprecated since version 0.32: Use
session.scheme
.
- start_journal(file_name)#
Executes tui command to start journal.
- stop_journal()#
Executes tui command to stop journal.
- class ansys.fluent.core.session.Fields(_session, get_zones_info=None)#
Bases:
object
Container for field and solution variables.
Methods:
__init__
(_session[, get_zones_info])Initialize Fields.
Attributes:
Field Information.
- __init__(_session, get_zones_info=None)#
Initialize Fields.
- property field_info#
Field Information.
Deprecated since version 0.34.0: Use relevant
field_data
methods..