(Lighthill)=
# Lighthill Tensor Loading

In this section we provide the steps for applying the Lighthill tensor
as a load in a Sierra/SD acoustics simulation. The Lighthill tensor
captures the noise generated by unsteady convection in fluid flow
simulation. In this work, we use the Sierra/TF incompressible
thermal fluids code Fuego to simulate a small chamber, shown in Figure
{numref}`%s <fig:fuego>`, that undergoes a sinusoidal pumping motion in the
x-direction. The air moving in and out of the chamber produces
turbulence that is captured by the Lighthill tensor computed during
the Fuego simulation. The divergence of the Lighthill tensor is
handed off to Sierra/SD and is used as an acoustic source term for
far-field acoustic noise modeling in the larger semi-circular domain
shown in Figure {numref}`%s <fig:salinas>`.

:::{figure-md} fig:fuego

![](fuegoLighthill.png)

a) [Fuego mesh](/tests/fuego_rtest/fuego/mesh_deformation_file/fluid_mesh.g) of fluids domain where sideset 2 (green) is absorbing, sideset 4 (blue) undergoes the pumping motion, and all other sides shown in red are fixed. Sideset 2 shown in green will be tied to the larger Sierra/SD domain shown in Figure . b) Fuego mesh shown on z-plane. c) Fuego interpolation mesh for output of the divergence of the Lighthill Tensor. Domain dimensions are also shown in c).
:::

These simulations are part of the Sierra test suite and provide
regression testing for both the Sierra/SD and Fuego parts of Lighthill
noise modeling. Lighthill loading has also been verified in Sierra/SD
for a 1-D waveguide with documentation provided in the Sierra/SD
verification manual. The [input](/tests/Salinas_rtest/training/exampleproblem/transient/load/lighthill/fuego/acoustic_nodeset.inp) for this example is attached.

Producing the Lighthill load and applying it in Sierra/SD is a $5$ step process.
The initial steps produce the
divergence of the Lighthill tensor from a Fuego CFD simulation.
Questions about these initial steps should be directed to the Sierra
Thermal Fluids team.

The final steps involve preparing the Fuego output for use in Sierra/SD and then running
the Sierra/SD simulation and are found in the input deck.
Questions about the final steps should be directed to the Sierra/SD team.

:::{figure-md} fig:salinas

![](sdLighthill.png)

a) Sierra/SD domain for acoustic noise propagation. The yellow block is the Fuego output domain containing divT and the red block is the additional domain [acoustic.e](/tests/Salinas_rtest/training/exampleproblem/transient/load/lighthill/fuego/hemisphere.exo) for the Sierra/SD simulation. The pink sideset will interface with infinite elements. b) Sierra/SD tetrahedron mesh coarsened out from the Fuego mesh.
:::

## Mesh Deformation For Fuego

This section describes the process of producing a deformation field
used to drive the Fuego simulation. Questions about Aria should be
directed to the Sierra/TF team.

In this example, Aria is used to produce a sinusoidal displacement in the x-direction on sideset 4,
shown in blue in Figure {numref}`%s <fig:fuego>`a.

:::{input}
Begin String Function displacement
  Value is "0.02*sin(1000*3.14159*t)"
End
:::

Additionally, the displacement in the y- and z-direction is fixed,
and the simulation is terminated at $t$=6e-3s.
The output of the Aria simulation, `displacements.e`, is then used as input for Fuego.

## Fuego Simulation

This section describes the process of running Fuego to produce the
divergence of the Lighthill Tensor. Questions about Fuego should be
directed to the Sierra/TF team.

The Fuego input file [fluid.i](/tests/fuego_rtest/fuego/mesh_deformation_file/fluid.i) is executed with the following command:

:::{command}
mpirun -np 8 fuego -i fluid.i
:::

The Fuego simulation is terminated at $t$=3e-3s. The Fuego simulation
is discretized by the tetrahedron mesh shown in Figure
{numref}`%s <fig:fuego>`b. The Fuego simulations writes the divergence of the
Lighthill tensor out to the coarser hexahedron mesh shown in Figure
{numref}`%s <fig:fuego>`c as nodal data. This data is written to
`acoustic.e.8.[0-7]` and provides the loading for the Sierra/SD
simulation.

## Processing Fuego output for Sierra/SD

This section describes the steps required to run a Sierra/SD
simulation using the Fuego output. Questions about this section
should be directed to the Sierra/SD team.

The first step is to join the partitioned Fuego files back together
using the epu Seacas tool:

:::{command}
epu -auto acoustic.e.8.0
:::

The above Fuego simulation writes the divergence of the Lighthill
tensor out as nodal data with the variable names: `divT_x`,
`divT_y`, `divT_z`. The Fuego domain is much smaller than the Sierra/SD domain.
If these two domains were joined together
into a single Exodus file, nodal data of divT=0 would be created on
the larger Sierra/SD domain. To circumvent this unnecessary storage
of divT data on the Sierra/SD mesh, we convert the Fuego divT data to
nodeset data using the ejoin Seacas tool:

:::{command}
ejoin -output acoustic_nodeset.exo \
      -convert_nodal_to_nodesets all \
      acoustic.e
:::

which produces the output file `acoustic_nodeset.exo`.

## Mesh for Sierra/SD

The Sierra/SD simulation will use the Fuego divT data as a source term
to model noise propagation in a larger domain. For this example we
join the smaller Fuego mesh containing the interpolated divT data to a
larger semi-circular domain, see Figure {numref}`%s <fig:salinas>`a. A cubit
journal file for creating the semi-circular mesh is contained in
[hemisphere.jou](/tests/Salinas_rtest/training/exampleproblem/transient/load/lighthill/fuego/hemisphere.jou). This mesh must contain sidesets (sideset 5
in the cubit journal file) that will be tied to sideset 2 in the Fuego
output mesh, shown in green in Figure {numref}`%s <fig:fuego>`a. This mesh
also contains sideset 6 on the exterior of the semicircular domain
which will be used for applying absorbing boundary conditions via
infinite elements. The two separate meshes are joined together with
the ejoin Seacas tool:

:::{command}
ejoin -output acoustic_nodeset_distribution_factors.exo \
      hemisphere.exo acoustic_nodeset.exo
:::

This produces the full meshed domain shown in Figure
{numref}`%s <fig:salinas>`b for the Sierra/SD simulation.

## Sierra/SD simulation

This Sierra/SD simulation will be described in this section.
Lighthill loading causes Sierra/SD to use the acceleration potential
form of the acoustic equation.
The Sierra/SD simulation is terminated
after t=0.06s, which is twice as long as the Fuego simulation. For the
final 0.03s of the simulation there will not be any available Fuego
produced divT data to be read in for Lighthill Loading. For this
case, the final divT data read in at t=0.03s will be applied for the
remainder of the simulation, which produces a warning to this effect.

Some Lighthill specific portions of the attached Sierra/SD input file are:

1.  The Lighthill loading is applied as a function load the LOADS
    section with the Function described in FUNCTION 1. Lighthill loading
    is described in the User's and verification manuals.

2.  Tied data ties together the Fuego and Sierra-SD domains. Sidesets
    must be defined on these surfaces when they are created in Cubit. It
    is difficult to add a sideset to a mesh after it contains nodal data,
    i.e. The sidesets needed to tie the meshes together must be defined on
    the mesh used for Fuego output before the Fuego simulation is run.

3.  Infinite elements are used on sideset 6 to absorb the pressure waves.
