Version:

# Units

Due to the variety of wave-equations and source-time functions one can use in Salvus Compute, the question of "which units are my results output in?" can be non-trivial. If you are interested in precisely determining the units of input and output, please read on.

## Acoustic simulations

Within Salvus, we consider a formulation of the acoustic wave equation based on a scalar displacement potential. The strong form of this equation is:

$\rho ^{-1} c ^{-2} \partial _t^2 \phi = \nabla \cdot (\rho ^{-1} \nabla \phi) + f.$

Here $\rho$ represents density, $c$ is the speed of sound, and by definition the units of the state variable $\phi$ are $\text{m}^2$. Depending on the units of our forcing term $f$, physically useful units can be extracted from the solution as follows.

#### Source in units of Volume Density Injection Rate ($\text{s}^{-1}$)

Desired outputExpressionField to saveFurther operations
Pressure ($\text{N}\cdot \text{m}^{-2}$)$\phi _t$["phi_t"]None
Particle velocity ($m \cdot s^{-1}$)$\nabla \phi \cdot \rho ^{-1}$["gradient-of-phi"]Multiply by the inverse density

#### Source in units of Force Density ($\text{N} \cdot \text{m}^{-3}$)

Desired outputExpressionField to saveFurther operations
Pressure ($\text{N}\cdot \text{m}^{-2}$)$\phi \cdot \rho^{-1}$["phi"]Multiply by the inverse density
Particle velocity ($\text{m}\cdot s^{-1}$)$\int \nabla \phi\;dt \cdot \rho ^{-2}$["gradient-of-phi"]Multiply by the inverse density squared

For more information on the physical equations solved in Salvus, please check out our paper here. Additionally, a complete list of fields which can be output can be found in the documentation.

## Elastic simulations

In the elastic case, Salvus solves the general elastic wave equation. For the analysis of units involved, let's limit ourselves to purely elastic linear media. The strong form of this equation is:

$\rho \, \partial _t^2 \mathbf{u} = \nabla \cdot (\mathbf{C} : \nabla \mathbf{u}) + \mathbf{\mathcal{f}}.$

Here $\rho$ is density, $\mathbf{u}$ is displacement and $f$ represents an external forcing term. The time and space dependency of these last three terms is taken as implicit to simplify notation. $\mathbf{C}$ is a fourth-order tensor characterizing the stiffness of the medium, and the symbol $:$ denotes a contraction over adjacent indices.

In the elastic case, it is a little less flexible to substitute units of the applied force. Let's see what units are present in the equation when one defines $\mathbf{u}$ as displacement in meters:

SymbolQuantity (Unit)
$\rho$Density ($\text{kg}\cdot\text{m}^{-3}$)
$\mathbf{u}$Displacement ($\text{m}$)
$\mathbf{C}$Elasticity ($\text{Pa}$)
$\partial_t$Time derivative, variation per second ($\text{s}^{-1}$)
$\nabla$Spatial derivative, variation per meter ($\text{m}^{-1}$)

Let's substitute these units into the equation, and figure out in what units the source term should be. In this exercise, we forego the dimensionalities of the quantities.

$[\text{kg} \cdot \text{m}^{-3}] \, \partial _t^2 [\text{m}] = \nabla \cdot ([\text{Pa}] : \nabla [\text{m}]) + \mathbf{\mathcal{f}}. \\ \\$

Applying the space and time derivatives as $[\text{m}^{-1}]$ and $[\text{s}^{-1}]$ respectively, and dropping the vector and tensor operators as they don't influence the units:

$[\text{kg} \cdot \text{m}^{-3}] \, [\text{m} \cdot \text{s}^{-2}] = [\text{m}^{-1}] \left( [\text{Pa}] [\text{m} \cdot \text{m}^{-1}]\right) + \mathbf{\mathcal{f}}.$

Simplifying and using $[\text{Pa}] = [\text{N} \cdot \text{m}^{-2}]$, where $\text{N}$ denotes force in units of Newtons gives:

$[\text{kg}\cdot\text{m} \cdot \text{s}^{-2} \cdot \text{m}^{-3}] = [\text{m}^{-1}] \cdot [\text{N} \cdot \text{m}^{-2}] + \mathbf{\mathcal{f}},$

So, finally using $[ \text{N} ] = [\text{kg} \cdot \text{m} \cdot \text{s}^{-2}]$:

$[\text{N} \cdot \text{m}^{-3}] = [\text{N} \cdot \text{m}^{-3}] + \mathbf{\mathcal{f}}.$

Which dictates that our source term $f$ needs to be interpreted in the strong form as a source term with units $\text{N} \cdot \text{m}^{-3}$.

### The units of vector point sources (VectorPoint3D)

One often desires point sources to be injected in a wavefield simulation. As a case study, we look at how to interpret the units of VectorPoint3D. The signature of creating this object is as follows:

.css-otuz2g{border-width:0px!important;padding:0px!important;font-size:80%;box-shadow:1px 1px 3px 1px rgba(0,0,0,0.48)!important;}.css-11hsurx{left:calc(100% + 1rem + 1.2em - 14px)!important;position:absolute!important;top:0.3em;}Copyclass VectorPoint3D(salvus.flow.simple_config.source._BaseSource):
def __init__(
self,
x: float,
y: float,
z: float,
fx: float,
fy: float,
fz: float,
source_time_function: Optional[
salvus.flow.simple_config.stf._Base
] = None,
rotation_on_input: Optional[Dict] = None,
):
...

To know in what units the source_time_function $\text{stf}(t)$ of these sources should be interpreted, we start with the formulation of this point source $f$ as injected into the strong form:

$f(\mathbf{x}, t) = \text{stf}(t) \, \mathbf{F} \,\delta(\mathbf{x})$

In this definition, the vector $\mathbf{F} = [$fx, fy, fz$]$ allows one to orient (and scale) the source in any direction. The symbol $\delta$ indicates the (multidimensional) Dirac delta function.

The units of the Dirac delta function should be interpreted to collapse to dimensionless if integrated over its argument. In this case, we would integrate over three spatial coordinates, giving it the units $\text{m}^{-3}$. If now we interpret the orientation vector $\mathbf{F}$ as dimensionless, the units of $\text{stf}(t)$ are found in the following way:

$[\text{N} \cdot \text{m}^{-3}] = \text{stf}(t) \cdot [ 1 ] \cdot [\text{m}^{-3}]$

Yielding that $\text{stf}(t)$ should be interpreted as Newtons. Conversely, if $\mathbf{F}$ is not unit length, only the combination $\text{stf}(t) \, \mathbf{F}$ should be interpreted as the exact Newtons injected in the wavefield simulation.

PAGE CONTENTS