play phryzby with physics

A Block on a Spring

solved SpringOscillator

Q. A block whose mass is 1 kgm=1kg is fastened to a spring. The spring has a spring constant of 50 N/mk=50N/m. The block is pulled to a distance x = 10 cmA=10cm from its equilibrium position at x = 0 on a frictionless surface from rest at t = 0. What is the kinetic energy of the block when it is 5 cmx1=5cm away from the mean position, in joules?

−AO+AA = 0.1 mm = 1 kgk = 50 N/mx = 0.05 mK = ?
Inputs
m
1 kg
k
50 N/m
A
10 cm
x1
5 cm
Outputs
energyK1?

How it's solved

Solved with SpringOscillator

Given

  • m=1kg
  • k=50N/m
  • A=10cm
  • x1=5cm

Find K1.

Working
  1. A=10cm=0.1m
  2. x1=5cm=0.05m
  3. energy of an oscillator(block)E=k⋅A22
  4. E=50⋅0.122
  5. E=0.25J
  6. energies at an instant(block, oscillating, 2)U1=k⋅x122
  7. U1=50⋅0.0522
  8. U1=0.0625J
  9. energies at an instant(block, oscillating, 3)E=K1+U1
  10. 0.25=K1+0.0625
  11. K1=0.1875J
  12. K1≈0.19Jto 2 significant figures
Conclusion

The oscillator's energy stays half the spring constant times the amplitude squared; halfway out, the spring holds a quarter of it and the rest is the block's motion.

The web of concepts

given read from the words equation asked

The Ruby that solves it

The question and its solution are small Ruby files. The engine runs them.

question.rb
1require_relative "../physics"23question :a_block_on_a_spring do4  kind :numerical5  describes "A block whose mass is %{mass} is fastened to a spring. The spring has a spring constant of %{constant}. " \6            "The block is pulled to a distance x = %{amplitude} from its equilibrium position at x = 0 on a " \7            "frictionless surface from rest at t = 0. %{energy} when it is %{place} away from the mean position, in " \8            "joules?"9  given mass: "1 kg"10  given constant: "50 N/m"11  given amplitude: "10 cm"12  given place: "5 cm"13  asks energy: "What is the kinetic energy of the block"14end
solution.rb
1require_relative "../questions/a_block_on_a_spring"2require_relative "../science/oscillations/spring_oscillator"34solve :a_block_on_a_spring, using: SpringOscillator do5  objects :block6  axes :x7  block.goes(:oscillating)89  take mass: block.mass10  take constant: block.spring_constant11  take amplitude: block.amplitude12  take place: block.final_position1314  energy = block.kinetic_energy(at: oscillating.end)15  answer energy:, in: "J", figures: 21617  conclusion "The oscillator's energy stays half the spring constant times the amplitude squared; halfway " \18             "out, the spring holds a quarter of it and the rest is the block's motion."19end
playground.rb
1require_relative "../solutions/a_block_on_a_spring"23play_with :a_block_on_a_spring do4  title "A Block on a Spring"5end
The laws it drew on
quantitywrittenunitswithinfrom
piπ—0 … ∞SimpleHarmonicMotion
positionxm—Velocity
displacementΔxm—Velocity
path lengthdm—Velocity
time takenΔts0 … 1e+05Velocity
average velocityvavm/s—Velocity
average speedcavm/s—Velocity
starting positionx0m—Velocity
final positionxm—Velocity
velocityvm/s—Acceleration
change of velocityΔvm/s—Acceleration
average accelerationaavm/s²—Acceleration
starting velocityv0m/s—Acceleration
final velocityvm/s—Acceleration
amplitudeAm0 … ∞SimpleHarmonicMotion
strokesm—SimpleHarmonicMotion
angular frequencyωrad/s0 … ∞SimpleHarmonicMotion
frequencyνHz0 … ∞SimpleHarmonicMotion
phase constantφ——SimpleHarmonicMotion
maximum speedvmaxm/s—SimpleHarmonicMotion
maximum accelerationamaxm/s²—SimpleHarmonicMotion
accelerationam/s²—SimpleHarmonicMotion
massmkg0 … ∞SpringOscillator
spring constantkN/m—SpringOscillator
kinetic energyKJ—SpringOscillator
potential energyUJ—SpringOscillator
total energyEJ—SpringOscillator
displacement of block during oscillating along xΔxm—
position of block at end of oscillating along xx1m—
position of block at start of oscillating along xx0m—
average velocity of block during oscillating along xvavm/s—
time taken of oscillatingΔts0 … 1e+05
average speed of block during oscillatingcavm/s—
path length of block during oscillatingdm—
change of velocity of block during oscillating along xΔvm/s—
velocity of block at end of oscillating from ground along xv1m/s—
velocity of block at start of oscillating from ground along xv0m/s—
average acceleration of block during oscillating along xaavm/s²—
stroke of groundsgm—
amplitude of groundAgm0 … ∞
stroke of blocksm—
amplitude of blockAm0 … ∞
angular frequency of groundωgrad/s0 … ∞
frequency of groundνgHz0 … ∞
angular frequency of blockωrad/s0 … ∞
frequency of blockνHz0 … ∞
maximum speed of groundvmax,gm/s—
maximum speed of blockvmaxm/s—
maximum acceleration of groundamax,gm/s²—
maximum acceleration of blockamaxm/s²—
position of block at end of oscillating|x1|m—
phase constant of blockφ——
velocity of block at end of oscillating from ground|v1|m/s—
acceleration of block at end of oscillating|a1|m/s²—
spring constant of groundkgN/m—
mass of groundmgkg0 … ∞
spring constant of blockkN/m—
mass of blockmkg0 … ∞
total energy of groundEgJ—
total energy of blockEJ—
kinetic energy of block at end of oscillatingK1J—
potential energy of block at end of oscillatingU1J—
x0≡xi(start of motion)
starting position
x≡xi(end of motion)
final position
v0≡vi(start of motion)
starting velocity
v≡vi(end of motion)
final velocity
di(whole)=di(part 1)+di(part 2)
path in parts
Δtw=Δtp+Δtp
time in parts
sb=2⋅Ab
stroke is twice the amplitude
ωb=2⋅π⋅νb
angular frequency is a turn each oscillation
vmax,b=ωb⋅Ab
fastest through the middle
amax,b=ωb2⋅Ab
hardest pulled at the ends
ωb2=kbmb
angular frequency of a mass on a spring
Eb=kb⋅Ab22
energy of an oscillator
Δx=x1-x0
change of position(oscillating, x)
vav=ΔxΔt
displacement a time(oscillating, x)
cav=dΔt
path a time(oscillating, x)
Δv=v1-v0
velocity gained(oscillating, x)
aav=ΔvΔt
velocity gained a time(oscillating, x)
sg=2⋅Ag
stroke is twice the amplitude(ground)
s=2⋅A
stroke is twice the amplitude(block)
ωg=2⋅π⋅νg
angular frequency is a turn each oscillation(ground)
ω=2⋅π⋅ν
angular frequency is a turn each oscillation(block)
vmax,g=ωg⋅Ag
fastest through the middle(ground)
vmax=ω⋅A
fastest through the middle(block)
amax,g=ωg2⋅Ag
hardest pulled at the ends(ground)
amax=ω2⋅A
hardest pulled at the ends(block)
|x1|=A⋅cos⁡(ω⋅Δt+φ)
displacement in shm(block, oscillating)
|v1|=−A⋅ω⋅sin⁡(ω⋅Δt+φ)
velocity in shm(block, oscillating)
|a1|=−ω2⋅|x1|
acceleration in shm(block, oscillating)
A2=x12+(v1ω)2
amplitude from where and how fast(block, oscillating)
ωg2=kgmg
angular frequency of a mass on a spring(ground)
ω2=km
angular frequency of a mass on a spring(block)
Eg=kg⋅Ag22
energy of an oscillator(ground)
E=k⋅A22
energy of an oscillator(block)
K1=m⋅v122
energies at an instant(block, oscillating, 1)
U1=k⋅x122
energies at an instant(block, oscillating, 2)
E=K1+U1
energies at an instant(block, oscillating, 3)