question.rb
solution.rb
playground.rb
1 require_relative "../physics" 2 3 question :just_outside_a_charged_sphere do 4 kind :numerical 5 describes "A spherical conductor of radius %{radius} has a charge of %{charge} distributed uniformly on its " \ 6 "surface. %{field} just outside the sphere, in N/C?" 7 given radius: "12 cm" 8 given charge: "1.6e-7 C" 9 asks field: "What is the electric field" 10 end
1 require_relative "../questions/just_outside_a_charged_sphere" 2 require_relative "../science/electric_charges_and_fields/electric_field" 3 4 solve :just_outside_a_charged_sphere , using: ElectricField do 5 objects :sphere , :point 6 7 take radius: point . separation ( from: sphere ) 8 take charge: sphere . charge 9 10 field = point . field_of_a_charge ( by: sphere ) 11 answer field :, in: "N/C" , figures: 2 12 13 conclusion "Outside a uniformly charged sphere the field is as if all the charge sat at its centre, so just " \ 14 "outside it is that of a point charge a radius away." 15 end
1 require_relative "../solutions/just_outside_a_charged_sphere" 2 3 play_with :just_outside_a_charged_sphere do 4 title "Just Outside a Charged Sphere" 5 end