UDT

Recognised by the OPM Flow parserSCHEDULE

The UDT keyword defines a single multi-dimensional User Defined Table (“UDT”).

User Defined Quantities (“UDQ”) defined using the UDQ keyword in the SCHEDULE section can be assigned values by looking up a UDT.

This keyword is partially supported by OPM Flow; only one-dimensional lookup tables are supported.

Each User Defined Table must be defined with a separate UDT keyword that consists of a number of records defining the table name and dimensions; the interpolation type and interpolation points for each dimension; and the table values for each set of interpolation points. The total number of records depends on the table dimensions and the number of interpolation points.

Notes:

Each User Defined Table must be entered with a separate UDT keyword.

The table values (VALUES) are ordered with the interpolation points for the first dimension cycling fasted.

Each of the records are terminated by a “/” and is explicitly shown in the above rows.

The keyword is terminated by a “/”.

The format for a one-dimensional table with m interpolation points is outlined below:

UDT

(NAME) 1 / ----------------------- NAME, NDIMS

--

-- Interpolation points for each dimension:

--

(TYPE1) a1 a2 ... am / ----------- TYPE, POINTS

--

-- VALUES: fi = f(ai)

--

f1 f2 ... fm / ------------------- end of 1D f(a1) ... f(am)

/ -------------------------------- end of 2D f(*)

/ -------------------------------- end of keyword

The format for a two-dimensional table with m and n interpolation points in the first and second dimensions respectively is outlined below:

UDT

(NAME) 2 / ----------------------- NAME, NDIMS

--

-- Interpolation points for each dimension:

--

(TYPE1) a1 a2 ... am / ----------- TYPE, POINTS

(TYPE2) b1 b2 ... bn /

--

-- VALUES: fij = f(ai,bj)

--

f11 f21 ... fm1 / ---------------- end of 1D f(a1,b1) ... f(am,b1)

f12 f22 ... fm2 /

...

f1n f2n ... fmn / ---------------- end of 1D f(a1,bn) ... f(am,bn)

/ -------------------------------- end of 2D f(*, b1) ... f(*, bn)

/ -------------------------------- end of keyword

The format for a three-dimensional table with m, n and p interpolation points in the first, second and third dimensions respectively is outlined below:

UDT

(NAME) 3 / ----------------------- NAME, NDIMS

--

-- Interpolation points for each dimension:

--

(TYPE1) a1 a2 ... am / ----------- TYPE, POINTS

(TYPE2) b1 b2 ... bn /

(TYPE3) c1 c2 ... cp /

--

-- VALUES: fijk = f(ai,bj,ck)

--

f111 f211 ... fm11 / ------------- end of 1D f(a1,b1,c1) ... f(am,b1,c1)

f121 f221 ... fm21 /

...

f1n1 f2n1 ... fmn1 / ------------- end of 1D f(a1,bn,c1) ... f(am,bn,c1)

/ -------------------------------- end of 2D f(*, b1,c1) ... f(*, bn,c1)

f112 f212 ... fm12 /

f122 f222 ... fm22 /

...

f1n2 f2n2 ... fmn2 /

/

...

f11p f21p ... fm1p /

f12p f22p ... fm2p /

...

f1np f2np ... fmnp / ------------- end of 1D f(a1,bn,cp) ... f(am,bn,cp)

/ -------------------------------- end of 2D f(*, b1,cp) ... f(*, bn,cp)

/ -------------------------------- end of 3D f(*, *, c1) ... f(*, *, cp)

/ -------------------------------- end of keyword

The format for a four-dimensional table with m, n, p and q interpolation points in the first, second, third and forth dimensions respectively is outlined below:

UDT

(NAME) 4 / ----------------------- NAME, NDIMS

--

-- Interpolation points for each dimension:

--

(TYPE1) a1 a2 ... am / ----------- TYPE, POINTS

(TYPE2) b1 b2 ... bn /

(TYPE3) c1 c2 ... cp /

(TYPE4) d1 d2 ... dq /

--

-- VALUES: fijkl = f(ai,bj,ck,dl)

--

-- f(*, *, *,d1):

--

f1111 f2111 ... fm111 / ---------- end of 1D f(a1,b1,c1,d1) ... f(am,b1,c1,d1)

f1211 f2211 ... fm211 /

...

f1n11 f2n11 ... fmn11 / ---------- end of 1D f(a1,bn,c1,d1) ... f(am,bn,c1,d1)

/ -------------------------------- end of 2D f(*, b1,c1,d1) ... f(*, bn,c1,d1)

f1121 f2121 ... fm121 /

f1221 f2221 ... fm221 /

...

f1n21 f2n21 ... fmn21 /

/

...

f11p1 f21p1 ... fm1p1 /

f12p1 f22p1 ... fm2p1 /

...

f1np1 f2np1 ... fmnp1 / ---------- end of 1D f(a1,bn,cp,d1) ... f(am,bn,cp,d1)

/ -------------------------------- end of 2D f(*, b1,cp,d1) ... f(*, bn,cp,d1)

/ -------------------------------- end of 3D f(*, *, c1,d1) ... f(*, *, cp d1)

--

-- f(*, *, *,d2):

--

f1112 f2112 ... fm112 / ---------- end of 1D f(a1,b1,c1,d2) ... f(am,b1,c1,d2)

f1212 f2212 ... fm212 /

...

f1n12 f2n12 ... fmn12 / ---------- end of 1D f(a1,bn,c1,d2) ... f(am,bn,c1,d2)

/ -------------------------------- end of 2D f(*, b1,c1,d2) ... f(*, bn,c1,d2)

f1122 f2122 ... fm122 /

f1222 f2222 ... fm222 /

...

f1n22 f2n22 ... fmn22 /

/

...

f11p2 f21p2 ... fm1p2 /

f12p2 f22p2 ... fm2p2 /

...

f1np2 f2np2 ... fmnp2 / ---------- end of 1D f(a1,bn,cp,d2) ... f(am,bn,cp,d2)

/ -------------------------------- end of 2D f(*, b1,cp,d2) ... f(*, bn,cp,d2)

/ -------------------------------- end of 3D f(*, *, c1,d2) ... f(*, *, cp,d2)

--

-- f(*, *, *,d3):

--

...

--

-- f(*, *, *,dq):

--

f111q f211q ... fm11q / ---------- end of 1D f(a1,b1,c1,dq) ... f(am,b1,c1,dq)

f121q f221q ... fm21q /

...

f1n1q f2n1q ... fmn1q / ---------- end of 1D f(a1,bn,c1,dq) ... f(am,bn,c1,dq)

/ -------------------------------- end of 2D f(*, b1,c1,dq) ... f(*, bn,c1,dq)

f112q f212q ... fm12q /

f122q f222q ... fm22q /

...

f1n2q f2n2q ... fmn2q /

/

...

f11pq f21pq ... fm1pq /

f12pq f22pq ... fm2pq /

...

f1npq f2npq ... fmnpq / ---------- end of 1D f(a1,bn,cp,dq) ... f(am,bn,cp,dq)

/ -------------------------------- end of 2D f(*, b1,cp,dq) ... f(*, bn,cp,dq)

/ -------------------------------- end of 3D f(*, *, c1,dq) ... f(*, *, cp,dq)

/ -------------------------------- end of 4D f(*, *, *, d1) ... f(*, *, *, dq)

/ -------------------------------- end of keyword

Records
No records — the keyword stands alone

Parameters

No.NameDescriptionDefault
1NAMEA character string of up to eight characters in length beginning with ‘TU’ that defines the table name.None
2NDIMSAn integer value between one and MXDIMS that defines the number of dimensions for the table. MXDIMS is the maximum number of UDT table dimensions defined using the UDTDIMS keyword in the RUNSPEC section. OPM Flow only supports one-dimensional tables (NDIMS = 1).None
1TYPEA defined character string that defines the type of interpolation for this dimension and must one of the following: ‘NV’ this dimension will use the nearest value. ‘LC’ this dimension will use linear interpolation within the table and clamp to the first or last value respectively for extrapolation. ‘LL’ this dimension will use linear interpolation within the table and linear extrapolation outside of the table. ‘ID’ this dimension will use a string or identifier to select the interpolation point. If no matching interpolation point is found then the lookup will return the value given to undefined UDQ variables as specifed by the DEFAULT value on the UDQPARAM keyword in the RUNSPEC section.None
2POINTSA monotonically increasing vector of real values that defines the numerical value of the interpolation points for this dimension if the specified type of interpolation TYPE is either ‘NV’, ‘LC’ or ‘LL’. Otherwise, a vector of character strings of up to eight characters in length defining the ‘ID’.None
1VALUESA vector of real values corresponding to each of the interpolations points POINTS in the first dimension.None

Example

The following example shows a one-dimension User Defined Table that will linearly interpolate between values of 100 and 180 for values of FOPR between 100 and 500 and will clamp to the end points for values of FOPR outside this range.
--
-- DECLARE USER DEFINED TABLE
--
UDT
-- NAME NDIMS
'TU_FBHP' 1 /
-- TYPE POINTS
'LC' 100.0 500.0 / -- FOPR values
-- VALUES
100.0 180.0 / -- FBHP values
/
/
--
-- DECLARE USER DEFINED QUANTITIES
--
UDQ
ASSIGN FU_WBHP 0 /
DEFINE FU_WBHP0 FU_WBHP /
DEFINE FU_WBHP (TU_FBHP[FOPR] UMIN WBHP 'PROD') UMIN FU_WBHP0 /
/
--
-- WELL PRODUCTION TARGETS AND CONSTRAINTS
--
WCONPROD
'PROD' 'OPEN' ORAT 500.0 4* FU_WBHP /
/
In the example above, the UDT specifies how the bottom hole pressure limit should reduce as the field oil production rate decreases (note the interpolation point values must be monotone increasing). The User Defined Quantity FU_WBHP uses a lookup value from the UDT in the form TU_BHP[FOPR].

Manual source: parts/chapters/subsections/12.3/UDT.fodt