RATimeStatistics#
- class ansys.rocky.app.ra_time_statistics.RATimeStatistics(id: str, model_id: str | None = None)#
Bases:
ansys.rocky.app.api_element_item.ApiElementItemPrePost Scripting wrapper for TimeStatisticsContainer.
Overview#
Add a new time statistics grid function. |
|
Remove a previously-generated grid function. |
Import detail#
from ansys.rocky.app.ra_time_statistics import RATimeStatistics
Method detail#
- RATimeStatistics.AddGridFunction(start_time: float | int | tuple[float | int, str] | coilib50.units.Scalar, stop_time: float | int | tuple[float | int, str] | coilib50.units.Scalar, operation: str, grid_function_name: str, location: str | None = None) RATimeStatisticsCalculator#
Add a new time statistics grid function.
- For both time parameters (start_time and stop_time), three kinds of values can be passed:
A float or int, which will be assumed to be a value in seconds;
A tuple with a float or int and a string. The first element is the value, and the second is the value’s unit.
A time Scalar.
- operation must be the string representing one of the operations that the time
statistics grid functions support. Currently, these are limited to “average”, “min”, “max” and “sum”.
- grid_function_name must be the string of the name of the input grid function over
which the operation will be performed.
- location is optional and must be one of ‘cell’ or ‘node’. If no location is passed, the
time statistics grid function will be created on the cell.
- Return RATimeStatisticsCalculator:
An object representing the newly-created time statistics grid function. This object can be used to change the start and stop times, and to retrieve the grid function name.
- RATimeStatistics.RemoveGridFunction(name_or_calculator: str | RATimeStatisticsCalculator) None#
Remove a previously-generated grid function.
The passed value can be either the name of the grid function to be removed, or a RATimeStatisticsCalculator object previously returned by AddGridFunction().
- classmethod RATimeStatistics.CreateFor(ra_process: ansys.rocky.app.api_element_item.ApiElementItem) RATimeStatistics | None#