ttim.invlapnumba#
Functions#
|
Inverse Laplace tansform with algorithm of De Hoog, Knight and Stokes. |
|
|
|
Compute time domain solution for given laplace domain solution. |
|
Compute time domain solution for given Laplace domain solution. |
Module Contents#
- ttim.invlapnumba.invlap(t, tmax, fp, M, alpha=1e-10, tol=1e-09)[source]#
Inverse Laplace tansform with algorithm of De Hoog, Knight and Stokes.
- Parameters:
t (array) – times for which inverse is computed
tmax (float) – maximum time
fp (complex array) – Laplace transformed solution
M (integer) – number of terms (number of values of fp)
alpha (is the real part of the rightmost pole or singularity, which) – is chosen based on the desired accuracy (assuming the rightmost singularity is 0), and tol=10α is the desired tolerance
- Returns:
result (array) – time domain solution for specified times
Reference
———
de Hoog, F., J. Knight, A. Stokes (1982). An improved method for
numerical inversion of Laplace transforms. SIAM Journal of Scientific
and Statistical Computing 3 (357-366, http://dx.doi.org/10.1137/0903022)
https (//bitbucket.org/klkuhlm/invlap/src/default/invlap.py)
- ttim.invlapnumba.invlapcomp(time, pot, npint, M, tintervals, enumber, etstart, ebc, nlayers)[source]#
Compute time domain solution for given laplace domain solution.
- Parameters:
time (array, must be ordered) – times for which time domain solution is computed, must start at 0
pot (array of laplace domain solution conform the ttim shape)
npint (int) – number of p values per interval (=2M + 1)
M (int) – order of the approximation
tintervals (time intervals)
enumber (array with number of element)
etstart (array with starting time of bc in element)
ebc (array with boundary condition value of element)
nlayers (integer or None (default)) – number of layers
Notes
enumber, etstart, and ebc are used because numba cannot deal with a list of arrays of different lengths (makes sense, actually)
- Returns:
pot[naq, ntimes] if layers=None,
otherwise pot[len(layers) ,ntimes]
t must be ordered
- ttim.invlapnumba.invlapgen(time, pot, M, tintervals, tstart, ebc)[source]#
Compute time domain solution for given Laplace domain solution.
- Parameters:
time (array, must be ordered) – times for which time domain solution is computed, must start at 0
pot (1D array of laplace domain solution of length nint * (2M + 1))
M (int order of the approximation (i.e., (2M + 1) p values per interval))
tintervals (1D array of time intervals, length nint + 1)
tstart (1D array with starting times of bc in element, length nstart)
ebc (1D array with change in boundary condition value, length nstart)
Notes
ebc is the difference with the previous value
- Return type:
rv[ntimes]