question.rb
solution.rb
playground.rb
1 require_relative "../physics" 2 3 question :hydrogen_to_match_oxygen_s_pv_over_t do 4 kind :numerical 5 describes "Plots of PV/T versus P are drawn for %{oxygen_mass} of oxygen gas at two different temperatures. The " \ 6 "molecular mass of H2 is %{hydrogen} and of O2 is %{oxygen}. If we obtained similar plots for hydrogen, " \ 7 "%{mass} yields the same value of PV/T (for low pressure high temperature region of the plot), in " \ 8 "kilograms?" 9 given oxygen_mass: "1.00e-3 kg" 10 given hydrogen: "2.02 g/mol" 11 given oxygen: "32.0 g/mol" 12 asks mass: "what mass of hydrogen" 13 end
1 require_relative "../questions/hydrogen_to_match_oxygen_s_pv_over_t" 2 require_relative "../science/kinetic_theory/moles" 3 4 solve :hydrogen_to_match_oxygen_s_pv_over_t , using: Moles do 5 objects :oxygen , :hydrogen 6 7 take oxygen_mass: oxygen . mass 8 take hydrogen: hydrogen . molar_mass 9 take oxygen: oxygen . molar_mass 10 11 deduce_from "the same value of PV/T" , hydrogen . amount => oxygen . amount 12 13 mass = hydrogen . mass 14 answer mass :, in: "kg" , figures: 2 15 16 conclusion "Where a gas behaves ideally, PV/T is the number of moles times the gas constant, so the same value " \ 17 "needs the same number of moles, and hydrogen's moles are far lighter." 18 end
1 require_relative "../solutions/hydrogen_to_match_oxygen_s_pv_over_t" 2 3 play_with :hydrogen_to_match_oxygen_s_pv_over_t do 4 title "Hydrogen to Match Oxygen's PV/T" 5 end