A modular 2D wave equation solver using finite difference methods
Project description
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
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
wave_solver_2d-0.3.0.tar.gz
(20.9 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file wave_solver_2d-0.3.0.tar.gz.
File metadata
- Download URL: wave_solver_2d-0.3.0.tar.gz
- Upload date:
- Size: 20.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6124f3cef2265728894c914a4b1e916de79e4b7fdfa30e84ae0432c5973b4a34
|
|
| MD5 |
79df5dfd2015ba575f5a3587e7107e50
|
|
| BLAKE2b-256 |
641912b0d26389dd0224bd2dd2aa003602898f1412b43e956ce0e7d72a848c35
|
File details
Details for the file wave_solver_2d-0.3.0-py3-none-any.whl.
File metadata
- Download URL: wave_solver_2d-0.3.0-py3-none-any.whl
- Upload date:
- Size: 20.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3f1d778f365b6a64d043f197240d3fcdb8fc2b867d6e1e86253bc1706315bffc
|
|
| MD5 |
75bdb7634556a6bb3cfa4b607345cae9
|
|
| BLAKE2b-256 |
afb13956e924bdf7233bfba0bf86f9aa932f7bbac47ae70afbeee36fde581954
|