# 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 out put in?" can be non-trivial. If you are interested in precicely 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 output Symbol Field to save Further 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 output Symbol Field to save Further 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.