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.
Within Salvus, we consider a formulation of the acoustic wave equation based on a scalar displacement potential. The strong form of this equation is:
Here represents density, is the speed of sound, and by definition the units of the state variable are . Depending on the units of our forcing term , physically useful units can be extracted from the solution as follows.
Desired output | Expression | Field to save | Further operations |
---|---|---|---|
Pressure () | ["phi_t"] | None | |
Particle velocity () | ["gradient-of-phi"] | Multiply by the inverse density |
Desired output | Expression | Field to save | Further operations |
---|---|---|---|
Pressure () | ["phi"] | Multiply by the inverse density | |
Particle velocity () | ["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.
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:
Here is density, is displacement and represents an external forcing term. The time and space dependency of these last three terms is taken as implicit to simplify notation. 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 as displacement in meters:
Symbol | Quantity (Unit) |
---|---|
Density () | |
Displacement () | |
Elasticity () | |
Time derivative, variation per second () | |
Spatial derivative, variation per meter () |
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.
Applying the space and time derivatives as and respectively, and dropping the vector and tensor operators as they don't influence the units:
Simplifying and using , where denotes force in units of Newtons gives:
So, finally using :
Which dictates that our source term needs to be interpreted in the strong form as a source term with units .
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:
class 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
of these sources should be interpreted, we start with the formulation of this point source as injected into the strong form:
In this definition, the vector fx
, fy
, fz
allows one to orient (and scale) the source in any direction. The symbol 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 . If now we interpret the orientation vector as dimensionless, the units of are found in the following way:
Yielding that should be interpreted as Newtons. Conversely, if is not unit length, only the combination should be interpreted as the exact Newtons injected in the wavefield simulation.