Examples
The examples folder holds Python runscripts that each solve a particular physics or math problem.
cherenkov.py
Simulates a supersonic (or superluminal) point source moving through a medium at a speed greater than c.
diffractionGrating.py
Simulates the transmission of an acoustic wave through a diffraction grating.
doubleSlit.py
Simulates a double slit experiment.
imageToStringArt.py
Creates the instructions for (and previews) an image made from strings stretched across a wheel with a chosen number of pins.
phase_coupling.py
Simulates harmonic oscillators coupled via a Kuramoto coupling parameter. This example is 10,000 oscillators (100x100) initialized with a random phase and coupling strength of 20%.
plinko.py
Simulates the Plinko game.
reactionDiffusion.py
Simulates the destruction of chemical mixtures in a rock-paper-scissors-like reaction setup, where A->B->C->A. In this case, A is blue, B is green, and C is red.
tsunami.py
Simulates a tsunami generated by a point source off the San Francisco Bay.
voronoi_diag.py
Originally a test of the Voronoi mesh generator, this script shows how to use it to generate a Voronoi diagram.
This particular example is the Voronoi mesh for a glass distribution generated by GlassNodeGenerator2d.
waveLogo.py
Simulates acoustic waves inside a region with Dirichlet boundary conditions arranged in a unique fashion.
Simple Test Cases
Many of the Python scripts inside the tests folder stress single components of Yggdrasil, or a small subset of them. For instance,
waveBox.py tests the acoustic wave solver with a single oscillatory source in the center of a box with two openings on either end
(using Dirichlet boundaries to create the box).