question.rb
solution.rb
playground.rb
1 require_relative "../physics" 2 3 question :the_magnetic_side_of_a_wave do 4 kind :numerical 5 describes "A plane electromagnetic wave of frequency %{frequency} travels in free space along the x-direction. At a " \ 6 "particular point in space and time, its electric field is %{electric} along y. %{magnetic}, in teslas?" 7 given frequency: "25 MHz" 8 given electric: "6.3 V/m" 9 asks magnetic: "What is the magnetic field at this point" 10 end
1 require_relative "../questions/the_magnetic_side_of_a_wave" 2 require_relative "../science/electromagnetic_waves/electromagnetic_wave" 3 4 solve :the_magnetic_side_of_a_wave , using: ElectromagneticWave do 5 objects :wave 6 7 take frequency: wave . frequency 8 take electric: wave . electric_field 9 10 magnetic = wave . magnetic_field 11 answer magnetic :, in: "T" , figures: 2 12 13 conclusion "In a light wave the electric field is always the speed of light times the magnetic field, " \ 14 "whatever the frequency; the magnetic field stands across both the electric field and the motion." 15 end
1 require_relative "../solutions/the_magnetic_side_of_a_wave" 2 3 play_with :the_magnetic_side_of_a_wave do 4 title "The Magnetic Side of a Wave" 5 end