Coluosim is stand for Coulomb's law simulator.
This project has been tested on Ubuntu 22.04
with Desktop Qt 6.7.2
.
-
Install Qt Prerequisites
Ensure your system is up to date:
sudo apt update && sudo apt upgrade
Then, install the necessary dependencies. For Debian/Ubuntu-based distro:
sudo apt install build-essential libgl1-mesa-dev
Refer to the Qt documentation for installation instructions on other Linux distributions.
-
Download and Install Qt
Download the Qt Online Installer (open source) from Qt's official site.
Run the installer and select "Qt 6.7.2 for desktop development" to install the necessary Qt libraries for GCC.
-
Clone the Repository
git clone https://github.com/mmmoradi/coulosim.git
-
Open project with Qt Creator and run it
When adding a charge to a simulation, you must specify the following properties:
- position [m]: The position of the charge in meters.
- velocity [m/s]: The velocity of the charge in meters per second.
- q [C]: The charge value in Coulombs.
- mass [kg]: The mass of the charge in kilograms.
- mobile: Determine whether the charge is mobile (can move) or static.
- play/pause/reset: Control the simulation's state.
- magnetic field [T]: Set the external magnetic field strength in Tesla.
- electric field [N/C]: Set the external electric field strength in Newtons per Coulomb.
- speed: Adjust the speed of the simulation.
- deltaT [ms]: Set the time step in milliseconds.
- refresh [ms]: Set the refresh rate for the simulation in milliseconds.
Load one of the predefined samples (Sample 1 to 4) to quickly start a simulation with preset configurations.
-
Sample 1: Elliptical motion with a static positive charge and a negative charge with an initial velocity.
-
Sample 2: Simulation of negative charge in an external electric field.
-
Sample 3: Simulation of positive charge in an external magnetic field.
-
Sample 4: Circular motion with a static negative charge and a positive charge with an initial velocity.
- Add friction force to the simulation.
- Implement dynamic memory management for charge objects.
- Complete documentation.
Contributions are welcome! If you would like to contribute to this project, please fork the repository and create a pull request with your changes.
This project is licensed under the MIT License. For more details, please see the LICENSE
file in the repository.