ttim ==== .. py:module:: ttim .. autoapi-nested-parse:: Copyright (C), 2017, Mark Bakker. TTim is a computer program for the simulation of transient multi-layer flow with analytic elements and consists of a library of Python scripts and FORTRAN extensions. Mark Bakker, Delft University of Technology mark dot bakker at tudelft dot nl. .. !! processed by numpydoc !! Submodules ---------- .. toctree:: :maxdepth: 1 /05api/ttim/aquifer/index /05api/ttim/aquifer_parameters/index /05api/ttim/besselnumba/index /05api/ttim/besselnumba_old/index /05api/ttim/besselnumba_total/index /05api/ttim/besselnumbanew/index /05api/ttim/circareasink/index /05api/ttim/circinhom/index /05api/ttim/element/index /05api/ttim/equation/index /05api/ttim/fit/index /05api/ttim/inhom1d/index /05api/ttim/invlapnumba/index /05api/ttim/kuhlman_invlap/index /05api/ttim/linedoublet/index /05api/ttim/linedoublet1d/index /05api/ttim/linesink/index /05api/ttim/linesink1d/index /05api/ttim/model/index /05api/ttim/plots/index /05api/ttim/stripareasink/index /05api/ttim/trace/index /05api/ttim/version/index /05api/ttim/well/index Attributes ---------- .. autoapisummary:: ttim.__name__ ttim.__author__ ttim.__version__ Classes ------- .. autoapisummary:: ttim.CircAreaSink ttim.Calibrate ttim.Xsection3D ttim.XsectionMaq ttim.LeakyLineDoublet ttim.LeakyLineDoubletString ttim.LeakyLineDoublet1D ttim.LineDoublet1DBase ttim.HeadLineSink ttim.HeadLineSinkHo ttim.HeadLineSinkString ttim.LineSink ttim.LineSinkDitchString ttim.DischargeLineSink1D ttim.FluxDiffLineSink1D ttim.HeadDiffLineSink1D ttim.HeadLineSink1D ttim.LineSink1D ttim.LineSink1DBase ttim.Model3D ttim.ModelMaq ttim.ModelXsection ttim.DischargeWell ttim.HeadWell ttim.Well ttim.WellTest Functions --------- .. autoapisummary:: ttim.timtrace ttim.timtraceline ttim.show_versions Package Contents ---------------- .. py:data:: __name__ :value: 'ttim' .. py:data:: __author__ :value: 'Mark Bakker' .. py:class:: CircAreaSink(model, xc=0, yc=0, R=0.1, tsandN=[(0, 1)], name='CircAreaSink', label=None) Bases: :py:obj:`ttim.element.Element` Create a circular area-sink with uniform infiltration rate in aquifer layer 0. Infiltration rate in length / time, positive for water entering the aquifer. :param model: model to which the element is added :type model: Model object :param xc: x-coordinate of center of area-sink :type xc: float :param yc: y-coordinate of center of area-sink :type yc: float :param R: :type R: radius of area-sink :param tsandN: tuples of starting time and infiltration rate after starting time :type tsandN: list of tuples :param label: label of the area-sink :type label: string or None (default: None) .. !! processed by numpydoc !! .. py:attribute:: xc .. py:attribute:: yc .. py:attribute:: R .. py:method:: __repr__() .. py:method:: initialize() Initialize the element. Initialization of terms that cannot be initialized before other elements or the aquifer is defined. As we don't want to require a certain order of entering elements, these terms are initialized when Model.solve is called The initialization class needs to be overloaded by all derived classes .. !! processed by numpydoc !! .. py:method:: setflowcoef() Separate function so that this can be overloaded for other types. .. !! processed by numpydoc !! .. py:method:: potinf(x, y, aq=None) Can be called with only one x,y value. .. !! processed by numpydoc !! .. py:method:: disvecinf(x, y, aq=None) Can be called with only one x,y value. .. !! processed by numpydoc !! .. py:method:: plot(ax=None) Plot the element. .. !! processed by numpydoc !! .. py:method:: K1RI0r(rin, iaq, ipint) .. py:method:: I1RK0r(rin, iaq, ipint) .. py:method:: K1RI1r(rin, iaq, ipint) .. py:method:: I1RK1r(rin, iaq, ipint) .. py:class:: Calibrate(model) .. py:attribute:: model .. py:attribute:: parameters .. py:attribute:: seriesdict .. py:attribute:: seriesinwelldict .. py:method:: set_parameter(name=None, layers=None, initial=0, pmin=-np.inf, pmax=np.inf, inhoms=None) Set parameter to be optimized. :param name: name can be 'kaq', 'Saq', 'c', 'Sll' or 'kzoverkh'. :type name: str :param layers: layer number(s) for which the parameter is set. If an integer is passed, parameter is associated with a single layer. If a list of layers is passed, layers must be consecutive and parameter is set for each layer from min(layers) up to and including max(layers). :type layers: int or list of ints :param initial: initial value for the parameter (the default is 0) :type initial: float, optional :param pmin: lower bound for parameter value (the default is -np.inf) :type pmin: float, optional :param pmax: upper bound for paramater value (the default is np.inf) :type pmax: float, optional :param inhoms: string with name of inhomogeneity, list with string names of inhomogeneities or list of inhomogeneities inhomogeneity(ies) for which the parameter is set. If a string is passed, parameter is associated with a single inhomogeneity. If a list of strings of inhomogeneities (or list of inhomogeneities) is passed, parameter is set for each inhomogeneity in the list. This allows linking of parameters across inhomogeneities. :type inhoms: str, list .. !! processed by numpydoc !! .. py:method:: set_parameter_by_reference(name=None, parameter=None, initial=0, pmin=-np.inf, pmax=np.inf) Set parameter to be optimized. :param name: parameter name :type name: str :param parameter: array reference containing the parameter to be optimized. must be specified as reference, i.e. w.rc[0:] :type parameter: np.array :param initial: initial value for the parameter (the default is 0) :type initial: float, optional :param pmin: lower bound for parameter value (the default is -np.inf) :type pmin: float, optional :param pmax: upper bound for paramater value (the default is np.inf) :type pmax: float, optional .. !! processed by numpydoc !! .. py:method:: series(name, x, y, layer, t, h, weights=None) Method to add observations to Calibration object. :param name: name of series :type name: str :param x: x-coordinate :type x: float :param y: y-coordinate :type y: float :param layer: layer number, 0-indexed :type layer: int :param t: array containing timestamps of timeseries :type t: np.array :param h: array containing timeseries values, i.e. head observations :type h: np.array .. !! processed by numpydoc !! .. py:method:: seriesinwell(name, element, t, h) Method to add observations to Calibration object. :param name: name of series :type name: str :param element: :type element: element object with headinside function :param t: array containing timestamps of timeseries :type t: np.array :param h: array containing timeseries values, i.e. head observations :type h: np.array .. !! processed by numpydoc !! .. py:method:: residuals(p, printdot=False, weighted=True, layers=None, series=None) Method to calculate residuals given certain parameters. :param p: array containing parameter values :type p: np.array :param printdot: print dot for each function call :type printdot: bool, optional :returns: array containing all residuals :rtype: np.array .. !! processed by numpydoc !! .. py:method:: residuals_lmfit(lmfitparams, printdot=False) .. py:method:: fit_least_squares(report=True, diff_step=0.0001, xtol=1e-08, method='lm') .. py:method:: fit_lmfit(report=False, printdot=True, **kwargs) .. py:method:: residuals_leastsq(logparams, printdot=False) .. py:method:: fit_leastsq(report=True, diff_step=0.0001, xtol=1e-08) .. py:method:: fit(report=False, printdot=True, **kwargs) .. py:method:: rmse(weighted=True, layers=None) Calculate root-mean-squared-error. :returns: return rmse value :rtype: float .. !! processed by numpydoc !! .. py:method:: topview(ax=None, layers=None, labels=True) Plot topview of model with calibration points. :param ax: axes to plot on (the default is None, which creates a new figure) :type ax: matplotlib.axes.Axes, optional .. !! processed by numpydoc !! .. py:method:: xsection(ax=None, labels=True) Plot cross-section of model with calibration points. :param ax: axes to plot on (the default is None, which creates a new figure) :type ax: matplotlib.axes.Axes, optional .. !! processed by numpydoc !! .. py:class:: Xsection3D(model, x1, x2, kaq=1, z=(4, 3, 2, 1), Saq=0.001, kzoverkh=0.1, poraq=0.3, topboundary='conf', phreatictop=False, topres=0, topthick=0, topSll=0, toppor=0.3, tsandhstar=None, tsandN=None, name=None) Bases: :py:obj:`Xsection` Cross-section inhomogeneity consisting of stacked aquifer layers. Vertical resistance is computed from vertical hydraulic conductivity and the anisotropy factor. :param model: Model to add the cross-section to, usually an instance of ModelXsection. :type model: Model :param x1: x-coordinate of the left boundary of the cross-section. :type x1: scalar :param x2: x-coordinate of the right boundary of the cross-section. :type x2: scalar :param kaq: Hydraulic conductivities of the aquifers. :type kaq: array :param z: Elevations of the tops and bottoms of the layers. :type z: array :param Saq: Specific storage of the aquifers. :type Saq: array :param kzoverkh: Ratio of vertical hydraulic conductivity to horizontal hydraulic conductivity. :type kzoverkh: scalar :param poraq: Porosities of the aquifers. :type poraq: array :param topboundary: Type of top boundary. Can be 'conf' for confined, 'semi' for semi-confined or "leaky" for a leaky top boundary. :type topboundary: str :param phreatictop: If true, interpret the first specific storage coefficient as specific yield., i.e. it is not multiplied by aquifer thickness. :type phreatictop: bool :param topres: Resistance of the top boundary. Only used if topboundary is 'leaky'. :type topres: scalar :param topthick: Thickness of the top boundary. Only used if topboundary is 'leaky'. :type topthick: scalar :param topSll: Specific storage of the top boundary. Only used if topboundary is 'leaky'. :type topSll: scalar :param toppor: Porosity of the top boundary. Only used if topboundary is 'leaky'. :type toppor: scalar :param tsandhstar: list containing time and water level pairs for the hstar boundary condition. :type tsandhstar: list of tuples :param tsandN: list containing time and infiltration pairs for the infiltration boundary condition. :type tsandN: list of tuples :param name: Name of the cross-section. :type name: str .. !! processed by numpydoc !! .. py:class:: XsectionMaq(model, x1, x2, kaq=1, z=(1, 0), c=(), Saq=0.001, Sll=0, poraq=0.3, porll=0.3, topboundary='conf', phreatictop=False, tsandhstar=None, tsandN=None, name=None) Bases: :py:obj:`Xsection` Cross-section inhomogeneity consisting of stacked aquifer layers. :param model: Model to add the cross-section to, usually an instance of ModelXsection. :type model: Model :param x1: x-coordinate of the left boundary of the cross-section. :type x1: float :param x2: x-coordinate of the right boundary of the cross-section. :type x2: float :param kaq: Hydraulic conductivities of the aquifers. :type kaq: array :param z: Elevations of the tops and bottoms of the layers. :type z: array :param c: Resistance of the leaky layers. :type c: array :param Saq: Specific storage of the aquifers. :type Saq: array :param Sll: Specific storage of the leaky layers. :type Sll: array :param poraq: Porosities of the aquifers. :type poraq: array :param porll: Porosities of the leaky layers. :type porll: array :param topboundary: Type of top boundary. Can be 'conf' for confined, 'semi' for semi-confined or "leaky" for a leaky top boundary. :type topboundary: str :param phreatictop: If true, interpret the first specific storage coefficient as specific yield., i.e. it is not multiplied by aquifer thickness. :type phreatictop: bool :param tsandhstar: list containing time and water level pairs for the hstar boundary condition. :type tsandhstar: list of tuples :param tsandN: list containing time and infiltration pairs for the infiltration boundary condition. :type tsandN: list of tuples :param name: Name of the cross-section. :type name: str .. !! processed by numpydoc !! .. py:class:: LeakyLineDoublet(model, x1=-1, y1=0, x2=1, y2=0, res='imp', order=0, layers=0, label=None, addtomodel=True) Bases: :py:obj:`LineDoubletHoBase`, :py:obj:`ttim.equation.LeakyWallEquation` Create a segment of a leaky wall, which is simulated with a line-doublet. The specific discharge through the wall is equal to the head difference across the wall divided by the resistance of the wall. :param model: Model to which the element is added :type model: Model object :param x1: x-coordinate of fist point of line-doublet :type x1: scalar :param y1: y-coordinate of fist point of line-doublet :type y1: scalar :param x2: x-coordinate of second point of line-doublet :type x2: scalar :param y2: y-coordinate of second point of line-doublet :type y2: scalar :param res: if string: 'imp' for an impermeable wall (same as res = np.inf) if scalar: resistance of leaky wall :type res: scalar or string :param order: polynomial order of potential jump along line-doublet (head jump if transmissivity is equal on each side of wall) :type order: int (default is 0) :param layers: layer(s) in which element is placed if scalar: element is placed in this layer if list or array: element is placed in all these layers :type layers: scalar, list or array :param label: label of element :type label: str or None .. seealso:: :class:`.LeakyLineDoubletString` .. !! processed by numpydoc !! .. py:attribute:: nunknowns .. py:method:: initialize() Initialize the element. Initialization of terms that cannot be initialized before other elements or the aquifer is defined. As we don't want to require a certain order of entering elements, these terms are initialized when Model.solve is called The initialization class needs to be overloaded by all derived classes .. !! processed by numpydoc !! .. py:class:: LeakyLineDoubletString(model, xy=[(-1, 0), (1, 0)], res='imp', order=0, layers=0, label=None) Bases: :py:obj:`ttim.element.Element`, :py:obj:`ttim.equation.LeakyWallEquation` Create a string of leaky wall segements consisting of line-doublets. :param model: Model to which the element is added :type model: Model object :param xy: list or array of (x,y) pairs of coordinates of end-points of the segements in the string :type xy: array or list :param res: if string: 'imp' for an impermeable wall (same as res = np.inf) if scalar: resistance of leaky wall :type res: scalar or string :param order: polynomial order of potential jump along line-doublet (head jump if transmissivity is equal on each side of wall) :type order: int (default is 0) :param layers: layer(s) in which element is placed if scalar: element is placed in this layer if list or array: element is placed in all these layers :type layers: scalar, list or array :param label: label of element :type label: str or None .. seealso:: :class:`.LeakyLineDoublet` .. !! processed by numpydoc !! .. py:attribute:: res :value: 'imp' .. py:attribute:: order :value: 0 .. py:attribute:: ldlist :value: [] .. py:attribute:: nld .. py:method:: __repr__() .. py:method:: initialize() Initialize the element. Initialization of terms that cannot be initialized before other elements or the aquifer is defined. As we don't want to require a certain order of entering elements, these terms are initialized when Model.solve is called The initialization class needs to be overloaded by all derived classes .. !! processed by numpydoc !! .. py:method:: potinf(x, y, aq=None) Returns array (nunknowns,nperiods). .. !! processed by numpydoc !! .. py:method:: disvecinf(x, y, aq=None) Returns array (nunknowns,nperiods). .. !! processed by numpydoc !! .. py:method:: plot(ax=None) Plot the element. .. !! processed by numpydoc !! .. py:class:: LeakyLineDoublet1D(model, xld=0, res='imp', layers=0, label=None) Bases: :py:obj:`LineDoublet1DBase`, :py:obj:`ttim.equation.LeakyWallEquation` Leaky line doublet with specified resistance. :param model: model to which the element is added :type model: Model object :param xld: x-coordinate of the line doublet :type xld: float :param res: resistance of the line doublet :type res: float :param layers: layer (int) or layers (list or array) in which line doublet is located :type layers: int, array or list :param label: label of the element :type label: string or None (default: None) .. !! processed by numpydoc !! .. py:attribute:: nunknowns .. py:method:: initialize() Initialize the element. Initialization of terms that cannot be initialized before other elements or the aquifer is defined. As we don't want to require a certain order of entering elements, these terms are initialized when Model.solve is called The initialization class needs to be overloaded by all derived classes .. !! processed by numpydoc !! .. py:class:: LineDoublet1DBase(model, xld=0, tsandbc=[(0, 0)], res='imp', layers=0, type='', name='LineDoublet1DBase', label=None) Bases: :py:obj:`ttim.element.Element` LineDoublet1D Base Class. All LineDoublet1D elements are derived from this class :param model: Model to which the element is added :type model: Model object :param xld: x-coordinate of the line doublet :type xld: float :param tsandbc: list of tuples of the form (time, bc) for boundary conditions :type tsandbc: list of tuples :param res: resistance of the line doublet :type res: float :param layers: layer (int) or layers (list or array) in which line doublet is located :type layers: int, array or list :param type: type of element, "g" for given, "v" for variable and "z" for zero. :type type: string :param name: name of the element :type name: string :param label: label of the element :type label: string, optional .. !! processed by numpydoc !! .. py:attribute:: tiny :value: 1e-08 .. py:attribute:: nparam .. py:attribute:: xld .. py:method:: __repr__() .. py:method:: initialize() Initialize the element. Initialization of terms that cannot be initialized before other elements or the aquifer is defined. As we don't want to require a certain order of entering elements, these terms are initialized when Model.solve is called The initialization class needs to be overloaded by all derived classes .. !! processed by numpydoc !! .. py:method:: setflowcoef() Separate function so that this can be overloaded for other types. .. !! processed by numpydoc !! .. py:method:: potinf(x, y=0, aq=None) Can be called with only one x value. .. !! processed by numpydoc !! .. py:method:: disvecinf(x, y=0, aq=None) Can be called with only one x value. .. !! processed by numpydoc !! .. py:method:: changetrace(xyzt1, xyzt2, aq, layer, ltype, modellayer, direction, hstepmax) :abstractmethod: .. py:method:: plot(ax=None) Plot the element. .. !! processed by numpydoc !! .. py:class:: HeadLineSink(model, x1=-1, y1=0, x2=1, y2=0, tsandh=[(0, 1)], res=0, wh='H', layers=0, label=None, addtomodel=True) Bases: :py:obj:`LineSinkBase`, :py:obj:`ttim.equation.HeadEquation` Create a head-specified line-sink with optional width and resistance. Inflow per unit length of line-sink is computed as: .. math:: \sigma = w(h_{aq} - h_{ls})/c where :math:`c` is the resistance of the bottom of the line-sink, :math:`w` is the width over which water enters the line-sink, :math:`h_{aq}` is the head in the aquifer at the center of the line-sink, :math:`h_{ls}` is the specified head inside the line-sink Note that all that matters is the conductance term :math:`w/c` but both are specified separately :param model: Model to which the element is added :type model: Model object :param x1: x-coordinate of fist point of line-sink :type x1: scalar :param y1: y-coordinate of fist point of line-sink :type y1: scalar :param x2: x-coordinate of second point of line-sink :type x2: scalar :param y2: y-coordinate of second point of line-sink :type y2: scalar :param tsandh: if list or 2D array: pairs of time and head after that time if 'fixed': head is fixed (no change in head) during entire simulation :type tsandh: list or 2D array of (time, head) values or string :param res: resistance of line-sink :type res: scalar (default is 0) :param wh: distance over which water enters line-sink if 'H': (default) distance is equal to the thickness of the aquifer layer (when flow comes mainly from one side) if '2H': distance is twice the thickness of the aquifer layer (when flow comes from both sides) if scalar: the width of the stream that partially penetrates the aquifer layer :type wh: scalar or str :param layers: layer(s) in which element is placed if scalar: element is placed in this layer if list or array: element is placed in all these layers :type layers: scalar, list or array :param label: label of element :type label: str or None .. seealso:: :class:`.HeadLineSinkString` .. !! processed by numpydoc !! .. py:attribute:: nunknowns .. py:method:: initialize() Initialize the element. Initialization of terms that cannot be initialized before other elements or the aquifer is defined. As we don't want to require a certain order of entering elements, these terms are initialized when Model.solve is called The initialization class needs to be overloaded by all derived classes .. !! processed by numpydoc !! .. py:class:: HeadLineSinkHo(model, x1=-1, y1=0, x2=1, y2=0, tsandh=[(0.0, 1.0)], order=0, layers=0, label=None, addtomodel=True) Bases: :py:obj:`LineSinkHoBase`, :py:obj:`ttim.equation.HeadEquationNores` HeadLineSink of which the head varies through time. May be screened in multiple layers but all with the same head .. !! processed by numpydoc !! .. py:attribute:: nunknowns .. py:method:: initialize() Initialize the element. Initialization of terms that cannot be initialized before other elements or the aquifer is defined. As we don't want to require a certain order of entering elements, these terms are initialized when Model.solve is called The initialization class needs to be overloaded by all derived classes .. !! processed by numpydoc !! .. py:class:: HeadLineSinkString(model, xy=[(-1, 0), (1, 0)], tsandh=[(0, 1)], res=0, wh='H', layers=0, label=None) Bases: :py:obj:`LineSinkStringBase`, :py:obj:`ttim.equation.HeadEquation` String of head-specified line-sinks with optional width and resistance. Inflow per unit length of line-sink is computed as: .. math:: \sigma = w(h_{aq} - h_{ls})/c where :math:`c` is the resistance of the bottom of the line-sink, :math:`w` is the width over which water enters the line-sink, :math:`h_{aq}` is the head in the aquifer at the center of the line-sink, :math:`h_{ls}` is the specified head inside the line-sink Note that all that matters is the conductance term :math:`w/c` but both are specified separately :param model: Model to which the element is added :type model: Model object :param xy: list or array of (x,y) pairs of coordinates of end-points of line-sinks in string :type xy: array or list :param tsandh: if list or 2D array: pairs of time and head after that time if 'fixed': head is fixed (no change in head) during entire simulation :type tsandh: list or 2D array of (time, head) values or string :param res: resistance of line-sink :type res: scalar (default is 0) :param wh: distance over which water enters line-sink if 'H': (default) distance is equal to the thickness of the aquifer layer (when flow comes mainly from one side) if '2H': distance is twice the thickness of the aquifer layer (when flow comes from both sides) if scalar: the width of the stream that partially penetrates the aquifer layer :type wh: scalar or str :param layers: layer(s) in which element is placed if scalar: element is placed in this layer if list or array: element is placed in all these layers :type layers: scalar, list or array :param label: label of element :type label: str or None .. seealso:: :class:`.HeadLineSink` .. !! processed by numpydoc !! .. py:attribute:: x .. py:attribute:: y .. py:attribute:: nls .. py:attribute:: tsandh :value: [(0, 1)] .. py:attribute:: res .. py:attribute:: wh :value: 'H' .. py:method:: initialize() Initialize the element. Initialization of terms that cannot be initialized before other elements or the aquifer is defined. As we don't want to require a certain order of entering elements, these terms are initialized when Model.solve is called The initialization class needs to be overloaded by all derived classes .. !! processed by numpydoc !! .. py:class:: LineSink(model, x1=-1, y1=0, x2=1, y2=0, tsandQ=[(0, 1)], res=0, wh='H', layers=0, label=None, addtomodel=True) Bases: :py:obj:`LineSinkBase` LineSink with non-zero and potentially variable discharge through time. Really only used for testing. .. !! processed by numpydoc !! .. py:class:: LineSinkDitchString(model, xy=[(-1, 0), (1, 0)], tsandQ=[(0, 1)], res=0, wh='H', layers=0, Astorage=None, label=None) Bases: :py:obj:`LineSinkStringBase`, :py:obj:`ttim.equation.MscreenDitchEquation` Create ditch consisting of a string of line-sink. The total discharge for the string is specified and divided over the line-sinks such that the head at the center inside each line-sink is equal. A width and resistance may optionally be specified. Inflow per unit length of line-sink is computed as: .. math:: \sigma = w(h_{aq} - h_{ls})/c where :math:`c` is the resistance of the bottom of the line-sink, :math:`w` is the width over which water enters the line-sink, :math:`h_{aq}` is the head in the aquifer at the center of the line-sink, :math:`h_{ls}` is the specified head inside the line-sink Note that all that matters is the conductance term :math:`w/c` but both are specified separately :param model: Model to which the element is added :type model: Model object :param xy: list or array of (x,y) pairs of coordinates of end-points of line-sinks in string :type xy: array or list :param tsandQ: if list or 2D array: pairs of time and discharge after that time :type tsandQ: list or 2D array of (time, discharge) values :param res: resistance of line-sink :type res: scalar (default is 0) :param wh: distance over which water enters line-sink if 'H': (default) distance is equal to the thickness of the aquifer layer (when flow comes mainly from one side) if '2H': distance is twice the thickness of the aquifer layer (when flow comes from both sides) if scalar: the width of the stream that partially penetrates the aquifer layer :type wh: scalar or str :param layers: layer(s) in which element is placed if scalar: element is placed in this layer if list or array: element is placed in all these layers :type layers: scalar, list or array :param label: label of element :type label: str or None .. !! processed by numpydoc !! .. py:attribute:: nls .. py:attribute:: Astorage :value: None .. py:method:: initialize() Initialize the element. Initialization of terms that cannot be initialized before other elements or the aquifer is defined. As we don't want to require a certain order of entering elements, these terms are initialized when Model.solve is called The initialization class needs to be overloaded by all derived classes .. !! processed by numpydoc !! .. py:class:: DischargeLineSink1D(model, xls=0, tsandq=[(0, 1)], res=0, wh='H', layers=0, label=None) Bases: :py:obj:`LineSink1DBase` Linesink1D with a specified discharge for each layer the linesink is in. :param model: model to which the element is added :type model: Model object :param x: x-coordinate of the linesink :type x: float :param tsandq: tuples of starting time and specific discharge after starting time :type tsandq: list of tuples :param res: resistance of the linesink :type res: float :param layers: layer (int) or layers (list or array) in which linesink is located :type layers: int, array or list :param label: label of the linesink :type label: string or None (default: None) .. rubric:: Examples Example of an infinitely long linesink that pumps with a specific discharge of 100 between times 10 and 50, with a specific discharge of 20 between times 50 and 200, and zero speficic discharge after time 200. >>> DischargeLineSink1D(ml, tsandq=[(10, 100), (50, 20), (200, 0)]) .. !! processed by numpydoc !! .. py:class:: FluxDiffLineSink1D(model, xls=0, layers=0, label=None, aq=None) Bases: :py:obj:`LineSink1DBase`, :py:obj:`ttim.equation.FluxDiffEquation` 1D flux-difference linesink element. Used to ensure continuity of flux in a cross-section model, e.g. at the boundary of an inhomogeneity. :param model: Model to which the element is added :type model: Model object :param xls: x-coordinate of the linesink :type xls: float :param layers: layer (int) or layers (list or array) in which linesink is located :type layers: int, array or list :param label: label of the element :type label: string, optional .. !! processed by numpydoc !! .. py:attribute:: nunknowns .. py:method:: initialize() Initialize the element. Initialization of terms that cannot be initialized before other elements or the aquifer is defined. As we don't want to require a certain order of entering elements, these terms are initialized when Model.solve is called The initialization class needs to be overloaded by all derived classes .. !! processed by numpydoc !! .. py:method:: plot(ax=None) Plot the element. .. !! processed by numpydoc !! .. py:class:: HeadDiffLineSink1D(model, xls=0, layers=0, label=None, aq=None) Bases: :py:obj:`LineSink1DBase`, :py:obj:`ttim.equation.HeadDiffEquation` 1D head-difference linesink element. Used to ensure continuity of head in a cross-section model, e.g. at the boundary of an inhomogeneity. :param model: Model to which the element is added :type model: Model object :param xls: x-coordinate of the linesink :type xls: float :param layers: layer (int) or layers (list or array) in which linesink is located :type layers: int, array or list :param label: label of the element :type label: string, optional :param aq: aquifer in which the element is located :type aq: Aquifer object .. !! processed by numpydoc !! .. py:attribute:: nunknowns .. py:method:: initialize() Initialize the element. Initialization of terms that cannot be initialized before other elements or the aquifer is defined. As we don't want to require a certain order of entering elements, these terms are initialized when Model.solve is called The initialization class needs to be overloaded by all derived classes .. !! processed by numpydoc !! .. py:method:: plot(ax=None) Plot the element. .. !! processed by numpydoc !! .. py:class:: HeadLineSink1D(model, xls=0, tsandh=[(0, 1)], res=0, wh='H', layers=0, label=None) Bases: :py:obj:`LineSink1DBase`, :py:obj:`ttim.equation.HeadEquation` 1D head-specified linesink element. :param model: Model to which the element is added :type model: Model object :param xls: x-coordinate of the linesink :type xls: float :param tsandh: list of tuples of the form (time, head) for head conditions :type tsandh: list of tuples :param res: resistance of the linesink :type res: float :param wh: wetted perimeter of the linesink, "H" for aquifer height, "2H" for 2x aquifer height (two-sided flow) or specify any float value :type wh: string or float :param layers: layer (int) or layers (list or array) in which linesink is located :type layers: int, array or list :param label: label of the element :type label: string, optional .. !! processed by numpydoc !! .. py:attribute:: nunknowns .. py:method:: initialize() Initialize the element. Initialization of terms that cannot be initialized before other elements or the aquifer is defined. As we don't want to require a certain order of entering elements, these terms are initialized when Model.solve is called The initialization class needs to be overloaded by all derived classes .. !! processed by numpydoc !! .. py:class:: LineSink1D(model, xls=0, tsandq=[(0, 1)], res=0, wh='H', vres=0.0, wv=1.0, layers=0, label=None) Bases: :py:obj:`LineSink1DBase`, :py:obj:`ttim.equation.MscreenEquation` Linesink1D with a specified discharge. :param model: model to which the element is added :type model: Model object :param x: x-coordinate of the linesink :type x: float :param tsandq: tuples of starting time and specific discharge after starting time :type tsandq: list of tuples :param res: resistance of the linesink :type res: float :param layers: layer (int) or layers (list or array) in which linesink is located :type layers: int, array or list :param label: label of the linesink :type label: string or None (default: None) .. rubric:: Examples Example of an infinitely long linesink that pumps with a specific discharge of 100 between times 10 and 50, with a specific discharge of 20 between times 50 and 200, and zero specific discharge after time 200. >>> LineSink1D(ml, tsandq=[(10, 100), (50, 20), (200, 0)]) .. !! processed by numpydoc !! .. py:attribute:: nunknowns .. py:attribute:: vres .. py:attribute:: wv :value: 1.0 .. py:method:: initialize() Initialize the element. Initialization of terms that cannot be initialized before other elements or the aquifer is defined. As we don't want to require a certain order of entering elements, these terms are initialized when Model.solve is called The initialization class needs to be overloaded by all derived classes .. !! processed by numpydoc !! .. py:class:: LineSink1DBase(model, xls=0, tsandbc=[(0, 1)], res=0, wh='H', layers=0, type='', name='LineSink1DBase', label=None, aq=None, inhomelement=False) Bases: :py:obj:`ttim.element.Element` LineSink1D Base Class. All LineSink1D elements are derived from this class :param model: Model to which the element is added :type model: Model object :param xls: x-coordinate of the line sink :type xls: float :param tsandbc: list of tuples of the form (time, bc) for boundary conditions :type tsandbc: list of tuples :param res: resistance of the line sink :type res: float :param wh: wetted perimeter of the linesink, "H" for aquifer height, "2H" for 2x aquifer height (two-sided flow) or specify any float value :type wh: string or float :param layers: layer (int) or layers (list or array) in which line sink is located :type layers: int, array or list :param type: type of element, "g" for given, "v" for variable and "z" for zero. :type type: string :param name: name of the element :type name: string :param label: label of the element :type label: string, optional :param aq: aquifer in which the element is located :type aq: Aquifer object :param inhomelement: set to True if element is part of an inhomogeneity :type inhomelement: boolean .. !! processed by numpydoc !! .. py:attribute:: tiny :value: 1e-08 .. py:attribute:: nparam .. py:attribute:: xls .. py:attribute:: res .. py:attribute:: wh :value: 'H' .. py:attribute:: aq :value: None .. py:method:: __repr__() .. py:method:: initialize() Initialize the element. Initialization of terms that cannot be initialized before other elements or the aquifer is defined. As we don't want to require a certain order of entering elements, these terms are initialized when Model.solve is called The initialization class needs to be overloaded by all derived classes .. !! processed by numpydoc !! .. py:method:: setflowcoef() Separate function so that this can be overloaded for other types. .. !! processed by numpydoc !! .. py:method:: potinf(x, y=0, aq=None) Can be called with only one x value. .. !! processed by numpydoc !! .. py:method:: disvecinf(x, y=0, aq=None) Can be called with only one x,y value. .. !! processed by numpydoc !! .. py:method:: changetrace(xyzt1, xyzt2, aq, layer, ltype, modellayer, direction, hstepmax) :abstractmethod: .. py:method:: plot(ax=None) Plot the element. .. !! processed by numpydoc !! .. py:class:: Model3D(kaq=1, z=[4, 3, 2, 1], Saq=0.001, kzoverkh=0.1, poraq=0.3, topboundary='conf', phreatictop=False, topres=0, topthick=0, topSll=0, toppor=0.3, tmin=1, tmax=10, tstart=0, M=10, timmlmodel=None) Bases: :py:obj:`TimModel` Create a multi-layer model object consisting of many aquifer layers. The resistance between the layers is computed from the vertical hydraulic conductivity of the layers. :param kaq: hydraulic conductivity of each layer from the top down if float, hydraulic conductivity is the same in all aquifers :type kaq: float, array or list :param z: elevation of top of system followed by bottoms of all layers from the top down bottom of layer is automatically equal to top of layer below it if topboundary='conf': length is number of layers + 1 if topboundary='semi': length is number of layers + 2 as top of leaky layer on top of systems needs to be specified :type z: array or list :param Saq: specific storage of all aquifers layers if float, sepcific storage is same in all aquifers layers if phreatictop is True and topboundary is 'conf', Saq of top aquifer is phreatic storage coefficient (and not multiplied with the layer thickness) :type Saq: float, array or list :param kzoverkh: vertical anisotropy ratio vertical k divided by horizontal k if float, value is the same for all layers length is number of layers :type kzoverkh: float :param topboundary: indicating whether the top is confined ('conf') or semi-confined ('semi'). currently only implemented for 'conf' :type topboundary: string, 'conf' or 'semi' (default is 'conf') :param topres: resistance of top semi-confining layer, only read if topboundary='semi' :type topres: float :param topthick: thickness of top semi-confining layer, only read if topboundary='semi' :type topthick: float :param phreatictop: the storage coefficient of the top aquifer layer is treated as phreatic storage (and not multiplied with the aquifer thickness) :type phreatictop: boolean :param tmin: the minimum time for which heads can be computed after any change in boundary condition. :type tmin: scalar :param tmax: the maximum time for which heads can be computed. :type tmax: scalar :param tstart: time at start of simulation (default 0) :type tstart: scalar :param M: the number of terms to be used in the numerical inversion algorithm. 10 is usually sufficient. If drawdown curves appear to oscillate, more terms may be needed, but this seldom happens. :type M: integer (default 10) :param timmlmodel: a timml model may be included to add steady-state flow :type timmlmodel: optional instance of a solved TimML model .. !! processed by numpydoc !! .. py:attribute:: name :value: 'Model3D' .. py:class:: ModelMaq(kaq=[1], z=[1, 0], c=[], Saq=[0.001], Sll=[0], poraq=[0.3], porll=[0.3], topboundary='conf', phreatictop=False, tmin=1, tmax=10, tstart=0, M=10, timmlmodel=None) Bases: :py:obj:`TimModel` Create model specifying a multi-aquifer sequence of aquifer-leakylayer-etc. :param kaq: hydraulic conductivity of each aquifer from the top down if float, hydraulic conductivity is the same in all aquifers :type kaq: float, array or list :param z: elevation tops and bottoms of the aquifers from the top down leaky layers may have zero thickness if top='conf': length is 2 * number of aquifers if top='semi': length is 2 * number of aquifers + 1 as top of leaky layer on top of systems needs to be specified :type z: array or list :param c: resistance of leaky layers from the top down if float, resistance is the same for all leaky layers if top='conf': length is number of aquifers - 1 if top='semi': length is number of aquifers :type c: float, array or list :param Saq: specific storage of all aquifers if float, sepcific storage is same in all aquifers if phreatictop is True and topboundary is 'conf', Saq of top aquifer is phreatic storage coefficient (and not multiplied with the layer thickness) :type Saq: float, array or list :param Sll: specific storage of all leaky layers if float, sepcific storage is same in all leaky layers if phreatictop is True and topboundary is 'semi', Sll of top leaky layer is phreatic storage coefficient (and not multiplied with the layer thickness) :type Sll: float, array or list :param topboundary: indicating whether the top is confined ('conf') or semi-confined ('semi') :type topboundary: string, 'conf' or 'semi' (default is 'conf') :param phreatictop: the storage coefficient of the top model layer is treated as phreatic storage (and not multiplied with the aquifer thickness) :type phreatictop: boolean :param tmin: the minimum time for which heads can be computed after any change in boundary condition. :type tmin: scalar :param tmax: the maximum time for which heads can be computed :type tmax: scalar :param tstart: time at start of simulation (default 0) :type tstart: scalar :param M: the number of terms to be used in the numerical inversion algorithm. 10 is usually sufficient. If drawdown curves appear to oscillate, more terms may be needed, but this seldom happens. :type M: integer :param timmlmodel: a timml model may be included to add steady-state flow :type timmlmodel: optional instance of a solved TimML model .. !! processed by numpydoc !! .. py:attribute:: name :value: 'ModelMaq' .. py:class:: ModelXsection(naq=1, tmin=1, tmax=10, tstart=0, M=10, timmlmodel=None) Bases: :py:obj:`TimModel` Model class for cross-section models. :param naq: number of aquifers :type naq: integer :param tmin: the minimum time for which heads can be computed after any change in boundary condition. :type tmin: float :param tmax: the maximum time for which heads can be computed. :type tmax: float :param tstart: time at start of simulation (default 0) :type tstart: float, optional :param M: the number of terms to be used in the numerical inversion algorithm. 10 is usually sufficient. :type M: integer, optional :param timmlmodel: a timml model may be included to add a steady-state flow result to the computed solution. :type timmlmodel: timml.Model .. !! processed by numpydoc !! .. py:attribute:: elementlist :value: [] .. py:attribute:: elementdict .. py:attribute:: vbclist :value: [] .. py:attribute:: zbclist :value: [] .. py:attribute:: gbclist :value: [] .. py:attribute:: tmin :value: 1 .. py:attribute:: tmax :value: 10 .. py:attribute:: tstart :value: 0 .. py:attribute:: M :value: 10 .. py:attribute:: aq .. py:attribute:: name :value: 'TimModel' .. py:attribute:: modelname :value: 'ml' .. py:attribute:: timmlmodel :value: None .. py:attribute:: plots .. py:attribute:: plot .. py:method:: check_inhoms() Check if number of aquifers in inhoms matches number of aquifers in model. .. !! processed by numpydoc !! .. py:method:: initialize() .. py:function:: timtrace(ml, xstart, ystart, zstart, tstartend, tstartoffset, tstep, nstepmax=100, hstepmax=10, silent=False, correctionstep=True) Compute a pathline by numerical integration of the velocity vector. Pathline is broken up in sections for which starting times are provided. Pathline is computed from first starting time + offset until second starting time, then continued from second starting time + offset until third starting time, etc. :param model: model :type model: Model object :param xstart: x-coordinate of starting location of pathline :type xstart: float :param ystart: y-coordinate of starting location of pathline :type ystart: float :param zstart: z-coordinate of starting location of pathline :type zstart: float :param tstartend: list of starting times of pathline. last entry is the ending time. :type tstartend: list :param tstartoffset: time after starting time when pathline is started. value or list. if this value is smaller than tmin it may cause problems after change in boundary conditions :type tstartoffset: float or list :param tstep: maximum time step for each step along pathline. Either one value for all sections, or list with values for each section. :type tstep: scalar or list :param nstepmax: maximum number of steps per section :type nstepmax: integer :param hstepmax: maximum length of horizontal step :type hstepmax: float or integer :param silent: parameter to indicate if message should be printed to the screen for each section of the pathline :type silent: boolean :param correctionstep: parameter to indicate if a correction step (Euler's method) should be taken. Taking a correction step is more accurate, especially for curved pathlines. :type correctionstep: boolean :returns: **result** -- * xyzt : 2D array with four columns: x, y, z, t along pathline * message : list with text messages of each section of the pathline * status : numerical indication of the result. Negative is likely undesirable. * -2 : reached maximum number of steps before reaching maximum time * -1 : starting z value not inside aquifer * +1 : reached maximum time * +2 : reached element * +3 : flows out of top of aquifer :rtype: dictionary with three items .. !! processed by numpydoc !! .. py:function:: timtraceline(ml, xstart, ystart, zstart, tstart, delt, tmax, nstepmax=100, hstepmax=10, correctionstep=True, silent=False) .. py:data:: __version__ :value: '0.8.0' .. py:function:: show_versions(optional=True) Print the version of dependencies. :param optional: Print the version of optional dependencies, by default False :type optional: bool, optional .. !! processed by numpydoc !! .. py:class:: DischargeWell(model, xw=0, yw=0, tsandQ=[(0, 1)], rw=0.1, res=0, layers=0, label=None) Bases: :py:obj:`WellBase` Well with a specified discharge for each layer that the well is screened in. This is not very common and is likely only used for testing and comparison with other codes. The discharge must be specified for each screened layer. The resistance of the screen may be specified. The head is computed such that the discharge :math:`Q_i` in layer :math:`i` is computed as .. math:: Q_i = 2\pi r_wH_i(h_i - h_w)/c where :math:`c` is the resistance of the well screen and :math:`h_w` is the head inside the well. :param model: model to which the element is added :type model: Model object :param xw: x-coordinate of the well :type xw: float :param yw: y-coordinate of the well :type yw: float :param tsandQ: tuples of starting time and discharge after starting time :type tsandQ: list of tuples :param rw: radius of the well :type rw: float :param res: resistance of the well screen :type res: float :param layers: layer (int) or layers (list or array) where well is screened :type layers: int, array or list :param label: label of the well :type label: string or None (default: None) .. rubric:: Examples Example of a well that pumps with a discharge of 100 between times 10 and 50, with a discharge of 20 between times 50 and 200, and zero discharge after time 200. >>> Well(ml, tsandQ=[(10, 100), (50, 20), (200, 0)]) .. !! processed by numpydoc !! .. py:class:: HeadWell(model, xw=0, yw=0, rw=0.1, tsandh=[(0, 1)], res=0, layers=0, label=None) Bases: :py:obj:`WellBase`, :py:obj:`ttim.equation.HeadEquation` Create a well with a specified head inside the well. The well may be screened in multiple layers. The resistance of the screen may be specified. The head is computed such that the discharge :math:`Q_i` in layer :math:`i` is computed as .. math:: Q_i = 2\pi r_wH_i(h_i - h_w)/c where :math:`c` is the resistance of the well screen and :math:`h_w` is the head inside the well. :param model: model to which the element is added :type model: Model object :param xw: x-coordinate of the well :type xw: float :param yw: y-coordinate of the well :type yw: float :param rw: radius of the well :type rw: float :param tsandh: tuples of starting time and discharge after starting time :type tsandh: list of tuples :param res: resistance of the well screen :type res: float :param layers: layer (int) or layers (list or array) where well is screened :type layers: int, array or list :param label: label of the well :type label: string (default: None) .. !! processed by numpydoc !! .. py:attribute:: nunknowns .. py:method:: initialize() Initialize the element. Initialization of terms that cannot be initialized before other elements or the aquifer is defined. As we don't want to require a certain order of entering elements, these terms are initialized when Model.solve is called The initialization class needs to be overloaded by all derived classes .. !! processed by numpydoc !! .. py:class:: Well(model, xw=0, yw=0, rw=0.1, tsandQ=[(0, 1)], res=0, rc=None, layers=0, wbstype='pumping', label=None) Bases: :py:obj:`WellBase`, :py:obj:`ttim.equation.WellBoreStorageEquation` Create a well with a specified discharge. The well may be screened in multiple layers. The discharge is distributed across the layers such that the head inside the well is the same in all screened layers. Wellbore storage and skin effect may be taken into account. The head is computed such that the discharge :math:`Q_i` in layer :math:`i` is computed as .. math:: Q_i = 2\pi r_wH_i(h_i - h_w)/c where :math:`c` is the resistance of the well screen and :math:`h_w` is the head inside the well. :param model: model to which the element is added :type model: Model object :param xw: x-coordinate of the well :type xw: float :param yw: y-coordinate of the well :type yw: float :param rw: radius of the well :type rw: float :param tsandQ: tuples of starting time and discharge after starting time :type tsandQ: list of tuples :param res: resistance of the well screen :type res: float :param rc: radius of the caisson, the pipe where the water table inside the well flucuates, which accounts for the wellbore storage :type rc: float :param layers: layer (int) or layers (list or array) where well is screened :type layers: int, array or list :param wbstype: 'pumping': Q is the discharge of the well 'slug': volume of water instantaneously taken out of the well :type wbstype: string :param label: label of the well :type label: string (default: None) .. !! processed by numpydoc !! .. py:attribute:: hdiff :value: None .. py:attribute:: nunknowns .. py:attribute:: wbstype :value: 'pumping' .. py:method:: initialize() Initialize the element. Initialization of terms that cannot be initialized before other elements or the aquifer is defined. As we don't want to require a certain order of entering elements, these terms are initialized when Model.solve is called The initialization class needs to be overloaded by all derived classes .. !! processed by numpydoc !! .. py:method:: setflowcoef() Separate function so that this can be overloaded for other types. .. !! processed by numpydoc !! .. py:class:: WellTest(model, xw=0, yw=0, tsandQ=[(0, 1)], rw=0.1, res=0, layers=0, label=None, fp=None) Bases: :py:obj:`WellBase` Well Base Class. All Well elements are derived from this class .. !! processed by numpydoc !! .. py:attribute:: fp :value: None .. py:method:: setflowcoef() Separate function so that this can be overloaded for other types. .. !! processed by numpydoc !!