Source code for symplyphysics.laws.kinematics.vector.acceleration_due_to_non_uniform_rotation
r"""
Acceleration due to non-uniform rotation
========================================
Imagine two reference frames, one of which is fixed (:math:`S`) and the other is moving (:math:`S'`). When :math:`S'` rotates
around :math:`S` in a non-uniform way, the acceleration of some body :math:`B` in :math:`S` has a component corresponding to
that non-uniform rotation of :math:`S'`. It is part of the transfer acceleration of body :math:`B` in :math:`S`.
**Notation:**
#. :math:`\vec a \times \vec b` (:code:`cross(a, b)`) is vector product of :math:`\vec a` and :math:`\vec b`.
**Links:**
#. `Wikipedia <https://ru.wikipedia.org/wiki/%D0%A1%D0%BB%D0%BE%D0%B6%D0%BD%D0%BE%D0%B5_%D0%B4%D0%B2%D0%B8%D0%B6%D0%B5%D0%BD%D0%B8%D0%B5#%D0%A3%D1%81%D0%BA%D0%BE%D1%80%D0%B5%D0%BD%D0%B8%D0%B5>`__.
..
TODO find English link
"""
from sympy import Expr, abc
from symplyphysics import (
units,
angle_type,
validate_input,
validate_output,
Vector,
Quantity,
QuantityVector,
cross_cartesian_vectors,
scale_vector,
)
from symplyphysics.core.vectors.arithmetics import diff_cartesian_vector
@validate_input(
angular_velocity_change_=angle_type / units.time,
time_change_=units.time,
position_vector=units.length,
)
@validate_output(units.acceleration)
def calculate_non_uniform_rotation_acceleration(
angular_velocity_change_: QuantityVector,
time_change_: Quantity,
radius_vector_: QuantityVector,
) -> QuantityVector:
time_ = abc.t
angular_velocity_ = scale_vector(
time_ / time_change_,
angular_velocity_change_.to_base_vector(),
)
result_vector = non_uniform_rotation_acceleration_law(
angular_velocity_,
time_,
radius_vector_.to_base_vector(),
)
return QuantityVector.from_base_vector(result_vector)