Files
opm-common/python/examples/wells.py
Joakim Hove 77795b5005 Add 'python/' from commit '278373703455ea6562a0f8e5278b4db46eb1fc7e'
git-subtree-dir: python
git-subtree-mainline: e8dbf7d8ee
git-subtree-split: 2783737034
2019-05-08 07:20:29 +02:00

20 lines
618 B
Python

import sunbeam
def main():
es = sunbeam.parse('../tests/spe3/SPE3CASE1.DATA')
sc = es.schedule
wp = sc.wells[0] # producer
wi = sc.wells[1] # injector
print('state: %s' % es)
print('schedule: %s' % sc)
print('prod well: %s' % wp)
print('inj well: %s' % wi)
for i in range(len(sc.timesteps)):
if not wp.isproducer(i) or wp.isinjector(i):
print('wp is not producer in step %s' % sc.timesteps[i])
if not wi.isinjector(i) or wi.isproducer(i):
print('wi is not injector in step %s' % sc.timesteps[i])
if __name__ == '__main__':
main()