题目
轻弹簧一端悬挂在水平光滑轴$O$上,另一端固定一可视为质点的小球,静止时弹簧的长度为$L$,现突然给小球一水平速度$v_0=2gL$($g$为重力加速度的大小),则在小球向上运动的过程中:()
A.弹簧的最大长度大于$L$
B.小球到达的最高点高于$O$点
C.小球到达的最高点与$O$点等高
D.小球到达最高点时弹簧弹力为0
程序演示
程序源码
from vpython import *
m=0.5
k=10
dt=0.001
t=0
g=vec(0,-9.8,0)
scene=canvas(width=500,height=500,background=vec(0.5,0.6,0.5))
ceiling=box(pos=vec(0,1,0),length=3,height=0.01,width=1)
ball=sphere(pos=vec(0,0.05,0),radius=0.1,color=color.red,v=vec(2,0,0),make_trail=True)
spring=helix(radius=0.06,coils=15,thickness=0.03)
spring.pos=ceiling.pos
spring.axis=ball.pos-spring.pos
spring.L=spring.length
while True:
rate(1000)
a=-(k*(spring.length-spring.L)/m)*spring.axis.norm()+g
ball.v=ball.v+a*dt
ball.pos=ball.pos+ball.v*dt
spring.axis=ball.pos-spring.pos
评论 (0)