Skip to content

A collection of different simulations in fields of physics like Statistical Physics, Quantum Mechanics and Fluid Dynamics.

License

Notifications You must be signed in to change notification settings

davidomanovic/computational-physics-projects

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

34 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Physics Scripts Collection

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.

Contents

  • 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.

Getting Started

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.

Requirements

Install the following dependencies to run the scripts:

pip install numpy scipy matplotlib

About

A collection of different simulations in fields of physics like Statistical Physics, Quantum Mechanics and Fluid Dynamics.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published