question.rb
solution.rb
playground.rb
1 require_relative "../physics" 2 3 question :steam_passed_into_water_till_ninety do 4 kind :numerical 5 describes "Steam is passed into %{water_mass} of water at %{water_temperature} till the temperature of the " \ 6 "mixture becomes %{mixed}. If the latent heat of steam is %{latent_heat}, %{total}, in grams?" 7 given water_mass: "54 g" 8 given water_temperature: "30 °C" 9 given mixed: "90 °C" 10 given latent_heat: "536 cal/g" 11 asks total: "the mass of the mixture will be" 12 end
1 require_relative "../questions/steam_passed_into_water_till_ninety" 2 require_relative "../science/thermal_properties_of_matter/calorimetry" 3 4 solve :steam_passed_into_water_till_ninety , using: Calorimetry do 5 objects :steam , :water , :mixture 6 7 take water_mass: water . mass , water_temperature: water . temperature_at_first , mixed: water . temperature_after 8 take latent_heat: steam . latent_heat 9 10 deduce_from "of water" , water . specific_heat_capacity => "1 cal/g °C" 11 deduce_from "Steam" , steam . temperature_at_first => "100 °C" , steam . specific_heat_capacity => water . specific_heat_capacity 12 deduce_from "the temperature of the mixture" , steam . temperature_after => water . temperature_after 13 deduce_from "Steam is passed into" , water . heat_to_warm => steam . heat_to_change_phase - steam . heat_to_warm , 14 mixture . mass => water . mass + steam . mass 15 16 total = mixture . mass 17 answer total :, in: "g" , figures: 2 18 19 conclusion "Each gram of steam gives up its latent heat as it condenses and ten calories more as it cools to " \ 20 "90 °C; the water takes sixty calories a gram to warm, so about six grams of steam join the 54 g." 21 end
1 require_relative "../solutions/steam_passed_into_water_till_ninety" 2 3 play_with :steam_passed_into_water_till_ninety do 4 title "Steam Passed Into Water Till Ninety" 5 end