dynamics of a rotating body: Lagrange's method
> restart: libname := libname, "C:/MBSymba": with(MBSymba_r6):
> PDEtools[declare]([theta(t)],prime=t,quiet):
> use_moving_frame(0,0,0,0,Omega,0):
Warning, The base frame <moving_frame> has been selected.
Define the body frame
> BF := rotate('Z',theta(t)) ;
Define the body
> rotating_body := make_BODY(BF,m,Ix,Iy,Iz): show(rotating_body);
kinetic energy
> KE := collect(kinetic_energy(rotating_body),Omega);
> eqnNL := lagrange(KE,theta(t),t);
> KE2 := taylorF(KE,[theta(t),diff(theta(t),t)],3);
> eqnL := lagrange(KE2,theta(t),t);
ynamics of a rotating body: fully-linear Newton's method
> restart: libname := libname, "C:/MBSymba": with(MBSymba_r6):
> use_moving_frame(0,0,0,0,Omega,0):
Warning, The base frame <moving_frame> has been selected.
> PDEtools[declare]([theta(t)],prime=t,quiet):
linear_modeling({theta(t)});
Warning, Linear Modeling option has been choosen for the following variables:
Define the body frame
> BF := rotate('Z',theta(t)) ;
Define the body
> rotating_body := make_BODY(BF,m,Ix,Iy,Iz): show(rotating_body);
constraint torque
> MG := make_TORQUE( make_VECTOR(moving_frame,Mx,My,0), rotating_body): show(MG);
Dynamic equations
> eqnE := euler_equations({rotating_body,MG},CoM(rotating_body)):
eqnE[comps] := collect(eqnE[comps],Omega):
show(eqnE);
>