question.rb
solution.rb
playground.rb
1 require_relative "../physics" 2 3 question :the_current_amplitude_at_resonance do 4 kind :numerical 5 describes "A series LCR circuit is connected to a variable frequency %{supply} source, with L = %{inductance}, " \ 6 "C = %{capacitance} and R = %{resistance}. The source is tuned to the frequency which drives the " \ 7 "circuit in resonance. %{amplitude}, in amperes?" 8 given supply: "230 V" 9 given inductance: "5.0 H" 10 given capacitance: "80 μF" 11 given resistance: "40 Ω" 12 asks amplitude: "What is the amplitude of current" 13 end
1 require_relative "../questions/the_current_amplitude_at_resonance" 2 require_relative "../science/alternating_current/series_lcr" 3 4 solve :the_current_amplitude_at_resonance , using: SeriesLcr do 5 objects :circuit 6 7 take supply: circuit . rms_voltage 8 take inductance: circuit . inductance 9 take capacitance: circuit . capacitance 10 take resistance: circuit . resistance 11 12 deduce_from "drives the circuit in resonance" , circuit . frequency => circuit . resonant_frequency 13 14 amplitude = circuit . peak_current 15 answer amplitude :, in: "A" , figures: 3 16 17 conclusion "At resonance the impedance falls to the bare resistance, so the current swings as wide as the " \ 18 "resistance lets it." 19 end
1 require_relative "../solutions/the_current_amplitude_at_resonance" 2 3 play_with :the_current_amplitude_at_resonance do 4 title "The Current Amplitude at Resonance" 5 end