ttim.linesink#
Classes#
LineSink Base Class. |
|
LineSink with non-zero and potentially variable discharge through time. |
|
Create a head-specified line-sink with optional width and resistance. |
|
Helper class that provides a standard way to create an ABC using |
|
String of head-specified line-sinks with optional width and resistance. |
|
MscreenLineSink that varies through time. |
|
Create ditch consisting of a string of line-sink. |
|
Create ditch consisting of a string of line-sink. |
|
Higher Order LineSink Base Class. |
|
HeadLineSink of which the head varies through time. |
Module Contents#
- class ttim.linesink.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)[source]#
Bases:
ttim.element.ElementLineSink Base Class.
All LineSink elements are derived from this class
- nparam#
- x1#
- y1#
- x2#
- y2#
- res#
- wh = 'H'#
- initialize()[source]#
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
- class ttim.linesink.LineSink(model, x1=-1, y1=0, x2=1, y2=0, tsandQ=[(0, 1)], res=0, wh='H', layers=0, label=None, addtomodel=True)[source]#
Bases:
LineSinkBaseLineSink with non-zero and potentially variable discharge through time.
Really only used for testing.
- class ttim.linesink.HeadLineSink(model, x1=-1, y1=0, x2=1, y2=0, tsandh=[(0, 1)], res=0, wh='H', layers=0, label=None, addtomodel=True)[source]#
Bases:
LineSinkBase,ttim.equation.HeadEquationCreate a head-specified line-sink with optional width and resistance.
Inflow per unit length of line-sink is computed as:
\[\sigma = w(h_{aq} - h_{ls})/c\]where \(c\) is the resistance of the bottom of the line-sink, \(w\) is the width over which water enters the line-sink, \(h_{aq}\) is the head in the aquifer at the center of the line-sink, \(h_{ls}\) is the specified head inside the line-sink Note that all that matters is the conductance term \(w/c\) but both are specified separately
- Parameters:
model (Model object) – Model to which the element is added
x1 (scalar) – x-coordinate of fist point of line-sink
y1 (scalar) – y-coordinate of fist point of line-sink
x2 (scalar) – x-coordinate of second point of line-sink
y2 (scalar) – y-coordinate of second point of line-sink
tsandh (list or 2D array of (time, head) values or string) – 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
res (scalar (default is 0)) – resistance of line-sink
wh (scalar or str) – 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
layers (scalar, list or array) – 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
label (str or None) – label of element
See also
- nunknowns#
- initialize()[source]#
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
- class ttim.linesink.LineSinkStringBase(model, tsandbc=[(0, 1)], layers=0, type='', name='LineSinkStringBase', label=None)[source]#
Bases:
ttim.element.ElementHelper class that provides a standard way to create an ABC using inheritance.
- lslist = []#
- initialize()[source]#
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
- headinside(t, derivative=0)[source]#
The head inside the line-sink string.
- Parameters:
t (array or float) – time(s) for whih head is computed
- Returns:
Head inside the line-sink for each line-sink, each layer that the line-sink is screened in, and each time
- Return type:
array size nline-sinks, nlayers, ntimes
- run_after_solve()[source]#
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.
- discharge_list(t, derivative=0)[source]#
The discharge of each line-sink in the string.
- Parameters:
t (array or float) – time(s) for whih discharge is computed
- Returns:
Discharge for each line-sink, each layer that the line-sink is screened in, and each time
- Return type:
array size nline-sinks, nlayers, ntimes
- class ttim.linesink.HeadLineSinkString(model, xy=[(-1, 0), (1, 0)], tsandh=[(0, 1)], res=0, wh='H', layers=0, label=None)[source]#
Bases:
LineSinkStringBase,ttim.equation.HeadEquationString of head-specified line-sinks with optional width and resistance.
Inflow per unit length of line-sink is computed as:
\[\sigma = w(h_{aq} - h_{ls})/c\]where \(c\) is the resistance of the bottom of the line-sink, \(w\) is the width over which water enters the line-sink, \(h_{aq}\) is the head in the aquifer at the center of the line-sink, \(h_{ls}\) is the specified head inside the line-sink Note that all that matters is the conductance term \(w/c\) but both are specified separately
- Parameters:
model (Model object) – Model to which the element is added
xy (array or list) – list or array of (x,y) pairs of coordinates of end-points of line-sinks in string
tsandh (list or 2D array of (time, head) values or string) – 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
res (scalar (default is 0)) – resistance of line-sink
wh (scalar or str) – 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
layers (scalar, list or array) – 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
label (str or None) – label of element
See also
- x#
- y#
- nls#
- tsandh = [(0, 1)]#
- res#
- wh = 'H'#
- initialize()[source]#
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
- class ttim.linesink.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)[source]#
Bases:
LineSinkBase,ttim.equation.MscreenEquationMscreenLineSink that varies through time.
Must be screened in multiple layers but heads are same in all screened layers
- nunknowns#
- vres#
- wv = 1.0#
- initialize()[source]#
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
- class ttim.linesink.LineSinkDitchString(model, xy=[(-1, 0), (1, 0)], tsandQ=[(0, 1)], res=0, wh='H', layers=0, Astorage=None, label=None)[source]#
Bases:
LineSinkStringBase,ttim.equation.MscreenDitchEquationCreate 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:
\[\sigma = w(h_{aq} - h_{ls})/c\]where \(c\) is the resistance of the bottom of the line-sink, \(w\) is the width over which water enters the line-sink, \(h_{aq}\) is the head in the aquifer at the center of the line-sink, \(h_{ls}\) is the specified head inside the line-sink Note that all that matters is the conductance term \(w/c\) but both are specified separately
- Parameters:
model (Model object) – Model to which the element is added
xy (array or list) – list or array of (x,y) pairs of coordinates of end-points of line-sinks in string
tsandQ (list or 2D array of (time, discharge) values) – if list or 2D array: pairs of time and discharge after that time
res (scalar (default is 0)) – resistance of line-sink
wh (scalar or str) – 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
layers (scalar, list or array) – 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
label (str or None) – label of element
- nls#
- Astorage = None#
- initialize()[source]#
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
- class ttim.linesink.LineSinkDitchString2(model, xy=[(-1, 0), (1, 0)], tsandQ=[(0, 1)], res=0, wh='H', layers=0, Astorage=None, label=None)[source]#
Bases:
LineSinkStringBase,ttim.equation.MscreenDitchEquationCreate 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:
\[\sigma = w(h_{aq} - h_{ls})/c\]where \(c\) is the resistance of the bottom of the line-sink, \(w\) is the width over which water enters the line-sink, \(h_{aq}\) is the head in the aquifer at the center of the line-sink, \(h_{ls}\) is the specified head inside the line-sink Note that all that matters is the conductance term \(w/c\) but both are specified separately
- Parameters:
model (Model object) – Model to which the element is added
xy (array or list) – list or array of (x,y) pairs of coordinates of end-points of line-sinks in string
tsandQ (list or 2D array of (time, discharge) values) – if list or 2D array: pairs of time and discharge after that time
res (scalar (default is 0)) – resistance of line-sink
wh (scalar or str) – 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
layers (scalar, list or array) – 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
label (str or None) – label of element
- nls#
- Astorage = None#
- initialize()[source]#
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
- class ttim.linesink.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)[source]#
Bases:
ttim.element.ElementHigher Order LineSink Base Class.
All Higher Order Line Sink elements are derived from this class
- order = 0#
- nparam#
- x1#
- y1#
- x2#
- y2#
- res = 0.0#
- wh = 'H'#
- initialize()[source]#
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
- class ttim.linesink.HeadLineSinkHo(model, x1=-1, y1=0, x2=1, y2=0, tsandh=[(0.0, 1.0)], order=0, layers=0, label=None, addtomodel=True)[source]#
Bases:
LineSinkHoBase,ttim.equation.HeadEquationNoresHeadLineSink of which the head varies through time.
May be screened in multiple layers but all with the same head
- nunknowns#
- initialize()[source]#
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