Python Simulations

Welcome to my python simulations showcase! All simulations are models of real world physics applications. The simulations are build using an online platform called Glowscript a platform which hosts a web version of VPython a visual python library which can be used to make animations and simulations. I build these simulations as a way to explore my passions of space travel and nuclear energy through physics.

GitHub to all simulation’s source code

If you want to see the programs in action, please go to the links for each project.

Earth Orbit Simulation:

Glowscript Earth Orbit Simulation

In this image, the blue dot represents the Earth, and the white dot represents the moon, obviously not to scale. The red line is a space object we named Ranger 7 after the satellite probe crashed into the moon. If we adjust the parameters of initial velocity for Ranger 7, the entire simulation will change.

When the initial velocity of Ranger 7 is decreased, it can no longer escape Earth’s orbit and falls back down to Earth

We can even change the initial velocity to allow Ranger 7 to bounce off the moon’s orbit, back to Earth’s orbit, and out into space!

Electric field and particle motion inside a tokamak :

Glowscript Tokamak simulation:

What is a tokamak?

A tokamak is a nuclear fusion reactor. Inside of a tokamak, particles are accelerated and heated using highly powerful magnets to the point where the stream of particles becomes plasma. This project simulates the motion of a proton inside a tokamak at a rate which we can see. By changing the mass and charge of the particle we can change the type of particle in the simulation.

Motion of a Particle From an Electric Dipole Simulation

Glowscript Electric Dipole Simulation:

The primary purpose of this simulation is to model the motion of different particles from an electric dipole. An electric dipole is a system of two particles that have identical inverse charges.

In this image, we see the motion of a proton; the particle will oscillate back in this semi-circle.

In this image, we see the motion of an antiproton, a particle with the same mass as a proton but with a negative charge.

We can explore how different initial positions will result in exciting motion!