Constant head elements#
This is the module that contains the constant head elements of the DFN.
Notes
This module contains the constant head classes.
- class andfn.const_head.ConstantHeadLine(label, endpoints0, head, frac0, ncoef=5, nint=10, **kwargs)[source]#
Bases:
Element
- __init__(label, endpoints0, head, frac0, ncoef=5, nint=10, **kwargs)[source]#
Constructor for the constant head line element.
- Parameters:
label (str) – The label of the constant head line
endpoints0 (np.ndarray[complex]) – The endpoints of the constant head line
head (float) – The head of the constant head line
frac0 (Fracture) – The fracture that the constant head line is associated with
ncoef (int) – The number of coefficients in the asymptotic expansion
nint (int) – The number of integration points in the asymptotic expansion
kwargs (dict) – Additional keyword arguments
- calc_omega(z)[source]#
Calculate the complex discharge potential for the constant head line.
- Parameters:
z (np.ndarray) – The points to calculate the complex discharge potential at
- Returns:
The complex discharge potential
- Return type:
np.ndarray
- calc_w(z)[source]#
Calculate the complex discharge vector for the constant head line.
- Parameters:
z (np.ndarray) – The points to calculate the complex discharge vector at
- Returns:
The complex discharge vector
- Return type:
np.ndarray
- check_boundary_condition(n=10)[source]#
Check if the constant head line satisfies the boundary conditions.
- Parameters:
n (int) – The number of points to check the boundary condition at
- Returns:
The error in the boundary condition
- Return type:
float
- check_chi_crossing(z0, z1, atol=1e-12)[source]#
Check the line between two points crosses the constant head line.
- Parameters:
z0 (complex) – The first point
z1 (complex) – The second point
atol (float) – The absolute tolerance for the check
- Returns:
The intersection point if it exists, otherwise False
- Return type:
complex | bool
- discharge_term(z)[source]#
Calculate the discharge term for the constant head line.
- Parameters:
z (np.ndarray) – The points to calculate the discharge term at
- Returns:
The discharge term
- Return type:
float
- length()[source]#
Calculate the length of the constant head line.
- Returns:
The length of the constant head line
- Return type:
float
- omega_along_element(n, frac_is)[source]#
Calculate the omega along the constant head line.
- 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:
The complex discharge potential along the constant head line
- Return type:
np.ndarray
- update_head(head)[source]#
Update the head of the constant head line.
- Parameters:
head (float) – The new head of the constant head line–