OilVolumeCorrectionToBase

(Function Library)

Description: Wrapper for OilVolumeCorrectionFactor, used to determine the volume correction factor for shifting a fluid at alternate conditions to standard conditions (60°F, 0 psig).
Returns: Numeric
Usage: Script or steady state.
Function Groups: Oil & Gas
Related to: OilVolumeCorrectionFactor
Format: OilVolumeCorrectionToBase(FluidType, Alpha60In, Rho, T, P[, ErrorTag])
Parameters:  
FluidType

Required numeric. An integer to identify the commodity group as follows:

  • 0 for Crude Oil
  • 1 for Refined Liquids
  • 2 for Lubricating Oil
  • 3 for Special Fluids
Alpha60In
Optional numeric. A thermal expansion factor that is required for special fluids, where FluidType is 3.
Rho
Required numeric. The density of the fluid at base conditions (60°F,0psig).
T
Required numeric. The current temperature of the fluid in °F.
P
Required numeric. The current pressure of the fluid in psig.
ErrorTag

An optional tag object that will be set to the error value. Error values include:

0 No error
1 Fluid type outside range
2 Thermal expansion factor required but not specified
3 Density outside range
6 Temperature T outside range
7 Pressure P outside range
Comments:

The function computes an oil volume correction factor based on the American Petroleum Institute Manual of Petroleum Measurement Standards Chapter 11.1.6.1. This factor is used to correct a volume from an alternate set of conditions to base conditions (60°F, 0 psig).

This function uses the more generic OilVolumeCorrectionFactor to compute the volume correction factor from base conditions to alternate conditions and then inverts the answer.

For oils where the density is provided at conditions other than base, use OilVolumeCorrectionFactor.