question.rb
solution.rb
playground.rb
1 require_relative "../physics" 2 3 question :a_flywheel_s_energy do 4 kind :numerical 5 describes "A cord of negligible mass is wound round the rim of a flywheel of mass %{mass} and radius %{radius}, " \ 6 "at rest on frictionless bearings. A steady pull of %{pull} is applied on the cord until %{unwound} of " \ 7 "cord is unwound. %{energy}, in joules?" 8 given mass: "20 kg" 9 given radius: "20 cm" 10 given pull: "25 N" 11 given unwound: "2 m" 12 asks energy: "What is the kinetic energy of the wheel at this time" 13 end
1 require_relative "../questions/a_flywheel_s_energy" 2 require_relative "../science/systems_of_particles_and_rotational_motion/rotational_dynamics" 3 4 solve :a_flywheel_s_energy , using: RotationalDynamics do 5 objects :flywheel , :cord 6 flywheel . goes ( :turning ) 7 8 take mass: flywheel . mass 9 take radius: flywheel . radius 10 take pull: flywheel . pull ( by: cord ) 11 take unwound: flywheel . cord_unwound 12 13 deduce_from "at rest" , flywheel . initial_angular_velocity => "0 rad/s" 14 15 energy = flywheel . rotational_kinetic_energy ( at: turning . end ) 16 answer energy :, in: "J" 17 18 conclusion "The pull does work equal to the force times the cord it unwinds, and with no friction all " \ 19 "of it becomes the wheel's energy of turning." 20 end
1 require_relative "../solutions/a_flywheel_s_energy" 2 3 play_with :a_flywheel_s_energy do 4 title "A Flywheel's Energy" 5 end