From 6cf6c1977c1cda2a7c123368630cc7703ddc5172 Mon Sep 17 00:00:00 2001 From: Holden Rohrer Date: Thu, 11 Nov 2021 18:13:00 -0500 Subject: more physics and linear homeworks --- jarrio/week12.bc | 164 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 164 insertions(+) create mode 100644 jarrio/week12.bc (limited to 'jarrio/week12.bc') diff --git a/jarrio/week12.bc b/jarrio/week12.bc new file mode 100644 index 0000000..fe5a7bd --- /dev/null +++ b/jarrio/week12.bc @@ -0,0 +1,164 @@ +print "Weekly Practice 12\n" +qelem = 1.6*10^(-19) # C +pi = 4*a(1) +mu0 = 4*pi*10^(-7) +g = 9.81 # m/s^2 +scale = 40 + +print "#1\n" +# magnetic field in this problem is |B| @ theta ccw from +x. +# we find the i and j components. i\times j = k. j\times i = -k. +#params +v1 = 1.25 * 10^6 #i m/s +f1 = 1.64 * 10^(-16) #k N +v2 = 2.49 * 10^6 #j m/s +f2 = -4.04* 10^(-16) #k N + +# v1*bj*q = f1 +bj = f1/v1/qelem +# v2*bi*q = -f2 +bi = -f2/v2/qelem + +print "Magnitude (T)\n" +sqrt((bi*10^16)^2 + (bj*10^16)^2)*10^(-16) + +print "Angle ccw from +x axis (deg)\n" +a(bj/bi)*180/pi + +scale = 40 +print "#2\n" +#params +v = 4*10^4 # m/s +b = 5 # mT + +m = 1.67*10^(-27) # kg +b = b/1000 +a = (b*qelem*v/m) +r = v^2/a +# r = vm/bq +print "Diameter (m)\n" +2*r + +print "#3\n" +#params +mf = 27 # mT +v = 5.5 * 10^6 # m/s +thdeg = 30 + +th = thdeg*pi/180 +mf = mf/1000 # T +vx = v*c(th) +melec = 9.1*10^(-31) +r = vx*melec/(mf*qelem) +print "Radius (m)\n" +r +c = 2*pi*r +t = c/vx + +print "Pitch (m)\n" +t*v*s(th) + +print "#4\n" +#params +l = 52 # mass density - g/m +d = 4 # cm + +d = d/100 # m +l = l/1000 # kg/m + +w = l*g # N/m +# Up and down cancel out from the two base wires, so we get an mf of +# 2*mu0*I*s(60deg)/(2pi*d) and a force (per meter) of I*mf = w +# i^2 * 2*mu0*s(60*pi/180)/(2*pi*d) = w +i = sqrt(w/(2*mu0*s(60*pi/180)/(2*pi*d))) + +print "Current (A)\n" +i + +print "#5\n" +#params +s = 5.1 # cm +i = 470 # mA +b = 1.7 # T +thdeg = 30 + +# We use magnetic moment here + +s = s/100 # m +i = i/1000 # A +th = thdeg*pi/180 + +print "Torque Magnitude (Nm)\n" +s^2*s(th)*b*i + +print "#6\n" +#params +k = 12 # N/m - spring constant +d = .7 # cm +b = .5 # T +l = 20 # cm + +d = d/100 # m +l = l/100 # m +f = 2*k*d # N (two springs, double the force) +# i*l*b = f +i = f/(l*b) + +print "Current (A)\n" +i + +print "#7\n" +#params +m = 4 # kg +s = 5.5 # m +i = 25 # A +thdeg = 25 + +th = thdeg*pi/180 + +w = m*g +t = w*s/2 +a = s^2 +# a*i*b = t +b = t/(a*i) # what happened to the angle lmao. this is right (??) + +print "Magnetic field (T)\n" +b + +print "#8\n" +#params +dv = .02 # V +l = 10 # cm +v = 5 # m/s + +l = l/100 # m +ef = dv/l # some stackexchange article said so +# ef = v*b + +print "Magnetic field into the page (T)\n" +ef/v + +print "#9\n" +#params +b = .45 # T +v = .5 # m/s +ohm = 2 # Ohm +d = 10 # cm + +d = d/100 # m +i = v*d*b/ohm # IMPORTANT !!! +p = i^2*ohm +# f*v = p +f = p/v + +print "Pushing force (N)\n" +f + +print "Power (W)\n" +p + +print "Current - induced counterclockwise (A)\n" +i + +print "Power dissipated by resistor (W)\n" +p -- cgit