Intersection#

This module contains the Intersection class. The Intersection class is used to create an Intersection object.

Notes

This module contains the intersection class.

class andfn.intersection.Intersection(label, endpoints0, endpoints1, frac0, frac1, ncoef=5, nint=10, **kwargs)[source]#

Bases: Element

__init__(label, endpoints0, endpoints1, frac0, frac1, ncoef=5, nint=10, **kwargs)[source]#

Constructor for the intersection element.

Parameters:
  • label (str) – The label of the intersection

  • endpoints0 (np.ndarray) – The endpoints of the first fracture that the intersection is associated with

  • endpoints1 (np.ndarray) – The endpoints of the second fracture that the intersection is associated with

  • frac0 (Fracture) – The first fracture that the intersection is associated with

  • frac1 (Fracture) – The second fracture that the intersection is associated with

  • ncoef (int) – The number of coefficients in the asymptotic expansion

  • nint (int) – The number of integration points in solver

  • kwargs (dict) – Additional keyword arguments

calc_omega(z, frac_is)[source]#

Calculate the complex potential for the intersection.

Parameters:
  • z (np.ndarray) – The points to calculate the complex potential at

  • frac_is (Fracture) – The fracture that the points are associated with

Returns:

omega – The complex discharge

Return type:

np.ndarray

calc_w(z, frac_is)[source]#

Calculate the complex discharge vector for the intersection.

Parameters:
  • z (np.ndarray) – The points to calculate the complex discharge vector at

  • frac_is (Fracture) – The fracture that the points are associated with

Returns:

w – The complex discharge vector

Return type:

np.ndarray

check_boundary_condition(n=10)[source]#

Check if the intersection satisfies the boundary conditions.

Parameters:

n (int) – The number of points to calculate the boundary condition at

Returns:

The error in the boundary condition

Return type:

float

check_chi_crossing(z0, z1, frac, atol=1e-12)[source]#

Check if the line between two points crosses the intersection.

Parameters:
  • z0 (complex) – The first point

  • z1 (complex) – The second point

  • frac (Fracture) – The fracture that the points are associated with

  • atol (float) – The absolute tolerance for the check

Returns:

The intersection point if it exists, otherwise False

Return type:

complex | bool

discharge_term(z, frac_is)[source]#

Calculate the discharge term for the intersection.

Parameters:
  • z (np.ndarray) – The points to calculate the discharge term at for the intersection

  • frac_is (Fracture) – The fracture that contains the points

Returns:

The discharge term

Return type:

float

length()[source]#

Calculate the length of the intersection

Returns:

length – The length of the intersection

Return type:

float

omega_along_element(n, frac_is)[source]#

Calculate the complex potential along the intersection.

Parameters:
  • n (int) – The number of points to calculate the omega at

  • frac_is (Fracture) – The fracture that the calculation is being done for

Returns:

omega – The complex discharge potential along the intersection

Return type:

np.ndarray

solve()[source]#

Solve the intersection.

z_array(n, frac_is)[source]#

Create an array of z points along the intersection.

Parameters:
  • n (int) – The number of points

  • frac_is (Fracture) – The fracture that the points are associated with

Returns:

z – The array of z points

Return type:

np.ndarray