Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

A collection of exploratory physics notebooks and scripts covering classical mechanics, wave phenomena, optics, and chaos. Includes visualizations of anharmonic oscillators, phase-space portraits, wave interference, and other foundational problems. Each project emphasizes clarity and reproducibility

License

Notifications You must be signed in to change notification settings

hschn58/Physics

Open more actions menu

Repository files navigation

Numerical Physics Projects

This repository collects small Python projects and a final course project demonstrating physics concepts through simulation and visualization.


Projects

  • Visualizes constructive/destructive interference from pairs of sinusoids.
  • Emphasizes how frequency, phase, and amplitude shape the resulting waveform.
  • Includes example plots/animations for fast visual inspection of effects.
  • Simulates a 2D idealized gas with elastic particle–particle and particle–wall collisions.
  • Tracks trajectories, speeds, and aggregate statistics; illustrates approach to equilibrium.
  • Useful for discussing conservation laws and links to Maxwell–Boltzmann intuition.

3) Numerical Optics — Undergraduate Final Project (Physics 325)

  • Report: Numerical_Optics.pdf
  • Implements multiple solvers for the paraxial wave/propagation equation:
    • Rayleigh–Sommerfeld integral, Leapfrog FD, Forward Euler, and Crank–Nicolson.
  • Compares stability, boundary conditions, and computational trade-offs; includes derivations and results.

4) Anharmonic Oscillator — Undergraduate Final Project (Physics 311)

  • Notebook: Anharmonic_Oscillator.ipynb
  • Derives equations of motion (Lagrangian → Hamiltonian → nonlinear ODE) and analyzes:
    • Amplitude-dependent period (elliptic integral), parametric driving, inverted-pendulum stabilization,
    • Onset of chaos and sensitivity to initial conditions (with RK4 simulations and phase portraits).

5) Laplace Equation via Relaxation — Undergraduate Honors Project (Physics 322)

  • Report: Laplace_Relaxation.pdf
  • Implements a 2D relaxation solver on a rectangular grid and benchmarks against an analytic Fourier-series solution.
  • Includes convergence checks, error metrics (RMSE/percent accuracy), and side-by-side visual comparisons.

The scripts require Python 3.x and the following external libraries:

You can install them with:

pip install numpy matplotlib scipy

Usage

Clone the repo and run any script:

git clone https://github.com/hschn58/Physics.git
cd Physics/Wave_Superposition
python3 wave_superposition.py

Example Outputs

Wave Superposition Particle Dynamics Rayleigh–Sommerfeld Integral
Wave Superposition Particle Dynamics Rayleigh–Sommerfeld Integral

License

This project is licensed under the MIT License.

About

A collection of exploratory physics notebooks and scripts covering classical mechanics, wave phenomena, optics, and chaos. Includes visualizations of anharmonic oscillators, phase-space portraits, wave interference, and other foundational problems. Each project emphasizes clarity and reproducibility

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published
Morty Proxy This is a proxified and sanitized view of the page, visit original site.