# Volume Maths

 Description Perform complex, arbitrary calculations using volumes and horizons. Module(s) Insight Requirements 3D Survey Related Volume Maths (Simple) Works with Gathers, Stacks, 2D

Volume math creates a new volume using an arbitrary mathematical expression. Variables in the function are extracted from volumes, horizons (and horizon attributes), spatial / survey information and trace headers.

Conditional statements and extensive math and utility functions can be included in the expression (see Functions and Variables for Math Expressions and Trace Header Variables for Maths Expressions).

## Create a volume maths process 1. In the Control Panel, open the Process tab.
2. At the tab header, click the Add icon and select New Process.
3. Double-click Volume Maths.
4. Type a name for the process and click OK.

## Create volume variables 1. In the Details Panel, click the Add Row icon beside Volume.
2. At Symbol, enter a variable to represent the volume.
3. At Volume, select a volume.

## Create horizon variables 1. In the Details Panel, click the Add Row icon beside Horizon.
2. At Symbol, enter a variable to represent the horizon.
3. At Horizon, select a horizon.
4. At Property, select the horizon property or attribute.
5. At Location, choose how to find the horizon value.
• Survey location (default): use in most cases.
• CMP X/Y (for gathers): use the CMP X/Y headers.
• Source (for gathers): use the SX/SY headers.

## Enter the formula Type the formula for the new volume at Formula using extra variables and conditionals if you wish.

## Output extents In the Output Extents section, set the range and increment of the result volume.

1. At Survey, select the survey which the volume will be assigned.
2. At Inline extent and Crossline extent, enter the min, max and increment.
3. Select the vertical domain, TWT or TVDSS, and start, stop and interval.

The result of this process is a new volume, located in the Volume tab. Use the CTRL-P hotkey to quickly switch between a process and its result volume.

## Use extra variables

In addition to the symbols you choose for volumes, you may use these additional case-insensitive variables:

• NaN ("Not a Number") or null — A null sample; NaNs are invisible in all views.
• twt_ms or twt_s — The time of a sample in milliseconds or seconds. Use this variable to perform an operation conditional to time or compute result in relative to time.
• tvdss_m or tvdss_ft — The depth of a sample in metres or feet respectively. Use this variable to perform an operation conditional to depth or compute result in relative to depth.

Use dimension variables including "offset", "freq", "channel", "realisation", "semblance", "rotation", "offset_m" and "offset_ft" in your Formula when performing the Volume Maths process on a gather volume.

• For example, if you have defined a symbol ‘a’ for your gather volume and the conditional formula if (offset < 2150, a, NaN), the process will produce a gather volume where the offset value is less than 2,150.

## Use conditionals

Volume Maths supports conditional statements in the form of:

if (condition, value if true, value if false)

Important: Do NOT use !=NaN or ==NaN in conditional statements. Instead, use !IsNaN() or IsNan().

Example 1:

``if (AI/SI <1.7, AI/SI, NaN) ``

This formula will produce a Vp/Vs volume defined only where the result is less than 1.7. Example 2:

``if (!IsNan(a), a, b)``

This formula will use the value of volume ‘a’ for a given location if it exists, otherwise it will take the value of volume ‘b’.