{"id":49602281,"url":"https://github.com/jorgemunozl/physical_simulations","last_synced_at":"2026-05-04T09:36:36.510Z","repository":{"id":327293514,"uuid":"1106789763","full_name":"jorgemunozl/physical_simulations","owner":"jorgemunozl","description":"A set of physics/mathematics scripts for different concepts.","archived":false,"fork":false,"pushed_at":"2026-04-27T00:16:45.000Z","size":9039,"stargazers_count":13,"open_issues_count":15,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2026-04-27T02:27:38.182Z","etag":null,"topics":["mathematics","nn","numpy","physics","python","scikit-learn","sympy"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jorgemunozl.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-11-30T00:07:25.000Z","updated_at":"2026-04-27T00:16:48.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/jorgemunozl/physical_simulations","commit_stats":null,"previous_names":["jorgemunozl/physical","jorgemunozl/physical_simulations"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/jorgemunozl/physical_simulations","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jorgemunozl%2Fphysical_simulations","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jorgemunozl%2Fphysical_simulations/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jorgemunozl%2Fphysical_simulations/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jorgemunozl%2Fphysical_simulations/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jorgemunozl","download_url":"https://codeload.github.com/jorgemunozl/physical_simulations/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jorgemunozl%2Fphysical_simulations/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32601761,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-03T22:12:39.696Z","status":"online","status_checked_at":"2026-05-04T02:00:06.625Z","response_time":58,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["mathematics","nn","numpy","physics","python","scikit-learn","sympy"],"created_at":"2026-05-04T09:36:36.399Z","updated_at":"2026-05-04T09:36:36.499Z","avatar_url":"https://github.com/jorgemunozl.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Physical simulations\n\nSmall math and physics experiments, simulations, and visualizations—mostly for curiosity and learning. This repository is a playground for stochastic processes, numerical integration, differential equations, optics, sampling, quantum-inspired numerics, and a few supporting utilities.\n\n## Setup\n\nPython **3.13+** (see `.python-version`). Dependencies are declared in `pyproject.toml` (NumPy, SciPy, SymPy, Matplotlib) and locked in `uv.lock`.\n\n```bash\ncd physical_simulations\nuv sync\n```\n\nSome scripts additionally expect **PyTorch** (for example `src/metropolis_hasting/`, `src/kans/`, and `src/matplotlib/main.py`). Install it in the same environment when you need those modules.\n\n## Topic index\n\n### Stochastic processes\n\n- `src/brownian/`  \n  Brownian motion in 1D and 3D, plus scripts for generating animations.\n- `src/metropolis_hasting/`  \n  Metropolis–Hastings sampling with a Gaussian target and a small PyTorch-based sampler (`MH.py`).\n\n### Numerical integration\n\n- `src/integrals/line_integral.py`  \n  Line integral along a parametric curve.\n- `src/integrals/riemann.py`  \n  Riemann and trapezoidal rules, with derivative and cumulative-integral plots.\n- `src/integrals/surface_integral.py`  \n  Scalar surface integrals and flux through parametric surfaces.\n\n### Differential equations\n\n- `src/differential_equations/`  \n  Numerical ODE experiments and Wronskian-related code.\n- `src/de_integration_me/`  \n  2D vector-field examples integrated with naive stepping, finite differences, and RK4.\n- `src/curricular/mathematics_methods_lab_01/`  \n  Course lab material: symbolic DEs, Euler method, numerical comparison, Wronskian script, LaTeX report (`main.tex`), and supporting assets.\n\n### Optics\n\n- `src/optics/refraction.py`  \n  Refraction at a planar interface (Snell’s law), static plots and GIF animation.  \n  Rendered outputs live under `src/optics/` (for example `refraction.png`, `tir.gif`).\n\n### Quantum / electronic structure\n\n- `src/dft/dft.py`  \n  Finite-difference density-functional toy model for hydrogen-like radial states.\n\n### Classical / mathematical physics\n\n- `src/spherical_armonics/main.py`  \n  Legendre and associated Legendre experiments tied to spherical harmonics.\n- `src/magnetic_field/main.py`  \n  Magnetic-field sketches from simple wire or point geometry.\n- `src/experimental_magnetic_field/main.py`  \n  Plotting experimental magnetic-field versus current data.\n- `src/vector_fields/vector_fields.py`  \n  Small library of illustrative 2D fields and plots.\n\n### Linear algebra and fitting\n\n- `src/descompositions/main.py`  \n  Gram–Schmidt orthonormalization, QR-style reconstruction, and error checks.\n- `src/least_squares/least_squares.py`  \n  Linear least squares via the normal equation.\n\n### Neural / approximation experiments\n\n- `src/kans/main.py`  \n  Scratch Kolmogorov–Arnold style layer on a toy regression task (PyTorch).\n\n### Visualization utilities\n\n- `src/matplotlib/main.py`  \n  Heat-equation-style comparisons, errors, scalar fields, and 3D views (uses PyTorch in places).\n\n### Concurrency\n\n- `src/async/async.py`  \n  Small async versus threading comparison for I/O-bound work.\n\n---\n\nMost entry points are plain scripts: run them with `uv run python path/to/script.py` after `uv sync`. Have fun experimenting.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjorgemunozl%2Fphysical_simulations","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjorgemunozl%2Fphysical_simulations","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjorgemunozl%2Fphysical_simulations/lists"}