Skip to content

CallMeGary123/ElectricFieldSimulator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

31 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Electric Field Simulator

This program is designed to provide a gui to simulate electric fields in brain using PyCharge.
*note that the calculations are carried out in vacuum space

*DISCLAIMER: The ability to put a charge inside the circle which represents the head is a design choice to allow more experimentation.

Content

Usage

From Source (Recommended)

Prerequisites

Step 1 - Python

First make sure you have Python installed.
You can execute python --version to check if you have python installed, if you don't have Python installed you can install it from this link.

Step 2 - Libraries

Execute pip install -r requirements.txt to get all the required libraries.

Step 3 - Running The Program

Execute python gui.py to run the program.

From Executable (Windows Only)

Windows users can simply download the exe file from releases and use the program.
*note that this executable has been created using auto-py-to-exe and hasn't been tested thoroughly.

Interface

1 - This panels lists all the current charges.
2 - This is the utility panel of the program.
3 - This panel shows a preview of charge positions and head radius.
4 - This bar indicates the progress of simulation process.

Running a simulation

Adding Charges

You can use the "Add Charge" button or simply click on where you want to add a charge and to do this however this method is not recommended.

Instead use "Load CSV" (Recommended) to load all the charges at once. To do this create a CSV file with columns X,Y,q and load it into the program. you can see an example csv in the repository

Example Input

Example Output

Settings

Setting Description
Head Radius Radius of the head in meter.
Number of simulation points Number of simulation points per axis. (100 would result in 10,000 simulation points in total)
linthresh Plotting parameter. Please refer to matplotlib documentation.
linscale Plotting parameter. Please refer to matplotlib documentation.
vmin Plotting parameter. Please refer to matplotlib documentation.
vmax Plotting parameter. Please refer to matplotlib documentation.

Keyboard Shortcuts

Shortcut Function
Enter Save (where "Save" button is present).
Ctrl + A Add charge.
Ctrl + C Clear all charges.
Ctrl + R Run simulation.
Ctrl + L Load CSV file.
F1 Open settings.

Issues

Please refer to issues tab to see a list of current identified issues.

About

A program to simulate electric fields.

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages