OilVolumeCorrectionFactor

(Function Library)

Description: Returns a coefficient to adjust a volume of oil to different temperature and pressure conditions.
Returns: Numeric
Usage: Script or steady state.
Function Groups: Oil & Gas
Related to:  
Format: OilVolumeCorrectionFactor(FluidType, Alpha60In, RhoIn, TRhoIn, PRhoIn, TAltIn, PAltIn[, 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.
RhoIn
Required numeric. The observed density of the fluid in kg per meter cubed.
TRhoIn
Required numeric. The temperature in °F at which the density of the fluid is observed.
PRhoIn
Required numeric. The pressure in psig at which the density of the fluid is observed.
TAltIn
Required numeric. The temperature in degrees F of the fluid for the volume correction.
PAltIn
Required numeric. The pressure in psig of the fluid for the volume correction.
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
4 TRholn outside range
5 PRholn outside range
6 TAltln outside range
7 PAltln outside range
8 Rho60ln outside range
9 Too many iterations
Comments:

The function computes an oil volume correction factor based on the American Petroleum Institute Manual of Petroleum Measurement Standards Chapter 11.1.6.

This factor is used to correct a volume from a set of observed conditions to a set of alternate conditions due to changes in temperature and pressure. Note that if the observed density is given at a set of conditions different from the current conditions, the function will be need to be evaluated twice. Once to determine the volume correction to the density conditions, and again to determine the volume correction from the density conditions to the alternate conditions.

For simple volume corrections from observed conditions to base conditions (60°F,0psig) use OilVolumeCorrectionToBase.