question.rb
solution.rb
playground.rb
1 require_relative "../physics" 2 3 question :the_electric_side_of_a_wave do 4 kind :numerical 5 describes "The amplitude of the magnetic field part of a harmonic electromagnetic wave in vacuum is B₀ = " \ 6 "%{magnetic}. %{electric}, in V/m?" 7 given magnetic: "510 nT" 8 asks electric: "What is the amplitude of the electric field part of the wave" 9 end
1 require_relative "../questions/the_electric_side_of_a_wave" 2 require_relative "../science/electromagnetic_waves/electromagnetic_wave" 3 4 solve :the_electric_side_of_a_wave , using: ElectromagneticWave do 5 objects :wave 6 7 take magnetic: wave . magnetic_field 8 9 electric = wave . electric_field 10 answer electric :, in: "V/m" , figures: 3 11 12 conclusion "In a light wave the electric field is the speed of light times the magnetic field, so a field " \ 13 "of a fraction of a microtesla goes with an electric field of a hundred or so volts a metre." 14 end
1 require_relative "../solutions/the_electric_side_of_a_wave" 2 3 play_with :the_electric_side_of_a_wave do 4 title "The Electric Side of a Wave" 5 end