question.rb
solution.rb
playground.rb
1 require_relative "../physics" 2 3 question :melting_ice_in_warm_water do 4 kind :numerical 5 describes "When %{ice_mass} of ice at %{ice_temperature} is mixed with %{water_mass} of water at " \ 6 "%{water_temperature} in a container, the resulting temperature is %{mixed}. Taking the specific heat " \ 7 "capacity of water as %{water_heat}, %{fusion}, in J/kg?" 8 given ice_mass: "0.15 kg" 9 given ice_temperature: "0 °C" 10 given water_mass: "0.30 kg" 11 given water_temperature: "50 °C" 12 given mixed: "6.7 °C" 13 given water_heat: "4186 J kg-1 K-1" 14 asks fusion: "what is the heat of fusion of ice" 15 end
1 require_relative "../questions/melting_ice_in_warm_water" 2 require_relative "../science/thermal_properties_of_matter/calorimetry" 3 4 solve :melting_ice_in_warm_water , using: Calorimetry do 5 objects :ice , :water 6 7 take ice_mass: ice . mass 8 take ice_temperature: ice . temperature_at_first 9 take water_mass: water . mass 10 take water_temperature: water . temperature_at_first 11 take mixed: water . temperature_after 12 take water_heat: water . specific_heat_capacity 13 14 deduce_from "the resulting temperature" , ice . temperature_after => water . temperature_after , 15 ice . specific_heat_capacity => water . specific_heat_capacity , 16 ice . heat_taken_in => - water . heat_taken_in 17 deduce_from "of water at" , water . heat_to_change_phase => "0 J" 18 19 fusion = ice . latent_heat 20 answer fusion :, in: "J/kg" , figures: 3 21 22 conclusion "The warm water gives up heat that first melts the ice and then warms the melted ice to the " \ 23 "mixture's temperature; what is left over after the warming is the heat of fusion." 24 end
1 require_relative "../solutions/melting_ice_in_warm_water" 2 3 play_with :melting_ice_in_warm_water do 4 title "Melting Ice in Warm Water" 5 end