question.rb
solution.rb
playground.rb
1 require_relative "../physics" 2 3 question :a_hot_copper_block_on_ice do 4 kind :numerical 5 describes "A copper block of mass %{mass} is heated in a furnace to a temperature of %{hot} and then placed on a " \ 6 "large ice block. Specific heat of copper = %{copper_heat}; heat of fusion of water = %{fusion}. " \ 7 "%{melted}, in kg?" 8 given mass: "2.5 kg" 9 given hot: "500 °C" 10 given copper_heat: "0.39 J g-1 K-1" 11 given fusion: "335 J g-1" 12 asks melted: "What is the maximum amount of ice that can melt" 13 end
1 require_relative "../questions/a_hot_copper_block_on_ice" 2 require_relative "../science/thermal_properties_of_matter/calorimetry" 3 4 solve :a_hot_copper_block_on_ice , using: Calorimetry do 5 objects :copper , :ice 6 7 take mass: copper . mass 8 take hot: copper . temperature_at_first 9 take copper_heat: copper . specific_heat_capacity 10 take fusion: ice . latent_heat 11 12 deduce_from "a large ice block" , copper . temperature_after => "0 °C" 13 deduce_from "placed on" , ice . heat_to_change_phase => - copper . heat_to_warm 14 15 melted = ice . mass 16 answer melted :, in: "kg" , figures: 2 17 18 conclusion "At most, the copper cools all the way to the ice's melting point, and all the heat it gives " \ 19 "up goes into melting ice." 20 end
1 require_relative "../solutions/a_hot_copper_block_on_ice" 2 3 play_with :a_hot_copper_block_on_ice do 4 title "A Hot Copper Block on Ice" 5 end