#NEWLINE# def test_specifying_coordinate_issue_339( ) : #NEWLINE# #INDENT# 'This test ensures that you can use derivatives as specified values.' #NEWLINE# beta = me . dynamicsymbols ( 'beta' ) #NEWLINE# ( q1 , q2 , q3 , q4 ) = me . dynamicsymbols ( 'q1, q2, q3, q4' ) #NEWLINE# ( u1 , u2 , u3 , u4 ) = me . dynamicsymbols ( 'u1, u2, u3, u4' ) #NEWLINE# N = me . ReferenceFrame ( 'N' ) #NEWLINE# A = N . orientnew ( 'A' , 'Axis' , ( q1 , N . x ) ) #NEWLINE# B = A . orientnew ( 'B' , 'Axis' , ( beta , A . y ) ) #NEWLINE# No = me . Point ( 'No' ) #NEWLINE# Ao = No . locatenew ( 'Ao' , ( ( ( q2 * N . x ) + ( q3 * N . y ) ) + ( q4 * N . z ) ) ) #NEWLINE# Bo = Ao . locatenew ( 'Bo' , ( ( ( 10 * A . x ) + ( 10 * A . y ) ) + ( 10 * A . z ) ) ) #NEWLINE# A . set_ang_vel ( N , ( u1 * N . x ) ) #NEWLINE# B . ang_vel_in ( bodies ) #NEWLINE# No . set_vel ( N , 0 ) #NEWLINE# Ao . set_vel ( N , ( ( ( u2 * N . x ) + ( u3 * N . y ) ) + ( u4 * N . z ) ) ) #NEWLINE# Bo . v2pt_theory ( Ao , N , B ) #NEWLINE# body_A = me . RigidBody ( 'A' , Ao , A , 1.0 , ( me . inertia ( A , 1 , 2 , 3 ) , Ao ) ) #NEWLINE# body_B = me . RigidBody ( 'B' , Bo , B , 1.0 , ( me . inertia ( A , 3 , 2 , 1 ) , Bo ) ) #NEWLINE# bodies = [ body_A , body_B ] #NEWLINE# loads = [ ( No , ( 0 * N . x ) ) ] #NEWLINE# kdes = [ ( u1 - q1 . diff ( ) ) , ( u2 - q2 . diff ( ) ) , ( u3 - q3 . diff ( ) ) , ( u4 - q4 . diff ( ) ) ] #NEWLINE# kane = me . KanesMethod ( N , q_ind = [ q1 , q2 , q3 , q4 ] , u_ind = [ u1 , u2 , u3 , u4 ] , kd_eqs = kdes ) #NEWLINE# ( fr , frstar ) = kane . kanes_equations ( loads , bodies ) #NEWLINE# sys = System ( kane ) #NEWLINE# sys . specifieds = { #NEWLINE# #INDENT# ( beta , beta . diff ( ) , beta . diff ( ) . diff ( ) ) : ( lambda x , t : np . array ( [ 1.0 , 1.0 , 1.0 ] ) ) , #NEWLINE# #UNINDENT# } #NEWLINE# sys . times = np . linspace ( 0 , 10 , 20 ) #NEWLINE# sys . integrate ( )