question.rb
solution.rb
playground.rb
1 require_relative "../physics" 2 3 question :a_lead_slab_sheared do 4 kind :numerical 5 describes "A square lead slab of side %{side} and thickness %{thickness} is subject to a shearing force of " \ 6 "%{force} on its narrow face. The lower edge is riveted to the floor. Taking the shear modulus of lead " \ 7 "as %{modulus}, %{shift}, in mm?" 8 given side: "50 cm" 9 given thickness: "10 cm" 10 given force: "9.0e4 N" 11 given modulus: "5.6e9 N/m2" 12 asks shift: "how much will the upper edge be displaced" 13 end
1 require_relative "../questions/a_lead_slab_sheared" 2 require_relative "../science/mechanical_properties_of_solids/shear_modulus" 3 4 solve :a_lead_slab_sheared , using: ShearModulus do 5 objects :slab 6 7 take side: slab . face_length 8 take thickness: slab . face_width 9 take force: slab . shearing_force 10 take modulus: slab . shear_modulus 11 12 deduce_from "square lead slab" , slab . height => slab . face_length 13 14 shift = slab . shift 15 answer shift :, in: "mm" , figures: 2 16 17 conclusion "The force spread over the narrow face is the shearing stress; lead answers it with a slant " \ 18 "of stress over the shear modulus, and the top edge moves that slant of the slab's height." 19 end
1 require_relative "../solutions/a_lead_slab_sheared" 2 3 play_with :a_lead_slab_sheared do 4 title "A Lead Slab Sheared" 5 end