question.rb
solution.rb
playground.rb
1 require_relative "../physics" 2 3 question :an_iron_core_s_magnetising_current do 4 kind :numerical 5 describes "A solenoid has a core of a material with relative permeability %{permeability}. The windings of the " \ 6 "solenoid are insulated from the core and carry a current of %{current}. If the number of turns is " \ 7 "%{turns}, %{current_needed}, in amperes?" 8 given permeability: "400" 9 given current: "2 A" 10 given turns: "1000 m-1" 11 asks current_needed: "what is the magnetising current, the extra current that would give the same field without the core" 12 end
1 require_relative "../questions/an_iron_core_s_magnetising_current" 2 require_relative "../science/magnetism_and_matter/magnetisation" 3 4 solve :an_iron_core_s_magnetising_current , using: Magnetisation do 5 objects :core 6 7 take permeability: core . relative_permeability 8 take current: core . current 9 take turns: core . turns_per_length 10 11 current_needed = core . magnetising_current 12 answer current_needed :, in: "A" , figures: 3 13 14 conclusion "Without the core the windings would need hundreds of amperes more to make the same field; the core's atoms supply it." 15 end
1 require_relative "../solutions/an_iron_core_s_magnetising_current" 2 3 play_with :an_iron_core_s_magnetising_current do 4 title "An Iron Core's Magnetising Current" 5 end