Coder Social home page Coder Social logo

field-pointcharges's Introduction

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

field-pointcharges's People

Contributors

ferxinii avatar

Watchers

 avatar

Forkers

344836387

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.