pyscal.pyscallist

Container class for list of Pyscal objects

class pyscal.pyscallist.PyscalList(pyscal_list=None)[source]

Container class for a list of WaterOilGas objects.

Essentially this is a list of objects of equal type, and all being pyscal objects WaterOil, GasOil, WaterOilGas or SCALrecommendation

It is possible to ask this list class for SWOF++ printouts, and it will call SWOF on each element succesively.

Parameters:

pyscal_list (list) – List of objects if already ready. Can be empty or None.

SGFN(write_to_filename=None)[source]

Build SGFN string

Return type:

str

SGOF(write_to_filename=None)[source]

Build SGOF string

Return type:

str

SLGOF(write_to_filename=None)[source]

Build SLGOF string

Return type:

str

SOF3(write_to_filename=None)[source]

Build SOF3 string

Return type:

str

SWFN(write_to_filename=None)[source]

Build SWFN string

Return type:

str

SWOF(write_to_filename=None)[source]

Build SWOF string

Return type:

str

append(pyscal_obj)[source]

Append a pyscal object to the list

Parameters:

pyscal_obj (Union[WaterOil, GasOil, GasWater, WaterOilGas, SCALrecommendation, None]) –

Raises:

ValueError – If the type of the incoming object does not match existing objects in the list

Return type:

None

build_eclipse_data(family=1, slgof=False)[source]

Construct Eclipse keywords and data for relative permeability properties of family 1 or 2 type.

Parameters:
  • slgof (bool) – Set to true of SLGOF is wanted instead of SGOF. Only applicable

  • 1. (if family is) –

Return type:

str

df()[source]

Dump dataframes of generated relperm data

Column names are compatible with ecl2df.satfunc. Always uppercase and capillary pressure is PCOW or PCOG (wateroil vs gasoil)

If the PyscalList contains SCALrecommendations, the CASE column will contain the strings ‘pess’, ‘base’ and ‘opt’ (independent of any alias name potentially used in an input xlsx/csv)

Return type:

DataFrame

dump_family_1(filename=None, slgof=False)[source]

Dumps family 1 Eclipse saturation tables to one filename. This means SWOF + SGOF (SGOF only if relevant)

This function is deprecated. Use build_eclipse_data() and write to disk in calling code.

Parameters:
  • filename (Optional[str]) – Filename for the output to be given to Eclipse 100

  • slgof (bool) – Set to true of SLGOF is wanted instead of SGOF

Return type:

str

dump_family_2(filename=None)[source]

Dumps family 2 Eclipse saturation tables to one filename. This means SWFN + SGFN + SOF3 (SOF3 only for WaterOilGas)

Relevant for WaterOilGas and GasWater.

Parameters:

filename (str) – Filename for the output to be given to Eclipse 100

Return type:

str

interpolate(int_params_wo, int_params_go=None, h=None)[source]

This function will interpolate each SCALrecommendation object to the chosen parameters

This only works on lists of SCALrecommendation objects

Parameters:
  • int_params_wo (Union[float, int, List[float]]) – Interpolation parameters for wateroil, or for both. If list, separate parameter for each SATNUM. All numbers between -1 and 1 (inclusive).

  • int_params_go (Union[float, int, List[Optional[float]], None]) – If specified, will be used for GasOil interpolation.

  • h (Optional[float]) – Saturation step-length

Return type:

PyscalList

Returns:

PyscalList of type WaterOilGas, with the same length.

relevant_keywords(family=1, slgof=False)[source]

Construct a list of relevant Eclipse keywords for the data in this Pyscallist object. This depends on the Pyscaltype, and which family is requested

Return type:

List[str]