monitor_streaming#

Module for monitors management.

Classes:

MonitorsManager(session_id, service)

Manages monitors (Fluent residuals and report definitions monitors).

class ansys.fluent.core.streaming_services.monitor_streaming.MonitorsManager(session_id, service)#

Bases: StreamingService

Manages monitors (Fluent residuals and report definitions monitors).

Parameters:
session_idstr

Session ID.

serviceMonitorsService

Monitors streaming service.

Methods:

__init__(session_id, service)

__init__ method of MonitorsManager class.

get_monitor_set_data(monitor_set_name[, ...])

Get monitor set data.

get_monitor_set_names()

Get monitor set names.

get_monitor_set_plot(monitor_set_name, ...)

Get monitor set plot.

get_monitor_set_prop(monitor_set_name, property)

Get monitor set property.

refresh(session, event_info)

Refresh plots on-initialized and data-read events.

__init__(session_id, service)#

__init__ method of MonitorsManager class.

get_monitor_set_data(monitor_set_name, start_index=0, end_index=None)#

Get monitor set data.

Parameters:
monitor_set_namestr

Name of the monitor set.

start_index: int, optional

Start index to provide data.

end_index: int, optional

End index to provide data.

Returns:
Tuple[np.array, Dict[str, np.array]]

Tuple containing two elements: a numpy array of x-axis values and a dictionary associating monitor names of type str to numpy arrays of y-axis values.

get_monitor_set_names()#

Get monitor set names.

Parameters:
None
Returns:
List[str]

List of all monitor set names.

get_monitor_set_plot(monitor_set_name, *args, **kwargs)#

Get monitor set plot.

Parameters:
monitor_set_namestr

Name of the monitor.

argsAny

Arguments.

kwargsAny

Keyword arguments.

Returns:
None | object

Returns None if the DataFrame is empty. Otherwise, it returns the plot object, depending on the plotting.backend.

get_monitor_set_prop(monitor_set_name, property)#

Get monitor set property.

Parameters:
monitor_set_namestr

Name of the monitor.

propertystr

Property of the monitor set. It can be title, xlabel, or ylabel.

Returns:
str

Monitor set property.

refresh(session, event_info)#

Refresh plots on-initialized and data-read events.

This method is registered with the EventsManager and is called to refresh plots whenever on-initialized and data-read events occur.

Parameters:
sessionstr

Session object.

event_infoobject

Event info object.

Returns:
None