Grid classes
- class grids.BasinGrid(gr=100, gd=21)
Bases:
objectSquare grid class with basin center at grid center.
The default BasinGrid object has radius gr=100 defining the square’s extent and grid density gd=21. An exception occurs if the grid radius is not positive. Grid density defines the numbers of rows and columns comprising the grid; thus, the default grid has 21 rows x 21 cols = 441 grid points. Minimum grid density is constrained to 11 (121 grid points) and maximum grid density is constrained to 41 (1681 grid points). Values for gd outside of these contraints are re-set to the minimum or maximum values as appropriate.
The .pts property returns the grid points attriubutes including local x-y coordinates and world x-y coordinates. The .info method displays grid information and the .draw method displays a plot of the grid in either local or world coordinates.
- Attributes:
- gr (float)Radius defining the extent of the solution grid (units L,
default 100.0).
- gd (int)Grid density defining the number of rows and columns;
minimum and maximum constraints are enforced (default 21).
- class RectBasin(cx=0.0, cy=0.0, lx=10, ly=10, rot=0, name='Rectangle basin')
Bases:
objectRectangular recharge basin class.
- Attributes:
cx (float) : Basin center x coordinate (units L, default 0.0). cy (float) : Basin center y coordinate (units L, default 0.0). lx (float) : Basin length in x direction (default 10.0) ly (float) : Basin length in y direction (default 10.0) rot (float) : Basin rotation angle in radians (default 0.0). name (str) : Basin name (default ‘Unnamed’).
- property area
float : Basin area.
- draw(dw=4)
Display a drawing of the basin.
- Args:
dw (float) : Width of basin drawing (default 4.0).
- info()
Print the basin information.
- is_circular = False
- is_rectangular = True
- property lx
float : Basin length in x direction.
Setter method checks for valid values and triggers an exception if invalid values are specified.
- property ly
float : Basin length in y direction.
Setter method checks for valid values and triggers an exception if invalid values are specified.
- property rot
float : Basin rotation angle in degrees.
Setter method checks for valid values and triggers an exception if invalid values are specified.
- property rot_rad
float : Basin rotation angle in radians.
- property verts
dict : x and y coordinates of basin verticies.
Vertex keys: ll - lower left, ul - upper left, lr - lower right and ur - upper right.
- property verts_rot
dict : x and y rotated coordinates of basin verticies.
Vertex keys: ll - lower left, ul - upper left, lr - lower right and ur - upper right.
- draw(local=False)
Draw the grid points.
- Args:
- local (bool)Display the grid plot in local coordinates with
the well at 0, 0 (default False).
- property gr
float : Grid radius.
Setter method checks for valid values and triggers an exception if invalid values are specified.
- property grdim
int : Number of grid rows and columns.
- info()
Print the basin grid information.
- property npts
int : Number of grid points.
- property pts
pandas dataframe : grid point attriubutes including local grid point coordinates and world grid point coordinates.
- class grids.SteadyWellGrid(gr=100, gd=21)
Bases:
objectSquare grid class with regular spacing and well at grid center.
The default SteadyWellGrid object has radius gr=100 defining the square’s extent and grid density gd=21. An exception occurs if the grid radius is not positive. Grid density defines the numbers of rows and columns comprising the grid; thus, the default grid has 21 rows x 21 cols = 441 grid points. Minimum grid density is limited to 11 (121 grid points) and maximum grid density is limited to 41 (1681 grid points). Values for gd outside of these contraints are re-set to the minimum or maximum values as appropriate.
The .pts property returns the grid points attriubutes including local x-y coordinates, world x-y coordinates and radius values relative to the well location. The .info method displays grid information and the .draw method displays a plot of the grid in either local or world coordinates.
- Attributes:
- gr (float)Radius defining the extent of the solution grid (units L,
default 100.0).
- gd (int)Grid density defining the number of rows and columns;
minimum and maximum constraints are enforced (default 21).
- class SteadyWell(x=0.0, y=0.0, r=0.05, q=0.0, pf=1, name='Steady state flowing well')
Bases:
objectSteady state flowing well class.
The default SteadyWell object has coordinates x=0.0 and y=0.0, well radius r=0.05, penetration fraction pf=1.0 and well rate q=0.0. Exceptions occur if invalid values are provided for r or pf. The well rate can be negative, positive or zero and is used to set the .state attribute as extract, inject or off.
- Attributes:
x (float) : Well x coordinate (units L, default 0.0). y (float) : Well y coordinate (units L, default 0.0). r (float) : Well radius (units L, default 0.05). q (float) : Well rate (units L3/T, default 0.0). pf (float) : Well penetration depth (fraction of aquifer depth,
default 1.0).
name (str) : Well name (default ‘’).
- info()
Print the well information.
- is_steady = True
- is_transient = False
- property pf
float : Well penetration depth.
Setter method checks for valid values and triggers an exception if invalid values are specified.
- property r
float : Well radius.
Setter method checks for valid values and triggers an exception if invalid values are specified.
- property state
str : Well state.
- draw(local=False)
Draw the grid points.
- Args:
- local (bool)Display the grid plot in local coordinates with
the well at 0, 0 (default False ).
- property gr
float : Grid radius.
Setter method checks for valid values and triggers an exception if invalid values are specified.
- property grdim
int : Number of grid rows and columns.
- info()
Print the well grid information.
- property npts
int : Number of grid points.
- property pts
pandas dataframe : grid point attriubutes including local grid point coordinates, world grid point coordinates and radius values of grid points relative to the well center.