Examples

k-Wave-python examples are organized by topic. Each example uses the setup()/run() pattern and can be run directly:

uv run python examples/ivp_homogeneous_medium.py

No GPU required — all examples run on CPU with NumPy.

Start with the Your First k-Wave Simulation tutorial, then explore by topic:

Initial Value Problems (IVP)

Learn fundamental wave physics using initial pressure distributions.

Time-Varying Pressure Sources (TVSP)

Transducer-driven simulations with time-varying sources.

Sensor Directivity (SD)

How sensor geometry affects measurements.

Photoacoustic Reconstruction (PR)

Image reconstruction from sensor data.

Numerical Analysis (NA)

Computational methods and optimization.