Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
x ECLIPSE 100
x ECLIPSE 300
SPECIAL
RUNSPEC
GRID
EDIT
PROPS
REGIONS
SOLUTION
SUMMARY
x SCHEDULE
CECON
and keyword:
LINCOM.
The user defined arguments are specified by a corresponding UDQ and keyword UDADIMS.
Note
UDAs require one time step to take effect after the keyword containing the UDA is
read.
A user defined quantity is initialized by either entering an assignment or a definition, with the
order of evaluation following the order of initialization. User defined quantities may refer to
other user defined quantities providing they have already been initialized. Assignment differs
from definition in that assignment is processed immediately, whilst a definition is evaluated
after the following time step. By default a definition will be recalculated at every time step but
this can be over-ridden by the user. Similarly, once a quantity is initialized units can also be
specified.
The number of user defined quantities is specified in RUNSPEC using the UDQDIMS keyword
and additional parameters can be set using the UDQPARAM keyword.
Keywords
UDQ
2229
The UDQ keyword is followed by any number of records, each containing the following items
of data and terminated by a slash (/). The set of records must end with a blank record, containing
only a slash (/).
1
Operation to perform
ASSIGN Assign a numeric value to elements of a quantity. The operation will initialize
the quantity and set the update argument to OFF.
DEFINE Define a mathematical expression with which to update the elements of the
quantity. The operation will initialize the quantity and set the update argument to ON.
UNITS Specify the units that will be written along with the summary data. The quantity
must already be initialized in order to perform this operation. This data has no effect on the
calculation of the quantity and is used for reporting only.
UPDATE Specify when next to evaluate the quantity definition. The quantity must already
be initialized in order to perform this operation.
2230
Keywords
UDQ
Field quantities:
FOPR - Field quantities are always scalars argument.
Group quantities:
GOPR - GOPR for all groups. Treated as a vector.
GOPR G1 - GOPR for group G1. Specifies a single element and will be treated as a scalar
argument.
Region quantities: Inter-region quantities such as ROFT are not permitted within user defined
quantities.
ROIP - ROIP for all regions and all FIP sets, including the FIPNUM set. Treated as a
vector.
ROIP_NUM - ROIP for all regions in the FIPNUM set. Treated as a vector.
ROIP_ONE - ROIP for all regions in the FIP set ONE. Treated as a vector.
ROIP_ONE 1 - ROIP for region 1 in the FIP set ONE. Specifies a single element and
will be treated as a scalar argument. A FIP set name must be given if a region index is
specified. Use NUM for the FIPNUM set.
Segment quantities:
SOFR - SOFR for all segments belonging to all multi-segment wells. Treated as a vector.
SOFR P* - SOFR for all segments belonging to all multi-segment wells with names
beginning with P. Treated as a vector.
SOFR P* 1 - SOFR for segment 1 belonging to all multi-segment wells with names
beginning with P. Treated as a vector regardless of the number of matching segments.
SOFR P1 1 - SOFR for segment 1 belonging to the multi-segment well P1. Specifies a
single element and will be treated as a scalar argument.
Well quantities:
WOPR - WOPR for all wells. Treated as a vector
WOPR P1 - WOPR for well P1. Specifies a single element and will be treated as a scalar
argument.
WOPR P* - WOPR for all wells with names beginning with P. Treated as a vector
regardless of the number of matching wells.
Aquifer quantities:
AAQR - AAQR for all aquifers. Treated as a vector
AAQR X - AAQR for aquifer number X. Specifies a single element and will be treated as
a scalar argument.
Block quantities:
BOSAT- BOSAT for all active blocks. Treated as a vector
BOSAT X Y Z - BOSAT for block coordinates X Y Z. Specifies a single element and will
be treated as a scalar argument.
Note
Well and group names containing template characters should be enclosed in quotes.
Keywords
UDQ
2231
Functions of UDQ
Function
Opening bracket.
Closing bracket.
2232
Keywords
UDQ
Description
unary elemental
ABS()
unary elemental
AVEA()
unary scalar
AVEG()
unary scalar
AVEH()
unary scalar
DEF()
unary elemental
EXP()
unary elemental
IDV()
LN()
unary elemental
LOG()
unary elemental
MAX()
unary scalar
Table 3.37
Functions of UDQ
Function
Description
MIN()
unary scalar
NORM1()
unary scalar
NORM2()
unary scalar
NORMI()
unary scalar
NINT()
unary elemental
PROD()
unary scalar
RANDN()
unary elemental
RANDU()
unary elemental
RRNDN()
unary elemental
RRNDU()
unary elemental
SORTA()
unary elemental
SORTD()
unary elemental
SUM()
unary scalar
UNDEF()
unary elemental
Keywords
UDQ
2233
Table 3.37
Functions of UDQ
Function
Description
TU*[]
unary elemental
2234
Keywords
UDQ
<=
binary intersection
>=
binary intersection
<
binary intersection
>
binary intersection
==
binary intersection
!=
binary intersection
binary intersection
Exponentiation.
binary intersection
Multiplication.
binary intersection
Division.
binary intersection
Addition.
binary intersection
Subtraction.
UADD
binary union
UMAX
binary union
UMIN
binary union
UMUL
binary union
Initialization of quantities
A quantity is initialized via the first ASSIGN or DEFINE record referencing the quantity in the
UDQ data. Upon initialization the elements of the quantity are undefined. When they are output
or used with in an ACTION(G,R,W,S,X) keyword, undefined elements are replaced by the value
specified in item 3 of UDQPARAM keyword.
WUMW1
Note
P11
P12
P32
P33
1.0
2.0
UNDEFINED
UNDEFINED
Keywords
UDQ
2235
Internally, the following vectors will be generated. Recall a well vector has an element for every
well in the simulation and if only a subset of the wells are selected the remaining elements are
left undefined:
WOPR P*1*
P11
P12
P32
P33
WOPR P11
WOPR P12
UNDEFINED
UNDEFINED
UNDEFINED
WOPR P12
WOPR P32
UNDEFINED
UNDEFINED
2 x WOPR P12
UNDEFINED
UNDEFINDED
+
WOPR P*2*
=
WUMW1
Since the addition function acts on the intersection of the defined elements P12 is the only well
for which WUMW1 is defined. All other wells would return the specified value for an undefined
element. A similar result is obtained in the following example in which we accumulate on a user
defined quantity:
ASSIGN WUMW1 P1 1 /
DEFINE WUMW1 WUMW1 * WOPR /
WUMW1
P11
P12
P32
P33
UNDEFINED
UNDEFINED
UNDEFINED
WOPR P11
WOPR P12
WOPR P32
WOPR P33
WOPR P11
UNDEFINED
UNDEFINED
UNDEFINED
*
WOPR
=
WUMW1
The key point to note is that binary functions act sequentially on corresponding elements. If we
wish to add together elements from different positions in a vector this must be done on an
individual basis as scalars. For example:
DEFINE FUMW1 WOPR P11 + WWPR P12 /
Alternatively, if the intention is to combine vectors then functions that act on the union of the
defined elements should be considered. For example in a simulation with the FIPNUM set and
two additional FIP sets named ONE and TWO, each with the three regions, we could
consider the definition:
DEFINE RUMW1 ROIP_NUM UMAX RGIP_ONE UMIN RWIP_TWO /
ONE set
TWO set
UMAX
RGIP_ONE
UMIN
RWIP_TWO
=
RUMW1
2236
Keywords
UDQ
ROIP_NUM
RGIP_ONE
RWIP_TWO
where X represents a value and U an undefined element. Note, in this case the choice of union
functions is not significant since the defined portions of the vectors do not overlap.
Note
Note
Examples
SUMMARY section
Request of user defined quantities in the SUMMARY section
CUMW1
P1 /
/
CUMW2
P1 /
/
FUMW1
FUMW2
GUMW1
/
GUMW2
/
RUMW1
/
RUMW1ONE
/
RUMW1TWO
/
WUMW1
/
WUMW2
/
AUMW1
/
AUMW2
1/
BUMW2
1 2 3/
/
Keywords
UDQ
2237
SCHEDULE section
Definition of the user defined quantities in the SCHEDULE section
UDQ
-- A COUPLE OF CONNECTION QUANTITES
ASSIGN CUMW1 2.0 /
ASSIGN CUMW1 P12 3.0 /
ASSIGN CUMW1 P12 10 12 1 4.0 /
UNITS CUMW1 CONS /
DEFINE CUMW2 COFR/MAX(CGFR) /
UNITS CUMW2 CONS /
-- A COUPLE OF FIELD QUANTITIES
DEFINE FUMW1 LOG(1+SUM(WOPR)) /
UNITS FUMW1 FLDS /
ASSIGN FUMW2 0 /
DEFINE FUMW2 WOPR P1 / -- RECORD WOPR OF P1 (SCALAR) IN A FIELD UDQ
UNITS FUMW2 FLDS /
-- A COUPLE OF GROUP QUANTITES
DEFINE GUMW1 SORTA(GOPR) /
UNITS GUMW1 GRPS /
ASSIGN GUMW2 G2 99.99 /
UNITS GUMW2 GRPS /
-- A COUPLE OF REGION QUANTITES
DEFINE RUMW1 ROIP /
UNITS RUMW1 REGS /
ASSIGN RUMW2 2.0E-2 /
ASSIGN RUMW2ONE 3 3.0 /
ASSIGN RUMW2TWO 4 4.0 /
UNITS RUMW2 REGS /
-- A COUPLE OF WELL QUANTITIES
DEFINE WUMW1 WBHP 'P*1*' UMAX WBHP 'P*4*' /
UNITS WUMW1 WELLS /
UPDATE WUMW1 NEXT /
DEFINE WUMW2 RANDN(WBHP 'P1*') /
UNITS WUMW2 WELLS /
-- A COUPLE OF AQUIFER QUANTITIES
DEFINE AUMW1 SORTA(AAQR) /
UNITS AUMW1 AQUIFER /
UPDATE AUMW1 NEXT /
DEFINE AUMW2 RANDN(AAQR) /
UNITS AUMW2 AQUIFER/
2238
Keywords
UDQ
Note
Both FU_CAPXT and FU_CAPXQ are defined in (almost) exactly the same way but
only FU_CAPXT will give the desired behavior.
The only difference is that FU_CAPXQ is initialized at the beginning of the UDQ definitions,
whereas FU_CAPXT is initialized just before its definition. As stated above the UDQs are
evaluated in the order in which they are first initialized. This means that at each time step,
FU_CAPXQ is evaluated before FU_CAPEX, whereas FU_CAPXT is evaluated after it. Thus,
when FU_CAPXQ is evaluated, the FU_CAPEX term being added is still undefined (that is 0) so
nothing is added and the cumulative does not grow. By contrast, FU_CAPXT is evaluated after
FU_CAPEX (because it is first initialized after it) and so behaves as expected.
Keywords
UDQ
2239
The value of WUMULT, 2.5 or 1.5 in this example, depends on the value of BHP in well I. The
same syntax can be used for a multiple condition.
UDQ
DEFINE FUBL1 WBHP I > 3573 /
DEFINE FUBL2 WWIR I < 6200 /
DEFINE WUMULT (FUBL1*1)+((1-FUBL1)*((FUBL2*2)+((1-FUBL2)*3)))/
/
WUBHP1 0.0 /
WUBHP2 WBHP P /
WUBHPDT ((WUBHP2- WUBHP1) / TIMESTEP) /
WUBHP1 WUBHP2 /
WUBHP1 PSIA /
WUBHP2 PSIA /
2240
Keywords
UDQ
UDQDIMS
x ECLIPSE 100
x ECLIPSE 300
SPECIAL
x RUNSPEC
GRID
EDIT
PROPS
REGIONS
SOLUTION
SUMMARY
SCHEDULE
DEFAULT: 0
DEFAULT: 0
DEFAULT: 0
DEFAULT: 0
DEFAULT: 0
DEFAULT: 16
DEFAULT: 16
DEFAULT: 0
DEFAULT: 0
DEFAULT: 0
11 Specifies whether a new random number generator seed is computed for restart runs. This
affects the UDQ functions RRNDN and RRNDU. If this item is set to Y, then a new seed
will be computed for restart simulations, hence the restart simulation random value
sequence will differ from that of the base simulation. If this item is defaulted or set to N,
then restart simulations will use the same seed as the base simulation, hence the restart
simulation random value sequence will be the same as that of the base simulation.
DEFAULT: N
Example
UDQDIMS
8 8 2
Keywords
UDQDIMS
2241
UDQPARAM
x ECLIPSE 100
x ECLIPSE 300
SPECIAL
x RUNSPEC
GRID
EDIT
PROPS
REGIONS
SOLUTION
SUMMARY
SCHEDULE
Integer seed value for the RANDN and RANDU random number functions. This item should
be a integer greater than 0.
The permitted range (+/-) of the user defined quantities. This item should be in the range
1.0 to 1.0E+20.
DEFAULT: 1.0E+20
DEFAULT: 1
DEFAULT: 0.0
The fractional equality tolerance used in the ==,!=,<= and >= functions.
DEFAULT: 1.0E-4
Example
UDQPARAM
100 1* -1.0 /
2242
Keywords
UDQPARAM
UDT
x ECLIPSE 100
x ECLIPSE 300
SPECIAL
RUNSPEC
GRID
EDIT
PROPS
REGIONS
SOLUTION
SUMMARY
x SCHEDULE
Table name
A name, which must be unique, which will be used to identify the table in UDQ definitions.
The name must begin with TU and cannot exceed 8 characters in length.
Records 2 to NUMDIM+1
1
LC dimensions will be linearly interpolated within the table but clamped to the first
or last value as appropriate when outside it.
LL dimensions will be linearly interpolated within the table and linearly extrapolated
outside it.
ID dimensions will use the name or identifier associated with the element rather than
the value. If there is no match found, the table lookup will return the undefined value
specified by item 3 of the UDQPARAM keyword. The first match found will always be
used.
For ID dimensions, these will be character strings, which can optionally use wildcard
characters. This dimension type is only available for group or well mnemonics as
arguments.
For all other dimensions, these will be numerical values, which must be entered in
ascending order.
Keywords
UDT
2243
Examples
This is a simple sample table with 3 dimensions. The first dimension will be evaluated using
linear interpolation and extrapolation, the second using the nearest value, and the third using the
ID of the elements. The first dimension has three interpolation points, the other two dimensions
have two each.
UDT
'TUTEST' 3 /
'LL' 1 2 3 /
'NV' 2 4 /
'ID' 'W2' '*' /
1 2 3 /
2 4 6 /
/
10 11 12 /
20 22 24 /
/
/
/
So, if in a UDQ keyword we had a table reference like
TUTEST[WOPR,WGPR,WWPR]
with wells W1 and W2, then the result of the table reference would be a well vector with two
elements. Wed start off with the first element of the well vector, which is well W1.
WOPR would be evaluated for W1, and then linear interpolation/extrapolation used.
WGPR would be evaluated for W1, and then the nearest value method of interpolation used.
WWPR isnt evaluated at all, because the third dimension of the table uses the ID method.
Instead we use the well name for its first element, which is W1, and compare it with the names
associated with the interpolation points. The name does not match the first point W2, but it
does match the second point which is the wildcard character *.
2244
Keywords
UDT
So, for the third dimension, we will be using the second set of values: the two rows starting with
10 and ending with 24.
For the second dimension, we will look to see whether the value of WGPR for W1 is closer to 2
or to 4. If it is closer to 2, we will use row 10 11 12. If it is closer to 4, we will use row 20 22 24.
And finally we will do linear interpolation or extrapolation based on where the value of WOPR
lies with relation to the interpolation points for the first dimension, which are 1 2 3.
So, if WGPR for W1 is 2, and WOPR for W1 is 1.5, the result would be 10.5 - wed take row 10
11 12, and then interpolate half way between the first two values.
This process is then repeated for well W2. This time we will be using the first block of values:
the two rows starting with 1 and ending with 6, since this block has the name W2. Assuming
for simplicity that W2 and W1 have the same values for WGPR and WOPR, then this time the
result will be 1.5.
We now have a well vector as our result, with values 10.5 and 1.5.
Keywords
UDT
2245
UDTDIMS
x ECLIPSE 100
x ECLIPSE 300
SPECIAL
x RUNSPEC
GRID
EDIT
PROPS
REGIONS
SOLUTION
SUMMARY
SCHEDULE
DEFAULT: 0
DEFAULT: 0
DEFAULT: 0
DEFAULT: 0
To be able to define user defined tables in a UDT keyword, all items must be set to greater than 0.
Example
UDTDIMS
2 20 3
2246
Keywords
UDTDIMS