fronts.inverse¶

fronts.
inverse
(o, samples)¶ Extract D from samples of a solution.
Given a function \(\theta\) of r and t, and scalars \(\theta_i\), \(\theta_b\) and \(o_b\), finds a positive function D of the values of \(\theta\) such that:
\[\begin{split}\begin{cases} \dfrac{\partial\theta}{\partial t} = \dfrac{\partial}{\partial r}\left(D(\theta)\dfrac{\partial\theta} {\partial r}\right) & r>r_b(t),t>0\\ \theta(r, 0) = \theta_i & r>0 \\ \theta(r_b(t), t) = \theta_b & t>0 \\ r_b(t) = o_b\sqrt t \end{cases}\end{split}\]\(\theta\) is taken as its values on a discrete set of points expressed in terms of the Boltzmann variable. Problems in radial coordinates are not supported.
 Parameters
o (numpy.array_like, shape (n,)) – Points where \(\theta\) is known, expressed in terms of the Boltzmann variable. Must be strictly increasing.
samples (numpy.array_like, shape (n,)) – Values of \(\theta\) at o. Must be monotonic (either nonincreasing or nondecreasing) and
samples[1]
must be the initial value \(\theta_i\).
 Returns
D –
Function to evaluate \(D\) and its derivatives:
D(theta)
evaluates and returns \(D\) attheta
D(theta, 1)
returns both the value of \(D\) and its first derivative attheta
D(theta, 2)
returns the value of \(D\), its first derivative, and its second derivative attheta
In all cases, the argument
theta
may be a single float or a NumPy array.\(D\) is guaranteed to be continuous; however, its derivatives are not.
 Return type
callable
See also
Notes
An o function of \(\theta\) is constructed by interpolating the input data with a PCHIP monotonic cubic spline. The returned D uses the spline to evaluate the expressions that result from solving the Boltzmanntransformed equation for \(D\).