question.rb
solution.rb
playground.rb
1 require_relative "../physics" 2 3 question :a_coil_turned_over do 4 kind :numerical 5 describes "A circular coil of radius 10 cm, %{turns} turns and resistance %{resistance} is placed with its plane " \ 6 "perpendicular to the horizontal component of the earth's magnetic field. It is rotated about its " \ 7 "vertical diameter through 180° in %{time}. The horizontal component of the earth's magnetic field at " \ 8 "the place is %{field}. %{emf}, in volts?" 9 given turns: "500" 10 given resistance: "2 Ω" 11 given time: "0.25 s" 12 given field: "3.0e-5 T" 13 asks emf: "What is the magnitude of the emf induced in the coil" 14 end
1 require_relative "../questions/a_coil_turned_over" 2 require_relative "../science/electromagnetic_induction/faradays_law" 3 4 solve :a_coil_turned_over , using: FaradaysLaw do 5 objects :coil 6 coil . goes ( :turning ) 7 8 take turns: coil . turns 9 take resistance: coil . resistance 10 take time: turning . time_taken 11 take field: coil . magnetic_field ( at: turning . start ) 12 13 deduce_from "A circular coil of radius 10 cm" , coil . area => "0.0314159 m2" 14 deduce_from "plane perpendicular to the horizontal component" , coil . angle_to_the_field ( at: turning . start ) => "0 deg" 15 deduce_from "through 180°" , coil . angle_to_the_field ( at: turning . end ) => "180 deg" , 16 coil . magnetic_field ( at: turning . end ) => coil . magnetic_field ( at: turning . start ) 17 18 emf = coil . induced_emf ( during: turning ) 19 answer emf :, in: "V" , figures: 2 20 21 conclusion "Turning the coil over reverses the flux through it, so the change is twice the flux, shared " \ 22 "over every turn of the coil." 23 end
1 require_relative "../solutions/a_coil_turned_over" 2 3 play_with :a_coil_turned_over do 4 title "A Coil Turned Over" 5 end