Beispiel #1
0
    def build(self):
        agr = self._agr

        from ..pieces.head import head_default as head
        head(agr, self.well_name, kw.producer(), self.group_name, self.fluid,
             self.operate, self.monitor, self.geometry, self.perf)

        from ..pieces.completion import completion_dual_default as completion
        completion(agr, self.completion)

        agr.add_two(kw.shutin(), self.well_name)

        if self.on_time:
            from ..pieces.others import on_time_default as on_time
            on_time(agr, self.well_name, self.on_time)

        if self.open:
            from ..pieces.others import open_default as openn
            openn(agr, self.well_name, self.open)

        if self.layerclump:
            from ..pieces.others import layerclump_default as layerclump
            layerclump(agr, self.well_name, self.layerclump)

        if self.icv_start:
            from ..pieces.icvs import icv_deafult as icv
            icv(agr, self.well_name, self.icv_start, self.layerclump,
                self.icv_control)
Beispiel #2
0
    def build(self):
        agr = self._agr

        from ..pieces.head import head_default as head
        head(agr, self.well_name['G'], kw.injector(), self.group_name,
             self.fluid['G'], self.operate['G'], self.monitor['G'],
             self.geometry, self.perf)

        from ..pieces.completion import completion_dual_default as completion
        completion(agr, self.completion)

        agr.add_two(kw.shutin(), self.well_name['G'])

        from ..pieces.head import head_default as head
        head(agr, self.well_name['W'], kw.injector(), self.group_name,
             self.fluid['W'], self.operate['W'], self.monitor['W'],
             self.geometry, self.perf)

        from ..pieces.completion import completion_dual_default as completion
        completion(agr, self.completion)

        agr.add_two(kw.shutin(), self.well_name['W'])

        if self.on_time:
            from ..pieces.others import on_time_default as on_time
            on_time(agr, self.well_name['G'], self.on_time)
            on_time(agr, self.well_name['W'], self.on_time)

        if self.open:
            mod, open = self.open
            from ..pieces.others import open_default as openn
            openn(agr, self.well_name[mod], open)

        if self.wag:
            from ..pieces.others import start_wag_default as start_wag
            start_wag(agr, self.well_name, self.wag)

        if self.layerclump:
            from ..pieces.others import layerclump_wag_default as layerclump
            layerclump(agr, self.well_name, self.layerclump)
Beispiel #3
0
 def operational_rule(self):
     outer = []
     for conditions in self.oc:
         iter_conditions = iter(conditions)
         inner = []
         while True:
             try:
                 qty = next(iter_conditions)
                 ine = next(iter_conditions)
                 val = next(iter_conditions)
                 stg = '{} __LAYER__ {} {} {}'.format(
                     kw.on_ctrllump(), qty, ine, val)
                 xxx = next(iter_conditions)  # conditional or action
                 inner.append(stg)
                 inner.append(xxx)
             except StopIteration:
                 outer.append(inner)
                 break
     return outer
    def operational_rule(self):
        operational_conditions = {}
        for operational in self.operational_conditions:
            lst = list(operational[1:])
            operational_conditions[operational[0]] = lst[::-1]

        outer = []
        actions = self.actions[::-1]
        while self._len_hold_lsts(operational_conditions):
            inner = []
            stg = ''
            conditionals = self.conditionals[::-1]
            for key in operational_conditions:
                val = operational_conditions[key].pop()
                stg = '{} __LAYER__ {} > {}'.format(kw.on_ctrllump(), key, val)
                inner.append(stg)
                try:
                    inner.append(conditionals.pop())
                except IndexError:
                    inner.append(actions.pop())
                    outer.append(tuple(inner))
        return outer
Beispiel #5
0
    for inje in inje_lst:
        inje.load_more_more()
        injector_dual_wag(
            inje.name, inje.group, inje.operate, inje.monitor, inje.geometry,
            inje.perf_ff, inje.perf_table, inje.time_open, inje.time_on,
            inje.wag_operation, inje.layerclump,
            sett.LOCAL_ROOT / sett.SIMS_FOLDER / sim_folder / 'wells')


if __name__ == '__main__':
    import numpy
    import pathlib
    from scripts import utils
    from dictionary.scripts.keywords import Keywords as kw

    qtys = [(kw.gor(), val) for val in numpy.linspace(250, 5000, 20)]

    sim_folder_group = pathlib.Path('DEFAULT')
    #sim_folder_group = pathlib.Path('WELL')
    sims = []
    for idx, qty in enumerate(qtys):
        sim_folder = sim_folder_group / 'sim_{:03d}'.format(idx + 1)

        utils.set_folders(sim_folder)

        from inputt.loader import prod_lst
        for prod in prod_lst:
            prod = prod.load_more_more()
            prod.monitor.append([qty[0], qty[1], kw.shutin()])
            producers(sim_folder, prod)
Beispiel #6
0
    for inje in inje_lst:
        inje.load_more_more()
        injector_dual_wag(
            inje.name, inje.group, inje.operate, inje.monitor, inje.geometry,
            inje.perf_ff, inje.perf_table, inje.time_open, inje.time_on,
            inje.wag_operation, inje.layerclump,
            sett.LOCAL_ROOT / sett.SIMS_FOLDER / sim_folder / 'wells')


if __name__ == '__main__':
    import numpy
    import pathlib
    from scripts import utils
    from dictionary.scripts.keywords import Keywords as kw

    qtys = [(kw.gor(), val) for val in numpy.linspace(250, 5000, 20)]

    sim_folder_group = pathlib.Path('DEFAULT')
    #sim_folder_group = pathlib.Path('ICV_02S_SMT')
    sims = []
    for idx, qty in enumerate(qtys):
        sim_folder = sim_folder_group / 'sim_{:03d}'.format(idx + 1)

        utils.set_folders(sim_folder)

        from valve.scripts import icv
        from inputt.loader import prod_lst
        for prod in prod_lst:
            prod.load_more_more()
            icvv = icv.ICV(prod.icv_nr)
            minn = 0.50 * qty[1]
Beispiel #7
0
    import pathlib
    from scripts import utils
    from dictionary.scripts.keywords import Keywords as kw

    sim_folder_group = pathlib.Path('DEFAULT')
    sim_folder = sim_folder_group / 'sim_001'

    utils.set_folders(sim_folder)

    from valve.scripts import icv
    from inputt.loader import prod_lst
    for prod in prod_lst:
        prod.load_more_more()
        icvv = icv.ICV(prod.icv_nr)
        icvv.add_rule([
            kw.gor(),
            kw.greater_than(), 500.0, 'OR',
            kw.wcut(),
            kw.less_than(), 85.0, 0.50
        ])
        icvv.add_rule([
            kw.gor(),
            kw.greater_than(), 750.0, 'OR',
            kw.wcut(),
            kw.less_than(), 90.0, 0.25
        ])
        icvv.add_rule([
            kw.gor(),
            kw.greater_than(), 1000.0, 'OR',
            kw.wcut(),
            kw.less_than(), 95.0, 0.00
Beispiel #8
0
    for inje in inje_lst:
        inje.load_more_more()
        injector_dual_wag(
            inje.name, inje.group, inje.operate, inje.monitor, inje.geometry,
            inje.perf_ff, inje.perf_table, inje.time_open, inje.time_on,
            inje.wag_operation, inje.layerclump,
            sett.LOCAL_ROOT / sett.SIMS_FOLDER / sim_folder / 'wells')


if __name__ == '__main__':
    import numpy
    import pathlib
    import itertools
    from scripts import utils
    from dictionary.scripts.keywords import Keywords as kw
    qty1 = [(kw.gor(), val) for val in numpy.linspace(250, 5000, 20)]
    qtys = qty1

    #qty1 = [(kw.gor(),  val) for val in numpy.linspace(250, 5000, 20)]
    #qty2 = [(kw.wcut(), val) for val in numpy.linspace(75.0, 95.0, 5)]
    #qtys = list(itertools.product(qty1, qty2))

    sim_folder_group = pathlib.Path('DEFAULT')
    #sim_folder_group = pathlib.Path('ICV_01S')
    #sim_folder_group = pathlib.Path('ICV_01S_EXT')
    sims = []
    for idx, qty in enumerate(qtys):
        sim_folder = sim_folder_group / 'sim_{:03d}'.format(idx + 1)

        utils.set_folders(sim_folder)
Beispiel #9
0
 def get_incomp(self, fluid):
     if not(fluid == kw.gas() or fluid == kw.water()):
         raise NameError('pass to function *GAS or *WATER')
     self.fluid = fluid