RAGridProcessElementItem#

class ansys.rocky.app.ra_grid_process_element.RAGridProcessElementItem#

Bases: kraken20.plugins.api.ka_grid.KAGrid, ansys.rocky.app._ra_subject_with_coloring_mixin._RASubjectWithColoringMixin, ansys.rocky.app.ra_custom_calculators.RACustomCurveAndGridProperty

Rocky API process model.

Overview#

GetGridFunction

GetGridFunctionNames

Overridden to filter out deprecated property names.

GetGeometry

GetTimeStatistics

Get the object responsible for handling time-statistics grid functions for this process.

CreateTransientCurveOutputVariable

Used to create an output variable based on a curve for which there’s a completely new

CreateCurveOutputVariable

Used to create an output variable based on a curve which doesn’t change at each new timestep

CreateGridFunctionStatisticOutputVariable

Used to create an output variable based on a grid function statistic (i.e.: will get a

GetOutputVariableValue

Get the value of a previously-created output variable.

RemoveOutputVariable

Removes some output variable.

RemoveProcess

Removes the process from the project.

Import detail#

from ansys.rocky.app.ra_grid_process_element import RAGridProcessElementItem

Attribute detail#

RAGridProcessElementItem.VALID_OPERATIONS: _typeshed.Incomplete#
RAGridProcessElementItem.VALID_TIME_RANGE_DEFINITIONS: _typeshed.Incomplete#
RAGridProcessElementItem.VALID_DOMAIN_RANGE: _typeshed.Incomplete#

Method detail#

RAGridProcessElementItem.GetGridFunction(grid_function_name, simulation_name=None, translated: bool = False)#
RAGridProcessElementItem.GetGridFunctionNames(translated: bool = False, context: str | None = None) list[str]#

Overridden to filter out deprecated property names.

RAGridProcessElementItem.GetGeometry(time_step: str | int | coilib50.time.time_step_interface.ITimeStep = 'current') sci20.core.geometry.IGeometry#
RAGridProcessElementItem.GetTimeStatistics() ansys.rocky.app.ra_time_statistics.RATimeStatistics#

Get the object responsible for handling time-statistics grid functions for this process. This call will return None if the process doesn’t support time statistics.

RAGridProcessElementItem.CreateTransientCurveOutputVariable(curve_name: str, operation: str = 'max', time_operation: str = 'max', time_range: str = 'last_output', initial_time_range: float = 0.0, final_time_range: float = 0.0, domain_range: str = 'all', initial_domain_range: float = 0.0, final_domain_range: float = 0.0, domain_unit: str | None = None)#

Used to create an output variable based on a curve for which there’s a completely new representation for each time step – such as Power : Impact X Belt Width (i.e.: will get the curve multiple times based on the time range, compute a value for each time based on the operation, to convert the multiple curves into a single curve and then will apply the time_operation to get a single scalar from those values).

Parameters:
  • curve_name – The name of the transient curve for which the output variable is wanted.

  • operation

    The operation we want to do at the curve in each time (i.e.: go from transient curve to a regular curve).

    Valid operations:

    ’min’ ‘max’ ‘sum’ ‘sum_squared’ ‘average’ ‘variance’ ‘standard_deviation’

  • time_operation

    The operation that we want to do at the curve when the curve is already converted to a regular time-based curve (by applying the ‘operation’ at each time).

    Valid operations:

    ’min’ ‘max’ ‘sum’ ‘sum_squared’ ‘average’ ‘variance’ ‘standard_deviation’

  • time_range

    Defines the time range for the curve to be gathered for creating the output variable (depending on which time range is chosen, the initial_time_range and the final_time_range may be used to get the actual times for computing the statistics).

    Valid time ranges:
    ’app_time_filter’:

    Uses the application time filter to get the relevant times.

    ’all’

    Uses all the times in the simulation.

    ’last_output’

    Uses only the last time in the simulation.

    ’absolute’

    Defines a time range using the initial_time_range and final_time_range.

    ’single’

    Defines a single time to be used as the time range specified as the initial_time_range.

    ’absolute_only_start’

    Defines a time range using all the values after the given initial_time_range.

    ’relative_to_end’

    Uses all the values considering initial_time_range as a delta from the end of the simulation.

  • initial_time_range – A value in seconds (whose actual meaning depends on the defined time_range).

  • final_time_range – A value in seconds (whose actual meaning depends on the defined time_range).

  • domain_range

    Define the domain range for the curve to create the output variable

    Valid domain_range:
    ’all’

    Uses all the domain in the simulation

    ’single’

    Defines a single time to be used as the time range specified as the initial_domain_range

    ’absolute’

    Defines a domain range using the initial_domain_range and final_domain_range.

  • initial_domain_range – A value for the beginning of the domain (whose actual meaning depends on the defined domain_range).

  • final_domain_range – A value for the end of the domain (whose actual meaning depends on the defined domain_range).

  • domain_unit – A unit for the domain_range

Return type:

str

Returns:

Returns the name of the variable to be used later on to reference the output variable.

RAGridProcessElementItem.CreateCurveOutputVariable(curve_name: str, operation: str = 'max', time_range: str = 'all', initial_time_range: float = 0.0, final_time_range: float = 0.0)#

Used to create an output variable based on a curve which doesn’t change at each new timestep (i.e.: a curve with a single value for each time).

See:

CreateTransientCurveOutputVariable for dealing with curves that are transient.

Parameters:
  • curve_name – The name of the curve for which the output variable is wanted.

  • operation

    The operation we want to do to convert the curve into a single value.

    Valid operations:

    ’min’ ‘max’ ‘sum’ ‘sum_squared’ ‘average’ ‘variance’ ‘standard_deviation’

  • time_range

    Defines the time range for the curve to be gathered for creating the output variable (depending on which time range is chosen, the initial_time_range and the final_time_range may be used to get the actual times for computing the statistics).

    Valid time ranges:
    ’app_time_filter’:

    Uses the application time filter to get the relevant times.

    ’all’

    Uses all the times in the simulation.

    ’last_output’

    Uses only the last time in the simulation.

    ’absolute’

    Defines a time range using the initial_time_range and final_time_range.

    ’single’

    Defines a single time to be used as the time range specified as the initial_time_range.

    ’absolute_only_start’

    Defines a time range using all the values after the given initial_time_range.

    ’relative_to_end’

    Uses all the values considering initial_time_range as a delta from the end of the simulation.

  • initial_time_range – A value in seconds (whose actual meaning depends on the defined time_range).

  • final_time_range – A value in seconds (whose actual meaning depends on the defined time_range).

Return type:

str

Returns:

Returns the name of the variable to be used later on to reference the output variable.

RAGridProcessElementItem.CreateGridFunctionStatisticOutputVariable(grid_function_name: str, operation: str = 'max', statistic_operation: str = 'max', time_range: str = 'last_output', initial_time_range: float = 0.0, final_time_range: float = 0.0) str#

Used to create an output variable based on a grid function statistic (i.e.: will get a grid function, compute its statistic based on statistic_operation and then based on the statistic values will apply the operation to get a single scalar).

Parameters:
  • grid_function_name – The name of the grid function for which the output variable is wanted.

  • operation

    The operation used to select which value to get based on the statistic values obtained.

    Valid operations:

    ’min’ ‘max’ ‘sum’ ‘sum_squared’ ‘average’ ‘variance’ ‘standard_deviation’

  • statistic_operation

    The statistic operation which should be applied to the grid function for each time to obtain a single value for each time.

    Valid operations:

    ’min’ ‘max’ ‘sum’ ‘sum_squared’ ‘average’ ‘variance’ ‘standard_deviation’

  • time_range

    Defines the time range for the grid functions to be gathered for creating the output variable (depending on which time range is chosen, the initial_time_range and the final_time_range may be used to get the actual times for computing the statistics).

    Valid time ranges:
    ’app_time_filter’:

    Uses the application time filter to get the relevant times.

    ’all’

    Uses all the times in the simulation.

    ’last_output’

    Uses only the last time in the simulation.

    ’absolute’

    Defines a time range using the initial_time_range and final_time_range.

    ’single’

    Defines a single time to be used as the time range specified as the initial_time_range.

    ’absolute_only_start’

    Defines a time range using all the values after the given initial_time_range.

    ’relative_to_end’

    Uses all the values considering initial_time_range as a delta from the end of the simulation.

  • initial_time_range – A value in seconds (whose actual meaning depends on the defined time_range).

  • final_time_range – A value in seconds (whose actual meaning depends on the defined time_range).

Returns:

Returns the name of the variable to be used later on to reference the output variable.

RAGridProcessElementItem.GetOutputVariableValue(variable_name: str) barril.units.Scalar#

Get the value of a previously-created output variable.

Parameters:

variable_name (unicode) – The variable name whose value we want.

Returns:

Returns a scalar with the value and unit for the given variable_name or None if no variable was found with the given name or if it couldn’t be computed.

RAGridProcessElementItem.RemoveOutputVariable(variable_name: str) None#

Removes some output variable.

Parameters:

variable_name – The name of the variable to be removed.

RAGridProcessElementItem.RemoveProcess() None#

Removes the process from the project.