trace#
Particle tracing utilities.
Implements pathline tracing for capture zone visualization.
Functions#
|
Function to trace one pathline. |
|
Deprecated alias for |
|
Function to trace multiple pathlines. |
|
Deprecated alias for |
Module Contents#
- traceline(ml, xstart, ystart, zstart, hstepmax, vstepfrac=0.2, tmax=1000000000000.0, nstepmax=100, win=None, silent=False)[source]#
Function to trace one pathline.
- Parameters:
ml (Model object) – model to which the element is added
xstart (scalar) – x-coordinate of starting location
ystart (scalar) – y-coordinate of starting location
zstart (scalar) – z-coordinate of starting location
hstepmax (scalar) – maximum horizontal step size [L]
vstepfrac (scalar) – maximum vertical step as fraction of layer thickness
tmax (scalar) – maximum travel time
nstepmax (int) – maximum number of steps
win (list) – list with [xmin, xmax, ymin, ymax]
silent (string) – if ‘.’, prints dot upon completion of each traceline
- Returns:
Result dictionary with keys:
trace: np.array of(x, y, z, t)along the pathmessage: termination messagecomplete: whether tracing stopped at a terminal conditiontotal_travel_time: final time in the tracelayers: model layer index for each trace segment / step
- Return type:
dict
- timtraceline(ml, xstart, ystart, zstart, hstepmax, vstepfrac=0.2, tmax=1000000000000.0, nstepmax=100, win=None, silent=False, returnlayers=False, *, metadata=False)[source]#
Deprecated alias for
traceline().Deprecated since version Use:
traceline()instead. This function will be removed in a future version. It returns only thetracearray, or(trace, layers)whenreturnlayersis True (not the full dict).
- tracelines(ml, xstart, ystart, zstart, hstepmax, vstepfrac=0.2, tmax=1000000000000.0, nstepmax=100, silent='.', win=None)[source]#
Function to trace multiple pathlines.
- Parameters:
ml (Model object) – model to which the element is added
xstart (array) – x-coordinates of starting locations
ystart (array) – y-coordinates of starting locations
zstart (array) – z-coordinates of starting locations
hstepmax (scalar) – maximum horizontal step size [L]
vstepfrac (scalar) – maximum vertical step as fraction of layer thickness
tmax (scalar) – maximum travel time
nstepmax (int) – maximum number of steps
silent (string) – if ‘.’, prints dot upon completion of each traceline
win (list) – list with [xmin, xmax, ymin, ymax]
- Returns:
One result dict per starting point, in the same form as
traceline()(each dict always includes alayersentry).- Return type:
list of dict
- timtracelines(ml, xstart, ystart, zstart, hstepmax, vstepfrac=0.2, tmax=1000000000000.0, nstepmax=100, silent='.', win=None, *, metadata=False, returnlayers=False)[source]#
Deprecated alias for
tracelines().Deprecated since version Use:
tracelines()instead. This function will be removed in a future version. It returns a list oftracearrays, or a list of(trace, layers)pairs whenreturnlayersis True (not result dicts).