API Reference

SphericalScattering.Dielectric — Type
Dielectric{C} <: ElectromagneticBoundary

The surface encloses a homogeneous, isotropic filling, see Medium: the tangential electric and magnetic fields are continuous across it.

source
SphericalScattering.DielectricSphere — Method
DielectricSphere(
    radius      = error("missing argument `radius`"),
    filling     = error("missing argument `filling`")
)

Constructor for the dielectric sphere, that is, for a Sphere with the boundary condition Dielectric.

DielectricSphere is an alias of Sphere{<:Dielectric}, so that it can be dispatched on as well.

source
SphericalScattering.DielectricSphereThinImpedanceLayer — Method
DielectricSphereThinImpedanceLayer(
    radius    = error("missing argument `radius`"),
    thickness = error("missing argument `thickness` of the coating"),
    thinlayer = error("missing argument `thinlayer`"),
    filling   = error("missing argument `filling`")
)

Constructor for the dielectric sphere with a thin impedance layer. For this model, it is assumed that the displacement field is only radial direction in the layer, which requires a small thickness and low conductivity. For details, see for example T. B. Jones, Ed., “Models for layered spherical particles,” in Electromechanics of Particles, Cambridge: Cambridge University Press, 1995, pp. 227–235. doi: 10.1017/CBO9780511574498.012.

DielectricSphereThinImpedanceLayer is an alias of Sphere{<:ThinImpedanceLayer}, so that it can be dispatched on as well, see ThinImpedanceLayer.

source
SphericalScattering.FitzgeraldDipole — Method
ex = FitzgeraldDipole(;
        embedding   = Medium(ε0, μ0),
        frequency   = error("missing argument `frequency`"),
        amplitude   = 1.0,
        position    = error("missing argument `position`"),
        orientation = SVector{3,typeof(frequency)}(0.0, 0.0, 1.0),
)
source
SphericalScattering.HardSphere — Method
HardSphere(
    radius = error("missing argument `radius`")
)

Constructor for a sound-hard sphere, that is, for a Sphere with the boundary condition SoundHard.

HardSphere is an alias of Sphere{SoundHard}, so that it can be dispatched on as well.

source
SphericalScattering.HertzianDipole — Method
ex = HertzianDipole(
        embedding   = Medium(ε0, μ0),
        frequency   = error("missing argument `frequency`"),
        amplitude   = 1.0,
        position    = error("missing argument `position`"),
        orientation = SVector{3,typeof(frequency)}(0.0, 0.0, 1.0),
)
source
SphericalScattering.Layered — Type
Layered{Core,N,R,C} <: ElectromagneticBoundary

The surface encloses N concentric shells around a core, on whose surface the condition core holds, a Dielectric or a PEC one.

Seen from outside, the shells form a condition on the outer surface, whose radius is that of the Sphere carrying it. Hence only the inner interfaces are stored, ascendingly: the shell k extends from radii[k] to radii[k + 1], the outermost one to the radius of the sphere, and is filled by filling[k]. The core fills the interior of radii[1], or that of the sphere if there are no shells.

source
SphericalScattering.LayeredSphere — Method
LayeredSphere(
    radii   = error("Missing argument `radii`"),
    filling = error("`missing argument `filling`")
)

Constructor for the layered dielectric sphere.

LayeredSphere is an alias of Sphere{<:Layered{<:Dielectric}}, so that it can be dispatched on as well: the outermost of the radii is the radius of the sphere, and the innermost filling that of its dielectric core, see Layered.

source
SphericalScattering.LayeredSpherePEC — Method
LayeredSpherePEC(
    radii   = error("Missing argument `radii`"),
    filling = error("Missing argument `filling`")
)

Constructor for the layered dielectric sphere with a PEC core.

LayeredSpherePEC is an alias of Sphere{<:Layered{PEC}}, so that it can be dispatched on as well: the outermost of the radii is the radius of the sphere, and the innermost one that of its PEC core, see Layered.

source
SphericalScattering.OblateSpheroid — Type
OblateSpheroid{BC,R} <: Spheroid{BC}

Oblate spheroid centered in the origin: the surface $ξ = ξ_0$ of the oblate spheroidal coordinates with the semifocal distance semifocal, rotationally symmetric about axis, on which the condition boundary holds.

For $ξ_0 = 0$ it degenerates into a disc, see Disc.

source
SphericalScattering.OblateSpheroid — Method
OblateSpheroid{BC}(
    equatorialRadius = error("missing argument `equatorialRadius`"),
    polarRadius      = error("missing argument `polarRadius`"),
    axis             = SVector(0.0, 0.0, 1.0)
)

Constructor for an oblate spheroid, $a > b$, see Spheroid.

source
SphericalScattering.PECSphere — Method
PECSphere(
    radius = error("missing argument `radius`"),
)

Constructor for the PEC sphere, that is, for a Sphere with the boundary condition PEC.

PECSphere is an alias of Sphere{PEC}, so that it can be dispatched on as well.

source
SphericalScattering.Parameter — Method
Parameter(nmax = -1, relativeAccuracy = 1e-12)

Settings controlling the truncation of the series which are evaluated.

The relativeAccuracy is the relative contribution below which a term is considered negligible: series which converge on their own are terminated once a term contributes less than that, and truncations which are determined in advance are chosen such that the neglected terms stay below it.

A non-negative nmax fixes the truncation instead, overriding the automatic choice; the default of -1 leaves it to the implementation.

source
SphericalScattering.PressureJump — Type
PressureJump(locations)

The jump $[p] = p|_+ - p|_-$ of the pressure across an open surface at the given locations.

The faces are distinguished by the outward normal: $+$ denotes the one whose normal is the axis of the scatterer. The jump is the natural unknown of a boundary element formulation on an open surface, where a one-sided trace is not determined by the geometry alone.

source
SphericalScattering.PressureNormalGradient — Type
PressureNormalGradient(locations)
PressureNormalGradient(locations, normals)

The normal gradient $\hat{n} ⋅ ∇p$ of the pressure at the given locations.

If no normals are provided, the outward normal $\hat{n} = \hat{r}$ of a sphere centered at the origin is employed at every location. Otherwise one normal vector per location is expected, which is useful for the locations of a faceted surface mesh, whose normals do not coincide with $\hat{r}$. Either way, the normals are normalized and stored for every location.

source
SphericalScattering.PressureNormalGradient — Method
PressureNormalGradient(sphere::Spheroid, locations)

Construct the Neumann trace for the outward normals of the spheroid at locations.

The normals of a spheroid are not parallel to the position vectors, so that the default of PressureNormalGradient, the radial direction, is not the outward normal unless the scatterer is a sphere. This constructor fills in the correct ones, see outwardNormal.

source
SphericalScattering.ProlateSpheroid — Type
ProlateSpheroid{BC,R} <: Spheroid{BC}

Prolate spheroid centered in the origin: the surface $ξ = ξ_0 > 1$ of the prolate spheroidal coordinates with the semifocal distance semifocal, rotationally symmetric about axis, on which the condition boundary holds.

The degenerate surface $ξ_0 = 1$, the segment of the axis between the foci, is excluded.

source
SphericalScattering.ProlateSpheroid — Method
ProlateSpheroid{BC}(
    equatorialRadius = error("missing argument `equatorialRadius`"),
    polarRadius      = error("missing argument `polarRadius`"),
    axis             = SVector(0.0, 0.0, 1.0)
)

Constructor for a prolate spheroid, $b > a > 0$, see Spheroid.

source
SphericalScattering.Scatterer — Type
Scatterer{BC}

Supertype of the scatterers, BC being the condition on their surface, see Boundary.

The parameter allows to address all scatterers of one physics at once, e.g., Scatterer{<:AcousticBoundary}. Solutions are, however, dispatched on a concrete geometry and condition, such as Sphere{SoundHard}; the abstract form is meant for preconditions and descriptive errors, lest the methods become ambiguous.

source
SphericalScattering.SoftSphere — Method
SoftSphere(
    radius = error("missing argument `radius`")
)

Constructor for a sound-soft sphere, that is, for a Sphere with the boundary condition SoundSoft.

SoftSphere is an alias of Sphere{SoundSoft}, so that it can be dispatched on as well.

source
SphericalScattering.Sphere — Type
Sphere{BC,R} <: Scatterer{BC}

Sphere centered in the origin, on whose surface the condition boundary of type BC holds.

The condition is stored as a value besides being the type parameter: a parameter-free condition, such as SoundHard, occupies no memory, whereas a condition requiring data can carry it.

Not to be confused with a Spheroid, which it is not a special case of: the spheroidal coordinates degenerate for a sphere.

source
SphericalScattering.Sphere — Method
Sphere(
    radius   = error("missing argument `radius`"),
    boundary = error("missing argument `boundary`")
)

Constructor for a sphere of the given radius, on whose surface the condition boundary holds.

source
SphericalScattering.Sphere — Method
Sphere{BC}(
    radius = error("missing argument `radius`")
)

Constructor for a sphere with a parameter-free boundary condition, e.g., Sphere{SoundHard}(; radius=1.0).

A condition requiring data has to be passed as a value instead, see Sphere.

source
SphericalScattering.SphericalModeTE — Method
ex = SphericalModeTE(;
        embedding   = Medium(ε0, μ0),
        frequency   = error("missing argument `frequency`"),
        amplitude   = 1.0,
        m           = 0,
        n           = 1,
        c           = 1,
        center      = SVector{3,typeof(frequency)}(0.0, 0.0, 0.0),
        orientation = SVector{3,typeof(frequency)}(0.0, 0.0, 1.0),
)
source
SphericalScattering.SphericalModeTM — Method
ex = SphericalModeTM(;
        embedding   = Medium(ε0, μ0),
        frequency   = error("missing argument `frequency`"),
        amplitude   = 1.0,
        m           = 0,
        n           = 1,
        c           = 1,
        center      = SVector{3,typeof(frequency)}(0.0, 0.0, 0.0),
        orientation = SVector{3,typeof(frequency)}(0.0, 0.0, 1.0),
)
source
SphericalScattering.Spheroid — Method
Spheroid{BC}(
    equatorialRadius = error("missing argument `equatorialRadius`"),
    polarRadius      = error("missing argument `polarRadius`"),
    axis             = SVector(0.0, 0.0, 1.0)
)

Constructor for a spheroid centered in the origin, where BC is SoundHard or SoundSoft.

The spheroid is specified by its equatorialRadius $a$ and its polarRadius $b$, the latter being measured along the axis of revolution, which is normalized. The shape follows from the radii: for $a > b$ an OblateSpheroid is returned, with the semifocal distance $f = \sqrt{a^2 - b^2}$ and the radial coordinate $ξ_0 = b / f$ of the surface; for $b > a$ a ProlateSpheroid, with $f = \sqrt{b^2 - a^2}$ and again $ξ_0 = b / f$.

For polarRadius = 0 the oblate spheroid degenerates into a disc of radius $a$, see Disc. The prolate spheroid degenerating into a line segment, equatorialRadius = 0, is not supported.

Note

$a ≠ b$ is required: the spheroidal coordinates degenerate for a sphere, as $f → 0$ and $ξ_0 → ∞$ in that limit. Use HardSphere or SoftSphere for a sphere.

source
SphericalScattering.SpheroidalModes — Type
SpheroidalModes{T}

Table of the modal coefficients of a spheroidal scattering problem.

Since the spheroidal wave functions are expensive compared to the spherical ones, the coefficients are computed once for a given scatterer and excitation and are reused for every evaluation point. Stored are the spheroidal parameter c, the truncation orders M and N, the coefficients A of the incident expansion and the scattering coefficients b, both indexed as [m + M + 1, n + 1] with $-M ≤ m ≤ M$ and $|m| ≤ n ≤ N$.

source
SphericalScattering.Disc — Method
Disc(BC; radius = error("missing argument `radius`"))

Constructor for a disc of radius $a$, that is, for the degenerate oblate spheroid with vanishing polar radius, where BC is SoundHard or SoundSoft.

Its two faces are distinguished by the sign of $η$; the surface is $ξ_0 = 0$.

source
SphericalScattering.amplitude — Method
amplitude(sphere, excitation::PlaneWave, quantity::MagneticField, r)

Returns $E₀$, where $E₀$ is the electric field of the incident plane wave. For PEC layers, it returns $0$.

source
SphericalScattering.amplitude — Method
amplitude(sphere, excitation::PlaneWave, quantity::MagneticField, r)

Returns $E₀$, where $E₀$ is the electric field of the incident plane wave.

source
SphericalScattering.amplitude — Method
amplitude(sphere, excitation::PlaneWave, quantity::MagneticField, r)

Returns $H₀/ηᵢ$, where $H₀$ is the magnetic field of the incident plane wave. For PEC layers, it returns $0$.

source
SphericalScattering.angularNorm — Method
angularNorm(m::Int, n::Int)

Returns the norm $N_{mn} = \int_{-1}^{1} S_{mn}^2(c, η) \, \mathrm{d}η = \cfrac{2}{2n + 1} \cfrac{(n + m)!}{(n - m)!}$ of the angular functions in the Meixner-Schäfke normalization.

It does not depend on $c$: the normalization is defined such that the norm is that of the associated Legendre functions, to which the angular functions reduce as $c → 0$. The ratio of the factorials is formed as a product, which is exact up to $2m$ roundings.

source
SphericalScattering.associatedLegendre — Method
associatedLegendre(n::T, m::T, ϑ::F)

Compute the normalized associated Legendre polynomials according to the definition by Hansen (A1.25) times m divided by sin(ϑ), but including the Condon-Shortley phase. By using the recursion relations (A1.34a) all corner cases are accounted for correctly.

m * bar(P)n|m|(cos(ϑ)) / sin(ϑ)

ϑ ∈ [0, π] assumed.

source
SphericalScattering.axialGradient — Method
axialGradient(sphere::Spheroid, md::SpheroidalModes, η, coefficients)

Compute the tangential part of the gradient of the series on the axis of the spheroid, $η = ±1$, in Cartesian coordinates of its frame.

There $h_η$ diverges and $h_φ$ vanishes, while the basis vectors $\hat{e}_η$ and $\hat{e}_φ$ are not determined. The tangential gradient is nevertheless finite, as the surface is smooth, and is carried by the orders $m = ±1$ alone: their angular functions vanish like $\sqrt{1 - η^2}$, those of $|m| ≥ 2$ faster, and the order zero has no tangential gradient on the axis. Writing $S_{1n} = \sqrt{1 - η^2} \, g_n$, the two terms of order $m$ combine into

\[\cfrac{1}{a} \, C_{mn} \, R_{1n}(c, ξ_0) \, g_n(±1) \, (1, \mathrm{j}m, 0) \,,\]

for both shapes, where $a$ denotes the equatorial radius: the dependence on $φ$ cancels, as it has to on the axis. The limits $g_n(±1)$ are extrapolated from two evaluations close to the pole (Richardson), the error being of the order of the square of their distance from it.

source
SphericalScattering.boundaryRatio — Method
boundaryRatio(sphere::Spheroid{SoundHard}, R₁, R₁′, Rₒ, Rₒ′)

Compute the scattering coefficient $b_{mn}$ of a sound-hard spheroid from the regular and the outgoing radial function and their derivatives with respect to $ξ$ on the surface.

The normal derivative of the total pressure vanishes, so that $R^{(1)\prime}_{mn}(c, ξ_0) + b_{mn} R^{(\mathrm{out})\prime}_{mn}(c, ξ_0) = 0$ holds.

For a disc, $ξ_0 = 0$, the coefficient vanishes identically for even $n - m$: at the degenerate surface the radial functions split by parity, and the Neumann problem is carried by the modes with odd $n - m$ alone.

source
SphericalScattering.boundaryRatio — Method
boundaryRatio(sphere::Spheroid{SoundSoft}, R₁, R₁′, Rₒ, Rₒ′)

Compute the scattering coefficient $b_{mn}$ of a sound-soft spheroid from the regular and the outgoing radial function on the surface.

The total pressure vanishes, so that $R^{(1)}_{mn}(c, ξ_0) + b_{mn} R^{(\mathrm{out})}_{mn}(c, ξ_0) = 0$ holds.

For a disc, $ξ_0 = 0$, the coefficient vanishes identically for odd $n - m$: the Dirichlet problem is carried by the modes with even $n - m$ alone.

source
SphericalScattering.cart2obl — Method
cart2obl(vec, semifocal)

Convert a 3D (3 entry) point from Cartesian to oblate spheroidal coordinates $(ξ, η, φ)$.

Inverting the definition in obl2cart leads to the quadratic $u^2 + (1 - A - B) u - B = 0$ for $u = ξ^2$, where $A = (x^2 + y^2) / f^2$ and $B = z^2 / f^2$, of which the non-negative root is taken.

For a point in the plane $z = 0$ inside the disc the sign of $η$, that is, the face of the disc, cannot be recovered; the positive one is returned. This holds for $z = -0$ as well, whose sign is an artifact of rounding, e.g., of the rotation into the frame of a scatterer, rather than a choice of the face.

source
SphericalScattering.cart2prol — Method
cart2prol(vec, semifocal)

Convert a 3D (3 entry) point from Cartesian to prolate spheroidal coordinates $(ξ, η, φ)$.

Inverting the definition in prol2cart leads to the quadratic $u^2 - (1 + A + B) u + B = 0$ for $u = ξ^2$, where $A = (x^2 + y^2) / f^2$ and $B = z^2 / f^2$, of which the larger root is taken, as $u ≥ 1$. Its discriminant is written as $(1 - B)^2 + A (A + 2 + 2B)$, a sum of non-negative terms.

On the axis, $x = y = 0$, the sign of $η$ is that of $z$; for $z = 0$ the positive one is returned, as for cart2obl.

source
SphericalScattering.checkDisc — Method
checkDisc(sphere::Spheroid)

Ensure that the scatterer is a disc, across which alone a jump is defined.

The check belongs before the loop over the locations: an error thrown inside the parallel loop is wrapped in a TaskFailedException as soon as more than one thread is available, which would make the failure depend on the number of threads.

source
SphericalScattering.checkExcitation — Method
checkExcitation(scatterer::Scatterer{<:AcousticBoundary}, excitation::AcousticMonopole)

Ensure that the monopole lies outside the scatterer, as the expansion of its field assumes.

source
SphericalScattering.checkExcitation — Method
checkExcitation(scatterer::Scatterer{<:AcousticBoundary}, excitation::AcousticExcitation)

Ensure that the excitation is compatible with the scatterer; nothing has to be checked by default.

Whether the scatterer is an acoustic one at all is decided by dispatch instead, see Scatterer.

source
SphericalScattering.convertSpherical2Cartesian — Method
convertSpherical2Cartesian(F_sph, point_sph)

Takes a 3D (3 entry) vector F_sph and converts it from its spherical basis to its Cartesian basis representation.

The location of the vector has to be provided in spherical coordinates by point_sph ordered as $(r, ϑ, φ)$.

source
SphericalScattering.derivatieAssociatedLegendre — Method
derivatieAssociatedLegendre(n::T, m::T, ϑ::F) where {T<:Integer,F<:Real}

Compute the derivatives of the normalized associated Legendre polynomials according to the definition by Hansen (A1.25), but including the Condon-Shortley phase. By using the recursion relations (A1.34b) all corner cases are accounted for correctly.

d bar(P)n|m|(cos(ϑ)) / dϑ

ϑ ∈ [0, π] assumed.

source
SphericalScattering.electricRingCurrent — Method
ex = electricRingCurrent(;
        embedding   = Medium(ε0, μ0),
        frequency   = error("missing argument `frequency`"),
        amplitude   = 1.0,
        radius      = error("missing argument `radius`"),
        center      = error("missing argument `center`"),
        orientation = SVector{3,typeof(frequency)}(0.0, 0.0, 1.0),
)
source
SphericalScattering.equatorialRadius — Method
equatorialRadius(sp::Spheroid)

Returns the equatorial radius of the spheroid, $f \sqrt{1 + ξ_0^2}$ for an oblate and $f \sqrt{ξ_0^2 - 1}$ for a prolate one.

source
SphericalScattering.expansion — Method
expansion(sphere::Scatterer{<:ElectromagneticBoundary}, excitation::PlaneWave, quantity::Field, r, plm, cosϑ, sinϑ, n::Int)

Compute functional dependencies of the Mie series for a plane wave travelling in +z-direction with polarization in x-direction.

source
SphericalScattering.expansion — Method
expansion(excitation::AcousticExcitation, quantity::FarField, kr, n::Int)

Compute the radial dependence $\mathrm{j}^{n+1} / k$ of the n-th term of the series for the scattered far field.

Since $h_n^{(2)}(kr) → \mathrm{j}^{n+1} \mathrm{e}^{-\mathrm{j}kr} / (kr)$ for $kr → ∞$, and since the factor $\mathrm{e}^{-\mathrm{j}kr} / r$ is omitted by convention, the far field is $\lim_{r → ∞} r \, \mathrm{e}^{\mathrm{j}kr} p_\mathrm{s}$, as for the electromagnetic excitations.

source
SphericalScattering.expansion — Method
expansion(excitation::AcousticExcitation, quantity::Union{Pressure,PressureTrace}, kr, n::Int)

Compute the radial dependence $h_n^{(2)}(kr)$ of the n-th term of the series for the scattered pressure.

The Dirichlet trace shares this dependence: it is the scattered pressure evaluated at $r = a$.

source
SphericalScattering.farfieldvalue — Method
farfieldvalue(sphere::Spheroid, md::SpheroidalModes, point, coefficients)

Evaluate $\sum_{mn} \mathrm{coefficients}_{mn} \, \mathrm{j}^{n+1} S_{mn}(c, η) \mathrm{e}^{\mathrm{j}mφ}$ for the direction of point, see the far field of scatteredfield.

source
SphericalScattering.field — Method
field(excitation::AcousticMonopole, point, normal, quantity::PressureNormalGradient; parameter::Parameter=Parameter())

Compute the Neumann trace $γ_1 p_\mathrm{i} = \hat{n} ⋅ ∇ p_\mathrm{i}$ of the pressure of an acoustic monopole for the given normal.

Since the pressure depends on the position solely via the distance $R$ to the monopole,

\[∇ p_\mathrm{i} = \frac{∂ p_\mathrm{i}}{∂R} \hat{R} = -\frac{A}{4π} (1 + \mathrm{j}kR) \frac{\mathrm{e}^{-\mathrm{j}kR}}{R^2} \hat{R}\]

holds, where $\hat{R}$ points from the monopole to the point. For $kR ≫ 1$ this approaches $-\mathrm{j} k (\hat{R} ⋅ \hat{n}) p_\mathrm{i}$, the local plane-wave result.

The point and the normal are in Cartesian coordinates, the latter being a unit vector.

source
SphericalScattering.field — Method
field(excitation::AcousticMonopole, point, quantity::FarField; parameter::Parameter=Parameter())

Compute the far field $A \mathrm{e}^{\mathrm{j} k \hat{r} ⋅ \mathbf{r}_0} / (4π)$ of an acoustic monopole located at $\mathbf{r}_0$.

Since $|\mathbf{r} - \mathbf{r}_0| = r - \hat{r} ⋅ \mathbf{r}_0 + 𝒪(1/r)$, the far field follows from the pressure by dropping the factor $\mathrm{e}^{-\mathrm{j}kr} / r$, that is, the returned quantity is $\lim_{r → ∞} r \, \mathrm{e}^{\mathrm{j}kr} p_\mathrm{i}$, as for the electromagnetic excitations. Its magnitude is the same in all directions, as it has to be for a point source: the position of the monopole enters the phase alone.

The point is in Cartesian coordinates, only its direction being relevant.

source
SphericalScattering.field — Method
field(excitation::AcousticMonopole, point, quantity::Union{Pressure,PressureTrace}; parameter::Parameter=Parameter())

Compute the pressure $p_\mathrm{i} = A \mathrm{e}^{-\mathrm{j}kR} / (4πR)$ of an acoustic monopole, which is at the same time its Dirichlet trace $γ_0 p_\mathrm{i}$.

Here, $R$ denotes the distance to the monopole, so that the pressure is the free-space Green's function of the Helmholtz equation scaled by the amplitude $A$. The field is singular at the position of the monopole.

The point is in Cartesian coordinates.

source
SphericalScattering.field — Method
field(excitation::AcousticMonopole, quantity::FarField; parameter::Parameter=Parameter())

Compute the far field of an acoustic monopole.

In contrast to a plane wave, a monopole does possess a far field. It is determined by the direction of observation alone, hence no locations are suppressed and a zeroRadius is not taken into account.

source
SphericalScattering.field — Method
field(excitation::AcousticMonopole, quantity::PressureNormalGradient; parameter::Parameter=Parameter())

Compute the Neumann trace of the pressure of an acoustic monopole for the normals of quantity.

The locations are taken as they are given and are assumed to lie on the surface of interest, whereas the traces of the scattered and of the total field are evaluated on the surface of the sphere.

source
SphericalScattering.field — Method
field(excitation::AcousticMonopole, quantity::Union{Pressure,PressureTrace}; parameter::Parameter=Parameter())

Compute the pressure of an acoustic monopole, or its Dirichlet trace.

The Dirichlet trace is the pressure itself. Its locations are taken as they are given and are assumed to lie on the surface of interest, whereas the traces of the scattered and of the total field are evaluated on the surface of the sphere.

source
SphericalScattering.field — Method
field(excitation::AcousticPlaneWave, point, normal, quantity::PressureNormalGradient; parameter::Parameter=Parameter())

Compute the Neumann trace $γ_1 p_\mathrm{i} = \hat{n} ⋅ ∇ p_\mathrm{i}$ of the pressure of an acoustic plane wave for the given normal.

Since $∇ p_\mathrm{i} = -\mathrm{j} k \hat{d} \, p_\mathrm{i}$, the trace evaluates to $-\mathrm{j} k (\hat{d} ⋅ \hat{n}) \, p_\mathrm{i}$.

The point and the normal are in Cartesian coordinates, the latter being a unit vector.

source
SphericalScattering.field — Method
field(excitation::AcousticPlaneWave, point, quantity::Union{Pressure,PressureTrace}; parameter::Parameter=Parameter())

Compute the pressure $p_\mathrm{i} = A \mathrm{e}^{-\mathrm{j} k \hat{d} ⋅ \mathbf{r}}$ of an acoustic plane wave, which is at the same time its Dirichlet trace $γ_0 p_\mathrm{i}$.

The point is in Cartesian coordinates.

source
SphericalScattering.field — Method
field(excitation::AcousticPlaneWave, quantity::FarField; parameter::Parameter=Parameter())

Throw error since the far-field of a plane wave is not defined.

source
SphericalScattering.field — Method
field(excitation::AcousticPlaneWave, quantity::PressureNormalGradient; parameter::Parameter=Parameter())

Compute the Neumann trace of the pressure of an acoustic plane wave for the normals of quantity.

The locations are taken as they are given and are assumed to lie on the surface of interest, whereas the traces of the scattered and of the total field are evaluated on the surface of the sphere.

source
SphericalScattering.field — Method
field(excitation::AcousticPlaneWave, quantity::Union{Pressure,PressureTrace}; parameter::Parameter=Parameter())

Compute the pressure of an acoustic plane wave, or its Dirichlet trace.

The Dirichlet trace is the pressure itself. Its locations are taken as they are given and are assumed to lie on the surface of interest, whereas the traces of the scattered and of the total field are evaluated on the surface of the sphere.

source
SphericalScattering.field — Method
field(excitation::FitzgeraldDipole, point, quantity::FarField; parameter::Parameter=Parameter())

Compute the electric far field radiated by a Fitzgerald dipole at given position and orientation at point.

The point and the returned field are in Cartesian coordinates.

source
SphericalScattering.field — Method
field(excitation::HertzianDipole, point, quantity::FarField; parameter::Parameter=Parameter())

Compute the electric far field radiated by a Hertzian dipole at given position and orientation at point.

The point and the returned field are in Cartesian coordinates.

source
SphericalScattering.field — Method
field(excitation::PlaneWave, point, quantity::ElectricField; parameter::Parameter=Parameter())

Compute the electric field of a plane wave.

The point and the returned field are in Cartesian coordinates.

source
SphericalScattering.field — Method
field(excitation::PlaneWave, point, quantity::FarField; parameter::Parameter=Parameter())

Throw error since the far-field of a plane wave is not defined.

source
SphericalScattering.field — Method
field(excitation::PlaneWave, point, quantity::ElectricField; parameter::Parameter=Parameter())

Compute the magnetic field of a plane wave.

The point and the returned field are in Cartesian coordinates.

source
SphericalScattering.field — Method
field(excitation::PlaneWave, quantity::Field; parameter::Parameter=Parameter())

Compute the electric field of a plane wave.

source
SphericalScattering.field — Method
field(sphere::Scatterer, excitation::AcousticPlaneWave, quantity::Field; parameter::Parameter=Parameter())

Descriptive error for the total far-field in the presence of a sphere for an incident acoustic plane wave.

source
SphericalScattering.field — Method
field(sphere::Scatterer, excitation::Excitation, quantity::Field; parameter::Parameter=Parameter())

Compute the total field in the presence of a sphere for a given excitation.

source
SphericalScattering.field — Method
field(sphere::Scatterer, excitation::Excitation, quantity::Trace; parameter::Parameter=Parameter())

Compute the total trace on the surface of a sphere for a given excitation.

In contrast to the fields, the traces are not set to zero anywhere: they are defined on the surface of the sphere, where the locations are assumed to lie.

source
SphericalScattering.field — Method
field(sphere::Scatterer, excitation::PlaneWave, quantity::Field; parameter::Parameter=Parameter())

Descriptive error for the total far-field in the presence of a sphere for an incident plane wave.

source
SphericalScattering.field — Method
field(sphere::Scatterer, excitation::SphericalMode, quantity::Field; parameter::Parameter=Parameter())

Descriptive error for the total far-field in the presence of a sphere for an incident spherical mode.

source
SphericalScattering.field — Method
field(excitation::SphericalMode, quantity::Field; parameter::Parameter=Parameter())

Compute the electric field of a spherical mode.

source
SphericalScattering.field — Method
field(excitation::SphericalModeTE, point, quantity::ElectricField; parameter::Parameter=Parameter())

Compute the electric field of a TE spherical mode.

source
SphericalScattering.field — Method
field(excitation::SphericalModeTE, point, quantity::FarField; parameter::Parameter=Parameter())

Compute the electric far-field of a TE spherical mode.

source
SphericalScattering.field — Method
field(excitation::SphericalModeTE, point, quantity::ElectricField; parameter::Parameter=Parameter())

Compute the electric field of a TM spherical mode.

source
SphericalScattering.field — Method
field(excitation::SphericalModeTE, point, quantity::ElectricField; parameter::Parameter=Parameter())

Compute the electric far-field of a TM spherical mode.

source
SphericalScattering.field — Method
field(excitation::AcousticExcitation, quantity::PressureJump; parameter::Parameter=Parameter())

Compute the jump of the pressure of an incident acoustic excitation across an open surface, which vanishes.

The incident field is regular across the surface, which is fictitious as far as it is concerned, so that its jump is zero. Consequently the jump of the total field equals that of the scattered field.

source
SphericalScattering.field — Method
field(excitation::Dipole, point, quantity::ElectricField; parameter::Parameter=Parameter())

Compute the electric field radiated by a Hertzian dipole at given position and orientation at point.

The point and the returned field are in Cartesian coordinates.

source
SphericalScattering.field — Method
field(excitation::Dipole, point, quantity::MagneticField; parameter::Parameter=Parameter())

Compute the magnetic field radiated by a Hertzian dipole at given position and orientation at point.

The point and the returned field are in Cartesian coordinates.

source
SphericalScattering.field — Method
field(excitation::Dipole, quantity::Field; parameter::Parameter=Parameter())

Compute the electric field radiated by a magnetic/electric ring current at some position and with some orientation.

source
SphericalScattering.field — Method
field(excitation::ElectricRingCurrent, r, ϑ, quantity::ElectricField; parameter::Parameter=Parameter())

Compute the electric field radiated by an electric ring current placed in origin at point (r, ϑ)

source
SphericalScattering.field — Method
field(excitation::ElectricRingCurrent, r, ϑ, quantity::FarField; parameter::Parameter=Parameter())

Compute the (electric) far-field radiated by an electric ring current placed in origin at point (r, ϑ)

source
SphericalScattering.field — Method
field(excitation::ElectricRingCurrent, r, ϑ, quantity::MagneticField; parameter::Parameter=Parameter())

Compute the magnetic field radiated by an electric ring current placed in origin at point (r, ϑ)

source
SphericalScattering.field — Method
field(excitation::RingCurrent, quantity::ElectricField; parameter::Parameter=Parameter())

Compute the electric field radiated by a magnetic/electric ring current at some position and with some orientation.

source
SphericalScattering.field — Method
field(sphere::Spheroid, excitation::AcousticExcitation, quantity::Pressure; parameter::Parameter=Parameter())

Compute the total pressure in the presence of an oblate spheroid, for an incident acoustic excitation.

source
SphericalScattering.field — Method
field(sphere::Spheroid, excitation::AcousticExcitation, md::SpheroidalModes, quantity::Pressure; parameter::Parameter=Parameter())

Compute the total pressure in the presence of an oblate spheroid, for an incident acoustic excitation.

source
SphericalScattering.field — Method
field(sphere::Spheroid, excitation::AcousticExcitation, md::SpheroidalModes, quantity::Trace; parameter::Parameter=Parameter())

Compute a total surface trace in the presence of an oblate spheroid, for an incident acoustic excitation.

source
SphericalScattering.field — Method
field(excitation::UniformField, point, quantity::ElectricField; parameter::Parameter=Parameter())

Compute the electric field of a uniform field.

The point and the returned field are in Cartesian coordinates.

source
SphericalScattering.field — Method
field(excitation::UniformField, point, quantity::ScalarPotential; parameter::Parameter=Parameter())

Compute the scalar potential of a uniform field.

source
SphericalScattering.field — Method
field(excitation::UniformField, quantity::Field; parameter::Parameter=Parameter())

Compute the field or potential of a uniform field.

source
SphericalScattering.frame — Method
frame(sphere::Spheroid)

Compute the rotation matrix whose third column is the axis of the spheroid.

It maps the spheroid frame, in which the axis of revolution is $\hat{e}_z$ and the spheroidal coordinates are defined, to the global frame. Since the pressure is a scalar, an arbitrarily oriented spheroid requires no more than transforming the points into that frame; nothing has to be rotated back.

source
SphericalScattering.getFieldType — Method
getFieldType(excitation::FitzgeraldDipole, quantity::Field)

Exchange electric and magnetic field for a magnetic current + apply duality relations.

source
SphericalScattering.impedance — Method
impedance(sp::Scatterer{<:ElectromagneticBoundary}, r)

Returns the impedance of the sphere sp at radius r. If this part is PEC, a zero medium is returned.

source
SphericalScattering.impedance — Method
impedance(sp::Scatterer{<:ElectromagneticBoundary}, ex::Excitation, r)

Returns the wavenumber at radius r in the sphere sp. If this part is PEC, a zero medium is returned.

source
SphericalScattering.incidentCoeff — Method
incidentCoeff(excitation::AcousticMonopole, n::Int)

Compute the coefficient $e_n = -\mathrm{j} k \, h_n^{(2)}(k R_0) / (4π)$ of the n-th term of the incident expansion, where $R_0$ denotes the distance of the monopole from the center of the sphere.

It follows from the addition theorem of the free-space Green's function,

\[\frac{\mathrm{e}^{-\mathrm{j}k|\mathbf{r} - \mathbf{r}_0|}}{4π|\mathbf{r} - \mathbf{r}_0|} = \frac{-\mathrm{j}k}{4π} \sum_n (2n+1) j_n(k r_<) h_n^{(2)}(k r_>) P_n(\cos\vartheta)\]

with $r_< = \min(r, R_0)$, $r_> = \max(r, R_0)$ and $\vartheta$ measured from the monopole. Since the monopole lies outside the sphere, $r_> = R_0$ holds at its surface, which is where the boundary condition determines the scattering coefficients.

source
SphericalScattering.incidentCoeff — Method
incidentCoeff(excitation::AcousticPlaneWave, n::Int)

Compute the coefficient $e_n = (-\mathrm{j})^n$ of the n-th term of the incident expansion.

It follows from $\mathrm{e}^{-\mathrm{j} k \hat{d} ⋅ \mathbf{r}} = \sum_n (2n+1) (-\mathrm{j})^n j_n(kr) P_n(\cos\vartheta)$, the plane-wave expansion with $\vartheta$ measured from the direction of incidence $\hat{d}$.

source
SphericalScattering.incidentCoefficients — Method
incidentCoefficients(sphere::Spheroid, excitation::AcousticMonopole, N::Int)

Compute the coefficients of the expansion of the field of the monopole in the spheroidal wave functions, see incidentCoefficients. With the position $(ξ_s, η_s, φ_s)$ of the monopole in the frame of the spheroid, the addition theorem of the free-space Green's function (Flammer, 1957) yields

\[A_{mn} = -\cfrac{\mathrm{j} k a}{2π} \, \cfrac{S_{|m|n}(c, η_s) \, R^{(\mathrm{out})}_{|m|n}(c, ξ_s)}{N_{|m|n}} \, \mathrm{e}^{-\mathrm{j}mφ_s} \,,\]

valid for $ξ < ξ_s$, which includes the surface of the scatterer, as the monopole lies outside. It is the counterpart of $-\mathrm{j}k / (4π) \, (2n+1) \, h_n^{(2)}(k r_0)$ for a sphere.

source
SphericalScattering.incidentCoefficients — Method
incidentCoefficients(sphere::Spheroid, excitation::AcousticPlaneWave, N::Int)

Compute the coefficients of the expansion of the plane wave in the spheroidal wave functions, see incidentCoefficients. With the direction of incidence $(η_d, φ_d)$ in the frame of the spheroid,

\[A_{mn} = 2 a \, (-\mathrm{j})^n \, \cfrac{S_{|m|n}(c, η_d)}{N_{|m|n}} \, \mathrm{e}^{-\mathrm{j}mφ_d}\]

holds (Flammer, 1957), the counterpart of $(2n+1)(-\mathrm{j})^n$ for a sphere, to which it reduces as $c → 0$. The normalization of the angular functions cancels, as they enter squared, see angularNorm.

source
SphericalScattering.incidentCoefficients — Method
incidentCoefficients(sphere::Spheroid, excitation::AcousticExcitation, N::Int)

Compute the coefficients $A_{mn}$ of the expansion of the incident field $p_\mathrm{i} = \sum_{mn} A_{mn} R^{(1)}_{mn}(c, ξ) S_{mn}(c, η) \mathrm{e}^{\mathrm{j}mφ}$ in the frame of the spheroid, for all orders $|m| ≤ N$ and degrees $|m| ≤ n ≤ N$, indexed as [m + N + 1, n + 1].

The plane wave and the monopole have analytic expansions, see their methods. For any other excitation, whose expansion is not known, the coefficients are obtained by projecting its field, see projectedCoefficients.

source
SphericalScattering.isinside — Function
isinside(scatterer::Scatterer, point)

Returns whether the point lies inside the scatterer.

Which geometry the interior has is for the scatterer to answer: the radius of a sphere cannot express the interior of a spheroid, nor the other way around. The methods are therefore found with the respective types.

source
SphericalScattering.isinside — Method
isinside(scatterer::Sphere, point)

Returns whether the point lies inside the sphere, see isinside.

Being a question of geometry alone, it holds for every boundary condition.

source
SphericalScattering.isinside — Method
isinside(scatterer::Spheroid, point)

Returns whether the point lies inside the spheroid, that is, whether its radial coordinate is smaller than that of the surface, see isinside.

source
SphericalScattering.layer — Method
layer(sp::Scatterer{<:ElectromagneticBoundary}, r)

Returns the index of the layer, r is located, where 1 denotes the inner most layer.

source
SphericalScattering.layer — Method
layer(sp::Sphere{<:Layered}, r)

Returns the index of the layer, r is located, where 1 denotes the inner most layer.

source
SphericalScattering.layerFillings — Method
layerFillings(sp::Sphere{<:Layered})

Returns the fillings of a layered sphere from the inside out: those of the shells, preceded by that of the core if it is a dielectric one.

source
SphericalScattering.layerRadii — Method
layerRadii(sp::Sphere{<:Layered})

Returns the radii of all interfaces of a layered sphere ascendingly, the outermost being the radius of the sphere.

source
SphericalScattering.magneticRingCurrent — Method
ex = magneticRingCurrent(;
        embedding   = Medium(ε0, μ0),
        frequency   = error("missing argument `frequency`"),
        amplitude   = 1.0,
        radius      = error("missing argument `radius`"),
        center      = error("missing argument `center`"),
        orientation = SVector{3,typeof(frequency)}(0.0, 0.0, 1.0),
)
source
SphericalScattering.medium — Method
medium(sp::Scatterer{<:ElectromagneticBoundary}, ex::Excitation, r)

Returns the medium of the sphere sp at radius r. If this part is PEC, a zero medium is returned. The argument r may be a vector of positions.

source
SphericalScattering.modes — Method
modes(sphere::Spheroid, excitation::AcousticExcitation; M=nothing, N=nothing, parameter::Parameter=Parameter())

Compute the modal coefficients of the scattering problem, see SpheroidalModes.

The incident field is expanded as $p_\mathrm{i} = \sum_{mn} A_{mn} R^{(1)}_{mn}(c, ξ) S_{mn}(c, η) \mathrm{e}^{\mathrm{j}mφ}$, the coefficients $A_{mn}$ being known analytically for the plane wave and the monopole, see incidentCoefficients. Since the surface $ξ = ξ_0$ is a coordinate surface, the boundary condition decouples the modes, each being scattered with the coefficient $b_{mn}$ of scatterCoeff.

The truncations are determined automatically unless they are given. Since the scattering coefficients decay once a mode is cut off at the surface, the degree is bounded by the size of the scatterer, so that $N = \lceil c \, ρ \rceil + 15$ is taken initially, where $ρ$ is the radius of the circumscribing sphere in units of the semifocal distance, see normalizedCircumradius; $c ρ$ is the counterpart of $ka$. The order M is not estimated but measured, see modesForDegree: a nearly axial excitation needs far fewer orders than a grazing one, which matters, as every order costs calls to the spheroidal wave functions.

The truncation is verified rather than trusted, on the surface of the scatterer: the size of a mode of the scattered pressure there bounds its contribution everywhere, as the outgoing radial functions decrease outward. The modes of the last degrees have to be negligible. A source close to the scatterer requires more degrees than its size suggests, as the expansion of its field converges the more slowly the closer the source is. If the degree has been determined automatically, it is therefore raised by half until the omitted modes are negligible, up to four times its initial value and as long as the result keeps improving: for a source very close to the scatterer the radial functions of high degree eventually exceed the range of the floating-point numbers, which limits the attainable accuracy. A message is printed if the relative accuracy is not attained. A given N, or a nmax of Parameter, is used as it is.

source
SphericalScattering.modesForDegree — Method
modesForDegree(sphere::Spheroid, excitation::AcousticExcitation, Nmax::Int, M, eps)

Compute the modal coefficients for the degree Nmax, see modes.

The incident coefficients and the scattering coefficients are computed order by order, the radial functions batched over the degree and shared by the orders $±m$; orders the excitation does not excite, such as all but the order zero for an axial excitation, are skipped. Unless M is given, the orders are computed in increasing $|m|$ until two consecutive ones are negligible, measured by the size of their modes on the surface of the scatterer as below, and truncated at the last one that is not. The azimuthal content of the incident field decays beyond its angular bandwidth, so that the orders of high $|m|$ are not computed at all: this saves their cost, and it keeps clear of the wave functions of high order, which exceed the range of the floating-point numbers once $n + m$ approaches about 170.

Returned are the SpheroidalModes and the size of the omitted modes: the L² norm of each mode of the scattered pressure on the surface of the scatterer, $|A_{mn} b_{mn} R^{(\mathrm{out})}_{mn}(c, ξ_0)| \sqrt{N_{mn}}$, the largest among the last two degrees relative to the largest overall. Two degrees are taken, as on a disc only modes of one parity of $n - m$ scatter, so that the last degree alone may vanish for an axial excitation.

If any of the retained coefficients is not finite, as the wave functions of high degree exceed the range of the floating-point numbers for a source very close to the scatterer, (nothing, Inf) is returned instead.

source
SphericalScattering.normalizedCircumradius — Method
normalizedCircumradius(sphere::Spheroid)

Returns the radius of the sphere circumscribing the spheroid in units of the semifocal distance, the larger of the two semi-axes: $\sqrt{1 + ξ_0^2}$ for an oblate and $ξ_0$ for a prolate spheroid. Multiplied by the spheroidal parameter $c = kf$ it is the counterpart of $ka$ for a sphere, which bounds the degree, see modes.

source
SphericalScattering.obl2cart — Method
obl2cart(vec, semifocal)

Convert a 3D (3 entry) point from oblate spheroidal to Cartesian coordinates.

The oblate spheroidal coordinates $(ξ, η, φ)$ with $ξ ≥ 0$ and $η ∈ [-1, 1]$ are defined by $x = f \sqrt{(1 + ξ^2)(1 - η^2)} \cos φ$, $y = f \sqrt{(1 + ξ^2)(1 - η^2)} \sin φ$ and $z = f ξ η$, where $f$ denotes the semifocal distance. The surface $ξ = ξ_0$ is an oblate spheroid with equatorial radius $f \sqrt{1 + ξ_0^2}$ and polar radius $f ξ_0$; the degenerate surface $ξ = 0$ is the disc of radius $f$, its two faces being distinguished by the sign of $η$.

source
SphericalScattering.oblateBasis — Method
oblateBasis(vec, semifocal)

Compute the unit vectors $(\hat{e}_ξ, \hat{e}_η, \hat{e}_φ)$ of the oblate spheroidal coordinates at the point vec, which is given in oblate spheroidal coordinates.

They follow from the tangent vectors $∂\bm{r} / ∂ξ$, $∂\bm{r} / ∂η$ and $∂\bm{r} / ∂φ$ of the forward transform, normalized by the metric coefficients, see oblateMetric. The first one is the outward normal of the surface $ξ = \mathrm{const}$.

Note

The basis degenerates at the rim of a disc, $ξ = 0$ and $η = 0$, where $\hat{e}_ξ$ and $\hat{e}_η$ vanish, and on the axis, $|η| = 1$, where $\hat{e}_φ$ is not determined. These are the edge and the poles of the scatterer.

source
SphericalScattering.oblateMetric — Method
oblateMetric(vec, semifocal)

Compute the metric coefficients $(h_ξ, h_η, h_φ)$ of the oblate spheroidal coordinates at the point vec, which is given in oblate spheroidal coordinates.

They read $h_ξ = f \sqrt{(ξ^2 + η^2) / (1 + ξ^2)}$, $h_η = f \sqrt{(ξ^2 + η^2) / (1 - η^2)}$ and $h_φ = f \sqrt{(1 + ξ^2)(1 - η^2)}$. Since the outward normal of the surface $ξ = ξ_0$ is $\hat{e}_ξ = h_ξ^{-1} ∂\bm{r} / ∂ξ$, the normal derivative is $∂/∂n = h_ξ^{-1} ∂/∂ξ$.

Note that $h_ξ = f |η|$ on the disc $ξ = 0$, so that the normal derivative is singular at its rim $η = 0$: this is where the edge singularity of a disc enters.

source
SphericalScattering.outwardNormal — Method
outwardNormal(sphere::Spheroid, point)

Compute the outward unit normal of the spheroid at the surface point having the direction of point.

The normal is $\hat{e}_ξ$ of the spheroidal coordinates, which is not parallel to the position vector unless the scatterer is a sphere: for a disc it is $\pm \hat{e}_z$, the sign following the face. The point and the returned normal are in Cartesian coordinates of the global frame.

source
SphericalScattering.permeability — Method
permeability(sp::Scatterer{<:ElectromagneticBoundary}, ex::Excitation, r)

Returns the permeability of the sphere sp at radius r. If this part is PEC, a zero permeability is returned. The argument r may be a vector of positions.

source
SphericalScattering.permittivity — Method
permittivity(sp::Scatterer{<:ElectromagneticBoundary}, ex::Excitation, r)

Returns the permittivity of the sphere sp at radius r. If this part is PEC, a zero permittivity is returned. The argument r may be a vector of positions.

source
SphericalScattering.phiCutPoints — Method
phiCutPoints(ϕ; r=1.0, resolution=1)

Convenience function returning points (in Cartesian coordinates) on a phi cut at a distance 'r' and a resolution in degrees.

source
SphericalScattering.planeWave — Method
ex = planeWave(;
        embedding    = Medium(ε0, μ0),
        frequency    = error("missing argument `frequency`"),
        amplitude    = 1.0,
        direction    = SVector{3,typeof(frequency)}(0.0, 0.0, 1.0),
        polarization = SVector{3,typeof(frequency)}(1.0, 0.0, 0.0),
)
source
SphericalScattering.prefac — Method
prefac(m::T, n::T)

Prefactor for both types of spherical vector wave functions.

Note the factor (-m / abs(m))^m is now part of the associated Legendre polynomials via the Condon-Shortley phase.

source
SphericalScattering.projectedCoefficients — Method
projectedCoefficients(sphere::Spheroid, excitation::AcousticExcitation, N::Int; ξ=nothing, nη=nothing, nφ=nothing, eps=1e-12)

Compute the coefficients of the incident expansion, see incidentCoefficients, by projecting the incident field onto the angular functions on a surface $ξ = \mathrm{const}$.

The angular functions of equal order are orthogonal there with unit weight, and the exponentials are orthogonal in $φ$, so that

\[A_{mn} = \cfrac{1}{R^{(1)}_{mn}(c, ξ) \, N_{mn}} \int_{-1}^{1} \left[ \cfrac{1}{2π} \int_0^{2π} p_\mathrm{i} \, \mathrm{e}^{-\mathrm{j}mφ} \, \mathrm{d}φ \right] S_{mn}(c, η) \, \mathrm{d}η\]

holds with $N_{mn} = \int_{-1}^{1} S_{mn}^2 \, \mathrm{d}η$. The projection requires nothing but the incident field, which makes it the fallback for excitations without an analytic expansion; for the plane wave and the monopole it serves as an independent check of the analytic coefficients. The integrals are evaluated by Gauss-Legendre quadrature with nη nodes in $η$ and by nφ equispaced nodes in $φ$; orders whose azimuthal projection is below the relative accuracy eps are left zero.

The surface of the projection has to lie between the scatterer and the source of the incident field: beyond the source, see sourceCoordinate, the expansion in the regular wave functions does not hold. By default it is placed at projectionCoordinate, or halfway between the scatterer and the source if that is closer; a given ξ reaching the source is rejected.

Note

The coefficients of high degree are accurate only as far as they matter on the surface of the projection: the error of the quadrature is amplified by $1 / R^{(1)}_{mn}(c, ξ)$, which is large for degrees beyond $c ξ$. The field on and inside that surface is unaffected, since it involves the product $A_{mn} R^{(1)}_{mn}$.

source
SphericalScattering.projectionCoordinate — Method
projectionCoordinate(sphere::Spheroid)

Returns the default radial coordinate of the surface on which the incident field is projected for an excitation without a known expansion, see projectedCoefficients.

For an oblate spheroid it is the surface of the scatterer, or $ξ = 0.5$ for a scatterer flatter than that: at the degenerate surface $ξ = 0$ the regular radial functions of odd $n - m$ vanish, by which the projection divides, so that a disc has to be projected off its surface. For a prolate spheroid it is the surface itself, which never degenerates, as $ξ_0 > 1$; even a thin one close to the excluded line segment is projected there without loss of accuracy.

source
SphericalScattering.prol2cart — Method
prol2cart(vec, semifocal)

Convert a 3D (3 entry) point from prolate spheroidal to Cartesian coordinates.

The prolate spheroidal coordinates $(ξ, η, φ)$ with $ξ ≥ 1$ and $η ∈ [-1, 1]$ are defined by $x = f \sqrt{(ξ^2 - 1)(1 - η^2)} \cos φ$, $y = f \sqrt{(ξ^2 - 1)(1 - η^2)} \sin φ$ and $z = f ξ η$, where $f$ denotes the semifocal distance. The surface $ξ = ξ_0$ is a prolate spheroid with equatorial radius $f \sqrt{ξ_0^2 - 1}$ and polar radius $f ξ_0$; the degenerate surface $ξ = 1$ is the segment of the axis between the foci.

source
SphericalScattering.prolateBasis — Method
prolateBasis(vec, semifocal)

Compute the unit vectors $(\hat{e}_ξ, \hat{e}_η, \hat{e}_φ)$ of the prolate spheroidal coordinates at the point vec, which is given in prolate spheroidal coordinates, see oblateBasis.

Note

The basis degenerates on the axis, $|η| = 1$, where $\hat{e}_φ$ is not determined: at the poles of the scatterer.

source
SphericalScattering.prolateMetric — Method
prolateMetric(vec, semifocal)

Compute the metric coefficients $(h_ξ, h_η, h_φ)$ of the prolate spheroidal coordinates at the point vec, which is given in prolate spheroidal coordinates.

They read $h_ξ = f \sqrt{(ξ^2 - η^2) / (ξ^2 - 1)}$, $h_η = f \sqrt{(ξ^2 - η^2) / (1 - η^2)}$ and $h_φ = f \sqrt{(ξ^2 - 1)(1 - η^2)}$, the outward normal of the surface $ξ = ξ_0$ being $\hat{e}_ξ = h_ξ^{-1} ∂\bm{r} / ∂ξ$. As for oblateMetric, the differences are formed as products.

source
SphericalScattering.rcs — Method
rcs(sphere::Scatterer, excitation::Excitation, point_cart; parameter::Parameter=Parameter())

RCS only defined for plane waves, so far.

source
SphericalScattering.rcs — Method
rcs(sphere::Scatterer, excitation::Excitation; parameter::Parameter=Parameter())

RCS only defined for plane waves, so far.

source
SphericalScattering.rcs — Method
rcs(sphere::Scatterer, excitation::PlaneWave, point_cart; parameter::Parameter=Parameter())

Compute the bistatic radar cross-section (RCS).

source
SphericalScattering.rcs — Method
rcs(sphere::Scatterer, excitation::PlaneWave; parameter::Parameter=Parameter())

Compute the monostatic radar cross-section (RCS): the bistatic RCS solely for the incident direction of the plane wave.

source
SphericalScattering.rotate! — Method
rotate!(excitation::Excitation, vectors_list; inverse=false)

Determine rotation matrix and perform rotation for a general excitation.

The points are assumed to be in Cartesian coordinates.

The vectors_list IS modified (overwritten).

source
SphericalScattering.rotate — Method
rotate(excitation::Excitation, vectors_list; inverse=false)

Determine rotation matrix and perform rotation for general excitations.

The points are assumed to be in Cartesian coordinates.

The vectors_list is NOT modified.

source
SphericalScattering.scatterCoeff — Method
scatterCoeff(sphere::Sphere{SoundHard}, excitation::AcousticExcitation, n::Int)

Compute the expansion coefficient $b_n$ of the field scattered by a sound-hard sphere.

The normal velocity, and hence the radial derivative of the total pressure, vanishes on the surface, so that $j_n'(ka) + b_n h_n^{(2)\prime}(ka) = 0$. The coefficient is independent of the excitation.

source
SphericalScattering.scatterCoeff — Method
scatterCoeff(sphere::Sphere{PEC}, excitation::PlaneWave, n::Int)

Compute scattering coefficients for a plane wave travelling in +z-direction with polarization in x-direction.

source
SphericalScattering.scatterCoeff — Method
scatterCoeff(sphere::Sphere{PEC}, excitation::SphericalModeTE, n::Int, ka)

Compute scattering coefficients for a spherical TE mode travelling towards the origin.

source
SphericalScattering.scatterCoeff — Method
scatterCoeff(sphere::Sphere{PEC}, excitation::SphericalModeTM, n::Int, ka)

Compute scattering coefficients for a spherical TM mode travelling towards the origin.

source
SphericalScattering.scatterCoeff — Method
scatterCoeff(sphere::Sphere{SoundSoft}, excitation::AcousticExcitation, n::Int)

Compute the expansion coefficient $b_n$ of the field scattered by a sound-soft sphere.

The total pressure vanishes on the surface, so that $j_n(ka) + b_n h_n^{(2)}(ka) = 0$. The coefficient is independent of the excitation.

source
SphericalScattering.scatterCoeff — Method
scatterCoeff(sp::Sphere{<:ThinImpedanceLayer}, ex::UniformField)

Compute the expansion coefficients for the thin impedance layer case and a uniform static field excitation.

source
SphericalScattering.scatterCoeff — Method
scatterCoeff(sphere::Spheroid, excitation::AcousticExcitation, m::Int, n::Int)

Compute the expansion coefficient $b_{mn}$ of the field scattered by a spheroid.

Since the surface $ξ = ξ_0$ is a coordinate surface and the angular functions form a complete orthogonal set on it, the boundary condition decouples the modes, see boundaryRatio. As for a sphere, the coefficient does not depend on the excitation.

source
SphericalScattering.scatterCoeff — Method
scatterCoeff(sphere::Sphere{Layered{Core,LN,LR,LC}}, excitation::UniformField{FC,FT,FR}, r) where {Core<:Dielectric,LN,LR,LC,FC,FT,FR}

Scatter coefficients according to Sihvola and Lindell. However, the radii of the shells are ordered from inside to outside as depicted in the documentation.

source
SphericalScattering.scatterCoeff — Method
scatterCoeff(sphere::Sphere{Layered{PEC,LN,LR,LC}}, excitation::UniformField{FC,FT,FR}, r) where {LN,LR,LC,FC,FT,FR}

Scatter coefficients according to Sihvola and Lindell. However, the radii of the shells are ordered from inside to outside as depicted in the documentation.

source
SphericalScattering.scatteredfield — Method
scatteredfield(sphere::Sphere{PEC}, excitation::ElectricRingCurrent, quantity::FarField; parameter::Parameter=Parameter())

Compute the electric far-field scattered by the PEC sphere, where the ring current is placed along the z-axis.

The point and the returned field are in Cartesian coordinates.

source
SphericalScattering.scatteredfield — Method
scatteredfield(sphere::Sphere{PEC}, excitation::FitzgeraldDipole, quantity::FarField; parameter::Parameter=Parameter())

Compute the electric far-field scattered by a PEC sphere, where the dipole is placed along the z-axis at z0.

The point and the returned field are in Cartesian coordinates.

source
SphericalScattering.scatteredfield — Method
scatteredfield(sphere::Sphere{PEC}, excitation::HertzianDipole, quantity::FarField; parameter::Parameter=Parameter())

Compute the electric far-field scattered by a PEC sphere, where the dipole is placed along the z-axis at z0.

The point and the returned field are in Cartesian coordinates.

source
SphericalScattering.scatteredfield — Method
scatteredfield(sphere::Sphere{PEC}, excitation::MagneticRingCurrent, quantity::FarField; parameter::Parameter=Parameter())

Compute the electric far-field scattered by the PEC sphere, where the ring current is placed along the z-axis.

The point and the returned field are in Cartesian coordinates.

source
SphericalScattering.scatteredfield — Method
scatteredfield(sphere::Sphere{PEC}, excitation::SphericalModeTE, point, quantity::ElectricField; parameter::Parameter=Parameter())

Compute the electric field scattered by a PEC sphere, when excited by a spherical mode travelling towards the origin.

The point and the returned field are in Cartesian coordinates.

source
SphericalScattering.scatteredfield — Method
scatteredfield(sphere::Sphere{PEC}, excitation::SphericalMode, quantity::Field; parameter::Parameter=Parameter())

Compute the electric field scattered by a dipole at some position and orientation.

source
SphericalScattering.scatteredfield — Method
scatteredfield(sphere::Sphere{PEC}, excitation::Dipole, point, quantity::ElectricField; parameter::Parameter=Parameter())

Compute the electric field scattered by a PEC sphere, where the dipole is placed along the z-axis at z0.

The point and the returned field are in Cartesian coordinates.

source
SphericalScattering.scatteredfield — Method
scatteredfield(sphere::Sphere{PEC}, excitation::Dipole, point, quantity::MagneticField; parameter::Parameter=Parameter())

Compute the magnetic field scattered by a PEC sphere, where the dipole is placed along the z-axis at z0.

The point and the returned field are in Cartesian coordinates.

source
SphericalScattering.scatteredfield — Method
scatteredfield(sphere::Sphere{PEC}, excitation::Dipole, quantity::Field; parameter::Parameter=Parameter())

Compute the field scattered by a PEC sphere excited by a dipole at some position and orientation.

source
SphericalScattering.scatteredfield — Method
scatteredfield(sphere::Sphere{PEC}, excitation::RingCurrent, point, quantity::ElectricField; parameter::Parameter=Parameter())

Compute the electric field scattered by the PEC sphere, where the ring current is placed along the z-axis.

The point and the returned field are in Cartesian coordinates.

source
SphericalScattering.scatteredfield — Method
scatteredfield(sphere::Sphere{PEC}, excitation::RingCurrent, quantity::MagneticField; parameter::Parameter=Parameter())

Compute the magnetic field scattered by the PEC sphere, where the ring current is placed along the z-axis.

The point and the returned field are in Cartesian coordinates.

source
SphericalScattering.scatteredfield — Method
field(excitation::ElectricRingCurrent, quantity::Field; parameter::Parameter=Parameter())

Compute the electric field radiated by an electric ring current at some position and orientation

source
SphericalScattering.scatteredfield — Method
scatteredfield(sphere::Sphere{PEC}, excitation::UniformField, point, quantity::ElectricField; parameter::Parameter=Parameter())

Compute the electric field scattered by a PEC sphere, for an incident uniform field with polarization in the given direction.

The point and returned field are in Cartesian coordinates.

source
SphericalScattering.scatteredfield — Method
scatteredfield(sphere::Sphere{PEC}, excitation::UniformField, point, quantity::ScalarPotential; parameter::Parameter=Parameter())

Compute the scalar potential scattered by a PEC sphere, for an incident uniform field with polarization in the given direction.

The point and returned field are in Cartesian coordinates.

source
SphericalScattering.scatteredfield — Method
scatteredfield(sphere::Scatterer{<:AcousticBoundary}, excitation::ElectromagneticExcitation, quantity)

Descriptive error for an acoustic scatterer excited by an electromagnetic field.

source
SphericalScattering.scatteredfield — Method
scatteredfield(sphere::Scatterer{<:ElectromagneticBoundary}, excitation::PlaneWave, point, quantity::Field; parameter::Parameter=Parameter())

Compute the electric field scattered by a PEC or dielectric sphere, for an incident plane wave travelling in +z-direction with E-field polarization in x-direction.

The point and the returned field are in Cartesian coordinates.

source
SphericalScattering.scatteredfield — Method
scatteredfield(sphere::Scatterer{<:ElectromagneticBoundary}, excitation::PlaneWave, quantity::Field; parameter::Parameter=Parameter())

Compute the electric field scattered by a PEC sphere, for an incident plane wave.

source
SphericalScattering.scatteredfield — Method
scatteredfield(sphere::Scatterer{<:ElectromagneticBoundary}, excitation::AcousticExcitation, quantity)

Descriptive error for an electromagnetic scatterer excited by an acoustic field.

source
SphericalScattering.scatteredfield — Method
scatteredfield(sphere::Scatterer{<:ElectromagneticBoundary}, excitation::UniformField, quantity::Field; parameter::Parameter=Parameter())

Compute the electric field scattered by a sphere, for an incident uniform field.

source
SphericalScattering.scatteredfield — Method
scatteredfield(sphere::Sphere{<:AcousticBoundary}, excitation::AcousticExcitation, point, normal, quantity::PressureNormalGradient; parameter::Parameter=Parameter())

Compute the Neumann trace $γ_1 p_\mathrm{s} = \hat{n} ⋅ ∇ p_\mathrm{s}$ of the pressure scattered by a sound-hard or sound-soft sphere for the given normal.

Decomposing the gradient in the spherical basis about the axis of the excitation, where the scattered pressure does not depend on $φ$, yields

\[\hat{n} ⋅ ∇ p_\mathrm{s} = (\hat{n} ⋅ \hat{r}) \frac{∂ p_\mathrm{s}}{∂r} + (\hat{n} ⋅ \hat{\vartheta}) \frac{1}{r} \frac{∂ p_\mathrm{s}}{∂\vartheta}\]

with $\hat{\vartheta} = (\cos\vartheta \, \hat{r} - \hat{e}) / \sin\vartheta$. Since $∂P_n(\cos\vartheta) / ∂\vartheta = -\sin\vartheta \, P_n'(\cos\vartheta)$, the factor $\sin\vartheta$ cancels, so that no special treatment of the poles is required. Differentiating the series for the scattered pressure term by term then gives

\[γ_1 p_\mathrm{s} = A \sum_n (2n+1) e_n b_n \left[ c_r \, k \, h_n^{(2)\prime}(ka) P_n(\cos\vartheta) - c_\vartheta \, h_n^{(2)}(ka) P_n'(\cos\vartheta) \right]\]

where $c_r = \hat{n} ⋅ \hat{r}$ and $c_\vartheta = (\cos\vartheta \, c_r - \hat{n} ⋅ \hat{e}) / a$. For the outward normal $\hat{n} = \hat{r}$ the coefficient $c_\vartheta$ vanishes and the radial derivative remains.

The trace is evaluated on the surface of the sphere: only the direction of the point is taken into account. The point and the normal are in Cartesian coordinates, the latter being a unit vector.

source
SphericalScattering.scatteredfield — Method
scatteredfield(sphere::Sphere{<:AcousticBoundary}, excitation::AcousticExcitation, point, quantity::AcousticQuantity; parameter::Parameter=Parameter())

Compute the pressure, the far field, or the Dirichlet trace scattered by a sound-hard or sound-soft sphere, for an incident acoustic excitation.

Every acoustic excitation considered here is rotationally symmetric about an axis $\hat{e}$ through the center of the sphere, so that its incident pressure can be expanded as

\[p_\mathrm{i} = A \sum_n (2n+1) e_n j_n(kr) P_n(\cos\vartheta) \,, \qquad \cos\vartheta = \hat{e} ⋅ \hat{r}\]

with the coefficients $e_n$ provided by incidentCoeff and the axis by symmetryAxis. Applying the boundary condition term by term leaves the radial structure untouched, so that

\[p_\mathrm{s} = A \sum_n (2n+1) e_n b_n h_n^{(2)}(kr) P_n(\cos\vartheta)\]

follows with the very same coefficients $b_n$ for every excitation. Note that, in contrast to the electromagnetic case, the monopole term $n = 0$ contributes.

The traces are evaluated on the surface of the sphere: only the direction of the point is taken into account, the radial coordinate is replaced by the radius of the sphere. Hence, the locations may also be given by points of a surface mesh, which do not lie exactly on the sphere.

The point is in Cartesian coordinates.

source
SphericalScattering.scatteredfield — Method
scatteredfield(sphere::Sphere{<:AcousticBoundary}, excitation::AcousticExcitation, quantity::PressureJump; parameter::Parameter=Parameter())

Descriptive error for the jump of the pressure across a closed surface.

source
SphericalScattering.scatteredfield — Method
scatteredfield(sphere::Sphere{<:AcousticBoundary}, excitation::AcousticExcitation, quantity::PressureNormalGradient; parameter::Parameter=Parameter())

Compute the Neumann trace of the pressure scattered by a sound-hard or sound-soft sphere, for an incident acoustic excitation, employing the normals of quantity.

source
SphericalScattering.scatteredfield — Method
scatteredfield(sphere::Sphere{<:AcousticBoundary}, excitation::AcousticExcitation, quantity::AcousticQuantity; parameter::Parameter=Parameter())

Compute the pressure, the far field, or the Dirichlet trace scattered by a sound-hard or sound-soft sphere, for an incident acoustic excitation.

source
SphericalScattering.scatteredfield — Method
scatteredfield(sphere::Sphere{<:Dielectric}, excitation::UniformField, point, quantity::ElectricField; parameter::Parameter=Parameter())

Compute the electric field scattered by a Dielectric sphere, for an incident uniform field with polarization in given direction.

The point and the returned field are in Cartesian coordinates.

source
SphericalScattering.scatteredfield — Method
scatteredfield(sphere::Sphere{<:Dielectric}, excitation::UniformField, point, quantity::ScalarPotential; parameter::Parameter=Parameter())

Compute the scalar potential scattered by a dielectric sphere, for an incident uniform field with polarization in given direction.

The point and the returned field are in Cartesian coordinates.

source
SphericalScattering.scatteredfield — Method
scatteredfield(sphere::Sphere{<:ThinImpedanceLayer}, excitation::UniformField, point, quantity::DisplacementField; parameter::Parameter=Parameter())

Compute the displacement field D = ε * E.

The point and the returned field are in Cartesian coordinates.

source
SphericalScattering.scatteredfield — Method
scatteredfield(sphere::Sphere{<:ThinImpedanceLayer}, excitation::UniformField, point, quantity::ElectricField; parameter::Parameter=Parameter())

Compute the electric field scattered by a dielectric sphere with a thin coating, where the displacement field in the coating is only in radial direction. We assume an an incident uniform field with polarization in the given direction.

The point and the returned field are in Cartesian coordinates.

source
SphericalScattering.scatteredfield — Method
scatteredfield(sphere::Sphere{<:ThinImpedanceLayer}, excitation::UniformField, point, quantity::ScalarPotentialJump; parameter::Parameter=Parameter())

Compute the jump of the scalar potential for a dielectric sphere with a thin coating, where the displacement field in the coating is only in radial direction. We assume an an incident uniform field with polarization in the given direction.

More precisely, we compute the difference Δ = Φi - Φe, where Φi is the potential on the inner side and ϕe the exterior potential.

The point and the returned field are in Cartesian coordinates.

source
SphericalScattering.scatteredfield — Method
scatteredfield(sphere::Sphere{<:ThinImpedanceLayer}, excitation::UniformField, point, quantity::ScalarPotential; parameter::Parameter=Parameter())

Compute the scalar potential scattered by a dielectric sphere with a thin coating, where the displacement field in the coating is only in radial direction. We assume an an incident uniform field with polarization in the given direction.

The point and the returned field are in Cartesian coordinates.

source
SphericalScattering.scatteredfield — Method
scatteredfield(sphere::Spheroid, excitation::AcousticExcitation, quantity::FarField; parameter::Parameter=Parameter())

Compute the far field of the pressure scattered by an oblate spheroid, determining the modal coefficients automatically, see modes.

source
SphericalScattering.scatteredfield — Method
scatteredfield(sphere::Spheroid, excitation::AcousticExcitation, quantity::Trace; parameter::Parameter=Parameter())

Compute a surface trace of the pressure scattered by an oblate spheroid, determining the modal coefficients automatically, see modes.

source
SphericalScattering.scatteredfield — Method
scatteredfield(sphere::Spheroid, excitation::AcousticExcitation, quantity::Pressure; parameter::Parameter=Parameter())

Compute the pressure scattered by an oblate spheroid, for an incident acoustic excitation.

The modal coefficients are determined automatically, see modes, and are reused for all locations of quantity. Pass them in explicitly in order to reuse them across several calls, as they are by far the most expensive part of the computation.

source
SphericalScattering.scatteredfield — Method
scatteredfield(sphere::Spheroid, excitation::AcousticExcitation, md::SpheroidalModes, point, normal, quantity::PressureNormalGradient; parameter::Parameter=Parameter())

Compute the Neumann trace $\hat{n} ⋅ ∇ p_\mathrm{s}$ of the pressure scattered by an oblate spheroid for the given normal.

In contrast to a sphere, the gradient does not reduce to two terms for an arbitrary normal: the scattered field of a spheroid depends on $φ$ as well, so that all three components contribute. For the outward normal $\hat{n} = \hat{e}_ξ$ the tangential ones drop out and the radial derivative remains, see outwardNormal and surfaceseries.

source
SphericalScattering.scatteredfield — Method
scatteredfield(sphere::Spheroid, excitation::AcousticExcitation, md::SpheroidalModes, point, quantity::PressureTrace; parameter::Parameter=Parameter())

Compute the Dirichlet trace of the pressure scattered by an oblate spheroid.

It is the scattered pressure evaluated on the surface, that is, at $ξ = ξ_0$. Only the direction of the point is taken into account, so that the locations may also be given by the points of a faceted surface mesh.

Note

For a disc the two faces $η > 0$ and $η < 0$ share their Cartesian coordinates, so that the face cannot be recovered from a location: the one with $η > 0$ is returned. The other follows from the parity of the angular functions, which the degenerate surface selects by the boundary condition:

disc$γ_0$$γ_1$
sound-softsame on both facesopposite
sound-hardoppositevanishes

The parity enters because only the modes with even $n - m$ contribute for a sound-soft disc and only those with odd $n - m$ for a sound-hard one, the angular functions being even and odd in $η$ accordingly.

source
SphericalScattering.scatteredfield — Method
scatteredfield(sphere::Spheroid, excitation::AcousticExcitation, md::SpheroidalModes, point, quantity::Pressure; parameter::Parameter=Parameter())

Compute the pressure scattered by an oblate spheroid, for an incident acoustic excitation.

Since the surface $ξ = ξ_0$ is a coordinate surface, the boundary condition decouples the modes, so that the scattered pressure follows from the incident expansion by multiplying each coefficient with the scattering coefficient of its mode and by replacing the regular radial function with the outgoing one:

\[p_\mathrm{s} = \sum_{mn} A_{mn} b_{mn} R^{(\mathrm{out})}_{mn}(c, ξ) S_{mn}(c, η) \mathrm{e}^{\mathrm{j}mφ}\]

The modal coefficients are passed in, see modes, as the spheroidal wave functions are expensive enough that they should be computed once per scatterer and excitation rather than per evaluation point.

The point is in Cartesian coordinates of the global frame; an arbitrary orientation of the spheroid and an arbitrary direction or position of the excitation are accounted for.

source
SphericalScattering.scatteredfield — Method
scatteredfield(sphere::Spheroid, excitation::AcousticExcitation, md::SpheroidalModes, quantity::FarField; parameter::Parameter=Parameter())

Compute the far field of the pressure scattered by an oblate spheroid at all locations of quantity.

source
SphericalScattering.scatteredfield — Method
scatteredfield(sphere::Spheroid, excitation::AcousticExcitation, md::SpheroidalModes, quantity::PressureJump; parameter::Parameter=Parameter())

Compute the jump of the scattered pressure across a disc at all locations of quantity.

source
SphericalScattering.scatteredfield — Method
scatteredfield(sphere::Spheroid, excitation::AcousticExcitation, md::SpheroidalModes, quantity::Trace; parameter::Parameter=Parameter())

Compute a surface trace of the pressure scattered by an oblate spheroid at all locations of quantity.

source
SphericalScattering.scatteredfield — Method
scatteredfield(sphere::Spheroid, excitation::AcousticExcitation, md::SpheroidalModes, quantity::Pressure; parameter::Parameter=Parameter())

Compute the pressure scattered by an oblate spheroid at all locations of quantity.

source
SphericalScattering.scatteredfield — Method
scatteredfield(sphere::Sphere{<:Layered{<:Dielectric}}, excitation::UniformField, point, quantity::ElectricField; parameter::Parameter=Parameter())

Compute the electric field scattered by a layered dielectric sphere, for an incident uniform field with polarization in the given direction using Sihvola and Lindell, 1988, Transmission line analogy for calculating the effective permittivity of mixtures with spherical multilayer scatterers.

In contrast to Sihvola and Lindell the radii of the shells are ordered from inside to outside as depicted in the documentation.

The point and returned field are in Cartesian coordinates.

source
SphericalScattering.scatteredfield — Method
scatteredfield(sphere::Sphere{<:Layered{<:Dielectric}}, excitation::UniformField, point, quantity::ScalarPotential; parameter::Parameter=Parameter())

Compute the scalar potential scattered by a layered dielectric sphere, for an incident uniform field with polarization in the given direction using Sihvola and Lindell, 1988, Transmission line analogy for calculating the effective permittivity of mixtures with spherical multilayer scatterers.

In contrast to Sihvola and Lindell the radii of the shells are ordered from inside to outside as depicted in the documentation.

The point and returned field are in Cartesian coordinates.

source
SphericalScattering.scatteredfield — Method
scatteredfield(sphere::Sphere{<:Layered{PEC}}, excitation::UniformField, point, quantity::ElectricField; parameter::Parameter=Parameter())

Compute the electric field scattered by a layered dielectric sphere with PEC core, for an incident uniform field with polarization in the given direction using Sihvola and Lindell, 1988, Transmission line analogy for calculating the effective permittivity of mixtures with spherical multilayer scatterers.

In contrast to Sihvola and Lindell the radii of the shells are ordered from inside to outside as depicted in the documentation.

The point and returned field are in Cartesian coordinates.

source
SphericalScattering.scatteredfield — Method
scatteredfield(sphere::Sphere{<:Layered{PEC}}, excitation::UniformField{FC,FT,FR}, point, quantity::ScalarPotential; parameter::Parameter=Parameter())

Compute the scalar potential scattered by a layered dielectric sphere with PEC core, for an incident uniform field with polarization in the given direction using Sihvola and Lindell, 1988, Transmission line analogy for calculating the effective permittivity of mixtures with spherical multilayer scatterers

In contrast to Sihvola and Lindell the radii of the shells are ordered from inside to outside as depicted in the documentation.

The point and returned field are in Cartesian coordinates.

source
SphericalScattering.scatteredfield — Method
scatteredfield(sphere::Spheroid, excitation::AcousticExcitation, md::SpheroidalModes, point, quantity::FarField; parameter::Parameter=Parameter())

Compute the far field of the pressure scattered by an oblate spheroid.

The outgoing radial functions behave as $R^{(\mathrm{out})}_{mn}(c, ξ) → \mathrm{j}^{n+1} \mathrm{e}^{-\mathrm{j}cξ} / (cξ)$ for $ξ → ∞$, just as $h_n^{(2)}$ does, the limit depending neither on the order nor on $c$. Since $r = f \sqrt{ξ^2 + 1 - η^2}$ tends to $f ξ$, so that $c ξ → k r$, the far field

\[p^\mathrm{sc}_\infty = \lim_{r → ∞} r \, \mathrm{e}^{\mathrm{j} k r} p_\mathrm{s} = \cfrac{1}{k} \sum_{mn} A_{mn} b_{mn} \, \mathrm{j}^{n+1} S_{mn}(c, η) \mathrm{e}^{\mathrm{j}mφ}\]

follows, that is, the factor $\mathrm{e}^{-\mathrm{j}kr} / r$ is omitted, as for the electromagnetic excitations. No radial function has to be evaluated.

The far field is determined by the direction of observation alone. In the limit $η$ becomes the cosine of the angle between the axis of the spheroid and that direction, which is why it is taken from the direction rather than from the oblate spheroidal coordinates of the point.

source
SphericalScattering.scatteredfield — Method
scatteredfield(sphere::Spheroid, excitation::AcousticExcitation, md::SpheroidalModes, point, quantity::PressureJump; parameter::Parameter=Parameter())

Compute the jump $[p] = p|_+ - p|_-$ of the pressure across a disc.

The two faces of the degenerate surface $ξ = 0$ are $η > 0$ and $η < 0$, and the angular functions obey $S_{mn}(c, -η) = (-1)^{n-m} S_{mn}(c, η)$, so that

\[[p] = 2 \sum_{n-m \ \mathrm{odd}} A_{mn} b_{mn} R^{(\mathrm{out})}_{mn}(c, 0) S_{mn}(c, η) \mathrm{e}^{\mathrm{j}mφ} \,,\]

the modes of even $n - m$ cancelling. Weighting the terms by their parity avoids having to evaluate the two faces separately, which the Cartesian coordinates of a location cannot distinguish.

Since the degenerate surface retains the modes of odd $n - m$ for a sound-hard disc and those of even $n - m$ for a sound-soft one, the jump of the pressure is carried entirely by the sound-hard case and vanishes identically for the sound-soft one, whose unknown is the jump of the normal derivative instead.

The jump of the total field equals this one, the incident field being continuous across the disc.

source
SphericalScattering.seriesvalue — Method
seriesvalue(sphere::Spheroid, md::SpheroidalModes, point, coefficients, outgoing::Bool)

Evaluate $\sum_{mn} \mathrm{coefficients}_{mn} R_{mn}(c, ξ) S_{mn}(c, η) \mathrm{e}^{\mathrm{j}mφ}$ at a point given in Cartesian coordinates of the global frame.

With outgoing=false the regular radial functions are employed, which reproduces the incident field from the coefficients A; with outgoing=true the outgoing ones are employed, which yields the scattered field.

source
SphericalScattering.shape — Method
shape(sphere::Spheroid)

Returns the shape of the spheroid as the symbol the spheroidal wave functions expect, :oblate or :prolate.

source
SphericalScattering.sourceCoordinate — Method
sourceCoordinate(sphere::Spheroid, excitation::AcousticExcitation)

Returns the radial coordinate of the source of the incident field, beyond which its expansion in the regular spheroidal wave functions does not hold: that of the position of a monopole, and infinity for a plane wave.

source
SphericalScattering.sphericalGridPoints — Method
patternPoints(;r=1.0, resolution=5)

Convenience function returning points (in Cartesian and spherical coordinates) on a spherical grid at a distance 'r' and a resolution in degrees.

source
SphericalScattering.spheroidalAngular — Method
spheroidalAngular(shape::Symbol, m::Int, n::Int, c, η)

Compute the spheroidal angular function of the given shape, :oblate or :prolate, of order m and degree n and its derivative with respect to $η$ at the spheroidal parameter c and the angular coordinate η.

Returned is a named tuple (value, derivative). The Meixner-Schäfke normalization is employed, for which the angular function reduces to the associated Legendre function $P_n^m$ as $c → 0$, so that the limit of a sphere connects directly to the series of the spherical scatterers.

source
SphericalScattering.spheroidalBasis — Method
spheroidalBasis(sphere::Spheroid, coordinates)

Compute the unit vectors $(\hat{e}_ξ, \hat{e}_η, \hat{e}_φ)$ of the spheroidal coordinates at the given ones, in the frame of the spheroid.

source
SphericalScattering.spheroidalParameter — Method
spheroidalParameter(sphere::Spheroid, excitation::Excitation)

Returns the spheroidal parameter $c = k f$, the product of the wavenumber and the semifocal distance, which takes the role of $ka$ for a sphere.

source
SphericalScattering.spheroidalRadial — Method
spheroidalRadial(shape::Symbol, m::Int, n::Int, c, ξ; outgoing::Bool=false)

Compute the spheroidal radial function of the given shape, :oblate or :prolate, of order m and degree n and its derivative with respect to $ξ$ at the spheroidal parameter c and the radial coordinate ξ.

Returned is a named tuple (value, derivative). For outgoing=false the regular function $R^{(1)}_{mn}$ is evaluated, which is the counterpart of $j_n$; for outgoing=true the outgoing one is evaluated, which is the counterpart of $h_n^{(2)}$.

source
SphericalScattering.surfaceseries — Method
surfaceseries(sphere::Spheroid, md::SpheroidalModes, point, coefficients)

Evaluate the series of the scattered field and its three partial derivatives on the surface of the spheroid, at the point having the direction of point.

Returned is a named tuple (value, gradient), the gradient being given in Cartesian coordinates of the global frame. It follows from the partial derivatives via $∇p = h_ξ^{-1} ∂_ξ p \, \hat{e}_ξ + h_η^{-1} ∂_η p \, \hat{e}_η + h_φ^{-1} ∂_φ p \, \hat{e}_φ$, where the derivative with respect to $φ$ amounts to a factor $\mathrm{j}m$.

Only the direction of point is taken into account, the radial coordinate being replaced by that of the surface.

On the axis, $η = ±1$, the basis vectors $\hat{e}_η$ and $\hat{e}_φ$ are not determined; the tangential part of the gradient is obtained as a limit there instead, see axialGradient.

source
SphericalScattering.symmetryAxis — Method
symmetryAxis(excitation::AcousticMonopole)

Returns the direction towards the monopole, about which the scattered field is rotationally symmetric.

source
SphericalScattering.thetaCutPoints — Method
thetaCutPoints(ϑ; r=1.0, resolution=1)

Convenience function returning points (in Cartesian coordinates) on a theta cut at a distance 'r' and a resolution in degrees.

source
SphericalScattering.translate — Method
translate(points, translation::SVector{3,T})

Translate the points in the direction of the translation vector.

All inputs are assumed to be in Cartesian coordinates.

source
SphericalScattering.wavenumber — Method

wavenumber(sp::Scatterer{<:ElectromagneticBoundary}, ex::Excitation, r)

Returns the wavenumber at radius r in the sphere sp. If this part is PEC, k=0 is returned.

source