2D Wave Equation Solver
A modular, testable implementation of a 2D wave equation solver using finite difference methods.
Features
- Modular design with separate components for boundary conditions, initial conditions, and solver
- Support for different boundary conditions (Dirichlet, Neumann)
- Configurable domain size, resolution, and wave speed
- Built-in visualization and animation capabilities
- Comprehensive test suite
Installation
pip install wave-solver-2d
Usage
# Show help
wave-solver --help
# Run with default parameters
wave-solver
# Run with custom parameters
wave-solver --wave-speed 1.5 --domain-size 3.0 --resolution 151 --time 4.0
# Run without animation
wave-solver --no-animation --time 2.0
# Use different color maps
wave-solver --colormap seismic
API
from wave_solver import WaveEquationSolver2D, DirichletBC, InitialCondition
import numpy as np
# Create initial condition
ic = InitialCondition(
displacement=lambda x, y: np.exp(-((x-1)**2 + (y-1)**2) / 0.1)
)
# Create solver
solver = WaveEquationSolver2D(
c=1.0, Lx=2.0, Ly=2.0, Nx=101, Ny=101,
boundary_condition=DirichletBC(),
initial_condition=ic
)
# Solve for 2 seconds
solver.solve(T=2.0)
Contribute and Contact
feel free to drop a PR!!
reach me at : Celestine1729@proton.me <3
Metadata
Release files for wave-solver-2d 0.4.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| wave_solver_2d-0.4.0.tar.gz | 20.9 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| wave_solver_2d-0.4.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 41.3 kB
Release files / wave_solver_2d-0.4.0.tar.gz
| Download URL | wave_solver_2d-0.4.0.tar.gz |
|---|---|
| Size | 20.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
252652bc34f7fa346214dbb937ab75c38a38823f5ac43a0e688564d016ebe7c6
|
|
BLAKE2b-256 checksum How to use checksums |
2ef196b1efa37380f1d85aedd4cb50995491a57365854afe54503e5af13ce68f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.6
|
Release files / wave_solver_2d-0.4.0-py3-none-any.whl
| Download URL | wave_solver_2d-0.4.0-py3-none-any.whl |
|---|---|
| Size | 20.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
bbebdf62dcf04655e05b6594d55af4e98576298070b39df2824b539be0d70267
|
|
BLAKE2b-256 checksum How to use checksums |
032283a475ef81ff7025d37c781218ef3d6408c582e4671e90d21a0f147a80b6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.6
|