question.rb
solution.rb
playground.rb
1 require_relative "../physics" 2 3 question :a_cut_loop_drawn_out_endwise 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. %{emf}, in volts?" 8 given field: "0.3 T" 9 given speed: "1 cm/s" 10 asks emf: "What is the emf developed across the cut" 11 end
1 require_relative "../questions/a_cut_loop_drawn_out_endwise" 2 require_relative "../science/electromagnetic_induction/faradays_law" 3 4 solve :a_cut_loop_drawn_out_endwise , 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 emf = rectangle . induced_emf ( during: leaving ) 19 answer emf :, in: "V" , figures: 2 20 21 conclusion "The flux through the loop falls steadily as it slides out, so the emf across the cut is the " \ 22 "whole flux shared over the time the loop takes to leave." 23 end
1 require_relative "../solutions/a_cut_loop_drawn_out_endwise" 2 3 play_with :a_cut_loop_drawn_out_endwise do 4 title "A Cut Loop Drawn Out Endwise" 5 end