ShellTemperatureCorrection

(Function Library)

Description: Returns a coefficient to adjust the calculation of volume within a tank.
Returns: Numeric
Usage: Script or steady state.
Function Groups: Oil & Gas
Related to: TableInterpolation
Format: ShellTemperatureCorrection(Insulated, LiquidTemp, AirTemp, VolRefTemp[, Material, CoEIn ErrorTag])
Parameters:  
Insulated
Required Boolean. A flag to indicate whether the tank is insulated.
LiquidTemp
Required numeric. The temperature of the liquid in the tank measured in degrees Fahrenheit.
AirTemp
Required numeric. The ambient air temperature measured in degrees Fahrenheit.
VolRefTemp
Required numeric. The reference temperature for the measured volume measured in degrees Fahrenheit.
Material

Optional numeric. An integer representing one of the following materials:

  • 0 for Carbon Steel
  • 1 for 304 Stainless steel
  • 2 for 316 Stainless steel
  • 3 for Monel.

Should be left blank if a custom coefficient of linear expansion is used.

CoEIn
Optional numeric. A coefficient of linear expansion measured in units of in/(in F) that will override the internal coefficient if a material is selected.
ErrorTag

Optional tag object. If provided, this will be set to the error value. Error values are as follows:

0 Success
1 No Material or CoE provided
2 No Liquid temperature provided
3 No Reference temperature provided
4 Insulation parameter not specified
5 No Air temperature provided
Comments:

The function computes a shell temperature correction factor based on the American Petroleum Institute Manual of Petroleum Measurement Standards guidelines.

This factor is used to correct volume measurements due to expansion or contraction of the tank from its measured reference volume.