fronts.inverse

fronts.inverse(o, S)

Solve the inverse problem.

Given a function S of r and t, and scalars \(S_i\), \(S_b\) and \(o_b\), finds a positive function D of the values of S such that:

\[\begin{split}\begin{cases} \dfrac{\partial S}{\partial t} = \dfrac{\partial}{\partial r}\left(D\left(S\right)\dfrac{\partial S} {\partial r}\right) & r>r_b(t),t>0\\ S(r, 0) = S_i & r>0 \\ S(r_b(t), t) = S_b & t>0 \\ r_b(t) = o_b\sqrt t \end{cases}\end{split}\]

S is input via its values on a finite 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 S is known, expressed in terms of the Boltzmann variable. Must be strictly increasing.

  • S (numpy.array_like, shape (n,)) – Values of the solution at o. Must be monotonic (either non-increasing or non-decreasing) and S[-1] must be \(S_i\).

Returns

D – Twice-differentiable function that maps the range of S to positive values. It can be called as D(S) to evaluate it at S. It can also be called as D(S, n) with n equal to 1 or 2, in which case the first n derivatives of the function evaluated at the same S are included (in order) as additional return values. While mathematically a scalar function, D operates in a vectorized fashion with the same semantics when S is a numpy.ndarray.

Return type

callable

See also

o()

Notes

An o(S) function is constructed by interpolating the input data with a PCHIP monotonic cubic spline. The function D is then constructed by applying the expressions that result from solving the Boltzmann-transformed equation for D.