question.rb
solution.rb
playground.rb
1 require_relative "../physics" 2 3 question :under_an_overhead_power_line do 4 kind :numerical 5 describes "A horizontal overhead power line carries a current of %{current} in east to west direction. %{field} " \ 6 "due to the current %{distance} below the line, in teslas?" 7 given current: "90 A" 8 given distance: "1.5 m" 9 asks field: "What is the magnitude of the magnetic field" 10 end
1 require_relative "../questions/under_an_overhead_power_line" 2 require_relative "../science/moving_charges_and_magnetism/magnetic_field_of_currents" 3 4 solve :under_an_overhead_power_line , using: MagneticFieldOfCurrents do 5 objects :line 6 7 take current: line . current 8 take distance: line . distance_from_the_wire 9 10 field = line . field_near_a_wire 11 answer field :, in: "T" , figures: 2 12 13 conclusion "Below a long straight current the field circles the line; by the right-hand rule, with the current " \ 14 "running west, it points south underneath." 15 end
1 require_relative "../solutions/under_an_overhead_power_line" 2 3 play_with :under_an_overhead_power_line do 4 title "Under an Overhead Power Line" 5 end