Version:

This page here has been created for the latest stable release of Salvus. You have chosen to view the documentation for another Salvus version. Please be aware there might be some small differences you have to account for.

Units

Determining the physical units of inputs and outputs in Salvus requires understanding which interpretation of the governing equations is chosen. Salvus supports several physically consistent interpretations for the scalar acoustic potential in purely acoustic simulations, and a unique one when acoustic and elastic physics are coupled. This page lists all supported interpretations, how to translate saved fields to physically meaningful quantities (pressure, particle velocity, displacement), and the special role of the coupled case.

In the elastic wave equation, all outputs are given in their canonical SI units. This is in contrast to the acoustic case, where the units depend on the chosen interpretation of the scalar field, typically some potential. Note that in coupled acoustic-elastic simulations, only one interpretation is allowed.

Acoustic simulations

The strong form we solve is written in a unified way as

ρ1c2t2ϕ=(ρ1ϕ)+f,\rho^{-1} c^{-2} \partial_t^2 \phi = \nabla \cdot (\rho^{-1} \nabla \phi) + f,

with density ρ\rho, wave speed cc, scalar potential ϕ\phi, and source term ff. Different physical choices for the dimensions assigned to ϕ\phi and ff lead to different practical post-processing steps. Salvus does not enforce a single convention for pure acoustic runs; you decide which table below applies.

Interpretation A: Volume Density Injection Rate Source

In the first interpretation, the source term represents a volumetric injection rate with units [f]=s1[f]=\text{s}^{-1}, one finds [ϕ]=Pas[\phi]=\text{Pa}\,s. To get pressure and particle velocity, use:

Desired outputExpressionField to saveFurther operations
Pressure (Pa)tϕ\partial_t \phi["phi_t"]None
Particle velocity (ms1\text{m}\,\text{s}^{-1})ρ1ϕ\rho^{-1} \nabla \phi["gradient-of-phi"]Multiply by inverse density

Interpretation B: Divergence of Force Density Source

Assume ff carries divergence of force density units [f]=Nm4[f]=\text{N}\,\text{m}^{-4}, we find [ϕ]=kg2m4s2[\phi]=\text{kg}^2\,\text{m}^{-4}\,\text{s}^{-2}. Then

Desired outputExpressionField to saveFurther operations
Pressure (Pa)ρ1ϕ\rho^{-1} \phi["phi"]Multiply by inverse density
Particle velocity (ms1\text{m}\,\text{s}^{-1})ρ2ϕdt\rho^{-2} \int \nabla \phi\, dt["gradient-of-phi"]Time integration + multiply by ρ2\rho^{-2}

Interpretation C: Dimensionless forces

Motivated by interface coupling (see below) we can assign [ϕ]=kg/m[\phi]=\text{kg}/\text{m}. Plugging this into the same governing equation implies a dimensionless right hand side in the strong form (i.e., [f]=1[f]=1). This means that the source term becomes a normalized monopole source strength. For more insight in this, see the section on conversions below. Practical consequences:

Desired outputExpressionField to saveFurther operations
Pressure (Pa)t2ϕ-\partial_t^2 \phi["phi_tt"]Multiply by -1
Normal displacement (at interface) (m\text{m})ρ1nϕ\rho^{-1} \partial_n \phi["gradient-of-phi"]Select normal component & multiply by 1/ρ1/\rho
Particle displacement (bulk) (m\text{m})ρ1ϕ\rho^{-1} \nabla \phi["gradient-of-phi"]Multiply by 1/ρ1/\rho
Particle velocity (bulk) (m\text{m})tρ1ϕ\partial_t \rho^{-1} \nabla \phi["gradient-of-phi"]Multiply by 1/ρ1/\rho, then take the time derivative*

*Note that one could also output [phi_t] and then compute the gradient afterwards, but this is much more involved on unstructured meshes than taking the time derivative of the gradient field with e.g. a central difference (higher order) scheme.

Interpretation C is mandatory when coupling to elasticity; A and B are only valid in purely acoustic scenarios.

Choosing among A or B (pure acoustic): Pick the one aligned with how your source is specified physically. Need immediate pressure? Use A. Have a known force density history? Use B. Planning to share meshes with elastic physics? Use C from the start to avoid reinterpretation.

For full algorithmic details see our paper here. Additionally, a complete list of fields which can be output can be found in the documentation.

Source conversion formulas

It is common to have a source specified in one physical description and wish to implement it under a different interpretation (or eventually migrate to a coupled simulation). The relations below let you translate between a purely acoustic physical source description and the dimensionless right-hand side f used in the coupled convention (Interpretation C). Denote the coupled-form source term by f_c(t) (dimensionless) and the time variable by t.

Given one of the following physical source descriptions in a pure acoustic setting:

Physical descriptionSymbol & unitsConversion to dimensionless f_c(t) (Interpretation C)Notes
Volume injection rateq(t) [s^-1]f_c(t) = - ∫ q(t) dt (constant chosen so f_c→0 outside source)Time integral; remove DC after integration
Pressure history (localized)p(t) [Pa]f_c(t) = - p(t) / (ρ c^2)Uses local acoustic impedance (ρ c^2) scaling
Divergence of force densityg(t) [N m^-4]f_c(t) = - (1/ρ) ∫∫ g(t) dt^2Two time integrals; detrend afterwards

Each physical description corresponds to a way of injecting work or mass/volume change into the acoustic field. In the coupled Interpretation C, the governing equation has a dimensionless right-hand side, so any dimensional source must be rescaled to produce the correctly scaled potential ϕ\phi with units kg/m\text{kg}/\text{m}. A volume injection rate q(t)q(t) is (up to constants) the time derivative of a dimensionless monopole strength—hence we integrate once to obtain its cumulative effect. A localized pressure history p(t)p(t) enters as an imposed normal stress; dividing by the bulk modulus proxy ρc2\rho c^2 yields a dimensionless amplitude consistent with p=ϕttp = -\phi_{tt}. Finally, a divergence of force density g(t)g(t) is (in the pure-acoustic interpretations) the second time derivative of a monopole-like loading; recovering the dimensionless f_c therefore requires two time integrations (and detrending to remove integration constants). This mapping ensures that after substitution into the coupled equation, ϕ\phi and its derivatives reproduce the originally intended physical pressure / traction and volume-change effects.

Conversely, once you have a dimensionless f_c(t) (coupled interpretation):

Quantity (pure acoustic meaning)Recover from f_c(t)Comment
Volume injection rate q(t)q(t) = - d f_c / dtCentral differences recommended
Local pressure p(t)p(t) = - ρ c^2 f_c(t)Near-source approximation
Divergence force density g(t)g(t) = - ρ d^2 f_c / dt^2Central differences recommended

Implementation tips:

  1. Always window the source time function so its value and its first derivative vanish near simulation start to avoid long-period artifacts.
  2. Numerical differentiation/integration should use the native solver time step to avoid interpolation phase errors (or heavily supersampled signals).
  3. After integration, remove any residual linear trend (detrending) to enforce zero mean; this prevents persistent offsets in φ.

Design guidance:

  • Use Interpretation A if your physical source is naturally specified as a volume injection rate and you mainly care about pressure time series.
  • Use Interpretation B if you have (or conceptually think in terms of) a known divergence of force density field.
  • Use Interpretation C if you will ever couple to elasticity, or if you prefer pressure via a second derivative and a straightforward formula for normal displacement at interfaces.
  • Converting previously archived A/B datasets to the coupled view can be done via the conversion tables by reconstructing f_c(t) and recomputing derived fields.

Elastic simulations

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

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

Here ρ\rho is density, u\mathbf{u} is displacement, and ff represents an external forcing term. The time and space dependency of these last three terms is taken as implicit to simplify notation. C\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 u\mathbf{u} as displacement in meters:

SymbolQuantity (Unit)
ρ\rhoDensity (kgm3\text{kg}\cdot\text{m}^{-3})
u\mathbf{u}Displacement (m\text{m})
C\mathbf{C}Elasticity (Pa\text{Pa})
t\partial_tTime derivative, variation per second (s1\text{s}^{-1})
\nablaSpatial derivative, variation per meter (m1\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.

[kgm3]t2[m]=([Pa]:[m])+f.[\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 [m1][\text{m}^{-1}] and [s1][\text{s}^{-1}] respectively, and dropping the vector and tensor operators as they don't influence the units:

[kgm3][ms2]=[m1]([Pa][mm1])+f.[\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 [Pa]=[Nm2][\text{Pa}] = [\text{N} \cdot \text{m}^{-2}], where N\text{N} denotes force in units of Newtons gives:

[kgms2m3]=[m1][Nm2]+f,[\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 [N]=[kgms2][ \text{N} ] = [\text{kg} \cdot \text{m} \cdot \text{s}^{-2}]:

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

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

The units of point sources (e.g. 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:

Copy
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 stf(t)\text{stf}(t) of these sources should be interpreted, we start with the formulation of this point source ff as injected into the strong form:

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

In this definition, the vector F=[\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 m3\text{m}^{-3}. If now we interpret the orientation vector F\mathbf{F} as dimensionless, the units of stf(t)\text{stf}(t) are found in the following way:

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

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

Coupled acoustic–elastic simulations

When an acoustic region adjoins an elastic region within the same simulation, the interface conditions uniquely determine the permissible scaling of the acoustic potential. Across any acoustic–elastic boundary with outward normal n^\hat{n} (Nissen-Meyer et al., 2007, equation 46):

un=n^u=ρ1nϕ,σnn=p=t2ϕ.u_n = \hat{n}\cdot \mathbf{u} = \rho^{-1} \partial_n \phi, \qquad \sigma_{nn} = -p = \partial_t^2 \phi.

With elastic displacement [u]=m[\mathbf{u}] = \text{m} and stress [σnn]=Pa[\sigma_{nn}] = \text{Pa}, these two relations force [ϕ]=kg/m[\phi]=\text{kg}/\text{m} and p=ϕttp = -\phi_{tt}. Thus only Interpretation C is consistent; A and B would break continuity. Practical recipe for coupled simulations:

  1. Request phi_tt to obtain pressure: pressure = -phi_tt.
  2. Request gradient-of-phi and multiply its components by 1/rho to get displacement components.
  3. All elastic outputs retain their canonical SI units: displacement (m), velocity (m/s), stress / pressure (Pa), etc.

FAQ (Coupled)

Why is there a minus sign in p=ϕttp = -\phi_{tt}? The sign follows directly from the stress balance with our positive pressure convention; in the frequency domain ϕttω2ϕ\phi_{tt} \rightarrow -\omega^2 \phi giving the expected 180° phase relative to ϕ\phi.

What are the units of the acoustic source term now? Dimensionless in the strong form; any physical forcing is mediated through traction continuity or is scaled so that resulting ϕ\phi has [kg/m][\text{kg}/\text{m}].

Can I still use a volume injection rate source in a coupled run? No. That scaling would force inconsistent interface units.

PAGE CONTENTS