RALinearTimeVariableMoment#

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

Bases: ansys.rocky.app.api_element_item.ApiElementItem

Rocky PrePost Scripting wrapper representing an Linear Time Variable Moment 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('Linear Time Variable Moment')
additional_force = motion_1.GetTypeObject()

Overview#

GetInitialMomentValue

Get the value of “Initial Moment Value”.

SetInitialMomentValue

Set the values of “Initial Moment Value”.

GetTimeCoefficients

Get the value of “Time Coefficients”.

SetTimeCoefficients

Set the values of “Time Coefficients”.

Import detail#

from ansys.rocky.app.motion.ra_linear_time_variable_moment import RALinearTimeVariableMoment

Method detail#

classmethod RALinearTimeVariableMoment.GetWrappedClass()#
classmethod RALinearTimeVariableMoment.GetClassName()#
RALinearTimeVariableMoment.GetInitialMomentValue(unit: str | None = None) list[float]#

Get the value of “Initial Moment Value”.

Parameters:

unit – The unit for the returned values. If no unit is provided, the returned values will be in “N.m”.

RALinearTimeVariableMoment.SetInitialMomentValue(values: collections.abc.Sequence[str | float], unit: str | None = None) None#

Set the values of “Initial Moment Value”.

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.

  • unit – The unit for values. If no unit is provided, values is assumed to be in “N.m”.

Raises:

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

RALinearTimeVariableMoment.GetTimeCoefficients(unit: str | None = None) list[float]#

Get the value of “Time Coefficients”.

Parameters:

unit – The unit for the returned values. If no unit is provided, the returned values will be in “N.m/s”.

RALinearTimeVariableMoment.SetTimeCoefficients(values: collections.abc.Sequence[str | float], unit: str | None = None) None#

Set the values of “Time Coefficients”.

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.

  • unit – The unit for values. If no unit is provided, values is assumed to be in “N.m/s”.

Raises:

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