ttim.linesink ============= .. py:module:: ttim.linesink Classes ------- .. autoapisummary:: ttim.linesink.LineSinkBase ttim.linesink.LineSink ttim.linesink.HeadLineSink ttim.linesink.LineSinkStringBase ttim.linesink.HeadLineSinkString ttim.linesink.MscreenLineSink ttim.linesink.LineSinkDitchString ttim.linesink.LineSinkDitchString2 ttim.linesink.LineSinkHoBase ttim.linesink.HeadLineSinkHo Module Contents --------------- .. py:class:: LineSinkBase(model, x1=-1, y1=0, x2=1, y2=0, tsandbc=[(0, 1)], res=0, wh='H', layers=0, type='', name='LineSinkBase', label=None, addtomodel=True) Bases: :py:obj:`ttim.element.Element` LineSink Base Class. All LineSink elements are derived from this class .. !! processed by numpydoc !! .. py:attribute:: nparam .. py:attribute:: x1 .. py:attribute:: y1 .. py:attribute:: x2 .. py:attribute:: y2 .. py:attribute:: res .. py:attribute:: wh :value: 'H' .. 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:: headinside(t) The head inside the line-sink. :param t: time(s) for whih head is computed :type t: array or float :returns: Head inside the line-sink for each layer that the line-sink is screened in :rtype: array (length number of layers) .. !! processed by numpydoc !! .. py:method:: plot(ax=None) Plot the element. .. !! 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:: 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:: LineSinkStringBase(model, tsandbc=[(0, 1)], layers=0, type='', name='LineSinkStringBase', label=None) Bases: :py:obj:`ttim.element.Element` Helper class that provides a standard way to create an ABC using inheritance. .. !! processed by numpydoc !! .. py:attribute:: lslist :value: [] .. 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:: headinside(t, derivative=0) The head inside the line-sink string. :param t: time(s) for whih head is computed :type t: array or float :returns: Head inside the line-sink for each line-sink, each layer that the line-sink is screened in, and each time :rtype: array size nline-sinks, nlayers, ntimes .. !! processed by numpydoc !! .. py:method:: plot(ax) Plot the element. .. !! processed by numpydoc !! .. py:method:: run_after_solve() Function to run after a solution is completed. For most elements nothing needs to be done, but for strings of elements some arrays may need to be filled. .. !! processed by numpydoc !! .. py:method:: discharge_list(t, derivative=0) The discharge of each line-sink in the string. :param t: time(s) for whih discharge is computed :type t: array or float :returns: Discharge for each line-sink, each layer that the line-sink is screened in, and each time :rtype: array size nline-sinks, nlayers, ntimes .. !! 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:: MscreenLineSink(model, x1=-1, y1=0, x2=1, y2=0, tsandQ=[(0.0, 1.0)], res=0.0, wh='H', layers=[0, 1], vres=0.0, wv=1.0, label=None, addtomodel=True) Bases: :py:obj:`LineSinkBase`, :py:obj:`ttim.equation.MscreenEquation` MscreenLineSink that varies through time. Must be screened in multiple layers but heads are same in all screened layers .. !! 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:: 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:: LineSinkDitchString2(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:: LineSinkHoBase(model, x1=-1, y1=0, x2=1, y2=0, tsandbc=[(0.0, 1.0)], res=0.0, wh='H', order=0, layers=0, type='', name='LineSinkBase', label=None, addtomodel=True) Bases: :py:obj:`ttim.element.Element` Higher Order LineSink Base Class. All Higher Order Line Sink elements are derived from this class .. !! processed by numpydoc !! .. py:attribute:: order :value: 0 .. py:attribute:: nparam .. py:attribute:: x1 .. py:attribute:: y1 .. py:attribute:: x2 .. py:attribute:: y2 .. py:attribute:: res :value: 0.0 .. py:attribute:: wh :value: 'H' .. 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:: headinside(t) The head inside the line-sink. :returns: Head inside the well for each screen :rtype: array (length number of screens) .. !! processed by numpydoc !! .. py:method:: plot(ax=None) Plot the element. .. !! 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 !!