RAPendulum#

class ansys.rocky.app.motion.ra_pendulum.RAPendulum(id: str, model_id: str | None = None)#

Bases: ansys.rocky.app.api_element_item.ApiElementItem

Rocky PrePost Scripting wrapper representing a Pendulum motion.

Retrieve this specific wrapper after setting the correct motion type on a RAMotion. For example:

motions = motion_frame.GetMotions()
motion_1 = motions.New()
motion_1.SetType('Pendulum')
pendulum = motion_1.GetTypeObject()

Overview#

GetAmplitudeVariation

Get the value of “Amplitude Variation”.

SetAmplitudeVariation

Set the value of “Amplitude Variation”.

GetInitialAmplitude

Get the value of “Initial Amplitude”.

SetInitialAmplitude

Set the value of “Initial Amplitude”.

GetInitialPhase

Get the value of “Initial Phase”.

SetInitialPhase

Set the value of “Initial Phase”.

GetDirection

Get the value of “Direction”.

SetDirection

Set the values of “Direction”.

GetFrequencyVariation

Get the value of “Frequency Variation”.

SetFrequencyVariation

Set the value of “Frequency Variation”.

GetInitialFrequency

Get the value of “Initial Frequency”.

SetInitialFrequency

Set the value of “Initial Frequency”.

Import detail#

from ansys.rocky.app.motion.ra_pendulum import RAPendulum

Method detail#

classmethod RAPendulum.GetWrappedClass()#
classmethod RAPendulum.GetClassName()#
RAPendulum.GetAmplitudeVariation(unit: str | None = None) float#

Get the value of “Amplitude Variation”.

Parameters:

unit – The unit for the returned value. If no unit is provided, the returned value will be in “rad/s”.

RAPendulum.SetAmplitudeVariation(value: str | float, unit: str | None = None) None#

Set the value of “Amplitude Variation”.

Parameters:
  • value – The value to set. This value can be an expression with input variables or float type.

  • unit – The unit for value. If no unit is provided, value is assumed to be in “rad/s”.

RAPendulum.GetInitialAmplitude(unit: str | None = None) float#

Get the value of “Initial Amplitude”.

Parameters:

unit – The unit for the returned value. If no unit is provided, the returned value will be in “rad”.

RAPendulum.SetInitialAmplitude(value: str | float, unit: str | None = None) None#

Set the value of “Initial Amplitude”.

Parameters:
  • value – The value to set. This value can be an expression with input variables or float type.

  • unit – The unit for value. If no unit is provided, value is assumed to be in “rad”.

RAPendulum.GetInitialPhase(unit: str | None = None) float#

Get the value of “Initial Phase”.

Parameters:

unit – The unit for the returned value. If no unit is provided, the returned value will be in “rad”.

RAPendulum.SetInitialPhase(value: str | float, unit: str | None = None) None#

Set the value of “Initial Phase”.

Parameters:
  • value – The value to set. This value can be an expression with input variables or float type.

  • unit – The unit for value. If no unit is provided, value is assumed to be in “rad”.

RAPendulum.GetDirection() list[float]#

Get the value of “Direction”.

RAPendulum.SetDirection(values: list[str | float]) None#

Set the values of “Direction”.

Parameters:

values – The values to set. The values can be heterogeneous, the element of values can be an expression with input variables or a float. Must have exactly 3 elements.

Raises:

RockyApiError – If values doesn’t have exactly 3 elements.

RAPendulum.GetFrequencyVariation(unit: str | None = None) float#

Get the value of “Frequency Variation”.

Parameters:

unit – The unit for the returned value. If no unit is provided, the returned value will be in “Hz/s”.

RAPendulum.SetFrequencyVariation(value: str | float, unit: str | None = None) None#

Set the value of “Frequency Variation”.

Parameters:
  • value – The value to set. This value can be an expression with input variables or float type.

  • unit – The unit for value. If no unit is provided, value is assumed to be in “Hz/s”.

RAPendulum.GetInitialFrequency(unit: str | None = None) float#

Get the value of “Initial Frequency”.

Parameters:

unit – The unit for the returned value. If no unit is provided, the returned value will be in “Hz”.

RAPendulum.SetInitialFrequency(value: str | float, unit: str | None = None) None#

Set the value of “Initial Frequency”.

Parameters:
  • value – The value to set. This value can be an expression with input variables or float type.

  • unit – The unit for value. If no unit is provided, value is assumed to be in “Hz”.