Physika
This page is meant to be a comprehensive treatment of all the physics I have learnt and been learning. It will cover areas of mechanics, quantum mechanics, optics, photonics, electromagnetics, field theory, and gravity. I will try to make this as comprehensive and all-encompassing in as cohesive a flow as possible, stating from basic fundamentals. It will not be physically possible to cover every topic in the realm of physics of course, but the goal is to cover enough that one can venture to learn more in depth once these fundamentals are understood. I will include references where applicable and write the code, simulations, and plots myself for my own learning and easy elucidation. Thanks for your patience, let’s begin!
1. Atomic beginnings
1.1 Hydrogen
The hydrogen atom: electron \(\color{blue}{-e}\), proton \(\color{blue}{+e}\), Coulomb potential.
Energy scales as \(1/n^2\) (eq. 1.1).
Code
import math
OSCILLATOR_X_RANGE = (0.0, 60.0)
OSCILLATOR_Y_RANGE = (-1.25, 1.25)
OSCILLATOR_X_AXIS_TITLE = "Time (dimensionless), t"
OSCILLATOR_Y_AXIS_TITLE = "Displacement (dimensionless), x"
def run_calc_slider(gamma, t_max=30.0):
n = 300
dt = t_max / max(n - 1, 1)
t = [i * dt for i in range(n)]
if gamma < 1.0:
wd = math.sqrt(1.0 - gamma**2)
y = [math.exp(-gamma * ti) * math.cos(wd * ti) for ti in t]
elif abs(gamma - 1.0) < 1e-9:
y = [math.exp(-ti) * (1.0 + ti) for ti in t]
else:
s = math.sqrt(gamma**2 - 1.0)
y = [math.exp(-gamma * ti) * math.cosh(s * ti) for ti in t]
ep = [math.exp(-gamma * ti) for ti in t]
en = [-math.exp(-gamma * ti) for ti in t]
return t, y, ep, en, OSCILLATOR_X_RANGE, OSCILLATOR_Y_RANGE, OSCILLATOR_X_AXIS_TITLE, OSCILLATOR_Y_AXIS_TITLE
Damped oscillator
(x(t)) vs (t); sliders: (\gamma) (horizontal), (t_{\mathrm{end}}) (vertical). Fixed axes in oscillator_slider.py.
Hydrogen demos
| Radial (R_{n\ell}(r)) and orbital ( | \psi | ^2) in (xz). Each plot has its own (n) and (\ell) (independent). Fixed axes in hydrogen.py. |