question.rb
solution.rb
playground.rb
1 require_relative "../physics" 2 3 question :a_nitrogen_molecule_s_free_path do 4 kind :numerical 5 describes "Take the radius of a nitrogen molecule to be roughly %{radius}. %{path} of a nitrogen molecule in a " \ 6 "cylinder containing nitrogen at %{pressure} and temperature 17 °C, in metres?" 7 given radius: "1.0 Å" 8 given pressure: "2.0 atm" 9 asks path: "Estimate the mean free path" 10 end
1 require_relative "../questions/a_nitrogen_molecule_s_free_path" 2 require_relative "../science/kinetic_theory/mean_free_path" 3 4 solve :a_nitrogen_molecule_s_free_path , using: MeanFreePath do 5 objects :nitrogen 6 7 take radius: nitrogen . molecular_radius 8 take pressure: nitrogen . pressure 9 10 deduce_from "temperature 17 °C" , nitrogen . temperature => "290 K" 11 12 path = nitrogen . mean_free_path 13 answer path :, in: "m" , figures: 2 14 15 conclusion "A molecule sweeps out a cylinder as wide as two molecules and hits whatever lies in it, so the more " \ 16 "crowded the gas and the bigger the molecules, the shorter it runs free." 17 end
1 require_relative "../solutions/a_nitrogen_molecule_s_free_path" 2 3 play_with :a_nitrogen_molecule_s_free_path do 4 title "A Nitrogen Molecule's Free Path" 5 end