question.rb
solution.rb
playground.rb
1 require_relative "../physics" 2 3 question :doping_silicon_with_arsenic do 4 kind :numerical 5 describes "Suppose a pure Si crystal has %{atoms} atoms. It is doped by %{doping} concentration of pentavalent As. " \ 6 "Given that the intrinsic carrier concentration is %{intrinsic}, %{holes}, per cubic metre?" 7 given atoms: "5e28 m-3" 8 given doping: "1e-6" 9 given intrinsic: "1.5e16 m-3" 10 asks holes: "how many holes are there" 11 end
1 require_relative "../questions/doping_silicon_with_arsenic" 2 require_relative "../science/semiconductor_electronics_materials_devices_and_simple_circuits/doped_semiconductor" 3 4 solve :doping_silicon_with_arsenic , using: DopedSemiconductor do 5 objects :crystal 6 7 take atoms: crystal . atoms 8 take doping: crystal . doping 9 take intrinsic: n_i 10 11 holes = crystal . holes 12 answer holes :, in: "m-3" , figures: 2 13 14 conclusion "Each arsenic atom gives an electron, swamping the crystal's own; electrons and holes keep their " \ 15 "product fixed, so the holes almost vanish." 16 end
1 require_relative "../solutions/doping_silicon_with_arsenic" 2 3 play_with :doping_silicon_with_arsenic do 4 title "Doping Silicon with Arsenic" 5 end