Coder Social home page Coder Social logo

juliawavescattering / effectivewaves.jl Goto Github PK

View Code? Open in Web Editor NEW
18.0 4.0 6.0 9.73 MB

A package to calculate ensemble averaged waves in heterogeneous materials. The focus is on wave propagation, scattering, and reflection, from particulate and porous materials.

License: MIT License

Julia 99.68% Mathematica 0.32%
julia-language waves effective-wavenumbers wave-reflection statistical-mechanics julia scattering multiple-scattering wave-propagation polydispersity

effectivewaves.jl's Introduction

EffectiveWaves

A Julia package for calculating, processing and plotting waves travelling in heterogeneous materials. The focus is on ensemble averaged waves.

Documentation Build Status
CI

At present, the package focuses on materails filled with randomly placed particles. You can calculate effective wavenumbers for 2D [1] and 3D [4] acoustics, wave transimission and wave reflection in 2D [1,2,3] and 3D [4], and scattering from an inhomogenious sphere [4]. See these notes for brief formulas on effective wavenumbers.

Together with MultipleScattering.jl, this package has been setup to easily extend to other dimensions, materials, and types of waves, such as elastic and electromagnetic waves.

Documentation

  • Stabledocumentation of the most recently tagged version.
  • Develpmentdocumentation of the in-development version.

More examples

For more examples and details go to docs/src/examples/.

Acknowledgements and contributing

This library was originally written by Artur L Gower. Contributions are very welcome.

The implementation of the Percus-Yevick pair correlation was based these notes [5].

The low frequency effective properties was based on these notes.

References

[1] Gower AL, Smith MJ, Parnell WJ, Abrahams ID. "Reflection from a multi-species material and its transmitted effective wavenumber". Proc. R. Soc. A. 2018 Apr 1;474(2212):20170864.

[2] Gower, Artur L., William J. Parnell, and I. David Abrahams. "Multiple waves propagate in random particulate materials". SIAM Journal on Applied Mathematics 79.6 (2019): 2569-2592.

[3] Gower, Artur L., I. David Abrahams, and William J. Parnell. "A proof that multiple waves propagate in ensemble-averaged particulate materials". Proceedings of the Royal Society A 475.2229 (2019): 20190344.

[4] Artur L. Gower and Gerhard Kristensson. "Effective Waves for Random Three-dimensional Particulate Materials". New Journal of Physics (2021).

[5] Gerhard Kristensson. "The Percus-Yevick approximation". github.com/JuliaWaveScattering/EffectiveWaves.jl (2022).

effectivewaves.jl's People

Contributors

arturgower avatar exa-tech avatar kevish-napal avatar pivaps avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

effectivewaves.jl's Issues

The SetupSymmetry types should have fields to fully describe setup.

At present, the subtypes of SetupSymmetry are used only to distinguish what methods to run. They are chosen by analysing the symmetry between the types Source and Material. The code would however be more elegant and easier to generalise if subtypes, such as WithoutSymmetry, had the fields Material, Source, basis_order, basis_field_order. At present several of these are carried with kws, which leads to more hidden behaviour, and some complications with dispatching to different WaveModes.

struct WithoutSymmetry{Dim} <: AbstractSetupSymmetry{Dim} end
"""
An incident plane-wave and halfspace material will result in all fields being plane-waves.
"""
abstract type AbstractPlanarSymmetry{Dim} <: AbstractSetupSymmetry{Dim} end
struct PlanarSymmetry{Dim} <: AbstractPlanarSymmetry{Dim} end
"""
For spatial dimension > 2, we can consider problems that have azimuthal symmetry. For example, a plane-wave incident on a sphere.
"""
abstract type AbstractAzimuthalSymmetry{Dim} <: AbstractSetupSymmetry{Dim} end
struct AzimuthalSymmetry{Dim} <: AbstractAzimuthalSymmetry{Dim} end
AzimuthalSymmetry() = AzimuthalSymmetry{3}()
"""
For example, a plane-wave with direct incidence on a halfspace will have both azimuthal and plane-wave symmetry.
"""
struct PlanarAzimuthalSymmetry{Dim} <: AbstractPlanarSymmetry{Dim} end
PlanarAzimuthalSymmetry() = PlanarAzimuthalSymmetry{3}()

All effective waves should have the same structure

The effective wave types should have the same structure. For example see EffectivePlaneWaves

struct EffectivePlaneWaveMode{T<:AbstractFloat,Dim} <: AbstractWaveMode{T,Dim}
ω::T
wavenumber::Complex{T}
basis_order::Int
direction::SVector{Dim,Complex{T}} # the effective direction where sum(direction.^2) == 1
eigenvectors::Array{Complex{T}} # the effective ampliudes
end

Each effective wave type should have only enough information for fully describe the value of this wave at some point in space.

The necessary fields are the eigenvectors, basis_order, wavenumber, and ω. Extra fields should be used sparring and only when necessary. This is certainly not the case for:

struct EffectiveRegularWaveMode{T<:AbstractFloat,Dim,P<:PhysicalMedium{T,Dim},S<:AbstractSetupSymmetry{Dim}} <: AbstractRegularWaveMode{T,Dim}
ω::T
wavenumber::Complex{T}
medium::P
material::Material{Dim}
eigenvectors::Array{Complex{T}} # the effective eigenvectors, each column is one eigenvector
basis_order::Int
basis_field_order::Int
function EffectiveRegularWaveMode::T, wavenumber::Complex{T}, source::AbstractSource{T}, material::Material{Dim}, eigenvectors::Array{Complex{T}};

TagBot trigger issue

This issue is used to trigger TagBot; feel free to unsubscribe.

If you haven't already, you should update your TagBot.yml to include issue comment triggers.
Please see this post on Discourse for instructions and more details.

If you'd like for me to do this for you, comment TagBot fix on this issue.
I'll open a PR within a few hours, please be patient!

material scattering coefficients should return a wave

There are several functions that return the coefficients of a wave basis as a final result. For example, scattering coefficients from a sphere, or the reflection coefficient from a halfspace. Instead, these functions should return a canonical wave which is the scattered wave. This would questions like: what phase should the reflected wave have? What kind of basis should these coefficients have (may potential have azimuth symmetry).

function material_scattering_coefficients(wavemode::EffectiveRegularWaveMode{T,3,Acoustic{T,3},WithoutSymmetry{3}}) where T

function reflection_coefficient::T, wave_eff::EffectivePlaneWaveMode{T}, psource::PlaneSource{T,2,1,Acoustic{T,2}}, material::Material{2,Halfspace{T,2}};

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.