misc.ecl_common

Common definitions for all import filters

>>> from misc.ecl_common import Phase, Prop
 1"""Common definitions for all import filters
 2
 3>>> from .ecl_common import Phase, Prop
 4"""
 5
 6
 7# Enumeration of the phases that can exist in a simulation.
 8#
 9# The names are abbreviations and should really be called oleic, aqueous and
10# gaseous, if we wanted to be correct and type more.
11#
12# The value that is returned is the Eclipse moniker, for backwards
13# compatibility with code that uses this directly.
14Phase = type('Phase', (object,), {
15    'oil': 'OIL',
16    'wat': 'WAT',
17    'gas': 'GAS',
18})
19
20
21# Properties that can be queried from an output file.
22#
23# The property forms the first part of a "selector", which is a tuple
24# containing the necessary information to setup the name of the property
25# to read.
26Prop = type('Prop', (object,), {
27    'pres': 'P',  # pressure
28    'sat': 'S',   # saturation
29    'mole': 'x',  # mole fraction
30    'dens': 'D',  # density
31    'temp': 'T',  # temperature
32    'leak': 'L',  # leaky well
33})
class Phase:
oil = 'OIL'
wat = 'WAT'
gas = 'GAS'
class Prop:
pres = 'P'
sat = 'S'
mole = 'x'
dens = 'D'
temp = 'T'
leak = 'L'