Chinaunix首页 | 论坛 | 博客
  • 博客访问: 357222
  • 博文数量: 132
  • 博客积分: 3066
  • 博客等级: 中校
  • 技术积分: 781
  • 用 户 组: 普通用户
  • 注册时间: 2009-04-14 16:19
文章分类

全部博文(132)

文章存档

2012年(1)

2010年(50)

2009年(81)

我的朋友

分类: 服务器与存储

2009-04-14 16:43:07

Part 4: Unit Model

Edition 1

This part describes the syntax of a unit model administered by the Subcommittee On Recommended Format For Well Data. The name of the unit model is API-SI. This unit model is based upon le Système International d'Unités (SI) with some extensions suitable for use by oilfield businesses.

The unit model described here is based on guidelines published in the following documents. These references are provided for information only and do not form a part of this standard:
  • [ANSI-260] ANSI STD 260-1978 (IEEE Standard Letter Symbols for Units of Measurement)
  • [ISO-1000] ISO 1000-1981 (E) (SI units and recommendations for the use of their multiples and of certain other units)
  • [SPE] The SI Metric System of Units and SPE METRIC STANDARD

- Definitions

The API-SI unit model consists of a grammar in which unit symbols from an administered dictionary are combined and scaled to produce expressions of desired units. The grammar (see 5.1) describes how to combine unit symbols using the algebraic operations multiplication, division, and exponentiation. The resulting combination may then be scaled by a numeric multiplier, which is expressed in terms of multiplication, division, and exponentiation of integer and decimal numbers. Finally, a similar numeric offset term may be applied to the scaled combination.

The unit symbol dictionary (see Part 5) contains symbols for a large number of commonly-used units. These are divided into two groups: base unit symbols and derived unit symbols. A base unit is not defined in terms of any other unit symbols. It represents the standard reference unit of a basic physical or dimensionless quantity. A derived unit symbol, on the other hand, is defined as an expression of other unit symbols or as a dimensionless scaling.

A unit symbol may be used in an API-SI unit expression only if it appears in the API-SI unit dictionary listed in Part 5 of this standard. API-SI unit symbols match corresponding SI unit symbols when such units are defined under SI. Additional unit symbols (including base units) have been added to the API-SI unit dictionary for commonly-used oilfield and (dimensionless) monetary quantities.

This model is based on the SI notion that from a small handful of basic quantities all other quantities can be derived by algebraic operations. The SI basic quantities are length, mass, time, electric current, temperature, luminous intensity, and amount of substance. Two dimensionless supplemental quantities - plane angle, and solid angle - are typically added. These have corresponding reference units m (meter), kg (kilogram), s (second), A (ampere), K (kelvin), cd (candela), mol (mole), rad (radian), and sr (steradian).

Given length and time, for example, velocity may be derived as length/time, and a corresponding unit for velocity may be expressed as m/s.

In addition to derived units that represent new quantities, there are derived units that represent scalings of other quantities. For example, the expression 0.3048 m is also a length. The expression 0.3048 m can be assigned to a customary unit symbol, say ft. The symbol ft is a derived unit symbol having definition ft = 0.3048 m. Both ft and 0.3048 m are derived units and may be used interchangeably. It happens that ft is also a unit symbol, which can be found in the unit dictionary and which may be used in the definition of other derived units.

The following Backus-Naur Form (BNF) grammar defines the syntax for expressing an API-SI unit.
SIUnit ::= ' ' | Multiplier | StandardForm .
StandardForm ::= [Multiplier ' '] FactorExpression [',' ' ' Offset] .
FactorExpression ::= UnitTerm ['/' UnitTerm] | 1 '/' UnitTerm .
UnitTerm ::= '(' FactorExpression ')' | UnitFactors .
UnitFactors ::= UnitFactor '.' UnitFactors | UnitFactor .
UnitFactor ::= SIUnitSymbol [UnitExponent] .
SIUnitSymbol ::= {UnitCharacter} .
UnitCharacter ::= 
        'A' | 'B' | 'C' | 'D' | 'E' | 'F' | 'G' | 'H' |
        'I' | 'J' | 'K' | 'L' | 'M' | 'N' | 'O' | 'P' |
        'Q' | `R' | 'S' | 'T' | 'U' | 'V' | 'W' | 'X' |
        'Y' | 'Z' | 'a' | 'b' | 'c' | 'd' | 'e' | 'f' |
        'g' | 'h' | 'i' | 'j' | 'k' | 'l' | 'm' | 'n' |
        'o' | 'p' | 'q' | 'r' | 's' | 't' | 'u' | 'v' |
        'w' | 'x' | 'y' | 'z' | '%' .
UnitExponent ::= 
        ['-'] SINum | '(' ['-'] (SINumber | SINum ['/' SINum]) ')' .
Multiplier ::= ComplexNum 
Offset ::= ['-'] ComplexNum 
ComplexNum ::= X ['E' N]['/' Y] 
X ::= SINumber 
N ::= ['-'] SINum Y ::= SINumber 
SINumber ::= SINum | SINum '.' SINum | '0' '.' SINum 
SINum ::= '0' SINum | SINum '0' | NonZeroDigits 
NonZeroDigits ::= NonZeroDigit | NonZeroDigit {NonZeroDigit} 
NonZeroDigit ::= '1' | '2' | '3' | '4' | '5' | '6' | '7' | '8' | '9' 
Here are a few examples that illustrate the grammar:
m/s meter per second
s(0.5) root-second
1E-28 m2 barn (b)
0.0174532925198 rad degree (dega)
360 dega cycle (c)
(c/s)/(m/s) (cycle per second) per (meter per second)
kg.m/s2 newton (N)
N.m joule (J)
J/s watt (W)
W/A volt (V)
A/V siemens (S)
Note the power of the grammar to construct an arbitrary number of unit expressions from a relatively small number of predefined unit symbols. The successive construction method illustrated here also makes the task of defining new unit symbols very simple, especially with respect to computing conversion factors (see 6.1.2).

Given the expression grammar described in 5.1, it is possible to derive formulas for converting values from one unit to another. This is described in 6.1.2 and 6.3.1.

Letting M = Multiplier, E = FactorExpression, and O = Offset, the standard form expression `M E, O' is a new derived unit. Let U represent this derived unit, i.e., U = M E, O. Note that E is also a unit. Let X represent an amount expressed in unit U and Y represent the same amount expressed in unit E. Then the following unit conversion equations hold:

(EQ 1) Y = M * (X - O)
(EQ 2) X = (1/M) * Y + O
The unit, degree fahrenheit (degF), is derived from degree celsius (degC) using the expression degF = 5/9 degC, 32. If X and Y represent the same temperature in degF and degC, respectively, then
Y = (5/9) (X - 32) and X = (9/5) Y + 32.
For example,
50 degF = (5/9) (50 -32) degC = 10 degC.

Applications typically need to convert between units when one is not directly expressed in terms of the other. The procedure for doing this is described in 6.3.1.

Any two units U and E related by a standard form expression `U = M E, O', are said to belong to the same unit dimension. Alternatively, any two units consisting of multipliers only are said to be dimensionless. A standard form expression can be reduced by successive substitution to a dimensionless unit or to a form in which E has only base unit symbols. This provides an algorithmic tool for detecting when two units have the same unit dimension and for computing the factors M and O needed to convert one unit to another.

Dimensionless units are already in reduced form. When there are no offsets, reduction is accomplished by substituting each unit symbol in E by its dimensionless or standard form, applying appropriate exponentiation and algebraic simplification, then factoring all multipliers out to create a new multiplier. If the new E reduces to 1, it is dropped out to produce a dimensionless unit. This is iterated until E has only base unit symbols or until a dimensionless unit results.

Example -
 mi/hr2 = (5280 ft) / (60 min) 2 = 5280/3600 ft/min2 = 4.4/3 ft/min2 
       = 4.4/3 (0.3048 m) / (60 s) 2= (4.4)(0.3048)/(3)(3600) m/s2 
       = 0.02794/225 m/s2 

For the simple case in which a factor expression has no denominator, and a single unit factor with exponent 1, then reduction with offset is governed by (EQ 1).

Example - From the unit symbol dictionary,
 degF = 5/9 degC, 32 and 
degC = K, -273.15.
If X degF, Y degC, and Z K all represent the same temperature, then from (EQ 1) Z = Y + 273.15 = (5/9)(X - 32) + 273.15 = (5/9)(X + 459.67) which by reverse application of (EQ 1) implies degF = 5/9 K, -459.67.

When a unit factor is in a denominator or has an exponent other than 1 or is not the only unit factor in the factor expression, then any offset in the definition of the unit factor is dropped. That is, such a unit factor is considered to represent a differential quantity.

Example - The unit degF/ft represents a temperature difference per length. It may be reduced by ignoring the offsets in the definition of degF and degC:
degF/ft = 5/9 degC/(.3048 m)
        = 0.508/3 degC/m
        = 0.508/3 K/m

Assume units U and V have been reduced to standard form expressions `MU EU, OU' and `MV EV, OV' respectively, where EU and EV have only base unit symbols. Then U and V belong to the same unit dimension if and only if EU/EV algebraically reduces to 1. Furthermore, if X represents an amount in unit U and Y represents the same amount in unit V, then from (EQ 1),
(EQ 3) MU(X - OU) = MV(Y - OV)
(EQ 4) Y = (MU/MV)(X - OU) + OV
For example, to convert X mi/hr to Y km/s, first reduce both expressions:
mi/hr = 5280 ft / 3600 s
      = 4.4/3 (0.3048 m)/s
      = 0.44704 m/s [MU = 0.44704, OU = 0]
 km/s = 1000 m/s [MV = 1000, OV = 0]
Note that m/s is the factor expression for both units, so U and V are convertible. Using (EQ 4), we get
Y = 0.44704/1000 X
  = 0.44704E-3 X

The same conversions shown in (EQ 3) and (EQ 4) also hold when two units reduce to dimensionless units, since only multipliers and offset are involved.

One could incorporate the dimensionless case into the standard form case by using a pseudo base unit symbol "nodim".

阅读(785) | 评论(0) | 转发(0) |
0

上一篇:DLIS-RP66-PART-3

下一篇:DLIS-RP66-PART-5

给主人留下些什么吧!~~