question.rb
solution.rb
playground.rb
1 require_relative "../physics" 2 3 question :an_iron_core_s_magnetisation 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}, %{magnetisation}, in A/m?" 8 given permeability: "400" 9 given current: "2 A" 10 given turns: "1000 m-1" 11 asks magnetisation: "what is the magnetisation M of the core" 12 end
1 require_relative "../questions/an_iron_core_s_magnetisation" 2 require_relative "../science/magnetism_and_matter/magnetisation" 3 4 solve :an_iron_core_s_magnetisation , 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 magnetisation = core . magnetisation 12 answer magnetisation :, in: "A/m" , figures: 2 13 14 conclusion "The core's own atomic magnets line up with H and add far more magnetisation than the windings make alone." 15 end
1 require_relative "../solutions/an_iron_core_s_magnetisation" 2 3 play_with :an_iron_core_s_magnetisation do 4 title "An Iron Core's Magnetisation" 5 end