<jupyter_start><jupyter_text>Electromagnetic inductionMagnet moving through a solenoid.```Setup:+----|V|----+|           |+\\\\\\\\\\\+      -->  |Magnet|   <-- ```What happens when a magnet is moved through a solenoid?What happens when - magnet is flipped around?- motion is faster?<jupyter_code>import matplotlib.pyplot as plt
%matplotlib inline

xs = range(16)
vs = [0, 0.25, 0, -0.25, 0, 0.5, 0, 0.2, 0, -0.19, 0, 0.18, 0, -0.17, 0, 0.16]
plt.plot(xs, vs)
plt.hlines(y=0, xmin=0, xmax=15)
plt.xlabel("time (s)")
plt.ylabel("Potential difference (V)")
plt.xticks([1, 3, 5, 11], ["Fall", "Flipped", "Faster", "Oscillation"])
plt.title("Magnet dropped through a solenoid");<jupyter_output><empty_output><jupyter_text>The magnet moving in the coil creates a changing magnetic field. This, due to the Lorentz force, induces an emf in the coil. If the coil is connected to a circuit, then a current will flow.But a current induces a magnetic field. To avoid energy conservation problem, the induced magnetic field must oppose the change that created it. => Lenz's Law Use1. Lenz's law2. Field lines3. Direction of B from I Magnet falling through coil    +-+/\    |S|  \    | | /|\    |N|  /    +-+\/        /-\    \-/  <- coilInitially, the B field is increasing and pointing down. To oppose this change, current induced must create B field upwards.Current is induced counterclockwise (right hand cockscrew rule).As the magnet leaves the coil, B field points down but is decreasing. B field induced must be downwards to oppose that change.Current is clockwise.        |        | /\        |/  \    emf +----\-------         |     \    /        |      \  /        |       \/ - What happens if we flip the magnet?  the opposite- If coil moves past magnet?    /-\  |    \-/ \|/    +-+/\    |S|  \    | | /|\    |N|  /    +-+\/same as first case - `Magnetic flux density`    - numerically equivalent to magnetic field strength $B$    - unit: $Wb / m^2$    - tells us density of field lines per unit area- `Magnetic flux`    - tells us amount of "$B$ going through surface $A$"    - M flux is $B \times A$            B   ----->  /| surface area A                -----> | |                -----> | |                -----> | |                -----> |/    - Only take component normal to surface to calculate flux:      M flux $\phi = B A \cos \theta$                        B \ \ \θ|               \ \ \|               ------- surface    - in Webers- `Magnetic flux linkage`    - $= N \phi$    - where $N$ is the number of loops    - in Weber turnsEmf induced$\epsilon = -\frac{N \Delta \phi}{\Delta t} = -\frac{d N B A \cos\theta}{dt}$      Power generation, alternating currentGenerating power: - oil, gas, coal- solar- tidal- wave- hydro- nuclear- wind- geothermalWhen a coil spins in a uniform magnetic field, the emf that is induced periodically changes polarity.  Explicative diagrams    1. |  coil made to spin       +-+     Flux through    X | | X   coil is at a      +-+          MAX       X             2. |       /|     Flux through    X | | X   coil decreases      |/       X      => emf increases    3. |       |      Flux through    X  | X    coil is 0       |       X    4. |      |\      Flux through    X | | X   coil increases       \|       X      => emf decreasees<jupyter_code>import numpy as np

theta = np.linspace(0, 2 * np.pi, 100)
epsilon = np.sin(theta)
plt.plot(theta, epsilon)
plt.xlabel('t')
plt.ylabel('$\epsilon$')

plt.yticks([0])
plt.xticks([0, np.pi / 2, np.pi, 3 * np.pi / 2], '1234')

plt.hlines(y=0, xmin=0, xmax=2 * np.pi)
for x_coord in (0, np.pi / 2, np.pi, 3 * np.pi / 2):
    plt.vlines(x=x_coord, ymin=-1, ymax=1, linestyle='--')

plt.show()<jupyter_output><empty_output><jupyter_text>This graph is the derivative of $B A \cos\theta$ with respect to time, multiplied by -1  -> $\sin\theta$ function Electromagnetic induction is the primary mode of electrical current, which is why we mostly use AC. The amplitude can be increased by:- increasing $N$- increasing speed of rotation (which will also increase the frequency)- increasing the value of $B$- increasing $A$ $V$ and $I$ are functions of time; they are in phase.$\begin{aligned}P(t) &= I^2(t) R \\&= \frac{V^2(t)}{R}\end{aligned}$<jupyter_code>t = np.linspace(0, 2 * np.pi, 50)
R = 1
P = np.sin(t) ** 2 / R
plt.plot(t, P)
plt.xlabel('t')
plt.ylabel('P')<jupyter_output><empty_output><jupyter_text>RMS values for AC circuits$\begin{aligned}I_{RMS} &= \frac{I_{max}}{\sqrt{2}} \\V_{RMS} &= \frac{V_{max}}{\sqrt{2}} \\P_{RMS} &= I_{RMS} V_{RMS} = \frac{P}{2}\end{aligned}$  Transformers- Electrical component that changes an input voltage to an output voltage- increase voltage -> step up transformer    - used after production to ramp up voltage in high voltage powerlines. High voltage is required to reduce current at equivalent power and therefore reduce heatlosses / increase efficiency- decrease voltage -> step down transformer    - used for example to adapt the voltage to customer's needs (e.g. industry needs high V, home consumers need low V)  Design of a transformer       Iron core    +-------------+    |   +-----+   |    |\_/|     |/-\|    |\_/|     |/-\|    |\_/|     |/-\|    +---+     +---+    Primary   Secondary     coil      coilApply voltage to it, current through it induces a changing $\bf{B}$ field.$\begin{aligned}\frac{V_P}{V_S} = \frac{N_P}{N_S} = \frac{I_S}{I_P}\end{aligned}$- $V_P$ and $V_S$ are the voltages across **P**rimary and **S**econdary coils.- $N_P$ and $N_S$ -> number of coils in P and SThe iron cone directs the magnetic flux from the primary to the secondary.Tue flux is varying, induces and emf in S coil.  Research:  - factors affecting T efficiency - why & how they affect it - what can be done to prevent the losses?- heating effect of the current    - replace wire by better conductors    - make wire by thicker- magnetic hysterosis(?)- flux leakage    - prevention: isolate - eddy current    - current inside the wire    -   Halfwave rectification- **Purpose**: to make AC more like DC (only 1 direction for flow of current)  CapacitorsCircuit symbol:      inside the space between 2 plates     is a dielectric (insulator)     such as air, polystyrene ...     ⬇️    -||-    ⬆️    2 parallel conducting plates  Behaviour of a capacitor         +-    +----|]----+    |    V     |    |          |    |    +-    |    +----||----+         V         +  -        /| /|     ---|| ||---        |/ |/- If the applied p.d. is too large, then dielectric will break down and current will flow- Charge flows away from plate to +positive terminal of battery. Charge is pushed out of -negative terminal to other plate. The unit of capacitance Farad (F) is defined as $$\underbrace{C}_{\text{capacitance}} = \underbrace{\overbrace{\frac{Q}{V}}^{\text{Charge on plates}}}_{\text{potential diff acroos capacitor}}$$  Practical: measuring V across a capacitor as it charges / discharges    +-----|]-----+    |            |    |            |    +---+-||-+---+    |   |    |   |    |   +-V--+   |    |            |    +-----R------+    1. C = 4.7$\mu F$ R = 100 $k\Omega$2. C = 4700$\mu F$ R = 1000 $\Omega$3. C = 4.7$\mu F$ R = 1000 $\Omega$4. C = 4700 $F$ R = 100 $k\Omega$ $\begin{aligned}&V_C = I R\\&V_C = \frac{dQ}{dt} R\\\Leftrightarrow &\frac{Q}{C} = \frac{dQ}{dt} R\\\text{We know } &\underbrace{C}_{\text{Capacitance in Farads; constant}} = \frac{\overbrace{Q}^{\text{Amound of charge on plates}}}{\underbrace{V}_{\text{Potential diff across plates}}}\\\text{Call } &RC = \tau \text{ the time constant (}R \text{ resistor, }C \text{ capacitor)}\\&Q(t) = Q_0 e^{-t/\tau}\end{aligned}$  In series/ paralle* In parallel: $C_T = C_1 + C_2 + \cdots + C_n$* In series: $\dfrac{1}{C_T} = \dfrac{1}{C_1} + \dfrac{1}{C_2} + \cdots + \dfrac{1}{C_n}$  Energy stored in capacitor* $Q = C V$ - plotting $Q$ against $V$ gives a line of gradient $C$* Energy stored in capacitor = area: $E = \dfrac{1}{2}QV$**Example**: Draw the Q-V graph for a 10nf capacitor and find graphiclly the energy stored at $V = 5V$.<jupyter_code>import matplotlib.pyplot as plt
import numpy as np

c = 10e-9
vs = np.linspace(0, 10)
qs = c * vs
plt.plot(vs, qs)

plt.xlabel("Potential diff / V")
plt.ylabel("Q / C")

plt.vlines(5, 0, 5*c)

plt.show()

1/2 * c*5 * 5<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.1552390149686142, 'fraction_numerical': 0.0175036214389184, 'mean_word_length': 2.4406146179401995, 'pattern_counts': {'":': 0, '<': 19, '<?xml version=': 0, '>': 30, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 8, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '4', 'dir': 'jupyter-structured-clean-dedup', 'id': '108733', 'license': 'MIT', 'n_tokens_mistral': 2857, 'n_tokens_neox': 2637, 'n_words': 958, 'path': 'notes/PHY/11-electronmagnetic-induction.ipynb', 'repo_name': 'JingjieYang/1-IB', 'size': '8284'}