Skip to content

Fluid Blending

digirock.WoodsFluid

A Fluid blending Model that uses Wood's Style Mixing

Attributes:

Name Type Description
name str

Name for switch

blend_keys list

Keys to use for blending

elements list

A list of elements

methods list

A list of methods that the Switch should implement to match the Elements.

n_elements int

The number of elements

check_vol_sum bool

Defaults to True, check volume fractions sum to 1.0

vol_frac_tol float

Apply an absolute tolerance 1.0 + vol_frac_tol to volume sum

bulk_modulus(self, props, **element_kwargs)

Return the density of the mixed fluid based upon the volume fraction.

The arguments passed to this function are the volume fractions of each fluid name to mix.

Volume fractions should sum to 1, pass a single fluid with value as None to set it as the complement.

Parameters:

Name Type Description Default
props Dict[str, Union[numpy.ndarray, float, int]]

dictionary of properties, must contain all keys in blend_keys.

required
element_kwargs

kwargs to pass to elements

{}

density(self, props, **element_kwargs)

Return the density of the mixed fluid based upon the volume fraction.

The arguments passed to this function are the volume fractions of each fluid name to mix.

Volume fractions should sum to 1, pass a single fluid with value as None to set it as the complement.

Parameters:

Name Type Description Default
props Dict[str, Union[numpy.ndarray, float, int]]

dictionary of properties, must contain all keys in blend_keys.

required
element_kwargs

kwargs to pass to elements

{}

shear_modulus(self, props, **element_kwargs)

Return the density of the mixed fluid based upon the volume fraction.

The arguments passed to this function are the volume fractions of each fluid name to mix.

Always returns 0.0 (No Shear Modulus in fluids).

Parameters:

Name Type Description Default
props Dict[str, Union[numpy.ndarray, float, int]]

dictionary of properties, must contain all keys in blend_keys.

required
element_kwargs

kwargs to pass to elements

{}

velocity(self, props, **element_kwargs)

Return the compressional velocity of the mixed fluid based upon the volume fraction by calculating the density and bulk modulus:

\[ v_p = \sqrt{\frac{\kappa}{\rho_b}} \]

The arguments passed to this function are the volume fractions of each fluid name to mix.

Volume fractions should sum to 1, pass a single fluid with value as None to set it as the complement.

Parameters:

Name Type Description Default
props Dict[str, Union[numpy.ndarray, float, int]]

dictionary of properties, must contain all keys in blend_keys.

required
element_kwargs

kwargs to pass to elements

{}

vp(self, props, **kwargs)

Alias for velocity

vs(self, props, **kwargs)

Always returns 0

digirock.FluidSwitch

Class for fluid switching, e.g. when different fluid properties are needed in different PVT zones

Implements the following [Switch][digirock.Switch] methods:

  • density
  • bulk_modulus
  • shear_modulus
  • velocity

Attributes:

Name Type Description
name str

Name for switch

switch_key str

Key to use for switching

elements list

A list of elements

n_elements int

The number of elements