/MPhys-Project-N-Body-Code

The N-Body code written to simulate interacting galaxies, for MPhys project.

Primary LanguagePython

Gravitational Interactions of Galaxies - N-Body Code

Background

This repository contains code written for my MPhys project that researched gravitational interactions of galaxies. Specifically, the interaction of Arp 240 (between NGC 5257/58 galaxies) was being investigated.

The aim of the project was to recreate the interaction the galaxies are currently experiencing in order to understand both how the interaction came about, and how it will look in the future. This can help improve our understanding of these types of interactions, including how they come about and what their results are, as well as predicting future interactions. Additionally, it may help deepen our understanding of dark matter and it's effects.

The dissertation is attached in this repository (MPhys-Dissertation.pdf), for those interested.

The code in this repository was written as a tool to conduct n-body numerical simulations of the galaxies' gravitational interactions.

Usage

The best way to use this code is to download it from GitHub and run the NBody.py file locally.

The parameters of the simulation/interaction can be updated in the config.py file.

You can observe the simulation using the plotting scripts in the /plotting directory.

NOTE

This is legacy code! It should still run, but it is by no means an efficient N-Body simulation.

Additionally, it is not particularly well written code as it was the first large programming project I had written in Python. It is not demonstrative of my current programming ability.