question.rb
solution.rb
playground.rb
1 require_relative "../physics" 2 3 question :a_cut_loop_drawn_out_endwise_for_how_long do 4 kind :numerical 5 describes "A rectangular wire loop of sides 8 cm and 2 cm with a small cut is moving out of a region of uniform " \ 6 "magnetic field of magnitude %{field} directed normal to the loop. The velocity of the loop is " \ 7 "%{speed} in a direction normal to the shorter side of the loop. %{time}, in seconds?" 8 given field: "0.3 T" 9 given speed: "1 cm/s" 10 asks time: "For how long does the induced voltage last" 11 end
1 require_relative "../questions/a_cut_loop_drawn_out_endwise_for_how_long" 2 require_relative "../science/electromagnetic_induction/faradays_law" 3 4 solve :a_cut_loop_drawn_out_endwise_for_how_long , using: FaradaysLaw do 5 objects :rectangle 6 rectangle . goes ( :leaving ) 7 8 take field: rectangle . magnetic_field ( at: leaving . start ) 9 take speed: rectangle . average_speed ( during: leaving ) 10 11 deduce_from "sides 8 cm and 2 cm" , rectangle . area => "16 cm2" 12 deduce_from "A rectangular wire loop" , rectangle . turns => "1" 13 deduce_from "directed normal to the loop" , rectangle . angle_to_the_field ( at: leaving . start ) => "0 deg" , 14 rectangle . angle_to_the_field ( at: leaving . end ) => "0 deg" 15 deduce_from "moving out of a region" , rectangle . magnetic_field ( at: leaving . end ) => "0 T" 16 deduce_from "normal to the shorter side" , rectangle . path_length ( during: leaving ) => "8 cm" 17 18 time = leaving . time_taken 19 answer time :, in: "s" , figures: 2 20 21 conclusion "The emf lasts only while some of the loop is still in the field and the flux through it is " \ 22 "changing, the time the loop takes to cross its own width." 23 end
1 require_relative "../solutions/a_cut_loop_drawn_out_endwise_for_how_long" 2 3 play_with :a_cut_loop_drawn_out_endwise_for_how_long do 4 title "A Cut Loop Drawn Out Endwise for How Long" 5 end