This repository contains a self-contained toy model exploring how reaction–diffusion–advection (RDA) dynamics can generate galaxy-like and web-like morphologies in a rotating baryonic medium. It is not a replacement for dark matter or ΛCDM, but a complex-systems analogy and a visual sandbox for pattern formation in an excitable medium.
The project consists of:
-
Paper I — Theoretical Framework:
Cosmic Morphodynamics Hypothesis.md
Derives the two-field Stoner–Turing equations, defines the physical mapping (gas activator & radiation inhibitor), and clearly states the limitations of the model (2-D, no self-gravity, phenomenological parameters). -
Paper II — Computational Verification:
Computational Verification of Cosmic Morphodynamics.md
Describes the numerical experiment, parameter choices, and qualitative results obtained from the Python simulation. -
Python implementation:
CMH.py
A ~221-line reference implementation of the Stoner–Turing RDA model with Keplerian-like advection and live visualization. -
Figures & animations:
results/
Example PNG frames and GIFs generated byCMH.py.
This model is deliberately minimal and phenomenological:
- 2-D thin-disk approximation (no vertical structure).
- No self-gravity or Poisson solver; the velocity field is imposed by hand.
- Parameters (
DIFF_G,DIFF_R,FEED,KILL,ETA) are in simulation units, not calibrated to km/s, pc, or Myr. - No attempt is made to fit rotation curves, lensing maps, or the cosmological matter power spectrum.
As stated in Paper I, this work should be interpreted as:
A toy model and morphological analogy for baryonic structure formation in an excitable medium, not a physically complete alternative to ΛCDM or non-baryonic dark matter.
Use it as a pattern-formation lab, not as a cosmological replacement.
.
├── CMH.py
├── Cosmic Morphodynamics Hypothesis.md
├── Computational Verification of Cosmic Morphodynamics.md
└── results/
├── 1.png
├── 2.png
├── 3.png
├── 4.png
├── 5.png
├── 6.png
├── 7.png
├── cosmic_morphodynamics_spiral.gif
└── cosmic_morphodynamics_spiral_small.gif
CMH.py— main simulation script.results/— sample outputs from a reference run.- The two
.mdfiles — standalone papers (Paper I and Paper II).
This project targets Python 3.10+ and uses only standard scientific Python packages.
Install via pip:
pip install numpy matplotlib scipy pillowFrom the repository root:
python CMH.pyBy default, CMH.py will:
- Initialize the gas (
G) and radiation (R) fields with a central perturbation plus small noise. - Evolve the 2-D Stoner–Turing RDA system on a
200 × 200periodic grid using:- 5-point Laplacian (diffusion),
- explicit Euler time integration,
- a radius-dependent rotational warp (semi-Lagrangian advection).
- Display a two-panel figure:
- Left: real-space gas field (interpreted as “baryonic density”).
- Right: log-magnitude Fourier power spectrum of
G.
- Save an animation to:
(If the results/ directory does not exist, create it or adjust the save path in CMH.py.)
You can change the number of frames, time step, or pattern regime by editing the constants near the top of CMH.py:
NUM_FRAMESSTEPS_PER_FRAMEDIFF_G,DIFF_RFEED,KILLROTATION_STRENGTH
Small changes can move the system between spot, stripe, labyrinth, and more spiral-like regimes.
The PNGs in results/ were generated by running CMH.py with:
N = 200DIFF_G = 0.16DIFF_R = 0.08FEED = 0.040KILL = 0.060ETA = 1.0ROTATION_STRENGTH = 0.05
To regenerate them:
- Delete the existing PNGs / GIFs in
results/. - Run
python CMH.py. - Optionally modify the script to save intermediate frames at chosen timesteps.
If you reference this repository in a talk, blog, or paper, a simple citation is:
Stoner (2025), Cosmic Morphodynamics: A Reaction–Diffusion–Advection Toy Model for Baryonic Structure Formation, GitHub repository.
You can also cite the two internal papers directly:
- Paper I: Cosmic Morphodynamics Hypothesis — theoretical framework and limitations.
- Paper II: Computational Verification of Cosmic Morphodynamics — numerical experiment and qualitative results.
MIT License
Copyright (c) 2025 Stoner
This project was inspired by:
- Classic reaction–diffusion work (Turing patterns, Gray–Scott model).
- Galactic morphology and large-scale-structure studies in the ΛCDM context.
- The broader idea that complex astrophysical structures can sometimes be fruitfully explored through simple excitable-media analogies.



