This repository contains a variety of Python scripts for simulating and solving common problems across multiple disciplines in physics. These scripts use numerical approaches, leveraging libraries like numpy
, scipy
, and matplotlib
for computation and visualization.
-
Classical Mechanics
- Kapitza Pendulum: Simulates the dynamic behavior of a Kapitza pendulum by solving ordinary differential equations (ODEs).
- Resonance Dynamics: Numerical exploration of resonance phenomena in mechanical systems.
-
Electricity and Magnetism
- Electrostatics Simulation: Models electrostatic fields, including examples such as parallel plate capacitors and fields from point charges.
- Finite Difference Methods: Solves electrostatics problems using finite difference methods, such as calculating fields with the Jacobian matrix.
-
Electromagnetic Theory
- Laplace’s Equation: Solves Laplace's equation for a square hollow metal tube, inspired by problems in David J. Griffiths' Introduction to Electrodynamics (Chapter 3).
- Gibbs Phenomenon: Numerical analysis of the Gibbs phenomenon, including Fourier series expansion and error analysis.
-
Fluid Mechanics and Wave Physics
- CFD Finite Volume Simulations: Simulates fluid dynamics using finite volume methods, with animations for visualizing flow.
- Damped Oscillator: Models the behavior of a damped oscillator over time.
-
Nonlinear Dynamics and Chaos Theory
- Chaotic Systems: Simulations of chaotic attractors such as the Lorenz and Rössler systems.
- Lyapunov Theory and Cobweb Constructions: Analyzes the stability of systems using Lyapunov exponents and visualizes iterative maps with cobweb plots.
-
Quantum Mechanics
- Schrödinger Equation Solutions: Numerical solutions of the time-independent and time-dependent Schrödinger equations for different potentials.
-
Statistical Physics
- Molecular Dynamics: Implements the Verlet algorithm to simulate molecular dynamics, with animations showing the evolution of molecules over time.
-
Thermodynamics
- Maxwell-Boltzmann Distribution: Simulates and visualizes particle velocities following the Maxwell-Boltzmann distribution.
- Ideal Gas Simulation: Models the behavior of an ideal gas with interactive visualizations.
Each topic in this repository is organized into its own folder. Within each folder, you'll find:
- README.md: Detailed information about the specific simulation, theory, and methods used.
- Code: Python scripts or Jupyter notebooks for running simulations and visualizing results.
- Examples: Sample output plots, animations, or figures generated by the code.
Install the following dependencies to run the scripts:
pip install numpy scipy matplotlib