Skip to content

Simple interactive visualisation of the electric field produced by a set of static point charges.

Notifications You must be signed in to change notification settings

ferxinii/field-pointcharges

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 

Repository files navigation

Electric field of static point charges ⚡️

This repository contains a simple Python code to visualize the electric field produced by a set of static point charges.

Running the code

Simply click on the plot where you want to place the point charge. A random charge of (reduced) magnitude 1 or -1 will be placed there, and the corresponding electric field visualized.

Physics

I have used Coulomb's law and the principle of superposition to compute the field in every point of a 2D grid. Note that the units are reduced.

$$\vec{E^*}(\vec{r}) = \sum_{i=1}^N q^*_i \frac{\vec{r}-\vec{r_i}}{(\vec{r}-\vec{r_i})^3} \quad \quad q^*_i = \frac{q_i}{4\pi\epsilon _0}$$

Examples

Example 1 Example 2

About

Simple interactive visualisation of the electric field produced by a set of static point charges.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages