scatter

A simple program that scatters an incoming wave

https://github.com/pletzer/scatter

Science Score: 31.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
    Found CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
  • DOI references
  • Academic publication links
  • Academic email domains
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (10.7%) to scientific vocabulary
Last synced: 9 months ago · JSON representation ·

Repository

A simple program that scatters an incoming wave

Basic Info
  • Host: GitHub
  • Owner: pletzer
  • License: 0bsd
  • Language: Python
  • Default Branch: master
  • Size: 1.41 MB
Statistics
  • Stars: 2
  • Watchers: 1
  • Forks: 2
  • Open Issues: 0
  • Releases: 0
Created almost 8 years ago · Last pushed almost 6 years ago
Metadata Files
Readme License Citation

README.md

scatter

Scatter is a simple program that computes the scattering of an incident wave on a 2D object. The total wave (incident + scattered) satisfies homomegenous Neunmann boundary conditions on the obstacle.

The numerical method integrates Green's functions along the boundary and requires that the normal derivative of the scattered wave cancels the normal derivative of the incident wave there. Using the assumption that the wavelength is much smaller than the size of the obstacle, the total wave amplitude is approximately set to zero on the shadow side. On the illuminated side, the scattered amplitude set to the incident wave amplitude as described in Morse and Feshbach, Methods of Theoretical Physics, pp 1551-1552.

The numerical approach involves looping over observer points, nodes on a uniform grid, with the scattered wave amplitude computed by summing all the reflection contributions from each boundary segment.

This program shows how a Python code can be modified to run faster using various techniques.

Requirements

  • Python 2.7.x (tested 2.7.14) or 3.x (tested 3.6.3)
  • Scipy (tested 1.0.0, 1.0.1)
  • Numpy (tested 1.13.1, 1.13.3)
  • Boost (1.6.8, 1.6.1)
  • C++ compiler

Directory layout

The directories below ``` |-\ |-original |-vect |-numba |-cext |-multiproc |-mpi |-openmp

`` contain different versions of the scatter code, all producing the same result but each having a different implementation. For instancevecthas a vectorised implementation andcext` has some functions coded in C++ for additional speed.

How to run the code

Regardless of the version of the code, use python scatter.py If you change the code and need to verify that the result has not changed, python scatter.py -checksum Sum of scattered field |amplitudes|^2: 4686.33935547 as this will print out a check sum. Additional options can be invoked to adjust the problem size and other parameters (type python scatter.py --help for a full list). The result can be saved in a VTK file using python scatter.py -save VisIt, Paraview and other tools can then be used to visualise the field.

Total wave amplitude at time t = 0

Owner

  • Name: Alex Pletzer
  • Login: pletzer
  • Kind: user
  • Location: Wellington
  • Company: New Zealand eScience Infrastructure

Citation (CITATION.txt)

@software{scatter-0.9.0,
  author = {{Alexander Pletzer and Mandes Sch\"{o}nherr and Chris Scott and Wolfgang Hayek}},
  title = {Scatter: a wave scattering program implemented in many different ways},
  url = {https://githib.com/pletzer/scatter},
  version = {0.9.0},
  date = {2019-08-27},
}

GitHub Events

Total
Last Year

Issues and Pull Requests

Last synced: over 1 year ago

All Time
  • Total issues: 1
  • Total pull requests: 17
  • Average time to close issues: 5 months
  • Average time to close pull requests: about 3 hours
  • Total issue authors: 1
  • Total pull request authors: 3
  • Average comments per issue: 2.0
  • Average comments per pull request: 0.18
  • Merged pull requests: 15
  • Bot issues: 0
  • Bot pull requests: 0
Past Year
  • Issues: 0
  • Pull requests: 0
  • Average time to close issues: N/A
  • Average time to close pull requests: N/A
  • Issue authors: 0
  • Pull request authors: 0
  • Average comments per issue: 0
  • Average comments per pull request: 0
  • Merged pull requests: 0
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
  • mand35 (1)
Pull Request Authors
  • pletzer (8)
  • tinyendian (2)
  • mand35 (2)
Top Labels
Issue Labels
Pull Request Labels