play phryzby with physics

A Metre-Long Pendulum

solved DimensionalAnalysis

Q. A pendulum 1 ml=1m long swings on the Earth, where g is 9.81 m/s²g=9.81m/s². How long does one swing there and back take, in seconds?

length1 m[L]gravity9.81 m/s²[L T⁻²]period?[T]Dimensional Analysis
Inputs
l
1.00 m
g
9.81 m/s²
Outputs
periodT?

How it's solved

Solved with DimensionalAnalysis

Given

  • l=1m
  • g=9.81m/s²
  • k=2⋅π from “assumed”

Assumed

  • m=1kg

Find T.

Working
  1. assumedconstant=2⋅π
  2. constant=2⋅3.14159265
  3. k=6.28318531
  4. matching time-2⋅y=1
  5. y=−0.5
  6. matching lengthx+y=0
  7. x+(−0.5)=0
  8. x=0.5
  9. matching massz=0
  10. z=0
  11. period as powersT=k⋅lx⋅gy⋅mz
  12. T=6.28318531⋅10.5⋅9.81(−0.5)⋅10
  13. T=2.01 s
Conclusion

The period grows as the square root of the length and shrinks as the square root of the pull, and the mass never enters.

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_metre_long_pendulum do4  kind :numerical5  describes "A pendulum %{length} long swings on the Earth, where g is %{gravity}. %{period}, in seconds?"6  given length: "1 m"7  given gravity: "9.81 m/s2"8  asks period: "How long does one swing there and back take"9end
solution.rb
1require_relative "../questions/a_metre_long_pendulum"2require_relative "../science/units_and_measurement/dimensional_analysis"34solve :a_metre_long_pendulum, using: DimensionalAnalysis do5  take length: :l, gravity: :g6  assume m: "1 kg"7  assume k: 2 * pi8  take period: :T9  answer find_value(:period, in: "s")1011  conclusion "The period grows as the square root of the length and shrinks as the square root of " \12             "the pull, and the mass never enters."13end
playground.rb
1require_relative "../solutions/a_metre_long_pendulum"23play_with :a_metre_long_pendulum do4  title "A Metre-Long Pendulum"5end
The laws it drew on
quantitywrittenunitswithinfrom
piπ—0 … ∞DimensionalAnalysis
speed of lightcm/s—DimensionalAnalysis
lengthlm—DimensionalAnalysis
gravitygm/s²—DimensionalAnalysis
massmkg—DimensionalAnalysis
periodTs—DimensionalAnalysis
constantk——DimensionalAnalysis
power of lengthx——DimensionalAnalysis
power of gravityy——DimensionalAnalysis
power of massz——DimensionalAnalysis
speedvm/s0 … ∞DimensionalAnalysis
heighthm—DimensionalAnalysis
timets0 … ∞DimensionalAnalysis
accelerationam/s²—DimensionalAnalysis
starts0m—DimensionalAnalysis
starting speedv0m/s—DimensionalAnalysis
distancesm—DimensionalAnalysis
rest massm0kg—DimensionalAnalysis
kinetic energyKJ—DimensionalAnalysis
T=k⋅lx⋅gy⋅mz
period as powers
x+y=0
matching length
-2⋅y=1
matching time
z=0
matching mass
m⋅v22=m⋅g⋅h
energy conserved
s=s0+v0⋅t+a⋅t22
distance under constant acceleration
constant=2⋅π
assumed