Skip to content

Repository files navigation

High-Order Nyström/Convolution-Quadrature Wave Scattering Solver

arXiv License: MIT Julia

Overview

This code solves the wave equation in unbounded domains for both time-domain and frequency-domain problems. It handles acoustic and electromagnetic wave scattering from obstacles with various boundary conditions.

What This Solver Does

The solver addresses two types of wave scattering problems:

Time-Domain Problems: The code computes how waves evolve over time when they encounter obstacles. Starting from zero initial conditions, it tracks the wave field as an incident pulse hits the obstacles and scatters. The time-domain solution uses Convolution Quadrature (CQ), which transforms the problem into a sequence of frequency-domain problems that are solved at discrete Laplace transform parameters. The method supports three temporal discretization schemes: BDF2 (second-order backward difference), RK3 (third-order Runge-Kutta), and RK5 (fifth-order Runge-Kutta).

Frequency-Domain Problems: The code can also directly solve the Helmholtz equation at a single frequency, computing the steady-state response when the system is driven by time-harmonic excitation. This is useful for analyzing resonances, computing scattering cross-sections, or studying the frequency response at specific wavelengths.

The solver uses boundary integral equation methods with Nyström discretization. For spatial discretization, it employs Alpert quadratures with various orders of accuracy to handle the weakly singular kernels that arise in the integral equations. The code includes several pre-computed Alpert coefficients ranging from low-order (2-3 correction points) to high-order (7+ correction points) schemes.

The implementation handles multiple geometries including circular arcs, full circles, and combinations thereof (such as a slotted cylinder formed by an arc and a circle). It supports Dirichlet boundary conditions (prescribed field values), Neumann boundary conditions (prescribed normal derivatives), and mixed configurations where different obstacles have different boundary conditions. For Neumann conditions, the code uses a Current and Charge formulation to avoid direct evaluation of hypersingular integrals.

Quick Start

Installation:

git clone https://github.com/circlespie/convolution_quadrature.git
cd convolution_quadrature/conv_quad
julia --project=. -e 'using Pkg; Pkg.instantiate()'

Run a validation example:

julia --project=. scattering_solver.jl --config validation/configs/NEUMANN_NEUMANN_VALIDATION.toml

Try the examples:

# Basic circle scattering
julia --project=. scattering_solver.jl --config examples/basic_circle.toml

# Complex multi-obstacle case  
julia --project=. scattering_solver.jl --config examples/complex_geometry.toml

# Generate movie visualization (BDF2 method - fastest)
julia --project=. scattering_solver.jl --config examples/movie_test.toml

# Try higher-order methods (slower but more accurate)
julia --project=. scattering_solver.jl --config examples/movie_test_rk5.toml

Movie Generation: Set mode = "movie" in your config file to generate high-quality MP4 animations. Movies are saved to output/movies/ with automatic frame generation and ffmpeg encoding.

Key Features

  • Dual-purpose solver: Both time-domain (CQ) and frequency-domain (Helmholtz) problems
  • Multiple temporal methods: BDF2 (2nd order), RK3 (3rd order), RK5 (5th order)
  • Multiple spatial methods: Configurable Alpert quadrature orders with pre-computed coefficients
  • Flexible geometries: Circular arcs, full circles, mixed configurations
  • Mixed boundary conditions: Dirichlet and Neumann boundary conditions
  • High-order accuracy: Up to 5th-order temporal convergence
  • Movie generation: Automatic MP4 creation from time-domain simulations

Documentation

Guide Description
Tutorial Complete walkthrough from installation to advanced examples
Mathematical Background Wave equations, CQ methodology, boundary integral formulations
Configuration Guide Detailed parameter explanations and examples
Advanced Usage Custom geometries, incident waves, solver options
Troubleshooting Common issues and solutions

For new users, start with the Tutorial which provides step-by-step guidance from installation through complex examples.

Basic Usage

Create a configuration file specifying your problem:

[temporal]
method = "BDF2"        # BDF2, RK3, or RK5
num_steps = 128
final_time = 2.0

[geometry]
shapes = [3, 4]        # Arc (3) and circle (4)
radii = [1.0, 0.25]

[boundary_conditions]
types = [2, 2]         # 1=Dirichlet, 2=Neumann

[incident_wave]
pulse_type = "rational_smooth"
frequency = 6.0
direction = [0.0, -1.0]

Run the solver:

julia --project=. scattering_solver.jl --config your_config.toml

Repository Structure

conv_quad/
├── scattering_solver.jl          # Main executable
├── src/                           # Core implementation
│   ├── parameters.jl              # Configuration and parameter handling
│   ├── alpert_coefficients.jl     # Spatial quadrature coefficients
│   ├── mix_kernals.jl             # Boundary integral kernels
│   ├── helm_MIX.jl                # Mixed boundary condition solver
│   ├── CQ_MIX.jl                  # Convolution quadrature methods
│   └── ...                        # Additional solver components
├── examples/                      # Ready-to-run examples
│   ├── basic_circle.toml          # Simple circular scatterer
│   ├── mixed_boundaries.toml      # Dirichlet/Neumann combination
│   ├── slotted_cylinder.toml      # Complex geometry validation
│   └── complex_geometry.toml      # Multi-obstacle scattering
├── docs/                          # Documentation
│   ├── TUTORIAL.md                # Complete user walkthrough
│   ├── MATHEMATICAL_BACKGROUND.md # Theory and methodology
│   ├── CONFIGURATION_GUIDE.md     # Parameter reference
│   └── ADVANCED_USAGE.md          # Advanced features
├── figures/                       # Plots and visualizations
│   ├── gallery/                   # Video gallery with research examples
│   │   ├── GALLERY.md             # Complete video documentation
│   │   ├── boundary_comparisons/   # Dirichlet/Neumann/Mixed comparisons  
│   │   ├── parameter_studies/      # Scale and geometry variations
│   │   ├── grid_comparisons/       # Multi-panel compilation videos
│   │   └── publication_figures/     # Research publication figures
├── validation/                    # Validation framework
│   ├── configs/                   # Test configurations
│   └── validate_alpert_orders.jl  # Validation script
└── test/                          # Test suite

Gallery

All animations are provided as GIF files for direct GitHub viewing. Static figures are available in both PDF (publication quality) and PNG (web display) formats.

Wave Scattering Animation

Wave Scattering Animation

Time-domain wave scattering from slotted cylinder with Dirichlet boundary conditions showing wave propagation and diffraction

Boundary Condition Comparison

Boundary Conditions Grid

Comparative analysis of Dirichlet, Neumann, and mixed boundary conditions

Static Frame Example

Slotted Cylinder Wave Scattering

Wave scattering from slotted cylinder geometry showing diffraction patterns at t=4.2s

Extended Video Gallery

For a comprehensive collection of wave scattering simulations showcasing different boundary conditions, parameter studies, and comparative analyses, see:

Video Gallery - Complete collection of research videos

Highlights include:

  • Boundary Condition Comparisons: Side-by-side Dirichlet, Neumann, and mixed conditions
  • Parameter Studies: Scale variations from low to high frequency regimes
  • Grid Comparisons: Multi-panel presentations showing simultaneous simulations
  • Specialized Geometries: Strip geometries and complex multi-obstacle scenarios

Citation

If you use this software in your research, please cite:

@article{windandersen2023highorder,
  title={High-Order Nystr{\"o}m/Convolution-Quadrature Solution of Time-Domain Scattering from Closed and Open Lipschitz Boundaries with Dirichlet and Neumann Boundary Conditions},
  author={Wind-andersen, Erli and Petropoulos, Peter G. and Turc, Catalin},
  journal={arXiv preprint arXiv:2111.06829},
  year={2023}
}

Acknowledgments

This work was supported by NSF through contract DMS-1908602.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages