AcousticRayTracers.jl

Differentiable acoustic ray tracers
Author org-arl
Popularity
6 Stars
Updated Last
4 Months Ago
Started In
April 2022

CI Codecov ColPrac

AcousticRayTracers

RaySolver is a differentiable 2½D Gaussian beam tracer for use with UnderwaterAcoustics.jl. It is similar to Bellhop, but fully written in Julia to be compatible with automatic differentiation (AD) tool such as ForwardDiff (compatibility with other AD packages such as ReverseDiff and Zygote is not fully tested).


Installation

julia> # press ]
pkg> add UnderwaterAcoustics
pkg> add AcousticRayTracers
pkg> # press BACKSPACE
julia> using UnderwaterAcoustics
julia> using AcousticRayTracers
julia> models()
2-element Vector{Any}:
 PekerisRayModel
 RaySolver

Usage

The propagation modeling API is detailed in the UnderwaterAcoustics documentation. We assume that the reader is familiar with it. This documentation only provides guidance on specific use of RaySolver propagation model.

Additional options available with RaySolver:

  • nbeams -- number of beams used for ray tracing (default: auto)
  • minangle -- minimum beam angle in radians (default: -80°)
  • maxangle -- maximum beam angle in radians (default: 80°)
  • ds -- ray trace step size in meters (default: 1.0)
  • atol -- absolute tolerance of differential equation solver (default: 1e-4)
  • rugocity -- measure of small-scale variations of surfaces (default: 1.5)
  • athreshold -- relative amplitude threshold below which rays are dropped (default: 1e-5)
  • solver -- differential equation solver (default: auto)
  • solvertol -- differential equation solver tolerance (default: 1e-4)

Example:

using UnderwaterAcoustics
using AcousticRayTracers
using Plots

env = UnderwaterEnvironment(
  seasurface = SeaState2,
  seabed = SandyClay,
  ssp = SampledSSP(0.0:20.0:40.0, [1540.0, 1510.0, 1510.0], :linear),
  bathymetry = SampledDepth(0.0:100.0:200.0, [40.0, 35.0, 38.0], :linear)
)
pm = RaySolver(env; nbeams=1000)
tx = AcousticSource(0.0, -5.0, 1000.0)
rx = AcousticReceiver(200.0, -20.0)
r = eigenrays(pm, tx, rx)
plot(env; sources=[tx], receivers=[rx], rays=r)

For more information on how to use the propagation models, see Propagation modeling toolkit.

Contributing

Contributions in the form of bug reports, feature requests, ideas/suggestions, bug fixes, code enhancements, and documentation updates are most welcome. Please read contribution guidelines if you wish to start contributing.

The scopes active in this repository are:

  • raysolv: RaySolver

Used By Packages

No packages found.