electromagnetics#
Functions#
|
|
|
|
|
Calculate the electric field from a capacitor. |
|
Calculate the magnetic field generated by a cylindrical capacitor. |
Module Contents#
- electromagnetics.E_from_circular_capacitor(x, y, z, Q, a, d)[source]#
Calculate the electric field from a capacitor. Parameters: x (float): x-coordinate of the point where the electric field is calculated. y (float): y-coordinate of the point where the electric field is calculated. z (float): z-coordinate of the point where the electric field is calculated. Q (float): Charge of the capacitor. a (float): Radius of the circular capacitor plates. d (float): Distance between the capacitor plates. Returns: numpy.ndarray: Electric field vector [E_x, E_y, E_z] at the given point.
Returns [0, 0, 0] if the point is outside the capacitor. Ignore the edge effects.
- electromagnetics.B_from_circular_capacitor_charging(x, y, z, I, a, d)[source]#
Calculate the magnetic field generated by a cylindrical capacitor. Parameters: x (float): x-coordinate of the point where the magnetic field is calculated. y (float): y-coordinate of the point where the magnetic field is calculated. z (float): z-coordinate of the point where the magnetic field is calculated. I (float): Current flowing into the lower capacitor plate. a (float): Radius of the circular capacitor plates. d (float): Distance between the capacitor plates. Returns: numpy.ndarray: A 3-element array representing the magnetic field vector [Bx, By, Bz] at the given point.