question.rb
solution.rb
playground.rb
1 require_relative "../physics" 2 3 question :a_kilogram_of_ice_in_a_kilogram_of_water_at_eighty do 4 kind :scq 5 describes "%{ice_mass} of ice at %{ice_temperature} is mixed with %{water_mass} of water at %{water_temperature}. " \ 6 "The final temperature of the mixture is (Take specific heat of water = %{water_heat}, latent heat of " \ 7 "ice = %{fusion})" 8 given ice_mass: "1 kg" 9 given ice_temperature: "0 °C" 10 given water_mass: "1 kg" 11 given water_temperature: "80 °C" 12 given water_heat: "4200 J kg-1 K-1" 13 given fusion: "336 kJ/kg" 14 15 option "0 °C" 16 option "53.3 °C" 17 option "40 °C" 18 option "60 °C" 19 end
1 require_relative "../questions/a_kilogram_of_ice_in_a_kilogram_of_water_at_eighty" 2 require_relative "../science/thermal_properties_of_matter/calorimetry" 3 4 solve :a_kilogram_of_ice_in_a_kilogram_of_water_at_eighty , using: Calorimetry do 5 objects :ice , :water 6 7 take ice_mass: ice . mass , ice_temperature: ice . temperature_at_first 8 take water_mass: water . mass , water_temperature: water . temperature_at_first 9 take water_heat: water . specific_heat_capacity , fusion: ice . latent_heat 10 11 deduce_from "of water at" , water . heat_to_change_phase => "0 J" 12 deduce_from "is mixed with" , ice . specific_heat_capacity => water . specific_heat_capacity , 13 ice . temperature_after => water . temperature_after , 14 ice . heat_taken_in => - water . heat_taken_in 15 16 answer find_value ( water . temperature_after , in: "°C" ) 17 18 conclusion "Cooling the water from 80 °C to 0 °C gives up 336 kJ, just what melting the ice takes, so " \ 19 "nothing is left to warm the mixture and it stays at 0 °C." 20 end
1 require_relative "../solutions/a_kilogram_of_ice_in_a_kilogram_of_water_at_eighty" 2 3 play_with :a_kilogram_of_ice_in_a_kilogram_of_water_at_eighty do 4 title "A Kilogram Of Ice In A Kilogram Of Water At Eighty" 5 end