print "Daily Homework 10a\n" print "Question 4\n" #params vbattery = 3.05 vchange = 2.9 ammeter = 1.7 bigr = vchange/ammeter "emf " vbattery "internal resistance " rtot = vbattery/ammeter rtot - bigr "circuit resistance " bigr print "\nDaily Homework 10b\n" print "Question 1\n" #params r1 = 2 r2 = 5 r3 = 1 r4 = 7 r5 = 3 r6 = 3 r7 = 3 "RA " r4+r3+1/(1/r1+1/r2) "RB (open) " r5 + r4 + r3 + 1/(1/(r6+r1) + 1/r2) "RB (closed) " r5 + 1/(1/r4+1/r7) + r3 + 1/(1/(r6+r1) + 1/r2) print "Question 2\n" print "Rlong^2\n" print "Question 3\n" # params ratio = 10 # Ip = 10Is # Without loss of generality, let Is = 1, and R2 = 1, so r = R1. # IR = V # 1(1+r) = V # 10/(1/1 + 1/r) = V # 1 + r = 10/(1 + 1/r) # (1+r)(1+1/r) = 10 # r^2 + 2r + 1 = 10r # r^2 - 8r + 1 = 0 b = 2 - ratio (-b - sqrt(b^2 - 4*1*1))/2 print "Question 4\n" #params ammeter = 9 # clockwise loop rule on top loop # ammeter - 3*i1 + 2*ammeter = 0 i1 = ammeter print "I1 (A)\n" i1 # branch rule i2 = i1+ammeter print "I2 (A)\n" i2 # clockwise loop rule on bottom loop # -2*ammeter + electromotive - 1*i2 = 0 electromotive = 2*ammeter + i2 print "Electromotive (V)\n" electromotive print "\nDaily Homework 10c\n" print "Question 2\n" print "C > A = E > B > D\n" print "Question 3\n" #params c = 10 # uF q = 30 # uC r = 1.8 # kOhm qtarget = 15 # uC # c = q(t)/v(t) --> v(t) = q(t)/c # dq(t)/dt = -I = -v(t)/r # dq(t)/dt = -q(t)/cr # q(t) = Ce^{-t/cr} # C = q # q(t) = qe^{-t/cr} = qtarget => -t/cr = ln(qtarget/q) r = r*1000 # Ohm qtarget = qtarget/10^6 # C c = c/10^6 # F q = q/10^6 # C t = -c*r*l(qtarget/q) print "Time (s)\n" t print "\nWeekly Homework 10\n" print "Question 1\n" #params r1 = 2.5 # kOhm r2 = 4.0 # kOhm r3 = 5.0 # kOhm v = 100 # V # v = ir # p = iv = v^2/r pparallel = v^2 / (1/(1/r1 + 1/r2 + 1/r3)) pseries = v^2 / (r1 + r2 + r3) pparallel/pseries print "Question 2\n" # I = ef/(r+R) # P = I^2R = ef^2*R/(r+R)^2 # dP/dR = 0 = d/dR (ef^2*R/(r+R)^2) # d/dR (R/(r+R)^2) = 0 # (r+R)/(r+R)^3 - 2R/(r+R)^3 = (r-R)/(r+R)^3 = 0 # r = R print "Part A: R = r\n" print "Part B\n" # params ef = 5 # V r = 1.8 # Ohm i = ef/(r+r) print "Power (W)\n" i^2*r print "Question 3\n" #params bulbr = 6 # Ohm r = .8 # Ohm v = 1.5 # V iopen = v/(r+bulbr) print "I_open (A)\n" iopen iclosed = v/(r+bulbr/2) / 2 # because current is even between a and b print "I_closed (A)\n" iclosed print "pct change\n" 100*(iclosed-iopen)/iopen print "Question 4\n" v = 24 # V # No params. Effective resistance w/ open is 6Ohm and 6Ohm in parallel, # giving 3Ohm print "Part A - Ibat (A)\n" v/3 print "Part B - dV (V)\n" v/3 # the two pairs of parallel resistors = two effective resistors in # parallel print "Part C - Ibat (A)\n" v / (1/(1/3 + 1/5) + 1/(1/3 + 1)) print "Part D - dV (V)\n" 0 print "Question 5\n" v = 24 # V i6 = v/10 # effective resistance calculation i5 = v/15 # same i10 = i5 i4 = i6 print "Currents (i6, i5, i10, i4)\n" i6 i5 i10 i4 v6 = i6*6 # V = IR v5 = i5*5 v10 = i10*10 v4 = i4*4 print "Voltages (v6, v5, v10, v4)\n" v6 v5 v10 v4 print "Question 6\n" #params v = 150 rtot = 2 + 1/(1/20 + 1/5) + 4 itot = v/rtot vparallel = itot / (1/20 + 1/5) # v through the parallel resistors i20 = vparallel/20 print "I20 (A)\n" i20 print "Question 7\n" # 1/(1/4 + 1/12) = 3. # 3 + 5 = 8 # 1/(1/8 + 1/24) = 6. # Assume current goes clockwise. # Loop: 12 - I*6 - 3 - I*3 = 0 # 9 = I*9 => I = 1A. # Then, week10resistors.py has the solution print "See source\n" print "Question 8\n" #params tconstant = 7 # ms print "Charge reduced to half (ms)\n" -l(1/2)*tconstant print "Energy reduced to half (ms)\n" -l(1/sqrt(2))*tconstant print "Question 9\n" #params c = 40 # uF # The graph shows a reduction from 30V to 10V in 4ms, giving a time # constant of tconstant = 4/l(30/10) # ms # tconstant = cr => r = tconstant/c c = c/10^6 # F tconstant = tconstant/1000 # s r = tconstant/c print "Resistance\n" r print "Question 10\n" #params c = .25 # uF v = 70 # V r1 = 25 # Ohm (the one the question asks about) r2 = 150 # Ohm q = c*v # uC j = q*v/2 print "Energy dissipated (uJ)\n" j*r1/(r1+r2)