All Projects → JuliaWaveScattering → MultipleScattering.jl

JuliaWaveScattering / MultipleScattering.jl

Licence: other
A Julia library for simulating, processing, and plotting multiple scattering of waves.

Programming Languages

julia
2034 projects

Projects that are alternatives of or similar to MultipleScattering.jl

Unity Bullet Hell
An extremely efficient projectile generator for unity.
Stars: ✭ 168 (+380%)
Mutual labels:  particles
Particleground Portfolio
A minimalistic particle theme landing page template. ⚛️
Stars: ✭ 204 (+482.86%)
Mutual labels:  particles
ParticleEditor
Particle editor for SFML/Thor based applications
Stars: ✭ 14 (-60%)
Mutual labels:  particles
Black
World's fastest HTML5 2D game engine   🛸
Stars: ✭ 174 (+397.14%)
Mutual labels:  particles
Three Nebula
WebGL based particle system engine for three.js
Stars: ✭ 192 (+448.57%)
Mutual labels:  particles
Partikel accelleration on gpu
Particle accelleration with OpenGL 4.3, using the compute shader to calculate particle movement on graphics hardware.
Stars: ✭ 236 (+574.29%)
Mutual labels:  particles
Proton
Javascript particle animation library
Stars: ✭ 1,958 (+5494.29%)
Mutual labels:  particles
ping-vue-admin
用vue做的一个后台管理系统模板,可以用此项目作为一个脚手架工程
Stars: ✭ 50 (+42.86%)
Mutual labels:  particles
Particle Life
Game of life with particles
Stars: ✭ 194 (+454.29%)
Mutual labels:  particles
diffcalc
Diffcalc: a diffraction condition calculator for X-ray or neutron diffractometer control
Stars: ✭ 17 (-51.43%)
Mutual labels:  diffraction
Dota
"hats" "what rules?" "free game" "no bitching" "glance value" - Delay the inevitable!
Stars: ✭ 179 (+411.43%)
Mutual labels:  particles
React Native Confetti Cannon
React Native confetti explosion and fall like iOS does.
Stars: ✭ 149 (+325.71%)
Mutual labels:  particles
Disintegrate
A small JS library to break DOM elements into animated Canvas particles.
Stars: ✭ 251 (+617.14%)
Mutual labels:  particles
Unity resources
A list of resources and tutorials for those doing programming in Unity.
Stars: ✭ 170 (+385.71%)
Mutual labels:  particles
particle-emitter
A particle system for PixiJS
Stars: ✭ 709 (+1925.71%)
Mutual labels:  particles
Layaair discard
This is old LayaAir veriosn writetten by ActionScript 3.0 ,now LayaAir is using TypeScript as the Engine Script,Please use https://github.com/layabox/LayaAir instead.
Stars: ✭ 1,858 (+5208.57%)
Mutual labels:  particles
Vue Particle Effect Buttons
A bursting particles effects buttons component ✨💥❄️🌋
Stars: ✭ 219 (+525.71%)
Mutual labels:  particles
v2
🧪 Personal website built using React!
Stars: ✭ 113 (+222.86%)
Mutual labels:  particles
ncrystal
NCrystal : a library for thermal neutron transport in crystals and other materials
Stars: ✭ 27 (-22.86%)
Mutual labels:  scattering
pyxem
An open-source Python library for multi-dimensional diffraction microscopy.
Stars: ✭ 114 (+225.71%)
Mutual labels:  diffraction

MultipleScattering

CI

A Julia library for simulating, processing, and plotting multiple scattering of waves.

The library focuses on multipole methods (addition translation theorems) to solve the inhomogeneous Helmholtz equation (time-harmonic waves). Multipole methods are particularly efficient at solving scattering from particles in an infinite domain. This library is configured to use T-matrices (also known as scattering matrices) to represent scattering from particles with any shape and properties (currently implemented for acoustics).

The package is setup to deal with different spatial dimensions and types of waves which satisfy Helmholtz equation's, e.g. acoustics, electromagnetism, elasticity. For details on some of the maths see Martin (1995) and Gower et al. (2017).

Installation

This package is available for Julia 1.0.5 and beyond. To get started, just add the package by typing

julia> ]
pkg> add MultipleScattering

then press the backspace key followed by

julia> using MultipleScattering

Documentation

Simple example

Define the properties of your host medium:

dimension = 2 # could also be 3, but then all 2D vectors need to be 3D vectors
host_medium = Acoustic(dimension; ρ = 1.0, c = 1.0); # 2D acoustic medium with density ρ = 1.0 and soundspeed c = 1.0

An acoustic medium in 2D with density 1 and wavespeed 1.

Next, define two dense, circular acoustic particles, the first centred at [-2,2] with radius 2 and the second at [-2,-2] with radius 0.5,

particle_medium =  Acoustic(dimension; ρ = 10.0, c = 2.0); # 2D acoustic particle with density ρ = 10.0 and soundspeed c = 2.0
p1 = Particle(particle_medium, Sphere([-2.0,2.0], 2.0));
p2 = Particle(particle_medium, Sphere([-2.0,-2.0], 0.5));
particles = [p1,p2];

Lastly we define the source, for example an incident plane wave (incident plane wave) using a helper function.

source = plane_source(host_medium; direction = [1.0,0.0])

Once we have these three components, we can build our FrequencySimulation object

simulation = FrequencySimulation(particles, source)

To get numerical results, we run our simulation for specific positions and angular frequencies,

x = [[-10.0,0.0], [0.0,0.0]]
max_ω = 1.0
ω = 0.01:0.01:max_ω
result = run(simulation, x, ω)

Plot

The package also provides recipes to be used with the Plots package for plotting simulations after they have been run.

In our above simulation we ran the simulation for 100 different wavenumbers, and measured the response at the location (-10,0).

To plot the time-harmonic response across these wavenumbers type:

using Plots
plot(result)

Plot of response against wavenumber

For a better overview you can plot the whole field in space for a specific angular frequency by typing:

ω = 0.8
plot(simulation,ω)

Plot real part of acoustic field

This shows the field over a spatial domain for one particular angular frequency ω.

Note: most things in the package can be plotted by typing plot(thing) if you need an insight into a specific part of your simulation.

To calculate an incident plane wave pulse in time use:

time_result = frequency_to_time(result)
plot(time_result)

Plot real part of acoustic field Or for a Gaussian impulse in time:

t_vec = LinRange(0.,700.,400)
time_result = frequency_to_time(result; t_vec = t_vec, impulse = GaussianImpulse(max_ω))
plot(time_result)

Plot real part of acoustic field

Examples

One way to learn the different features of this package is through the following examples.

Examples
Helmholtz resonator Random particles
Helmholtz resonator field in random particles
Choosing basis order Particles in a circle
Basis order convergence The field with particles
Times response lens Statistical moments
Times response lens random particles

Acknowledgements and contributing

This library was originally restructured from one written by Artur L Gower and Jonathan Deakin.

Contributions are welcome, and the aim is to expand this package to elasticity and electromagnetism.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].