ModelXsection#
- class timflow.transient.model.ModelXsection(naq=1, tmin=1, tmax=10, tstart=0, M=10, steady=None)#
Bases:
ModelModel class for cross-section models.
- Parameters:
naq (integer) – number of aquifers
tmin (float) – the minimum time for which heads can be computed after any change in boundary condition.
tmax (float) – the maximum time for which heads can be computed.
tstart (float, optional) – time at start of simulation (default 0)
M (integer, optional) – the number of terms to be used in the numerical inversion algorithm. 10 is usually sufficient.
steady (timflow.steady.Model) – a timflow.steady model may be included to add a steady-state flow result to the computed solution.
Notes
A ModelXsection may consist of an arbitrary number of Xsection3D or XsectionMaq sections. The combined domain of all sections must span from $x = -infty$ to $x = +infty$, with no gaps.
- check_inhoms()#
Check inhoms.
Checks that the number of aquifers in each inhomogeneity matches the number of aquifers in the model, and whether the inhoms span from -inf to inf.
- check_elements()#
Check elements.
Checks that no elements are located exactly on the boundaries between inhomogeneities.
- compute_laplace_parameters()#
Compute the parameters for the Laplace transform inversion.
- nint#
- Type:
Number of time intervals
- npint#
- Type:
Number of p values per interval
- npval#
- Type:
Total number of p values (nint * npint)
- p[npval]#
- Type:
Array with p values
- potential(x, y, t, layers=None, aq=None, derivative=0, returnphi=0)#
Returns pot[naq, ntimes] if layers=None, otherwise pot[len(layers), ntimes].
t must be ordered.
- potentialone(x, y, time, layers=None, aq=None, derivative=0, returnphi=0)#
Returns pot[naq] if layers=None, otherwise pot[len(layers)].
time is one value.
- disvec(x, y, t, layers=None, aq=None, derivative=0)#
Compute discharge vectgor.
Returns qx[naq, ntimes], qy[naq, ntimes] if layers=None, otherwise qx[len(layers,Ntimes)],qy[len(layers, ntimes)].
t must be ordered.
- head(x, y, t, layers=None, aq=None, derivative=0, neglect_steady=False)#
Head at x, y, t where t can be multiple times.
- Parameters:
x (float)
y (float)
t (list or array) – times for which grid is returned
layers (integer, list or array, optional) – layers for which grid is returned if None: all layers are returned
- Returns:
h
- Return type:
array size nlayers, ntimes
- velocity_array(x, y, z, t, show_progress=True, parallel=False)#
Compute velocity for an array of points.
- Parameters:
x (1d-array) – x values
y (1d-array) – y values
z (1d-array) – z values
t (float) – time at which velocity computed
show_progress (bool, optional) – if True, shows progress bar when computing velocity grid, by default True
parallel (bool or int, optional) – if True, computes velocity grid in parallel using multiprocessing, by default False. If an integer is provided, it specifies the number of processes to use.
- Returns:
velocity – velocity vector (vx, vy, vz) at each point in grid, size (3, len(x))
- Return type:
array
- velocity_grid(xg, yg, zg, t, show_progress=True, parallel=False)#
Compute velocity grid.
- Parameters:
xg (1d-array) – x values of grid
yg (1d-array) – y values of grid
zg (1d-array) – z values of grid
t (float) – time for which grid is returned
show_progress (bool, optional) – if True, shows progress bar when computing velocity grid, by default True
parallel (bool or int, optional) – if True, computes velocity grid in parallel using multiprocessing, by default False. If an integer is provided, it specifies the number of processes to use.
- Returns:
velocity – velocity vector (vx, vy, vz) at each point in grid, size (3, len(z), len(y), len(x))
- Return type:
array
- headalongline(x, y, t, layers=None)#
Head along line or curve.
- Parameters:
x (1D array or list) – x values of line
y (1D array or list) – y values of line
t (float or 1D array or list) – times for which grid is returned
layers (integer, list or array, optional) – layers for which grid is returned
- Returns:
h
- Return type:
array size nlayers, ntimes, nx
- disvecalongline(x, y, t, layers=None)#
Discharge vector along line or curve.
- Parameters:
x (1D array or list) – x values of line
y (1D array or list) – y values of line
t (float or 1D array or list) – times for which grid is returned
layers (integer, list or array, optional) – layers for which grid is returned
- Returns:
q
- Return type:
array size nlayers, ntimes, nx
- head_array(x, y, t, layers=None, show_progress=False, parallel=False)#
Head for array of points.
- Parameters:
x (1D array or list) – x values of points
y (1D array or list) – y values of points
t (float or 1D array or list) – times for which grid is returned
layers (integer, list or array, optional) – layers for which grid is returned
show_progress (bool) – show computation progress, by printing dots per row or with tqdm progressbar when parallel is True. Default is False.
parallel (bool or int, optional) – if True, computes head_array in parallel using multiprocessing, by default False. If an integer is provided, it specifies the number of processes to use.
- Returns:
h
- Return type:
array size nlayers, ntimes, npoints
- headgrid(xg, yg, t, layers=None, printrow=False, show_progress=False, parallel=False)#
Grid of heads.
- Parameters:
xg (array) – x values of grid
yg (array) – y values of grid
t (list or array) – times for which grid is returned
layers (integer, list or array, optional) – layers for which grid is returned
show_progress (bool) – show computation progress, by printing dots per row or with tqdm progressbar when parallel is True. Default is False.
parallel (bool or int, optional) – if True, computes headgrid in parallel using multithreading, by default False. If an integer is provided, it specifies the number of processes to use.
printrow (bool, optional) –
Deprecated since version 0.2.0: prints dot to screen for each row of grid if set to True
- Returns:
h
- Return type:
array size nlayers, ntimes, ny, nx
See also
headgrid2()
- headgrid2(x1, x2, nx, y1, y2, ny, t, layers=None, show_progress=False, printrow=False, parallel=False)#
Grid of heads.
- Parameters:
xg (array) – x values are generated as linspace(x1, x2, nx)
yg (array) – y values are generated as linspace(y1, y2, ny)
t (list or array) – times for which grid is returned
layers (integer, list or array, optional) – layers for which grid is returned
show_progress (bool) – show computation progress, by printing dots per row or with tqdm progressbar when parallel is True. Default is False.
parallel (bool or int, optional) – if True, computes headgrid in parallel using multiprocessing, by default False. If an integer is provided, it specifies the number of processes to use.
printrow (boolean, optional) –
Deprecated since version 0.2.0: prints dot to screen for each row of grid if set to True
- Returns:
h
- Return type:
array size nlayers, ntimes, ny, nx
See also
headgrid()
- disvecgrid(x, y, t, layers=None, show_progress=True, parallel=False)#
Compute grid of discharge vectors.
- Parameters:
x (array) – x values of grid
y (array) – y values of grid
t (list or array) – times for which grid is returned
layers (integer, list or array, optional) – layers for which grid is returned
show_progress (bool) – show computation progress, by printing dots per row or with tqdm progressbar when parallel is True. Default is True.
parallel (bool, optional) – if True, computes discharge vector grid in parallel using multiprocessing, by default False
- Returns:
qx (array size (nlayers, ntimes, ny, nx)) – x component of discharge vector at each point in grid
qy (array size (nlayers, ntimes, ny, nx)) – y component of discharge vector at each point in grid
- inverseLapTran(pot, t)#
Returns array of potentials of len(t) t must be ordered and tmin<=t<=tmax.
- solve(printmat=0, sendback=0, silent=False)#
Compute solution.
- aquifer_summary()#
Return DataFrame with summary of aquifer(s) parameters in model.
- Returns:
dataframe with summary of aquifer(s) parameters
- Return type:
pandas.DataFrame