question.rb
solution.rb
playground.rb
1 require_relative "../physics" 2 3 question :the_heat_of_aluminium do 4 kind :numerical 5 describes "A sphere of %{sphere_mass} aluminium is placed for sufficient time in a vessel containing boiling " \ 6 "water, so that the sphere is at %{hot}. It is then immediately transferred to a %{calorimeter_mass} " \ 7 "copper calorimeter containing %{water_mass} water at %{cool}. The temperature of water rises and " \ 8 "attains a steady state at %{steady}. Taking the specific heat capacity of water as %{water_heat} and of " \ 9 "copper as %{copper_heat}, %{heat_capacity}, in J kg⁻¹ K⁻¹?" 10 given sphere_mass: "0.047 kg" 11 given hot: "100 °C" 12 given calorimeter_mass: "0.14 kg" 13 given water_mass: "0.25 kg" 14 given cool: "20 °C" 15 given steady: "23 °C" 16 given water_heat: "4.18e3 J kg-1 K-1" 17 given copper_heat: "0.386e3 J kg-1 K-1" 18 asks heat_capacity: "what is the specific heat capacity of aluminium" 19 end
1 require_relative "../questions/the_heat_of_aluminium" 2 require_relative "../science/thermal_properties_of_matter/calorimetry" 3 4 solve :the_heat_of_aluminium , using: Calorimetry do 5 objects :sphere , :calorimeter , :water 6 7 take sphere_mass: sphere . mass 8 take hot: sphere . temperature_at_first 9 take calorimeter_mass: calorimeter . mass 10 take water_mass: water . mass 11 take cool: water . temperature_at_first 12 take steady: water . temperature_after 13 take water_heat: water . specific_heat_capacity 14 take copper_heat: calorimeter . specific_heat_capacity 15 16 deduce_from "copper calorimeter containing" , calorimeter . temperature_at_first => water . temperature_at_first 17 deduce_from "attains a steady state" , sphere . temperature_after => water . temperature_after , 18 calorimeter . temperature_after => water . temperature_after 19 deduce_from "The temperature of water rises" , 20 sphere . heat_to_warm => - ( water . heat_to_warm + calorimeter . heat_to_warm ) 21 22 heat_capacity = sphere . specific_heat_capacity 23 answer heat_capacity :, in: "J kg-1 K-1" , figures: 3 24 25 conclusion "In the steady state the heat the sphere gave up is the heat the water and the calorimeter " \ 26 "took in, and that fixes how much heat a kilogram of aluminium holds per degree." 27 end
1 require_relative "../solutions/the_heat_of_aluminium" 2 3 play_with :the_heat_of_aluminium do 4 title "The Heat of Aluminium" 5 end