question.rb
solution.rb
playground.rb
1 require_relative "../physics" 2 3 question :argon_and_chlorine_in_a_flask do 4 kind :numerical 5 describes "A flask contains argon and chlorine in the ratio of 2:1 by mass. The temperature of the mixture is 27 °C. " \ 6 "The atomic mass of argon is %{argon} and the molecular mass of chlorine is %{chlorine}. %{ratio} of " \ 7 "argon to chlorine?" 8 given argon: "39.9 g/mol" 9 given chlorine: "70.9 g/mol" 10 asks ratio: "What is the ratio of the root mean square speeds of the molecules" 11 end
1 require_relative "../questions/argon_and_chlorine_in_a_flask" 2 require_relative "../science/kinetic_theory/rms_speed" 3 4 solve :argon_and_chlorine_in_a_flask , using: RmsSpeed do 5 objects :argon , :chlorine 6 7 take argon: argon . molar_mass 8 take chlorine: chlorine . molar_mass 9 10 deduce_from "The temperature of the mixture" , argon . temperature => chlorine . temperature 11 12 answer find_relation ( argon . rms_speed / chlorine . rms_speed ), figures: 3 13 14 conclusion "At one temperature every molecule has the same average kinetic energy, so the lighter argon " \ 15 "atoms move faster, as the square root of the inverse ratio of the masses; how much of each gas " \ 16 "there is does not matter." 17 end
1 require_relative "../solutions/argon_and_chlorine_in_a_flask" 2 3 play_with :argon_and_chlorine_in_a_flask do 4 title "Argon and Chlorine in a Flask" 5 end