Example #1
0
def get_unit_qoil(PE_server, unit):
    return float(
        PE.DoGet(
            PE_server,
            "GAP.MOD[{PROD}].SEP[{" + unit + "}].SolverResults[0].OilRate"))
Example #2
0
def solve_network_rb(PE_server):
    PE.DoCmd(PE_server, "GAP.SOLVENETWORK(3, MOD[0])")
    return None
Example #3
0
def showinterface(PE_server, s):
    PE.DoCmd(PE_server, "GAP.SHOWINTERFACE(" + str(s) + ")")
    return None
Example #4
0
def choose_unit(PE_server, unit):
    PE.DoCmd(PE_server, "GAP.MOD[{PROD}].SEP[$].MASK()")
    PE.DoCmd(PE_server, "GAP.MOD[{PROD}].SEP[{" + unit + "}].UNMASK()")
    return None
Example #5
0
def unmask_all_units(PE_server):
    PE.DoCmd(PE_server, "GAP.MOD[{PROD}].SEP[$].UNMASK()")
    return None
Example #6
0
def close_pipes(PE_server, pipe_close):
    for p in pipe_close:
        PE.DoCmd(PE_server, "GAP.MOD[{PROD}].PIPE[{" + p + "}].MASK()")
    return None
Example #7
0
def set_pipes(PE_server, pipe_close, pipe_open):
    for p in pipe_close:
        PE.DoCmd(PE_server, "GAP.MOD[{PROD}].PIPE[{" + p + "}].MASK()")
    for p in pipe_open:
        PE.DoCmd(PE_server, "GAP.MOD[{PROD}].PIPE[{" + p + "}].UNMASK()")
    return None
Example #8
0
def get_all(PE_server, s):
    return PE.DoGet(PE_server, s).split("|")[:-1]
Example #9
0
def set_chokes_calculated(PE_server):
    PE.DoSet(PE_server, "GAP.MOD[{PROD}].WELL[$].DPControl", "CALCULATED")
    PE.DoSet(PE_server, "GAP.MOD[{PROD}].WELL[$].DPControlValue", 0)
    return None
Example #10
0
def open_well(PE_server, well):
    PE.DoSet(PE_server, "GAP.MOD[{PROD}].WELL[{" + well + "}].DPControl",
             "CALCULATED")
    PE.DoSet(PE_server, "GAP.MOD[{PROD}].WELL[{" + well + "}].DPControlValue",
             0)
    return None
Example #11
0
def shut_well(PE_server, well):
    PE.DoSet(PE_server, "GAP.MOD[{PROD}].WELL[{" + well + "}].DPControl",
             "FIXEDVALUE")
    PE.DoSet(PE_server, "GAP.MOD[{PROD}].WELL[{" + well + "}].DPControlValue",
             10000)
    return None
Example #12
0
def set_unit_pres(PE_server, unit, pres):
    PE.DoSet(PE_server, "GAP.MOD[{PROD}].SEP[{" + unit + "}].SolverPres[0]",
             pres)
    return None