本文整理汇总了Python中sympy.physics.mechanics.Point.set_acc方法的典型用法代码示例。如果您正苦于以下问题:Python Point.set_acc方法的具体用法?Python Point.set_acc怎么用?Python Point.set_acc使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类sympy.physics.mechanics.Point
的用法示例。
在下文中一共展示了Point.set_acc方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: RootLink
# 需要导入模块: from sympy.physics.mechanics import Point [as 别名]
# 或者: from sympy.physics.mechanics.Point import set_acc [as 别名]
class RootLink(Link):
"""TODO
"""
def __init__(self, linkage):
super(RootLink, self).__init__(linkage, 'root')
# TODO rename to avoid name conflicts, or inform the user that 'N' is
# taken.
self._frame = ReferenceFrame('N')
self._origin = Point('NO')
self._origin.set_vel(self._frame, 0)
# TODO need to set_acc?
self._origin.set_acc(self._frame, 0)
示例2: symbols
# 需要导入模块: from sympy.physics.mechanics import Point [as 别名]
# 或者: from sympy.physics.mechanics.Point import set_acc [as 别名]
omega_E, omega_M, omega_e, omega_m = symbols('ω_E ω_M ω_e ω_m', positive=True)
symbol_values = {R_SQ: 4.5e5, R_QE: 1.5e11, R_EM: 4.0e8,
R_Ee: 7.0e6, R_Mm: 2.0e6,
omega_E: 2e-7, omega_M: 24e-7,
omega_e: 12e-4, omega_m:10e-4}
# reference frames
S = ReferenceFrame('S')
Q = S.orientnew('Q', 'axis', [0, S.x])
E = Q.orientnew('E', 'axis', [0, S.x])
M = E.orientnew('M', 'axis', [0, S.x])
frames = [S, Q, E, M]
pS = Point('S')
pS.set_acc(S, 0)
pQ = Point('Q')
pQ.set_acc(Q, 0)
pE = Point('E')
pE.set_acc(E, 0)
pM = Point('M')
pM.set_acc(M, 0)
pe = Point('e')
pm = Point('m')
points = [pS, pQ, pE, pM, pe, pm]
# v = ω*R, a = ω**2 * R
pQ.set_acc(S, omega_E**2 * R_SQ * S.x)
pE.set_acc(Q, omega_E**2 * R_QE * S.x)
pM.set_acc(E, omega_M**2 * R_EM * S.x)
pe.set_acc(E, omega_e**2 * R_Ee * S.x)
示例3: symbols
# 需要导入模块: from sympy.physics.mechanics import Point [as 别名]
# 或者: from sympy.physics.mechanics.Point import set_acc [as 别名]
C = B.orientnew('C', 'Axis', [q[1], B.y]) # Enclosure frame
C.set_ang_vel(B, u[1]*B.y)
D = C.orientnew('D', 'Axis', [q[2], C.z]) # Flywheel frame
D.set_ang_vel(C, u[2]*C.z)
Ixx, Iyy, Izz = symbols('Ixx Iyy Izz') # Enclosure inertia scalars
I_enclosure = inertia(C, Ixx, Iyy, Izz) # Inertia tensor of enclosure
IFxx, IFyy, IFzz = symbols('IFxx IFyy IFzz') # Flywheel inertia scalars
I_flywheel = inertia(D, IFxx, IFyy, IFzz) # Inertia tensor of flywheel
O = Point('O') # Mass center, assumed to be
O.set_vel(A, 0) # on gimbal axis so it has zero
O.set_acc(A, 0) # velocity and acceleration
# Define rigid body objects
Enclosure = RigidBody('Enclosure', O, C, 0, (I_enclosure, O))
Flywheel = RigidBody('Flywheel', O, D, 0, (I_flywheel, O))
body_list = [Enclosure, Flywheel]
# List of forces and torques
tau = symbols('tau') # Gimbal torque scalar
torque_force_list = [(O, m*g*A.z), # Gravitational force
(B, -tau*B.y), # Gimbal reaction torque
(C, tau*B.y)] # Gimbal torque
# Form equations of motion
KM = KanesMethod(A, q, u, kindiffs)