question.rb
solution.rb
playground.rb
1 require_relative "../physics" 2 3 question :molar_volume_at_stp do 4 kind :numerical 5 describes "Molar volume is the volume occupied by %{amount} of any (ideal) gas at standard temperature and pressure " \ 6 "(STP : 1 atmospheric pressure, 0 °C). %{volume}, in litres?" 7 given amount: "1 mol" 8 asks volume: "What is the molar volume" 9 end
1 require_relative "../questions/molar_volume_at_stp" 2 require_relative "../science/kinetic_theory/ideal_gas" 3 4 solve :molar_volume_at_stp , using: IdealGas do 5 objects :gas 6 7 take amount: gas . amount 8 9 deduce_from "1 atmospheric pressure" , gas . pressure => "1 atm" 10 deduce_from "0 °C" , gas . temperature => "273.15 K" 11 12 volume = gas . volume 13 answer volume :, in: "L" , figures: 3 14 15 conclusion "The ideal gas law has no room for what the molecules are, so a mole of any gas at the same pressure " \ 16 "and temperature takes up the same volume." 17 end
1 require_relative "../solutions/molar_volume_at_stp" 2 3 play_with :molar_volume_at_stp do 4 title "Molar Volume at STP" 5 end