events_streaming#

Module for events management.

Classes:

AboutToInitializeSolutionEventInfo()

Information about the event triggered just before solution is initialized.

AboutToLoadCaseEventInfo(case_file_name)

Information about the event triggered just before a case file is loaded.

AboutToLoadDataEventInfo(data_file_name)

Information about the event triggered just before a data file is loaded.

CalculationsEndedEventInfo()

Information about the event triggered when calculations are ended.

CalculationsPausedEventInfo()

Information about the event triggered when calculations are paused.

CalculationsResumedEventInfo()

Information about the event triggered when calculations are resumed.

CalculationsStartedEventInfo()

Information about the event triggered when calculations are started.

CaseLoadedEventInfo(case_file_name)

Information about the event triggered after a case file is loaded.

DataLoadedEventInfo(data_file_name)

Information about the event triggered after a data file is loaded.

Event

alias of SolverEvent

EventsManager(event_type, ...)

Manages server-side events.

FatalErrorEventInfo(message, error_code)

Information about the event triggered when a fatal error occurs.

IterationEndedEventInfo(index)

Information about the event triggered when an iteration is ended.

MeshingEvent(value[, names, module, ...])

Enumerates over supported server (Fluent) events.

ProgressUpdatedEventInfo(message, percentage)

Information about the event triggered when progress is updated.

ReportDefinitionUpdatedEventInfo(report_name)

Information about the event triggered when a report definition is updated.

ReportPlotSetUpdatedEventInfo(plot_set_name)

Information about the event triggered when a report plot set is updated.

ResidualPlotUpdatedEventInfo()

Information about the event triggered when residual plots are updated.

SettingsClearedEventInfo()

Information about the event triggered when settings are cleared.

SolutionInitializedEventInfo()

Information about the event triggered after solution is initialized.

SolutionPausedEventInfo(level, index)

Information about the event triggered when solution is paused.

SolverEvent(value[, names, module, ...])

Enumerates over supported server (Fluent) events.

SolverTimeEstimateUpdatedEventInfo(hours, ...)

Information about the event triggered when solver time estimate is updated.

TimestepEndedEventInfo(index, size)

Information about the event triggered when a timestep is ended.

TimestepStartedEventInfo(index, size)

Information about the event triggered when a timestep is started.

class ansys.fluent.core.streaming_services.events_streaming.AboutToInitializeSolutionEventInfo#

Bases: EventInfoBase

Information about the event triggered just before solution is initialized.

class ansys.fluent.core.streaming_services.events_streaming.AboutToLoadCaseEventInfo(case_file_name)#

Bases: EventInfoBase

Information about the event triggered just before a case file is loaded.

Attributes:
case_file_namestr

Case filename.

Attributes:

case_file_name: str#
class ansys.fluent.core.streaming_services.events_streaming.AboutToLoadDataEventInfo(data_file_name)#

Bases: EventInfoBase

Information about the event triggered just before a data file is loaded.

Attributes:
data_file_namestr

Data filename.

Attributes:

data_file_name: str#
class ansys.fluent.core.streaming_services.events_streaming.CalculationsEndedEventInfo#

Bases: EventInfoBase

Information about the event triggered when calculations are ended.

class ansys.fluent.core.streaming_services.events_streaming.CalculationsPausedEventInfo#

Bases: EventInfoBase

Information about the event triggered when calculations are paused.

class ansys.fluent.core.streaming_services.events_streaming.CalculationsResumedEventInfo#

Bases: EventInfoBase

Information about the event triggered when calculations are resumed.

class ansys.fluent.core.streaming_services.events_streaming.CalculationsStartedEventInfo#

Bases: EventInfoBase

Information about the event triggered when calculations are started.

class ansys.fluent.core.streaming_services.events_streaming.CaseLoadedEventInfo(case_file_name)#

Bases: EventInfoBase

Information about the event triggered after a case file is loaded.

Attributes:
case_file_namestr

Case filename.

Attributes:

case_file_name: str#
class ansys.fluent.core.streaming_services.events_streaming.DataLoadedEventInfo(data_file_name)#

Bases: EventInfoBase

Information about the event triggered after a data file is loaded.

Attributes:
data_file_namestr

Data filename.

Attributes:

data_file_name: str#
ansys.fluent.core.streaming_services.events_streaming.Event#

alias of SolverEvent

class ansys.fluent.core.streaming_services.events_streaming.EventsManager(event_type, session_events_service, fluent_error_state, session)#

Bases: Generic[TEvent]

Manages server-side events.

This class allows the client to register and unregister callbacks with server events.

Methods:

__init__(event_type, session_events_service, ...)

__init__ method of EventsManager class.

register_callback(event_name, callback, ...)

Register the callback.

start(*args, **kwargs)

Start streaming.

stop()

Stop streaming.

unregister_callback(callback_id)

Unregister the callback.

__init__(event_type, session_events_service, fluent_error_state, session)#

__init__ method of EventsManager class.

register_callback(event_name, callback, *args, **kwargs)#

Register the callback.

Parameters:
event_nameTEvent or str

Event to register the callback to.

callbackCallable

Callback to register. If the custom arguments, args and kwargs, are empty then the callback signature must be precisely <function>(session, event_info). Otherwise, the arguments for args and/or kwargs must precede the other arguments in the signature.

argsAny

Arguments.

kwargsAny

Keyword arguments.

Returns:
str

Registered callback ID.

Raises:
InvalidArgument

If event name is not valid.

start(*args, **kwargs)#

Start streaming.

stop()#

Stop streaming.

unregister_callback(callback_id)#

Unregister the callback.

Parameters:
callback_idstr

ID of the registered callback.

class ansys.fluent.core.streaming_services.events_streaming.FatalErrorEventInfo(message, error_code)#

Bases: EventInfoBase

Information about the event triggered when a fatal error occurs.

Attributes:
messagestr

Error message.

error_codeint

Error code.

Attributes:

error_code: int#
message: str#
class ansys.fluent.core.streaming_services.events_streaming.IterationEndedEventInfo(index)#

Bases: EventInfoBase

Information about the event triggered when an iteration is ended.

Attributes:
indexint

Iteration index.

Attributes:

index: int#
class ansys.fluent.core.streaming_services.events_streaming.MeshingEvent(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)#

Bases: Enum

Enumerates over supported server (Fluent) events.

Attributes:

ABOUT_TO_LOAD_CASE = 'AboutToReadCaseEvent'#
CASE_LOADED = 'CaseReadEvent'#
FATAL_ERROR = 'ErrorEvent'#
PROGRESS_UPDATED = 'ProgressEvent'#
SETTINGS_CLEARED = 'ClearSettingsDoneEvent'#
class ansys.fluent.core.streaming_services.events_streaming.ProgressUpdatedEventInfo(message, percentage)#

Bases: EventInfoBase

Information about the event triggered when progress is updated.

Attributes:
messagestr

Progress message.

percentageint

Progress percentage.

Attributes:

message: str#
percentage: int#
class ansys.fluent.core.streaming_services.events_streaming.ReportDefinitionUpdatedEventInfo(report_name)#

Bases: EventInfoBase

Information about the event triggered when a report definition is updated.

Attributes:
report_namestr

Report name.

Attributes:

report_name: str#
class ansys.fluent.core.streaming_services.events_streaming.ReportPlotSetUpdatedEventInfo(plot_set_name)#

Bases: EventInfoBase

Information about the event triggered when a report plot set is updated.

Attributes:
plot_set_namestr

Plot set name.

Attributes:

plot_set_name: str#
class ansys.fluent.core.streaming_services.events_streaming.ResidualPlotUpdatedEventInfo#

Bases: EventInfoBase

Information about the event triggered when residual plots are updated.

class ansys.fluent.core.streaming_services.events_streaming.SettingsClearedEventInfo#

Bases: EventInfoBase

Information about the event triggered when settings are cleared.

class ansys.fluent.core.streaming_services.events_streaming.SolutionInitializedEventInfo#

Bases: EventInfoBase

Information about the event triggered after solution is initialized.

class ansys.fluent.core.streaming_services.events_streaming.SolutionPausedEventInfo(level, index)#

Bases: EventInfoBase

Information about the event triggered when solution is paused.

Attributes:
levelstr

Level of the pause event.

indexint

Index of the pause event.

Attributes:

index: int#
level: str#
class ansys.fluent.core.streaming_services.events_streaming.SolverEvent(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)#

Bases: Enum

Enumerates over supported server (Fluent) events.

Attributes:

ABOUT_TO_INITIALIZE_SOLUTION = 'AboutToInitializeEvent'#
ABOUT_TO_LOAD_CASE = 'AboutToReadCaseEvent'#
ABOUT_TO_LOAD_DATA = 'AboutToReadDataEvent'#
CALCULATIONS_ENDED = 'CalculationsEndedEvent'#
CALCULATIONS_PAUSED = 'CalculationsPausedEvent'#
CALCULATIONS_RESUMED = 'CalculationsResumedEvent'#
CALCULATIONS_STARTED = 'CalculationsStartedEvent'#
CASE_LOADED = 'CaseReadEvent'#
DATA_LOADED = 'DataReadEvent'#
FATAL_ERROR = 'ErrorEvent'#
ITERATION_ENDED = 'IterationEndedEvent'#
PROGRESS_UPDATED = 'ProgressEvent'#
REPORT_DEFINITION_UPDATED = 'ReportDefinitionChangedEvent'#
REPORT_PLOT_SET_UPDATED = 'PlotSetChangedEvent'#
RESIDUAL_PLOT_UPDATED = 'ResidualPlotChangedEvent'#
SETTINGS_CLEARED = 'ClearSettingsDoneEvent'#
SOLUTION_INITIALIZED = 'InitializedEvent'#
SOLUTION_PAUSED = 'AutoPauseEvent'#
SOLVER_TIME_ESTIMATE_UPDATED = 'SolverTimeEstimateEvent'#
TIMESTEP_ENDED = 'TimestepEndedEvent'#
TIMESTEP_STARTED = 'TimestepStartedEvent'#
class ansys.fluent.core.streaming_services.events_streaming.SolverTimeEstimateUpdatedEventInfo(hours, minutes, seconds)#

Bases: EventInfoBase

Information about the event triggered when solver time estimate is updated.

Attributes:
hoursfloat

Hours of solver time estimate.

minutesfloat

Minutes of solver time estimate.

secondsfloat

Seconds of solver time estimate.

Attributes:

hours: float#
minutes: float#
seconds: float#
class ansys.fluent.core.streaming_services.events_streaming.TimestepEndedEventInfo(index, size)#

Bases: EventInfoBase

Information about the event triggered when a timestep is ended.

Attributes:
indexint

Timestep index.

sizefloat

Timestep size.

Attributes:

index: int#
size: float#
class ansys.fluent.core.streaming_services.events_streaming.TimestepStartedEventInfo(index, size)#

Bases: EventInfoBase

Information about the event triggered when a timestep is started.

Attributes:
indexint

Timestep index.

sizefloat

Timestep size.

Attributes:

index: int#
size: float#