(section:scattering)=
# Acoustic Scattering

Acoustic analysis often includes the concepts of a "scattering" solution.
By this, we mean an analysis where it is relatively easy to specify the
incident wave at all points in space, and we solve for the reflected wave.
Such analysis is seldom done for elasticity because the input medium is not
usually homogeneous and an *a priori* specification of the incident wave
is a challenge.
Such scattering solutions are useful in a variety of contexts. A submarine in
the ocean may be struck by an incident "ping" from a neighboring ship. Such
a ping is nearly a plane wave, and calculation of the outbound wave is the item
of interest. The total acoustic pressure (which is the sum of the incident
and scattered components) may not be important. Because the incident wave is
known, we do not need to model the vast region of space between the incident
source and the scattering object. This greatly reduces the cost of the
computation.

The theory manual details the formulation. There are several salient issues.

1.  The same PDE is solved for scattering and full pressure solutions.

2.  The acoustic scattering loads are applied analytically as a pressure on the
    wet surface of the structure.

3.  A conjugate load is applied to the wet surface of acoustic medium. Thus,
    there are two loads applied: a pressure load, $P$, on the elastic medium, and
    a velocity load on the acoustic medium. For a plane wave, $v=\frac{P}{\rho c}$.

4.  Because there are two such loads, we have designed a limited number of
    specialized functions for application of these loads. These functions ensure
    compatibility between the elastic and acoustic portions of the model.

5.  The natural output quantity is the scattered pressure.

6.  Typically, absorbing boundary conditions are applied to the exterior of the
    mesh to reduce reflection of the scattered wave.

Because scattering solutions use the same PDE as the full pressure
calculation, the analyst could complete an analysis by applying these loads
independently. Using the scattering loads and set up provides a more robust
and simpler interface to scattering problems.

## Scattering Sphere

The sample problem is an elastic sphere floating in an infinite acoustic
medium. The meshes for the sphere and fluid do not match at the interface, so
tied surface specifications must be used. The example problem is illustrated
in Figure {numref}`%s <fig:scattering:sphere>`.
A [full example](/tests/Salinas_rtest/training/exampleproblem/transient/acoustic/scattering/sphere_ps.inp) is attached,
  with geometry shown in {numref}`scattering:mesh`.

:::{figure-md} fig:scattering:sphere

![](scattering-sphere.png)

Elastic Sphere in Fluid Example.
:::
:::{figure-md} scattering:mesh

![](mesh.png)

Mesh Used in sphere_ps.inp
:::
### Solution

Within the solution section of the input, we specify the "scattering"
keyword. This informs the solver that consistency must be maintained between
loads, and output pressures will be scattered pressures.

### Loads

The loads section should have a load applied to both the elastic and the
fluid portions of the model. In the example input
{numref}`%s <fig:scattering:inp>`, sideset 1 is the surface of the elastic material,
and sideset 2 is the corresponding surface of the fluid. Note that there are
no checks made on this loading. However, if the loads are not applied in
pairs, the analysis is meaningless.

While other structural loads can be applied in a scattering problem, it is
incorrect to apply acoustic loads other than scattering loads. This is
because we are redefining the acoustic variables to apply to incident
pressures. We cannot define the variable as "incident" in one portion of
the analysis and "total pressure" in another portion.

### Functions

The functions referred to in the loads section must be capable of applying
different functional responses to the elastic and acoustic regions.
Specification of the "scattering" keyword in the solution section permits
us to check this for consistency.

### Tied Data

Because the elastic and acoustic regions of the model are not compatibly
meshed, the surfaces must be tied together with a tied surface specification.
Sidesets 1 and 2 are again applied. It is not necessary for the scattering
problem to use tied data sections if the regions have compatible meshes.

### Outputs

Specification of "apressure" outputs the scattered pressure.

:::{input}
:caption: Example Scattering Input
:name: fig:scattering:inp

Solution
  case out
    transient
    scattering
    nsteps=1000
    time_step=0.001
end
Loads
  sideset 1
    pressure=1
    function=1
  sideset 2
    acoustic_vel=1.
    function=1
End
Function 1
  type=Plane_Wave
  material=water
  k0=450.
  direction -1 0 0
end
Tied Data
  name surface1-2
  surface 1,2
end
Outputs
  apressure
  displacement
end
material water
  c0 = 5000
  density = 1
:::
