Xsection#
- class timflow.transient.inhom1d.Xsection(model, x1, x2, kaq, z, Haq, Hll, c, Saq, Sll, leffaq, poraq, porll, ltype, topboundary, phreatictop, tsandhstar, tsandN, kzoverkh=None, model3d=False, name=None)#
Bases:
timflow.transient.aquifer.AquiferDataBase class for a cross-section inhomogeneity.
- Parameters:
model (Model) – Model to add the cross-section to, usually an instance of ModelXsection.
x1 (float) – x-coordinate of the left boundary of the cross-section.
x2 (float) – x-coordinate of the right boundary of the cross-section.
kaq (array) – Hydraulic conductivities of the aquifers.
z (array) – Elevations of the tops and bottoms of the layers.
Haq (array) – Thicknesses of the aquifers.
Hll (array) – Thicknesses of the leaky layers.
c (array) – Resistance of the leaky layers.
Saq (array) – Specific storage of the aquifers.
Sll (array) – Specific storage of the leaky layers.
leffaq (array) – loading efficiency of the aquifer
poraq (array) – Porosities of the aquifers.
porll (array) – Porosities of the leaky layers.
ltype (array) – Type of each layer. ‘a’ for aquifer, ‘l’ for leaky layer.
topboundary (str) – Type of top boundary. Can be ‘conf’ for confined, ‘semi’ for semi-confined or “leaky” for a leaky top boundary.
phreatictop (bool) – If true, interpret the first specific storage coefficient as specific yield., i.e. it is not multiplied by aquifer thickness.
tsandhstar (list of tuples) – list containing time and water level pairs for the hstar boundary condition.
tsandN (list of tuples) – list containing time and infiltration pairs for the infiltration boundary condition.
kzoverkh (float, optional,) – anisotropy factor for vertical resistance, kzoverkh = kz / kh. Default is 1.
model3d (bool, optional) – Boolean indicating whether model is Model3D-type.
name (str) – Name of the cross-section inhomogeneity.
- is_inside(x, _)#
Check if a point is inside the cross-section.
- Parameters:
x (float) – x-coordinate of the point.
- Returns:
True if the point is inside the cross-section, False otherwise.
- Return type:
bool
- create_elements()#
Create linesinks to meet the continuity conditions the at the boundaries.
- plot(ax=None, labels: bool = False, params: bool = False, names: bool = False, fmt: str | None = None, sep: Literal[', ', '\n'] = ', ', units: dict = None, layer_names: tuple | dict = ('aquifer', 'leaky layer'), ha: str = 'center', **kwargs)#
Plot the cross-section.
- Parameters:
ax (plt.Axes, optional) – Axis to plot the cross-section on. If None, a new axis will be created.
labels (bool, optional) – If True, add layer-name labels.
params (bool, optional) – If True, add parameter labels.
names (bool, optional) – If True, add inhomogeneity names.
fmt (str, optional) – format string for parameter values, e.g. ‘.2f’ for 2 decimals.
sep (str, optional) – Separator between parameters, either “, “ or “n”
units (dict, optional) – Dictionary with units for parameters, only used if params is True. Use timflow parameter names as keys e.g. {“kaq”: “m/d”, “c”: “d”, “Saq”: “m$^{-1}$”, “Sll”: “m$^{-1}$”}.
layer_names (tuple or dict, optional) – names for aquifers and leaky layers, default is (‘aquifer’, ‘leaky layer’). If a dict is provided, it maps layer type and number to a name, e.g. {‘aquifer 0’: ‘top aquifer’, ‘leaky layer 1’: ‘clay layer’}
sep – Separator between parameters, either “, “ or “n”
ha (str, optional) – Horizontal alignment for parameter labels. Defaults to “center”.
- initialize()#
Initialize the aquifer data.
- eigval[naq, npval]#
Array with eigenvalues
- lab[naq, npval]#
Array with lambda values
- lab2[naq, nint, npint]#
Array with lambda values reorganized per interval
- eigvec[naq, naq, npval]#
Array with eigenvector matrices
- coef[naq, naq, npval]#
Array with coefficients coef[ilayers, :, np] are the coefficients if the element is in ilayers belonging to Laplace parameter number np.
- in_which_layer(z)#
Get layer given elevation z.
Returns -9999 if above top of system, +9999 if below bottom of system, negative for in leaky layer.
leaky layer -n is on top of aquifer n
- findlayer(z)#
Returns layer-number, layer-type and model-layer-number.