pyafm/auxiliary.tex: Add a Peltier figure with a caption from my oral
[thesis.git] / src / figures / schematic / peltier.asy
1 import Circ;
2 import ElectroMag;
3 import Mechanics;
4
5 real u = 0.75cm;
6 real w = 1.75u;
7 real wo = 0.75u;
8
9 MultiTerminal bat = source(dir=180, type=DC);
10
11 Block hot = Block(
12   center=bat.center + (0, 1.3u), width=4u, height=u, fill=red, L="heat sink");
13 Block h_in = Block(center=hot.center + (-u, 0.75u), width=w, height=u/2);
14 Block h_out = Block(center=hot.center + (u, 0.75u), width=w, height=u/2);
15 Block n = Block(center=h_in.center + (0, 1.25u), width=w, height=2u,
16   fill=opacity(0.25)+blue, L=Label("n", align=E));
17 Block p = Block(center=h_out.center + (0, 1.25u), width=w, height=2u,
18   fill=opacity(0.25)+red, L=Label("p", align=W));
19 Block bridge = Block(
20   center=hot.center + (0, 3u), width=3.75u, height=u/2);
21 Block cold = Block(
22   center=hot.center + (0, 3.75u), width=3.75u, height=u,
23   fill=blue, L="cooled");
24
25 MultiTerminal cur = current(draw=false);
26 cur.centerto(bridge.center + (-1, 0), bridge.center + (1, 0));
27
28 Charge electron = nCharge(n.center + (-0.3u, 0), "-");
29 Vector v_e = Velocity(center=electron.center(), dir=-90);
30
31 Charge hole = pCharge(p.center + (0.3u, 0), "+");
32 Vector v_h = Velocity(center=hole.center(), dir=-90);
33
34 wire(bat.terminal[1], h_in.center + (-h_in.width/2, 0), type=rlsq, dist=-2u);
35 wire(bat.terminal[0], h_out.center + (h_out.width/2, 0), type=rlsq, dist=2u);
36 hot.draw();
37 h_in.draw();
38 h_out.draw();
39 n.draw();
40 p.draw();
41 bridge.draw();
42 cold.draw();
43 cur.draw();
44
45 v_e.draw();
46 electron.draw();
47 v_h.draw();
48 hole.draw();