rpl_pack.flag.Brine

class rpl_pack.flag.Brine(username: str, password: str)

Bases: FLAG

Returns Brine application object upon authentication of ‘username’ and ‘password’ inputs through which all brine/water property calculations are performed, otherwise RPLUserCredentialsDeniedException is raised.

As long as the Brine application object exists it can be used to call functions on the RPL server, checking authentication and permissions to each function called.

Parameters:
  • username (str) – RPL server login username.

  • password (str) – RPL server login password.

Raises:

rpl_exceptions.RPLUserCredentialsDeniedException – If either username/password is invalid.

Returns:

Brine application instance.

Return type:

object

Methods

density_brine

Calculate density of brine at given temperature (C), pressure (MPa), salinity (ppm), NaCl (weight %), KCl (weight %), and CaCl2 (weight %).

density_water

Calculate density of pure water at given temperature (C) and pressure (MPa).

density_water_CO2

Calculate density of water+CO2 at given temperature (C), pressure (MPa), gwr (L/L).

modulus_brine

Calculate modulus of brine at given temperature (C), pressure (MPa), salinity (ppm), NaCl (weight %), KCl (weight %), and CaCl2 (weight %).

modulus_water

Calculate modulus of pure water at given temperature (C) and pressure (MPa).

resistivity_brine

Calculate resistivity of brine at given temperature (C) and salinity (ppm).

saturated_vapor_pressure

Calculate saturated vapor pressure of brine at given temperature (C).

saturated_vapor_temperature

Calculate saturated vapor temperature of brine at given pressure (MPa).

solubility_co2_water

Calculate solubility of CO2 in H20 at a given temperature (C) and Pressure (MPa).

solubility_gas_brine

Calculate solubility of gas in brine (gwr) at given temperature (C), pressure (ppm), and salinity (ppm).

solubility_gas_water

Calculate solubility of gas in pure water (gwr) at given temperature (C) and pressure (MPa).

velocity_brine

Calculate velocity of brine at given temperature (C), pressure (MPa), salinity (ppm), NaCl (weight %), KCl (weight %), and CaCl2 (weight %).

velocity_water

Calculate velcity of pure water at given temperature (C) and pressure (MPa).

velocity_water_CO2

Calculate velocity of water+CO2 at given temperature (C), pressure (MPa), gwr (L/L).

viscosity_brine

Calculate viscosity of brine at given temperature (C) and salinity (ppm).

viscosity_water

Calculate viscosity of water at given temperature (C).

density_brine(temperature: float, pressure: float, salinity: float, NaCl: float, KCl: float, CaCl2: float) float

Calculate density of brine at given temperature (C), pressure (MPa), salinity (ppm), NaCl (weight %), KCl (weight %), and CaCl2 (weight %).

Parameters:
  • temperature (float) – Temperature of brine in C.

  • pressure (float) – Pressure of brine in MPa.

  • salinity (float) – Salinity of brine (weight %).

  • NaCl (float) – Weight % of NaCl in brine.

  • KCl (float) – Weight % of KCl in brine.

  • CaCl2 (float) – Weight % of CaCl2 in brine.

Returns:

Density of brine at given temperature and pressure.

Return type:

float

density_water(temperature: float, pressure: float) float

Calculate density of pure water at given temperature (C) and pressure (MPa).

Parameters:
  • temperature (float) – Temperature of water in C.

  • pressure (float) – Pressure of water in MPa.

Returns:

Density of pure water at given temperature and pressure.

Return type:

float

density_water_CO2(temperature: float, pressure: float, gwr: float) float

Calculate density of water+CO2 at given temperature (C), pressure (MPa), gwr (L/L).

Parameters:
  • temperature (float) – Temperature of brine in C.

  • pressure (float) – Pressure of brine in MPa.

  • gwr (float) – Gas water ratio of CO2 to water.

Returns:

Density of water+CO2 at given temperature and pressure and gwr.

Return type:

float

modulus_brine(temperature: float, pressure: float, salinity: float, NaCl: float, KCl: float, CaCl2: float) float

Calculate modulus of brine at given temperature (C), pressure (MPa), salinity (ppm), NaCl (weight %), KCl (weight %), and CaCl2 (weight %).

Parameters:
  • temperature (float) – Temperature of brine in C.

  • pressure (float) – Pressure of brine in MPa.

  • salinity (float) – Salinity of brine (weight %).

  • NaCl (float) – Weight % of NaCl in brine.

  • KCl (float) – Weight % of KCl in brine.

  • CaCl2 (float) – Weight % of CaCl2 in brine.

Returns:

Modulus of brine at given temperature and pressure, salinity, NaCl, KCl, CaCl2.

Return type:

float

modulus_water(temperature: float, pressure: float) float

Calculate modulus of pure water at given temperature (C) and pressure (MPa).

Parameters:
  • temperature (float) – Temperature of water in C.

  • pressure (float) – Pressure of water in MPa.

Returns:

Modulus of pure water at given temperature and pressure.

Return type:

float

resistivity_brine(temperature: float, salinity: float) float

Calculate resistivity of brine at given temperature (C) and salinity (ppm).

Parameters:
  • temperature (float) – Temperature of brine in C.

  • salinity (float) – Salinity of brine in ppm.

Returns:

Resistivity of brine at given temperature and salinity.

Return type:

float

saturated_vapor_pressure(temperature: float) float

Calculate saturated vapor pressure of brine at given temperature (C).

Parameters:

temperature (float) – Temperature of brine in C.

Returns:

Saturated vapor pressure of brine at given temperature.

Return type:

float

saturated_vapor_temperature(pressure: float) float

Calculate saturated vapor temperature of brine at given pressure (MPa).

Parameters:

pressure (float) – Pressure of brine in MPa.

Returns:

Saturated vapor temperature of brine at given pressure.

Return type:

float

solubility_co2_water(temperature: float, pressure: float) float

Calculate solubility of CO2 in H20 at a given temperature (C) and Pressure (MPa).

Parameters:

temperature (float) – Temperature of water in C.

Returns:

CO2 solubility in H20 at given temperature.

Return type:

float

solubility_gas_brine(temperature: float, pressure: float, salinity: float) float

Calculate solubility of gas in brine (gwr) at given temperature (C), pressure (ppm), and salinity (ppm).

Parameters:
  • temperature (float) – Temperature of brine in C.

  • pressure – Pressure of brine in MPa.

  • salinity (float) – Salinity of brine in ppm.

Returns:

Solubility of gas in brine (gwr) at given temperature, pressure, and salinity.

Return type:

float

solubility_gas_water(temperature: float, pressure: float) float

Calculate solubility of gas in pure water (gwr) at given temperature (C) and pressure (MPa).

Parameters:
  • temperature (float) – Temperature of water in C.

  • pressure – Pressure of water in MPa.

Returns:

Solubility of gas in pure water (gwr) at given temperature and pressure.

Return type:

float

velocity_brine(temperature: float, pressure: float, salinity: float, NaCl: float, KCl: float, CaCl2: float) float

Calculate velocity of brine at given temperature (C), pressure (MPa), salinity (ppm), NaCl (weight %), KCl (weight %), and CaCl2 (weight %).

Parameters:
  • temperature (float) – Temperature of brine in C.

  • pressure (float) – Pressure of brine in MPa.

  • salinity (float) – Salinity of brine (weight %).

  • NaCl (float) – Weight % of NaCl in brine.

  • KCl (float) – Weight % of KCl in brine.

  • CaCl2 (float) – Weight % of CaCl2 in brine.

Returns:

Velocity of brine at given temperature and pressure.

Return type:

float

velocity_water(temperature: float, pressure: float) float

Calculate velcity of pure water at given temperature (C) and pressure (MPa).

Parameters:
  • temperature (float) – Temperature of water in C.

  • pressure (float) – Pressure of water in MPa.

Returns:

Velocity of pure water at given temperature and pressure.

Return type:

float

velocity_water_CO2(temperature: float, pressure: float, gwr: float) float

Calculate velocity of water+CO2 at given temperature (C), pressure (MPa), gwr (L/L).

Parameters:
  • temperature (float) – Temperature of brine in C.

  • pressure (float) – Pressure of brine in MPa.

  • gwr (float) – Gas water ratio of CO2 to water.

Returns:

Velocity of water+CO2 at given temperature and pressure and gwr.

Return type:

float

viscosity_brine(temperature: float, salinity: float) float

Calculate viscosity of brine at given temperature (C) and salinity (ppm).

Parameters:
  • temperature (float) – Temperature of brine in C.

  • salinity – Salinity of brine in ppm.

Returns:

Viscosity of brine at given temperature and salinity.

Return type:

float

viscosity_water(temperature: float) float

Calculate viscosity of water at given temperature (C).

Parameters:

temperature (float) – Temperature of water in C.

Returns:

Viscosity of water at given temperature.

Return type:

float