Welcome to ElectriPy, a powerful and interactive electrostatic simulator designed to help you gain an intuitive understanding of how electric fields and charges behave. Created as a personal project to visualize the principles of physics, ElectriPy lets you play with electrons and protons, observing how the electric field changes as you add more charges to the simulation.
ElectriPy was developed as a user-friendly and engaging tool to facilitate the exploration of electrostatics. Unlike precise calculators, ElectriPy emphasizes simulation and learning through interactive play. Whether you are a student, an educator, or simply someone curious about the fascinating world of physics, this simulator is here to spark your interest and deepen your understanding of electric fields.
Getting started with ElectriPy is easy. You'll need to have Python 3.10 (or above) and pip installed. Once you've met these requirements, simply install Numpy, Pygame and the ElectriPy package using the following commands:
$ pip install numpy
$ pip install pygame
$ pip install electripy
You are all done! To start the simulation type:
$ python -m electripy
- right click to add an electron
- left click to add a proton
- CTRL + Z to remove last charge added
- CTRL + Y to add last charge removed
- R to remove all charges from screen
- E to show/hide the electric field
- + to increment the electric field brightness
- - to decrement the electric field brightness
- F to show/hide electric force vectors
- M to show/hide electric field vector at cursor position
- SPACE to show/hide vectors components
This section explains the physics of ElectriPy. If you want to see its implementation on Python you can go to ElectriPy physics package on GitHub. While following the logic and formulas below it is important to consider that all charges are point charges (i.e. their mass is negligible) and are at rest.
Imagine we have a plane with two point charges at rest,
Nevertheless, we need to find the electric forces vector, not only their magnitude. To
simplify our task we are going to analyze the electric force exerted only on
In this scenario,
Here the electric force has changed, it is now calculated as
As we see, the direction of
Now let's imagine that we have three point charges:
If we look at
Given a distribution of
After replacing
We can optimize this by taking the constants values outside of the summatory:
We have arrived to a formula for calculating the electric net force of a given charge on an electric field distribution.
The electric field is defined mathematically as a vector field that associates to each point in space the force per unit of charge exerted on an infinitesimal positive test charge at rest at that point.
Given a test charge
Where
Where
ElectriPy is an engaging and user-friendly electrostatic simulator that allows you to explore the intriguing world of electric fields and charges. Through interactive play and visualizations, ElectriPy offers a platform to experiment with point charges, observe electric field interactions, and gain valuable insights into fundamental physics concepts.
As a tool for learning and teaching, ElectriPy serves as an excellent resource for students, educators, and enthusiasts alike. By interacting with electrons and protons and manipulating electric fields, you can develop an intuitive understanding of how charges behave and how their interactions shape the electric field.
While ElectriPy may not be as complex as some specialized simulation tools, its simplicity allows for an accessible and enjoyable learning experience. It aims to spark curiosity, enhance intuition, and provide a starting point for further exploration of electrostatics.
If you enjoyed using ElectriPy and found value in its educational features, we encourage you to consider giving it a star on GitHub. Your support motivates us and shows appreciation for the effort put into creating this interactive electrostatic simulator.
Feel free to share ElectriPy with others who might benefit from this hands-on learning experience. Together, we can inspire a deeper appreciation and understanding of electric fields and their fascinating behavior.
Thank you for being a part of the ElectriPy community, and we hope you find value in your exploration of electric fields with this interactive tool. Happy simulating!