RARelativeVelocityCalculator#

class ansys.rocky.app.ra_relative_velocity_calculator.RARelativeVelocityCalculator(id: str, model_id: str | None = None)#

Bases: ansys.rocky.app.api_element_item.ApiElementItem, ansys.rocky.app.motion._with_movement_mixin._WithMovementMixin

Rocky PrePost Scripting wrapper to manipulate Relative Velocity Calculators in a project.

The class corresponds to an individual “Frame-Based Results” calculation under the “Calculation” item on the project’s data tree. To create the RARelativeVelocityCalculator from a RACalculations, use:

selection_process = study.GetElement('Particles')
calculations = study.GetCalculations()
relative_velocity_calculator = calculations.CreateFrameBasedResultsCalculator(selection_process)

Overview#

GetGridFunctionName

Get the grid function name. This name can be used to access the grid function on a process.

GetCoordinateSystem

Get “Coordinate System” as a string.

SetCoordinateSystem

Set the value of “Coordinate System”.

GetValidCoordinateSystemValues

Get a list of all possible values for “Coordinate System”.

GetName

Get the value of “Name”.

SetName

Set the value of “Name”.

GetReferenceAxis

Get “Reference Axis” as a string.

SetReferenceAxis

Set the value of “Reference Axis”.

GetValidReferenceAxisValues

Get a list of all possible values for “Reference Axis”.

Import detail#

from ansys.rocky.app.ra_relative_velocity_calculator import RARelativeVelocityCalculator

Method detail#

classmethod RARelativeVelocityCalculator.GetWrappedClass() → type[rocky30.plugins.particles_calculations.relative_velocity.relative_velocity_calculator.FrameBasedRelativeVelocityCalculator]#
classmethod RARelativeVelocityCalculator.GetClassName() → str#
RARelativeVelocityCalculator.GetGridFunctionName() → str#

Get the grid function name. This name can be used to access the grid function on a process.

RARelativeVelocityCalculator.GetCoordinateSystem() → str#

Get “Coordinate System” as a string.

Returns:

The returned value will be one of [‘Cartesian’, ‘Cylindrical’, ‘Spherical’].

RARelativeVelocityCalculator.SetCoordinateSystem(value: str) → None#

Set the value of “Coordinate System”.

Parameters:

value – The value to set. Must be one of [‘Cartesian’, ‘Cylindrical’, ‘Spherical’].

Raises:

RockyApiError – If value is not a valid “Coordinate System” option.

RARelativeVelocityCalculator.GetValidCoordinateSystemValues() → list[str]#

Get a list of all possible values for “Coordinate System”.

Returns:

The returned list is [‘Cartesian’, ‘Cylindrical’, ‘Spherical’].

RARelativeVelocityCalculator.GetName() → str#

Get the value of “Name”.

RARelativeVelocityCalculator.SetName(value: str) → None#

Set the value of “Name”.

Parameters:

value – The value to set.

RARelativeVelocityCalculator.GetReferenceAxis() → str#

Get “Reference Axis” as a string.

Returns:

The returned value will be one of [‘X’, ‘Y’, ‘Z’].

RARelativeVelocityCalculator.SetReferenceAxis(value: str) → None#

Set the value of “Reference Axis”.

Parameters:

value – The value to set. Must be one of [‘X’, ‘Y’, ‘Z’].

Raises:

RockyApiError – If value is not a valid “Reference Axis” option.

RARelativeVelocityCalculator.GetValidReferenceAxisValues() → list[str]#

Get a list of all possible values for “Reference Axis”.

Returns:

The returned list is [‘X’, ‘Y’, ‘Z’].