## Simulation of galaxy collision in 2D and 3D using the Barnes Hut Algorithm
## Simulation of galaxy collision in 3D using the Barnes Hut Algorithm
---------
---------
Summary of files and their functionalities:
Summary of files and their functionalities:
...
@@ -16,6 +16,7 @@ In `tasks/src` directory:
...
@@ -16,6 +16,7 @@ In `tasks/src` directory:
- Choosing integrators (we recommend using velocity verlet).
- Choosing integrators (we recommend using velocity verlet).
- Adjusting mass of particles
- Adjusting mass of particles
- Adjusting particle number.
- Adjusting particle number.
- Adjusting the mass of the center of mass (COM)
If the file is executed as `main`, the simulation will be run with following options:
If the file is executed as `main`, the simulation will be run with following options:
- Running the simulation.
- Running the simulation.
...
@@ -32,8 +33,8 @@ Please make sure to read the code description/specification, since it will guide
...
@@ -32,8 +33,8 @@ Please make sure to read the code description/specification, since it will guide
- To avoide infinity gravitational forces at infinitesimally small distances between particles, a cutoff distance is applied. The pair-wise distances between never drop below it.
- To avoide infinity gravitational forces at infinitesimally small distances between particles, a cutoff distance is applied. The pair-wise distances between never drop below it.
-Once a particle exits the frame of the snapshot, it loses its contribution to the center of mass of the "galaxy" and once it reenters the frame, it returns its contribution to the center of mass.
-The COM is provided with a mass. This can be adjusted in "ff_simulation_3D.py".
---------
---------
We recommend using VS_code, Spyder, or Jupyter notebook editiors to run this simulation. Enjoy :)
We recommend using VS_code, Spyder, or Jupyter notebook editiors to run this simulation. Enjoy :)