This repository contains various simulation codes developed during the course on Physical Systems Simulation. The files are organized into several directories based on their functionality and purpose.
This directory contains files corresponding to midterm exams conducted in the Physical Systems Simulation course.
- bolaPingPong: Simulation codes related to the ping pong ball dynamics.
- cunaNewton: Simulation code related to Newton’s cradle.
- midterm1: Contains various points related to the first midterm exam, related to Magnus Force Simulation.
- F_Flecha: Examining forces acting on a projectile (arrow).
- LenteBiesferica: Simulations related to a biconvex lens.
This directory contains shell scripts with commands for accessing the university’s computer labs.
- loginComputerLab.sh: Script for logging into the computer lab.
- loginMaxwellComputer.sh: Script for accessing the Maxwell computer lab.
This directory contains all source code files organized into subdirectories based on their specific topics. The following are the key components of this directory:
This directory is dedicated to simulations using the Lattice Boltzmann method and is divided into three key areas:
- EMLBM_Dielectric.cpp: Code for simulating electromagnetic fields in dielectric materials using Lattice Boltzmann methods.
- EMLBM_Skin.cpp: Code for simulating skin effect in conductive materials.
- LB_Fluids_D2Q9.cpp: Simulation of fluid dynamics using the D2Q9 lattice configuration.
- LB_Poiseuille.cpp: Simulation of Poiseuille flow in a channel using Lattice Boltzmann methods.
- plotFluids.gp: Gnuplot script for visualizing fluid simulation results.
- plotWaves.gp: Gnuplot script for visualizing wave propagation results.
- Waves_D2Q5.cpp: Simulation code for wave propagation using the D2Q5 lattice configuration.
This subdirectory contains simulations related to Brownian motion.
- pollenDiffusion.cpp: C++ implementation simulating the diffusion of pollen particles.
- Random64.h: Header file providing random number generation utilities.
Contains Jupyter Notebook files that demonstrate simulations using CUDA for parallel computing.
- Adding_two_1D_arrays_on_CUDA_Google_Colab.ipynb: A notebook that illustrates the addition of two 1D arrays using CUDA.
- LBwavesD2Q5_on_CUDA_Google_Colab.ipynb: A notebook focused on simulating Lattice Boltzmann waves in a D2Q5 lattice using CUDA.
This directory includes simulations of discrete element methods with several subdirectories:
- Ball.cpp: C++ code simulating the behavior of a ball under various conditions.
- Collider.cpp: Code for simulating evolution of the orbit of two planets.
- vector.h: Header file for vector operations.
- Molecules.cpp: Code simulating 2D gas molecules.
- Grains2D.cpp: C++ code simulating granular material behavior in 2D.
- Contains various implementations of planetary motion simulations.
- PlanetaEuler.py: Python implementation of Euler’s method for planetary motion.
- PlanetaForestRuth.py: Implementation of the Forest-Ruth method for simulating planetary orbits.
- PlanetaLeapFrog.py: Leapfrog integration method for simulating planetary motion.
- PlanetaPEFRL.py: PEFRL (Position Verlet with Force Rotation Leapfrog) method for planetary dynamics.
- PlanetaVerlet3erOrden.py: Third-order Verlet method for simulating planetary motion.
- Planet.cpp: C++ code for simulating the dynamics of planets.
- plot.gp: Gnuplot script for visualizing planetary motion results.
- vector.h: Header file for vector operations.
- BallVector.cpp: Implementation of vector operations for ball dynamics.
- PlanetaConstructor.cpp: Code for constructing planet simulations.
- plot.gp: Gnuplot script for visualizing vector simulation results.
This directory contains simulations related to Lattice Gas models:
- Continuous_LatticeGas1D.cpp: Code simulating a continuous Lattice Gas in one dimension.
- Discrete_LatticeGas1D.cpp: Code simulating a discrete Lattice Gas in one dimension.
This subdirectory focuses on algorithms for rotational dynamics:
- topRotationQuaternions.cpp: Code for simulating the rotation of a spinning top using quaternion mathematics.
This directory contains implementations of the Runge-Kutta method for solving ordinary differential equations:
- Euler.cpp: Implementation of the Euler method.
- RungeKutta4CondFrontera.cpp: Fourth-order Runge-Kutta method with boundary conditions.
- RungeKutta4.cpp: Standard fourth-order Runge-Kutta method implementation.
- RungeKuttaAcoplado.ipynb: Jupyter Notebook demonstrating the coupled Runge-Kutta method.