question.rb
solution.rb
playground.rb
1 require_relative "../physics" 2 3 question :the_fastest_whirl do 4 kind :numerical 5 describes "A stone of mass %{mass} tied to the end of a string is whirled round in a circle of radius %{radius} " \ 6 "in a horizontal plane. %{speed} if the string can withstand a maximum tension of %{tension}, in m/s?" 7 given mass: "0.25 kg" 8 given radius: "1.5 m" 9 given tension: "200 N" 10 asks speed: "What is the maximum speed with which the stone can be whirled around" 11 end
1 require_relative "../questions/the_fastest_whirl" 2 require_relative "../science/motion_in_a_plane/uniform_circular_motion" 3 4 solve :the_fastest_whirl , using: UniformCircularMotion do 5 objects :stone 6 paths :circle 7 stone . goes ( :round , on: circle ) 8 take mass: stone . mass , radius: circle . radius , tension: stone . centripetal_force 9 speed = stone . speed 10 answer speed :, in: "m/s" , figures: 2 11 conclusion "The faster the stone goes, the harder the string must pull to turn it, so the strongest pull " \ 12 "the string can give sets the fastest it can go." 13 end
1 require_relative "../solutions/the_fastest_whirl" 2 3 play_with :the_fastest_whirl do 4 title "The Fastest Whirl" 5 end