question.rb
solution.rb
playground.rb
1 require_relative "../physics" 2 3 question :an_lcr_circuit_s_phase do 4 kind :numerical 5 describes "A sinusoidal voltage of peak value %{peak} and frequency %{frequency} is applied to a series LCR " \ 6 "circuit in which R = %{resistance}, L = %{inductance} and C = %{capacitance}. %{phase}, in degrees?" 7 given peak: "283 V" 8 given frequency: "50 Hz" 9 given resistance: "3 Ω" 10 given inductance: "25.48 mH" 11 given capacitance: "796 μF" 12 asks phase: "What is the phase difference between the voltage across the source and the current" 13 end
1 require_relative "../questions/an_lcr_circuit_s_phase" 2 require_relative "../science/alternating_current/series_lcr" 3 4 solve :an_lcr_circuit_s_phase , using: SeriesLcr do 5 objects :circuit 6 7 take peak: circuit . peak_voltage 8 take frequency: circuit . frequency 9 take resistance: circuit . resistance 10 take inductance: circuit . inductance 11 take capacitance: circuit . capacitance 12 13 phase = circuit . phase_angle 14 answer phase :, in: "deg" , figures: 3 15 16 conclusion "The inductor's reactance outweighs the capacitor's, so the current lags the voltage, by the angle whose tangent is the net reactance over the resistance." 17 end
1 require_relative "../solutions/an_lcr_circuit_s_phase" 2 3 play_with :an_lcr_circuit_s_phase do 4 title "An LCR Circuit's Phase" 5 end