Solving rolling disk inside another using symbolic computation

by Nasser M. Abbasi. April 20, 2011

Needs["Notation`"]

Symbolize[(NotationTemplateTag[(Subscript[m, 1])])]
Symbolize[(NotationTemplateTag[(Subscript[m, 2])])]
Symbolize[(NotationTemplateTag[(Subscript[I, 1])])]
Symbolize[(NotationTemplateTag[(Subscript[I, 2])])]

Solve for ω to meet the no-slip condition

Clear["Global`*"]
noSlipEquation=(R-r)θ'[t]==R ϕ'[t]+r ω;
ω=ω/.First@Solve[noSlipEquation,ω]

Find T and V and find the Lagrangian

T=(1/2)(Subscript[m, 1])(((R ϕ'[t]))^2)+(1/2)(Subscript[I, 1]) ((ϕ'[t])^2)+(1/2)(Subscript[m, 2])((((R ϕ'[t]-(R-r)θ'[t] Cos[θ[t]]))^2)+((((R-r)θ'[t]Sin[θ[t]]))^2))+(1/2)(Subscript[I, 2]) (ω^2)

V=-(Subscript[m, 2]) g(R-r)Cos[θ[t]]

L=(T-V)//FullSimplify

Solve for ϕ’’[t]. Note the generalized force is zero

equationOfMotion1=D[D[L,ϕ'[t]],t]-D[L,ϕ[t]]==0//Simplify

Solve for θ’’[t] . Note the generalized force is zero

equationOfMotion2=D[D[L,θ'[t]],t]-D[L,θ[t]]==0//Simplify

Define problem parameters

parms={g->9.81,R->1,r->0.1,(Subscript[m, 1])->10,(Subscript[m, 2])->1};
parms=Union[parms,{(Subscript[I, 1])->(((Subscript[m, 1]) (R^2))/2),(Subscript[I, 2])->(((Subscript[m, 2]) (r^2))/2)}/.parms]

Numerically solve the equations of motion using some initial conditions

s=NDSolve[{equationOfMotion1,equationOfMotion2,ϕ[0]==30 Degree,ϕ'[0]==-2,θ[0]==0,θ'[0]==-2}/.parms,{ϕ[t],θ[t]},{t,0,30}]

Plot the solution, motion of small disk. We see the small disk makes an oscillatio9n motion inside the large disk as the large disk is rotating

Plot[Evaluate[θ[t]/.s],{t,0,30},PlotRange->All,Frame->True,FrameLabel->{{"θ[t]",None},{"time (sec)","The solution θ[t] of small disk"}},FrameTicks->{Automatic,{-30 Degree,-15 Degree,15 Degree,30 Degree}}]