question.rb
solution.rb
playground.rb
1 require_relative "../physics" 2 3 question :a_helium_atom_in_a_star_s_core do 4 kind :numerical 5 describes "%{energy} at the temperature of %{temperature} (the typical core temperature in the case of a star), in " \ 6 "joules?" 7 given temperature: "1.0e7 K" 8 asks energy: "Estimate the average thermal energy of a helium atom" 9 end
1 require_relative "../questions/a_helium_atom_in_a_star_s_core" 2 require_relative "../science/kinetic_theory/rms_speed" 3 4 solve :a_helium_atom_in_a_star_s_core , using: RmsSpeed do 5 objects :helium 6 7 take temperature: helium . temperature 8 9 energy = helium . average_thermal_energy 10 answer energy :, in: "J" , figures: 2 11 12 conclusion "At a star's core the atoms carry energies of a kiloelectronvolt or so, enough for nuclei to come " \ 13 "close and fuse." 14 end
1 require_relative "../solutions/a_helium_atom_in_a_star_s_core" 2 3 play_with :a_helium_atom_in_a_star_s_core do 4 title "A Helium Atom in a Star's Core" 5 end