Mass Derailed

There are two masses of mass m m . They are connected by a spring of force constant k k and natural length L 0 L_0 .

Particle 1 is confined to move solely on the y-axis and particle 2 is confined to move solely on the x-axis.

At time t = 0 t = 0 , particle 1 starts at rest ( x 1 , y 1 ) = ( 0 , 1 ) (x_1,y_1) = (0,1) , and particle 2 starts at rest ( x 2 , y 2 ) = ( 1 , 0 ) (x_2,y_2) = (1,0) . As soon as the x-coordinate of particle 2 becomes zero for the first time, the rails confining particle 2 to the x-axis cease to exist (Turns out that the rails for particle 2 exist only along the positive x-direction). The goal of this question is to compute the y-coordinate of particle 2 one second after its x-coordinate is zero for the first time.

Note that ( x 1 , y 1 ) (x_1,y_1) and ( x 2 , y 2 ) (x_2,y_2) vary over time but their initial values are given in the problem statement.

Details and Assumptions:

  • m = 1 m = 1

  • k = 10 k = 10

  • L 0 = 2 L_0 = \sqrt{2}

  • Gravitational acceleration g = 10 g = 10 in the negative y direction.

Inspiration - Solving the mentioned problem will bring you a step closer to the answer.


The answer is -7.39966.

This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try refreshing the page, (b) enabling javascript if it is disabled on your browser and, finally, (c) loading the non-javascript version of this page . We're sorry about the hassle.

1 solution

Steven Chase
Nov 3, 2019

I used a Newtonian (force) approach for this. The implementation was quite general, so I just needed to "flip a switch" in the code to accommodate this case. I have attached a plot of the various positions over time.

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
import math

# Constants

m = 1.0
k = 10.0
L0 = math.sqrt(2.0)

g = 10.0

dt = 10.0**(-5.0)

########################

# Initialize pos,vel,acc
x1 = 0.0
y1 = 1.0

x2 = 1.0
y2 = 0.0

x1d = 0.0
y1d = 0.0

x2d = 0.0
y2d = 0.0

x1dd = 0.0
y1dd = 0.0

x2dd = 0.0
y2dd = 0.0

########################

print "t x1 y1 x2 y2"

# Simulation until x2 = 0

t = 0.0

count = 0

while x2 >= 0.0:

    x1 = x1 + x1d * dt  # Numerical integration
    y1 = y1 + y1d * dt

    x2 = x2 + x2d * dt
    y2 = y2 + y2d * dt

    x1d = x1d + x1dd * dt
    y1d = y1d + y1dd * dt

    x2d = x2d + x2dd * dt
    y2d = y2d + y2dd * dt

    ##########

    Lx = x2 - x1
    Ly = y2 - y1

    L = math.hypot(Lx,Ly)

    ux = Lx/L
    uy = Ly/L

    Fsmag = k*(L-L0)

    Fs1x = Fsmag * ux
    Fs1y = Fsmag * uy

    Fs2x = -Fs1x
    Fs2y = -Fs1y

    ##########

    Fgx = 0.0
    Fgy = -m*g

    ##########

    F1x = Fs1x + Fgx
    F1y = Fs1y + Fgy

    F2x = Fs2x + Fgx
    F2y = Fs2y + Fgy

    ##########

    x1dd = (F1x / m)*0.0   # Rail constraints
    y1dd = (F1y / m)        # Both rail constraints active initially

    x2dd = (F2x / m)
    y2dd = (F2y / m)*0.0

    t = t + dt
    count = count + 1

    if count % 1000 == 0:
        print t,x1,y1,x2,y2

########################

# First set of results

#print ""
#print ""
#print dt
#print t
#print x1,y1
#print x2,y2
#print ""
#print ""

#1e-05
#1.49225
#0.0 -4.32652205654
#-5.29602508791e-06 0.0

tref = t     # reference time

########################

# Simulation for another second

while t <= (tref + 1.0):

    x1 = x1 + x1d * dt
    y1 = y1 + y1d * dt

    x2 = x2 + x2d * dt
    y2 = y2 + y2d * dt

    x1d = x1d + x1dd * dt
    y1d = y1d + y1dd * dt

    x2d = x2d + x2dd * dt
    y2d = y2d + y2dd * dt

    ##########

    Lx = x2 - x1
    Ly = y2 - y1

    L = math.hypot(Lx,Ly)

    ux = Lx/L
    uy = Ly/L

    Fsmag = k*(L-L0)

    Fs1x = Fsmag * ux
    Fs1y = Fsmag * uy

    Fs2x = -Fs1x
    Fs2y = -Fs1y

    ##########

    Fgx = 0.0
    Fgy = -m*g

    ##########

    F1x = Fs1x + Fgx
    F1y = Fs1y + Fgy

    F2x = Fs2x + Fgx
    F2y = Fs2y + Fgy

    ##########

    x1dd = (F1x / m)*0.0
    y1dd = (F1y / m)

    x2dd = (F2x / m)
    y2dd = (F2y / m)*1.0   # Rail constraints removed for particle 2

    t = t + dt
    count = count + 1

    if count % 1000 == 0:
        print t,x1,y1,x2,y2

########################

# Second set of results

#print ""
#print ""
#print dt
#print t
#print x1,y1
#print x2,y2
#print ""
#print ""

#1e-05
#2.49225000001
#0.0 -3.90356699196
#-1.60860063883 -7.3993989347

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...